File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code -1: null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code -1: null" Watch "com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code -1: null" New topic
Author

com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code -1: null

Anand Nair
Greenhorn

Joined: Jul 13, 2011
Posts: 2
Hi guys,
I am writing a Web Service api for OCOD and I face a strange issue when I connect using a sun proxy which gives the following exception


com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code -1: null
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.checkStatusCode(HttpTransportPipe.java:261)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.createResponsePacket(HttpTransportPipe.java:210)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:172)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:95)
at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:133)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470)
at com.sun.xml.ws.client.Stub.process(Stub.java:319)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:157)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:140)
at $Proxy37.opportunityQueryPage(Unknown Source)

But I ran the same code in ISI proxy which is not giving any exception?
What could be the possible solution.
TIA

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
Since -1 is not a legal status code, I suspect that your client never got a real HTTP response but had some other kind of failure.

Bill
Anand Nair
Greenhorn

Joined: Jul 13, 2011
Posts: 2
But this same code is working fine with other proxies other than sun web server proxy. So dont you think there is some issues with web proxy settings?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code -1: null