views:

1123

answers:

1

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

+1  A: 

We ran into a similar issue on my project. Check into extending SuffixBasedPortTypesProvider, SuffixBasedMessagesProvider, and Soap11Provider. We use the InliningXsdSchemaTypesProvider to import the schema we use to build the WSDL. If you run the WSDL generation through the debugger you'll get the hang of how it works. The Spring code is easy to follow and extend.

Daniel Cox