Morten Jacobsen
Morten Jacobsen

Reputation: 986

Sporadic exception from jax-ws webservice

We are facing a problem with a jax-ws webservice, where occasionally we get the following exception:

com.sun.xml.ws.streaming.XMLStreamReaderException: unexpected XML tag. expected: {http://www.company.com/system}getFooResponse but found: {http://www.company.com/system}getFoo
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyTag(XMLStreamReaderUtil.java:214)
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyTag(XMLStreamReaderUtil.java:222)
    at com.sun.xml.ws.client.sei.ResponseBuilder$DocLit.readResponse(ResponseBuilder.java:531)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:127)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
    at $Proxy226980.getFoo(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor315.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
    at $Proxy185.getFoo(Unknown Source)

The exception happens sporadically (and not very often) on the production system (always in batch jobs where there is usually a lot of calls) and we cannot reproduce it locally.. When the exception occurs, the batchjob naturally fails, and its often just a matter of restarting the batch job to make it succeed. The web service is not directly the responsibility of my project, but we have the possibility to make changes if needed.

Has anyone seen this before? It seems like a response is returned but the "Response" part is cut off. I'm not sure whether this is a problem with the web service implementation or the client proxy?

I'm not 100% sure which versions have been used, but I know the following:

Any ideas?

Note: We are currently not logging the raw requests/responses which is naturally something we will consider. I'm posting the question here in case someone has seen this before and can point me in the right direction. As I said, i'm not sure if the server is generating the wrong response, the client is interpreting it wrong or something inbetween messes with the xml.

Upvotes: 2

Views: 608

Answers (1)

gpeche
gpeche

Reputation: 22514

Your stack trace shows that your client is inside the readResponse() so I guess the server is sending back a message in an incorrect format. You should check with a sniffer to be sure.

Upvotes: 1

Related Questions