Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

socket error thrown with axis2 client

Thread view: 
edh - 23 Aug 2007 21:53 GMT
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 - 24 Aug 2007 05:41 GMT
> Hello,
>
[quoted text clipped - 43 lines]
> 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 - 27 Aug 2007 15:40 GMT
> > Hello,
>
[quoted text clipped - 54 lines]
>
> - 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 - 27 Aug 2007 17:48 GMT
> 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 - 28 Aug 2007 16:04 GMT
> > 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
[quoted text clipped - 13 lines]
> -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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.