Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

First time only SOAPException while invoking a web service

 
Ravi Narala
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I am getting this strange error while calling a web service. My web service is hosted on the intranet. I call this service using a JAX-RPC client. When the service is invoked for the first time get an 401 Unauthorized error. From the second time onwards it works. What could be the reason. Any help on this is appreciated.

I've written a simple JSP that calls a servlet which in turn invokes the web service.

thanks,
Ravi
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like the first request is made anonymously and the second one carries authentication (like the Authorization HTTP-header).

Use Apache TCPMon (Tutorial) or java.net tcpmon to capture/view the HTTP request/response pairs and find out if there is indeed a difference.
 
Ravi Narala
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peer Reynders wrote:Sounds like the first request is made anonymously and the second one carries authentication (like the Authorization HTTP-header).

Use Apache TCPMon (Tutorial) or java.net tcpmon to capture/view the HTTP request/response pairs and find out if there is indeed a difference.


Peer,
Thanks for the reply. I will try it. But is that always the first time request does not carry a http-auth header.
thanks,
Ravi
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic