This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Web Services and the fly likes Sending the header info in web service Operations - JAX-WS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Sending the header info in web service Operations - JAX-WS" Watch "Sending the header info in web service Operations - JAX-WS" New topic
Author

Sending the header info in web service Operations - JAX-WS

Mike Thomson
Ranch Hand

Joined: Nov 07, 2007
Posts: 121
Hi,
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

portType.httpEndPoint().cardVaildation(CardInfoRq, rqHeader)

But I don't have any such options. Any help or idea will be helpful
H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 471
    
    4
I would do:

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sending the header info in web service Operations - JAX-WS