Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

socket error thrown with axis2 client

77 views
Skip to first unread message

edh

unread,
Aug 23, 2007, 4:53:49 PM8/23/07
to
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

Manish Pandit

unread,
Aug 24, 2007, 12:41:07 AM8/24/07
to
On Aug 23, 1:53 pm, edh <edward.hila...@gmail.com> wrote:
> 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

edh

unread,
Aug 27, 2007, 10:40:40 AM8/27/07
to
On Aug 24, 12:41 am, Manish Pandit <pandit.man...@gmail.com> wrote:
> On Aug 23, 1:53 pm, edh <edward.hila...@gmail.com> wrote:
>
>
>
>
>
> > Hello,
>
> > I have created aaxis2client using the generated code from WSDL2Java
> 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

Manish Pandit

unread,
Aug 27, 2007, 12:48:29 PM8/27/07
to
On Aug 27, 7:40 am, edh <edward.hila...@gmail.com> wrote:
> 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

edh

unread,
Aug 28, 2007, 11:04:10 AM8/28/07
to

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

0 new messages