BPEL 大家帮忙看看哪儿有错误 郁闷很久了

<!-- AddTest BPEL Process [Generated by the Eclipse BPEL Designer] -->
<bpel:process name="AddTest"
         targetNamespace="http://AddTest"
         suppressJoinFailure="yes"
         xmlns:tns="http://AddTest"
         xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
         xmlns:ns="http://add">

    <!-- Import the client WSDL -->
    <bpel:import namespace="http://add" location="Add.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"&gt;&lt;/bpel:import>
    <bpel:import location="AddTestArtifacts.wsdl" namespace="http://AddTest"
        importType="http://schemas.xmlsoap.org/wsdl/" />
        
    <!-- ================================================================= -->        
    <!-- PARTNERLINKS                                                      -->
    <!-- List of services participating in this BPEL process               -->
    <!-- ================================================================= -->        
    <bpel:partnerLinks>
        <!-- The 'client' role represents the requester of this service. -->
        <bpel:partnerLink name="client"
                     partnerLinkType="tns:AddTest"
                     myRole="AddTestProvider"
                     />
       
        <bpel:partnerLink name="addPL" partnerLinkType="tns:AddPLT" partnerRole="AddProvide"></bpel:partnerLink>
    </bpel:partnerLinks>
 
    <!-- ================================================================= -->        
    <!-- VARIABLES                                                         -->
    <!-- List of messages and XML documents used within this BPEL process  -->
    <!-- ================================================================= -->        
    <bpel:variables>
        <!-- Reference to the message passed as input during initiation -->
        <bpel:variable name="input"
                  messageType="tns:AddTestRequestMessage"/>
                 
        <!--
          Reference to the message that will be returned to the requester
          -->
        <bpel:variable name="output"
                  messageType="tns:AddTestResponseMessage"/>
        <bpel:variable name="addPLResponse" messageType="ns:addMethodResponse"></bpel:variable>
        <bpel:variable name="addPLRequest" messageType="ns:addMethodRequest"></bpel:variable>
    </bpel:variables>

    <!-- ================================================================= -->        
    <!-- ORCHESTRATION LOGIC                                               -->
    <!-- Set of activities coordinating the flow of messages across the    -->
    <!-- services integrated within this business process                  -->
    <!-- ================================================================= -->        
    <bpel:sequence name="main"><!-- Receive input from requester.
             Note: This maps to operation defined in AddTest.wsdl
             -->
        <bpel:receive name="receiveInput" partnerLink="client" portType="tns:AddTest" operation="process" variable="input" createInstance="yes" />
       
        <!-- Generate reply to synchronous request -->
        <bpel:assign validate="no" name="Assign">

            <bpel:copy>
                <bpel:from>
                    <bpel:literal xml:space="preserve">
<impl:addMethod xmlns:impl="http://add" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<impl:a></impl:a>
<impl:b></impl:b>
</impl:addMethod>
</bpel:literal>
                </bpel:from>
                <bpel:to variable="addPLRequest" part="parameters"></bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="payload" variable="input">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:inputa]]></bpel:query>
                </bpel:from>
                <bpel:to part="parameters" variable="addPLRequest">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns:a]]></bpel:query>
                </bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="payload" variable="input">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:inputb]]></bpel:query>
                </bpel:from>
                <bpel:to part="parameters" variable="addPLRequest">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns:b]]></bpel:query>
                </bpel:to>
            </bpel:copy>
        </bpel:assign>
        <bpel:invoke name="Invoke" partnerLink="addPL" operation="addMethod" portType="ns:Add" inputVariable="addPLRequest" outputVariable="addPLResponse"></bpel:invoke>
    
        <bpel:assign validate="no" name="Assign1">
<bpel:copy>
            <bpel:from>
                <bpel:literal xml:space="preserve"><tns:AddTestResponse xmlns:tns="http://AddTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:result></tns:result>
</tns:AddTestResponse>
</bpel:literal>
            </bpel:from>
            <bpel:to variable="output" part="payload"></bpel:to>
        </bpel:copy>
        <bpel:copy>
            <bpel:from part="parameters" variable="addPLResponse"></bpel:from>
            <bpel:to part="payload" variable="output"></bpel:to>
        </bpel:copy>       
        </bpel:assign>
        <bpel:reply name="replyOutput" partnerLink="client" operation="process" portType="tns:AddTest" variable="output" />
    </bpel:sequence>
</bpel:process>

用的是eclipse的bpel designer, ode引擎。 运行的时候报
<faultstring xmlns:axis2ns3="http://docs.oasis-open.org/wsbpel/2.0/process/executable"&gt;axis2ns3:uninitializedVariable&lt;/faultstring>
错误,大家帮忙看看那里出问题了。。。

wsdl文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:tns="http://AddTest" xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:wsdl="http://add" name="AddTest" targetNamespace="http://AddTest" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     TYPE DEFINITION - List of types participating in this BPEL process
     The BPEL Designer will generate default request and response types
     but you can define or import any XML Schema type and use them as part
     of the message types.
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   
    <plnk:partnerLinkType name="AddPLT">
    <plnk:role name="AddProvide" portType="wsdl:Add"/>
  </plnk:partnerLinkType>
    <import location="Add.wsdl" namespace="http://add"/>
    <types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://AddTest">

            <element name="AddTestRequest">
                <complexType>
                    <sequence>
                        <element name="inputa" type="int"/>
                        <element name="inputb" type="int"/>
                    </sequence>
                </complexType>
            </element>

            <element name="AddTestResponse">
                <complexType>
                    <sequence>
                        <element name="result" type="int"/>
                    </sequence>
                </complexType>
            </element>
        </schema>
    </types>


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     MESSAGE TYPE DEFINITION - Definition of the message types used as
     part of the port type defintions
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   
    <message name="AddTestRequestMessage">
        <part element="tns:AddTestRequest" name="payload"/>
    </message>
    <message name="AddTestResponseMessage">
        <part element="tns:AddTestResponse" name="payload"/>
    </message>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     PORT TYPE DEFINITION - A port type groups a set of operations into
     a logical service unit.
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   

    <!-- portType implemented by the AddTest BPEL process -->
    <portType name="AddTest">
        <operation name="process">
            <input message="tns:AddTestRequestMessage"/>
            <output message="tns:AddTestResponseMessage"/>
        </operation>
    </portType>
 

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     PARTNER LINK TYPE DEFINITION
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   
    <plnk:partnerLinkType name="AddTest">
        <plnk:role name="AddTestProvider" portType="tns:AddTest"/>
    </plnk:partnerLinkType>
   
    <binding name="AddTestBinding" type="tns:AddTest">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="process">
    <soap:operation soapAction="http://AddTest/process" />
    <input>
    <soap:body use="literal" />
    </input>
    <output>
    <soap:body use="literal" />
    </output>
    </operation>
    </binding>
    <service name="AddTestService">
    <port name="AddTestPort" binding="tns:AddTestBinding">
    <soap:address location="http://localhost:8080/ode/processes/AddTest" />
    </port>
    </service>
</definitions>

soap request:
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:q0="http://AddTest" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <soapenv:Body>
- <q0:AddTestRequest>
  <q0:inputa>2</q0:inputa>
  <q0:inputb>3</q0:inputb>
  </q0:AddTestRequest>
  </soapenv:Body>
  </soapenv:Envelope>


soap  repose:
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
- <soapenv:Body>
- <soapenv:Fault>
  <faultcode>soapenv:Server</faultcode>
  <faultstring xmlns:axis2ns1="http://docs.oasis-open.org/wsbpel/2.0/process/executable"&gt;axis2ns1:uninitializedVariable&lt;/faultstring>
  <detail />
  </soapenv:Fault>
  </soapenv:Body>
  </soapenv:Envelope>



问题补充
谢谢你 问题解决了

soa

2个回答

没变化吗?
为啥我比对了两个bpel,后来的多了两个query?

看错误信息是有未初始化的变量,把wsdl贴出来看看,把soap请求也抓出来看看

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐