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() but still not working.
Can anyone help me out in this its very urgent....
Thanks,
Prabhu
Hi, you can try by setting your own header via the method setHeader on
a specific object, but thats tricky, you know.... be careful!
bye
Luca
itsprabhu@gmail.com ha scritto:
> 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
[quoted text clipped - 29 lines]
> Thanks,
> Prabhu
itsprabhu@gmail.com - 13 Dec 2006 09:18 GMT
Hi luker i've tried that also but still its not changing .
setHeader("http://www.dev.com/loc",org.apache.axis.transport.http.HTTPConstants.HEADER_ACCE
PT,"text/html,
image/gif, image/jpeg, *; q=.2, */*; q=.2");
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
> Hi, you can try by setting your own header via the method setHeader on
> a specific object, but thats tricky, you know.... be careful!
[quoted text clipped - 38 lines]
> > Thanks,
> > Prabhu