Hi,can anyone help me out?
I need to call a webserivice ,but I have no idea how to define the webserivice task in the bpmn file.
Here is my wsld file :
<definitions targetNamespace="xxx" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="xxx" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<!-- Types -->
<types>
<s:schema elementFormDefault="qualified" targetNamespace="xxx">
<s:complexType name="InputParams">
<s:sequence id="InputSequence">
<s:element maxOccurs="1" minOccurs="0" name="input1" type="s:string"/>
</s:sequence>
</s:complexType>
<s:element name="XacuteRequest">
<s:complexType>
<s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="LoginName" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="LoginPassword" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="InputParams" type="s0:InputParams"/>
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="Rowset">
<s:sequence>
<s:element maxOccurs="unbounded" minOccurs="0" name="Row" type="s0:Row"/>
</s:sequence>
<s:attribute name="Message" type="s:string"/>
</s:complexType>
<s:complexType name="Row">
<s:sequence id="RowSequence"></s:sequence>
</s:complexType>
<s:element name="XacuteResponse">
<s:complexType>
<s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="Rowset" type="s0:Rowset"/>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</types>
<!-- Messages -->
<message name="XacuteSoapIn">
<part element="s0:XacuteRequest" name="parameters"/>
</message>
<message name="XacuteSoapOut">
<part element="s0:XacuteResponse" name="parameters"/>
</message>
<!-- Ports -->
<portType name="XacuteWSSoap">
<operation name="Xacute">
<input message="s0:XacuteSoapIn"/>
<output message="s0:XacuteSoapOut"/>
</operation>
</portType>
<!-- Bindings -->
<binding name="XacuteWSSoap" type="s0:XacuteWSSoap">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="Xacute">
<soap:operation soapAction="xxx" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<!-- Service mapping -->
<service name="XacuteWS">
<port binding="s0:XacuteWSSoap" name="XacuteWSSoap">
<soap:address location="xxxx"/>
</port>
</service>
</definitions>
What I want is call the method ‘Xacute’ with parameters .
I know how to import the wsdl file using the import tag ,but I’ve no idea how to associate the message with the item definitions.
Here is some piece of code :
<serviceTask id="webService" invocation" implementation="##WebService" operationRef="tns:Xacute">
<ioSpecification>
<dataInput itemSubjectRef="tns:XacuteRequest" id="dataInputOfWebService" />
<inputSet>
<dataInputRefs>dataInputOfWebService</dataInputRefs>
</inputSet>
<outputSet />
</ioSpecification>
<dataInputAssociation>
<sourceRef>input</sourceRef>
<targetRef>dataInputOfWebService</targetRef>
<assignment>
<from>${input.username}</from>
<to>${dataInputOfWebService.loginName}</to>
</assignment>
<assignment>
<from>${input.password}</from>
<to>${dataInputOfWebService.loginPassword}</to>
</assignment>
<assignment>
<from>${input.inputParams}</from>
<to>${dataInputOfWebService.inputParams}</to>
</assignment>
</dataInputAssociation>
</serviceTask>
<interface name="Log Interface" implementationRef="log:XacuteWSSoap"> <!-- NEEDED FOR THE PORT -->
<!-- Operation: implementationRef = QName of WSDL Operation -->
<operation id="Xacute" name="WebService Operation" implementationRef="log:Xacute"> <!-- NEEDED FOR THE OPERATION NAME -->
<inMessageRef>tns:XacuteSoapIn</inMessageRef>
</operation>
</interface>
<message id="XacuteSoapIn" itemRef="tns:XacuteRequest" name="XacuteSoapIn"/>
<itemDefinition id="XacuteRequest" structureRef="log:XacuteRequest" /><!-- QName of input element --> <!-- NEEDED FOR THE ARGUMENTS -->
when I run the process ,I got some type error exception:
Part {xxx}parameters should be of type xxx.XacuteRequest, not java.lang.String.
but when I change the structureRef of the itemDefinition to log:XacuteSoapIn,I got npe as there is no such structure in the imported structureMap.
I am so confused ,and any help will be appreciated.
Thank you.