Setting the SOAP header elements in Web Services Client.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   P_Manchanda
Posted On:   Friday, May 6, 2005 01:21 AM

I am writing a stand alone client to invoke a web service. I have got the WSDL file and i used the ant task WSDL2Java to generate the client side code. As per the documentation of the web service the SOAP header is required and it has two elements "lang" and "txid". Now when i run the client i get a fault that field "lang" is empty. Now my query is # Do i need to explicitly set the header and its element in my client? Or the stub generated by the WSDL2Java should set the header and provide methods for setting the value for the header elements? # if yes how i do that? I have tried to use the Stub.setHeader(java.lang.String namesp   More>>

I am writing a stand alone client to invoke a web

service. I have got the WSDL file and i used the ant
task WSDL2Java to generate the client side code. As per
the documentation of the web service the SOAP header
is required and it has two elements "lang" and "txid".
Now when i run the client i get a fault that
field "lang" is empty. Now my query is

# Do i need to explicitly set the header and its
element in my client? Or the stub generated by the
WSDL2Java should set the header and provide methods for
setting the value for the header elements?

# if yes how i do that? I have tried to use the
Stub.setHeader(java.lang.String namespace, java.lang.String
partName, java.lang.Object headerValue) with no success.    <<Less
About | Sitemap | Contact