How to add custom SOAP-Header element to the generated WSDL in Spring-WS
Posted
by Petr Macek
on Stack Overflow
See other posts from Stack Overflow
or by Petr Macek
Published on 2009-08-24T06:34:25Z
Indexed on
2010/04/13
22:53 UTC
Read the original article
Hit count: 1097
Hi,
we are migrating from WebLogic web-services to Spring-WS (1.5.X). There is currently one issue we are facing:
We need to pass a context object (on WLS it is passed as SOAP-Header element) to other services that are still running on WLS from the Spring-WS powered service. The header element is still formulated on client side and the newly created WS (Spring-WS) should just pass it to other services.
I can imagine how the custom element would be passed: override the doWithMessage(WebServiceMessage message) method...
Is there a way to generate the wsdl with the help of DefaultWsdl11Definition to contain that custom header element? See the example:
<wsdl:operation name="GetSomeInformation">
<soap:operation
soapAction="http://www.dummyservice.com/InformationService/GetSomeInformation" />
<wsdl:input>
<soap:body use="literal" />
<soap:header message="ctx:ServiceContextMessage" part="serviceContext" use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
<wsdl:fault name="Error">
<soap:fault name="Error" use="literal" />
</wsdl:fault>
</wsdl:operation>
Thanks for help
© Stack Overflow or respective owner