Apache Axis 2: how to get header?

C

cdvr

Hi...I have a client which I am using to access a web service The
code I have is...

MyStub stub = new MyStub();
HelloWorldDocument reqDoc = HellWorldDocument.Factory.newInstance();
reqDoc.setName("bob");

HelloWorldResponseDocumnet resp = stub.SayHello(reqDoc);

The SOAP XML response is in the following form...

<soap12:Envelope ....>
<soap12:Header>
<ErrorResponse ....>
</ErrorResponse>
<UserInfo ...>
<Id>string</Id>
<DOB>string</DOB>
</UserInfo>
</soap12:Header>
<soap12:Body>
<HelloWorldResponse ....>
.....
</HelloWorldResponse>
</soap12:Body>
</soap12:Envelope>

My issue is I need to get stuff from the UserInfo header....how can I
get that? Currently all I can get is the HelloWorldResponse from the
"body".

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top