• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

First time only SOAPException while invoking a web service

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic