Error while trying to consume an Axis Web Service

Asked

Viewed 822 times

1

When I try to consume web service functionality, the following exception occurs:

org.apache.axis2.AxisFault: Stream write error
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)

I’ve searched the Internet but found nothing.

  • 1

    If possible post the code or part of the code that generated the exccession.

  • The problem is you have business secrets that I can’t expose, but what exactly do you need? I think axis2 can’t handle

1 answer

1

Groping in the dark, I see the following possibilities:

  1. A "hidden" error in the exception. There are no other exception stacks before they can give clues about the true cause of the error?

  2. Incorrect libraries. Something common with Axis is missing a dependency or having a conflict of classpath, that is, incorrect version of a library.

  3. Server problem related to the implementation or configuration of the webservice that ends up returning some corrupted or invalid data.

  4. Incompatible versions of stub (client) and Skeleton (server).

  5. Incompatible summers of the SOAP protocol.

Suggestions for debugging:

  1. Use Soapui to test the service. Does it work? Make sure the client is correct. Doesn’t it work? Fix the server.

  2. Create a client independent, that is, a simple and minimal design with a method main and only the necessary dependencies. This will help you isolate the problem.

  3. In the latter case, create another fictional webservice from scratch and see if the problem repeats. If it continues, post this code here for analysis, including used dependencies.

  • Thanks for the answer, the error was found using an independent client only with the main and Axis2 library, the Web Service is OK as I have already performed the test by SOAP UI. And I have another web service that works normally using axis2. I don’t know what else to do, you recommend me another technology to consume this service?

  • @diegosoaresub I understand that your client with the same configuration and same dependencies works in another situation, so I will assume that it is not such a problem. It remains to check if the SOAP message is being generated correctly. Use a network monitoring tool and see what’s transitioning from/to the server from your independent client. Is the request consistent with Soapui? You can also try generating the classes again from the server’s WSDL if you have not done so.

  • the files I used were generated directly by WSDL, I debugged the axis2 library, and saw that the message is being sent correctly, I have already tested versions 1.6.0 and 1.6.2. I don’t know what else to do

  • @diegosoaresub Searching only for "Stream write error" in google, some responses say that this message comes from the operating system for not being able to record any file. It may be that Axis is trying to record a log and the disk is full or without permission, so the message is encapsulated in this way and may be hiding the original message. You cannot debug the webservice by deploying it to your environment, for example?

  • By debug mode I was able to capture the SOAP answer, which is: <? xml version='1.0' encoding='utf-8'? > <SOAP-ENV:Envelope xmlns:SOAPENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>SOAP-ENV:Server</faultcode> <faultstring>Stream write error</faultstring> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  • @diegosoaresub You need to look at the server log to see if there are any other error messages.

  • I am running on main, not on server. So I have no log

  • @diegosoaresub Running client and server on main?

  • I don’t have access to the server, it’s a black box for me.

  • @diegosoaresub Already tried to get the same message generated by the client and paste into Soapui?

  • Yeah, I gave up. I’m using JAX-WS and it’s working.. Thanks :)

Show 6 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.