• Post Reply Bookmark Topic Watch Topic
  • New Topic

howto drop operation name from message for wrapped document style wsdl  RSS feed

 
john a wilson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to write a client for the wrapped document style wsdl below. Since it is wrapped document style the input message produced by the generated classes from axis 1.4 wsdl2java includes the operation name (process) as the top level element. However the actual service doesn't accept the operation name - it just wants the message content only. Could anyone recommend a way to overcome this issue,

Thanks for any help

John

wsdl (some namespaces replaced by ellipses):


<wsdl:definitions targetNamespace=".....">
<!--WSDL created by Apache Axis version: 1.3 Built on Oct 05, 2005 (05:23:37 EDT)-->
<wsdl:types>
<schema targetNamespace="....">
<import namespace="...."/>
<element name="process" type="xsd:anyType"/>
</schema>
<schema targetNamespace="....">
<element name="processReturn" type="xsd:anyType"/>
<element name="fault" type="xsd:anyType"/>
</schema>
</wsdl:types>
<wsdl:message name="processResponse">
<wsdl:part element="impl:processReturn" name="processReturn"/>
</wsdl:message>
<wsdl:message name="processRequest">
<wsdl:part element="tns1:process" name="part"/>
</wsdl:message>
<wsdl:message name="WebServicesRuntimeException">
<wsdl:part element="impl:fault" name="fault"/>
</wsdl:message>
<wsdl:portType name="WebServiceExceptionLoggingAdapter">
<wsdl:operation name="process">
<wsdl:input message="impl:processRequest" name="processRequest"/>
<wsdl:output message="impl:processResponse" name="processResponse"/>
<wsdl:fault message="impl:WebServicesRuntimeException" name="WebServicesRuntimeException"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="...." type="impl:WebServiceExceptionLoggingAdapter">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="process">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="processRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="processResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="WebServicesRuntimeException">
<wsdlsoap:fault name="WebServicesRuntimeException" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WebServiceExceptionLoggingAdapterService">
<wsdl:port binding="impl:..." name="....">
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
As far as I can see, you have two choices:
1) You use the javax.xml.ws.Dispatch interface to issue the request, which you then have to create yourself.
2) You generate a client from the WSDL and then add a handler that strips the element in question from all outgoing requests.
Best wishes!
 
john a wilson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ivan Krizsan wrote:Hi!
As far as I can see, you have two choices:
1) You use the javax.xml.ws.Dispatch interface to issue the request, which you then have to create yourself.
2) You generate a client from the WSDL and then add a handler that strips the element in question from all outgoing requests.
Best wishes!


Ok Thanks very much Ivan,

I kind of suspected as much but was hoping that I might have missed something and that there was a simpler approach (not being that familiar with wsdl).

About the second approach which I think I will try - presumably it doesn't matter that I am signing the using wss4j - the handler will pick up the message first before the signing?

Also do you know of a good tutorial for this approach for axis 1.x

Thanks

John
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

About the second approach which I think I will try - presumably it doesn't matter that I am signing the using wss4j - the handler will pick up the message first before the signing?

Most, if not all, security features such as encryption and signing are implemented as handlers so you need to find a way to insert your own handler before the handlers of the security features.

Sorry, I do not know of any tutorials on this matter. Personally, I would first implement the code that strips out the unwanted element, then insert it into a handler and finally combine the result with the security features - testing at each step.
Best wishes!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!