socket error thrown with axis2 client

E

edh

Hello,

I have created a axis2 client using the generated code from WSDL2Java
wizard while in the eclipse 3.3 ide.

The webservice is built with .Net and returns an authentication type
of a response, but when I send the message, I receive the following
axis fault
during the debug session:

java.net.SocketException: Software caused connection abort: recv
failed

at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:
89)
at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:
326)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:
389)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:
211)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:
163)
at com.web.WebServiceStub.GetSecurity(WebServiceStub.java:398)
at Consume.getSecurity(Consume.java:213)
at Consume.main(Consume.java:98)
Caused by: java.lang.NullPointerException
at
org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:
156)
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:
111)
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:
87)
... 7 more


Can someone point to me possibly what is needed?
Thank you
edh
 
M

Manish Pandit

Hello,

I have created a axis2 client using the generated code from WSDL2Java
wizard while in the eclipse 3.3 ide.

The webservice is built with .Net and returns an authentication type
of a response, but when I send the message, I receive the following
axis fault
during the debug session:

java.net.SocketException: Software caused connection abort: recv
failed

at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.­java:
89)
at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInA­xisOperation.java:
326)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperati­on.java:
389)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxis­Operation.java:
211)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:
163)
at com.web.WebServiceStub.GetSecurity(WebServiceStub.java:398)
at Consume.getSecurity(Consume.java:213)
at Consume.main(Consume.java:98)
Caused by: java.lang.NullPointerException
at
org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUt­ils.java:
156)
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.­java:
111)
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.­java:
87)
... 7 more

Can someone point to me possibly what is needed?
Thank you
edh

I thought I posted a reply to this one, it never showed up.

Anyway, you might want to turn off any software firewall/antivirus
thingies on the presumably Windows box you're using (on the client)
and give it another try.

-cheers,
Manish
 
E

edh

I thought I posted a reply to this one, it never showed up.

Anyway, you might want to turn off any software firewall/antivirus
thingies on the presumably Windows box you're using (on the client)
and give it another try.

-cheers,
Manish- Hide quoted text -

- Show quoted text -


Manish,

Thanks - I tried with the shutting down of what you mentioned but
since it did not work, I debugged deeper and noticed the error is
actually "HTTP/1.1 400 Bad Request ( The HTTP request includes a non-
supported header. Contact your ISA Server administrator. )".
My question now is, if the web service is a .NET webservice what
binding should I use to generate the client code. Could this be
generating the wrong headers? Currently I used adb binding... Is this
correct?

Thank you....
edh
 
M

Manish Pandit

My question now is, if the web service is a .NET webservice what
binding should I use to generate the client code. Could this be
generating the wrong headers? Currently I used adb binding... Is this
correct?

The binding should work regardless of the service impl language.
However, you can print out all the HTTP header parameters and see if
you're missing any one of them. Specifically, SOAP Action must be set.
The header should look something like:

POST /your_endpoint HTTP/1.1
Content-Type: text/xml; charset="utf-8"
Content-Length: <length_here>
SOAPAction: "http://url/someOperation"

-cheers,
Manish
 
E

edh

The binding should work regardless of the service impl language.
However, you can print out all the HTTP header parameters and see if
you're missing any one of them. Specifically, SOAP Action must be set.
The header should look something like:

POST /your_endpoint HTTP/1.1
Content-Type: text/xml; charset="utf-8"
Content-Length: <length_here>
SOAPAction: "http://url/someOperation"

-cheers,
Manish

Manish,

Thanks for the help...
Here is what I had to do. The generated code was using SOAP version
1.2 and had to be changed to use SOAP 1.1. This enabled the creation
of the SOAPAction header. Also chunking had to be turned off this to
create the Content-Length header.

Now it works...
edh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,701
Latest member
XavierQ83

Latest Threads

Top