I tried to generate the Web Service Client Stub in Netbeans 6.1 IDE, but the IDE is generating the Soap Body and not generating the Soap Header stub / java classes.
Can any one help me how to create the Client Soap Header java classes using JAX-RPC API. I want to conver the below wsdl to java classes and use it thru the mobile.
On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.
As to your question, what do you mean by "SOAP body" and "SOAP header"? The tools don't generate any SOAP, they generate code to make and/or receive SOAP requests. If that's not what's happening in your case, tell us what is happening.
I guess what he meant was the Netbeans IDE does not generate the stub which includes handling the Authentication. Let me explain a bit. I'm having the same issue currently.
I'm trying to consume a web service created in .NET which needs SOAP authentication. Here is a link to the webservice.
The part that you would be most interested is this:
When consuming the web service using the instuctions given here under the sections "Creating Proxy in Java" and "Write code in Java to call web service" fails because we are not able to add the authentication part in the code.
When automatically generating the code in Netbeans it gives us this:
Using JAX-WS
Using JAX-RPC
At the least when I use JAX-WS method, I get a class called SoapAuthenticationHeader in which I can set the username and password. But I'm not able to bind it with the service or port objects.
I do not have this option in JAX-RPC method.
Any inputs on this would be greatly appreciated. Thanks in advance for your time.
Karthic Raghupathi
Greenhorn
Joined: Nov 23, 2009
Posts: 9
posted
0
bump
pardon me.. i was just hoping this post would catch your attention... if it is against forum rules, please forgive my ignorance...
I see that there are no replies to the message by Karthic Raghupathi.
I am facing a smiliar scenario and need to add an authentication header to a JAX RPC client. (The autogenerated stub classes do not contain any classes for adding the header to my SOAP message)
Reuqest you to provide some information on this issue.
Thanks,
Annu
Karthic Raghupathi
Greenhorn
Joined: Nov 23, 2009
Posts: 9
posted
0
I keep running into such issues every now and then.
I come back to see if there is an answer but no luck yet. Hopefully someone will have an answer soon enough.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Create / Generate Soap Header client stub / java classes using JAX-RPC API