AnsweredAssumed Answered

Spec-compliant webservice call: Multiple message parts?

Question asked by sjoerges on Oct 13, 2011
Latest reply on Nov 4, 2011 by sjoerges
Hi there,

first let me say thank you for the great set of examples that come with Activiti - they really ease the first steps!

Now for my question. I am currently trying to figure out how to call a webservice the BPMN2-spec-compliant way. I started with the examples contained in activiti-cxf-examples, and tried to modify them in order to invoke a webservice hosted locally at my company.

However, different from the "Counter" service in the examples, the messages for most operations of this webservice make use of multiple parts, each of them being associated with some complex type. In the SOAP binding of the webservice, some of those parts are bound to the SOAP header, others to the SOAP body.

Transferred to the "Counter" example, I have the following situation:



<wsdl:message name="prettyPrintCount">
  <wsdl:part element="tns:prettyPrintCount" name="parameters" />
  <wsdl:part element="tns:furtherComplexType" name="moreParameters" />
</wsdl:message>

<wsdl:binding name="CounterSoapBinding" type="tns:Counter">
  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
   …
  <wsdl:operation name="prettyPrintCount">
     <soap:operation soapAction="" style="document" />
     <wsdl:input>
       <soap:header message="prettyPrintCount" part="moreParameters" use="literal"/>
       <soap:body parts="parameters" use="literal"/>
     </wsdl:input>
     …
  </wsdl:operation>
  …
</wsdl:binding>


Hence, in this example, the message sent to the webservice contains two complex types, "prettyPrintCount" and "furtherComplexType". So my question is:

:?: How do I specify a corresponding interface in a BPMN2-spec-compliant manner, so that it is interpretable by the Activiti Engine?

So far, from the examples and from looking at the spec, I understood that an "operation" specified for an "interface" is associated with exactly one message ("inMessageRef"). Furthermore, a "message" refers to one item via "itemRef", and an "itemDefinition" refers to one element via "structureRef".

In the "Counter" example, "structureRef" uses the QName of the "prettyPrintCount" type ("counter:prettyPrintCount"), but how would I correctly specify my scenario, that involves more than one type in the payload of the message?

Could you give me any hints on where my thoughts go into the wrong direction here?

Cheers & Sorry for the long post,
Sven

Outcomes