Warning | ||
---|---|---|
| ||
This component has been deprecated in favor to servicemix-http component. |
Introduction
ServiceMix supports SOAP with Attachments for Java supports Soap With Attachments (SAAJ) and Apache Axis.
Invoking
...
Web Services Using SAAJ
We have ServiceMix includes a component for invoking web services using SAAJ and Axis via JBI. Here is an example of it in use., as an InOut message exchange. The InOut message exchange pattern (MEP) is a request response pattern where the output message is replaced by a fault, if the message is not successful. For more details on the InOut MEP please see JSR 208. The following example invokes a web service to ask for a stock price:
Wiki Markup |
---|
{snippet:id=saaj|lang=xml|url=http://cvs.servicemix.codehaus.org/*checkout*/servicemix/baseservicemix/smx3/trunk/common/servicemix-components/src/test/resources/org/apache/servicemix/components/saaj/example.xml} |
To invoke this function, pass the following request body:
Wiki Markup |
---|
{snippet:id=request|lang=xml|url=servicemix/smx3/trunk/common/servicemix-components/src/test/resources/org/apache/servicemix/components/saaj/request.xml} |
Below is the expected response:
Wiki Markup |
---|
{snippet:id=example|lang=xml|url=servicemix/smx3/trunk/common/servicemix-components/src/test/resources/org/apache/servicemix/components/saaj/exampleresponse.xml?rev=HEAD}} |
Additional Resources
For a complete example, using SAAJ and incorporating the above code snippets, please see the HTTP Binding Example.
For details on JBI InOut message exchanges, please JSR 208.