Changing Headers in Axis

I

itsprabhu

Hi all i have generated java files from wsdl using WSDL2Java. I need
to
invoke a method in the web service.There is a stub file generated and
iam using them to test. I want to change the request headers .

Generated one

POST / HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related,
text/*
User-Agent: Axis/1.4
Host: localhost:8008
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "urn:Login"
Content-Length: 441

Expected one

POST / HTTP/1.1
Authorization: Basic cHI6cHI=
Content-Length: 441
Content-Type: text/xml; charset=utf-8
User-Agent: Java/1.5.0_09
Host: localhost:8008
SOAPAction: "urn:Login"
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive

I have tried setting using call.setProperty() and setHeader but
still not working.
Can anyone help me out in this its very urgent....

My problem is when i use socket connection program to connect to the
server the req header is goin like as expected and iam gettin proper
response,but when i use the generated stub file and axis stuff my req
headers is different and iam not able to get the proper response
rather
iam gettin exception like content is not allowed in the trailing
section. Can u plz help me in this
Thanks in advance....
 

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

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top