This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
We have been provided with the WSDL file and we need to consume the web service call.
We are trying for the top-down approach. We are using IBM 8.0 - JAX-WS 2.1 - JDK 1.6 and we are trying to generate the client using the WSDL from RAD ("Generate Client" option).
It has generated a pile of files based on the WSDL and we are written standalone java client for testing.
We have got the http endpoint using the service class and invoking the required operations.
The issue here is we need to send some of header info in RqHeaders along with each operations.
We also have RqHeaders class generated thru RAD and set the reqiured values but there is no option to send it along with the required operations.
I have checked all the classes generated based on the WSDL and couldn't see any such set property.
In axis, we will use to send like
1. From the wsdl 1x,
Check the element <portType, you should see a list of operation with their in/out parameters required
2. From the wsdl 2x
Check the element <wsdl:interface, you should see a list of operation with their in/out parameters required
3. In case of doubt which is the case, ask the web service provider for the sample of the SOAP request they expect.
By looking at the SOAP request, you will know where rqHeader supposed to be and what they meant by that (rqHeader)
If it's part of the SOAP BODY or SOAP HEADER. This will clarify the requirement and this will tell drive the HOW.
subject: Sending the header info in web service Operations - JAX-WS