aspose file tools*
The moose likes Web Services and the fly likes First time only SOAPException while invoking a web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "First time only SOAPException while invoking a web service" Watch "First time only SOAPException while invoking a web service" New topic
Author

First time only SOAPException while invoking a web service

Ravi Narala
Greenhorn

Joined: Oct 23, 2007
Posts: 16
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


SCJP, SCWCD5, SCBCD5, SCDJWS
IBM Certified Websphere 6.1 Core Admin
IBM Certified SOA Solution Designer
SCEA Part 1
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
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

Joined: Oct 23, 2007
Posts: 16
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: First time only SOAPException while invoking a web service