GeeCON Prague 2014*
The moose likes SOA and ESB and the fly likes How can I send header message in Java by using org.apache.axis.client.Stub and java.rmi.Remote? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » SOA and ESB
Bookmark "How can I send header message in Java by using org.apache.axis.client.Stub and java.rmi.Remote?" Watch "How can I send header message in Java by using org.apache.axis.client.Stub and java.rmi.Remote?" New topic
Author

How can I send header message in Java by using org.apache.axis.client.Stub and java.rmi.Remote?

Zeynep Coskun
Greenhorn

Joined: Oct 23, 2013
Posts: 2
I have a wsdl and this wsdl has a request message like this, in SOAPUI:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:service="www.xxxxx.xx">
<soapenv:Header>
<service:SessionInfo>
<service:UserPassword>?</service:UserPassword>
</service:SessionInfo></soapenv:Header>
<soapenv:Body>
<service:Method1>
<!--Optional:-->
<service:Arguments>
<service:Parameter1>?</service:Parameter1>
<service:Parameter2>?</service:Parameter2>
<!--Optional:-->
<service:Parameter3>?</service:Parameter3>
<!--Optional:-->
<service:Parameter4>?</service:Parameter4>
</service:Arguments>
</service:Method1></soapenv:Body></soapenv:Envelope>

I am having problem while sending header message of this wsdl in Java. I sent the request message in C# and SOAPUI successfully. After importing wsdl in Java I could not access the header part of this request although I was able to access in SOAPUI and C#. I can only access body part of this wsdl in Java but I cannot access soapenv:Header part in Java. Is there a solution for this problem by using org.apache.axis.client.Stub and java.rmi.Remote? How can I add header? Thanks.
Roger Sterling
Ranch Hand

Joined: Apr 06, 2012
Posts: 426

You are somewhat ambiguous in your post. What do you mean "I could not access the header part" ? What happens when you try to access it ? Have you experimented with Jersey ? https://jersey.java.net ? Jersey RESTful Web Services framework provides support for JAX-RS APIs and serves as a JAX-RS (JSR 311 & JSR 339) Reference Implementation. A JAX-RS resource is an annotated POJO that provides resource methods that are able to handle HTTP requests (and access to headers) for URI paths that the resource is bound to. Which is what I think you are trying to do, but not sure based on your post.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I send header message in Java by using org.apache.axis.client.Stub and java.rmi.Remote?