Hi,
I am trying to invoke CMIS Repository service. I have deployed the ear file in jboss in CS 6.5sp1. I am getting below exception
The Exception trace: <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:Username>dmtcm</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">dmtcm</wsse:Password></wsse:UsernameToken><wsse:Encrypt/></wsse:Security></S:Header><S:Body><ns1:getRepositories xmlns:ns1="http://www.cmis.org/2008/05" xmlns:ns2="http://www.w3.org/2007/app" xmlns:ns3="http://www.w3.org/2005/Atom"/></S:Body></S:Envelope>Exception in thread "main" com.sun.xml.ws.streaming.XMLStreamReaderException: unexpected XML tag. expected: {http://www.cmis.org/2008/05}getRepositoriesResponse but found: {http://www.cmis.org/2008/05}getRepositories 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:524) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:121) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89) at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118) at $Proxy46.getRepositories(Unknown Source) at test.HelloCmis.main(HelloCmis.java:176)
Can you please help me in this what should be the wrong.
Thanks
Prakash
Hey, I am experiencing the exact same Exception. I haven't dug into it too far yet but I was wondering if you were able to determine what the root cause of it was?
Hello norvillerogers, can you please tell me your deployed environment or can you try to deploy the ear package to JBoss to see if the error happen?
JAX-WS 2.1.7 running on top of JDK 1.5.0_11. I don't work with JBoss at all so it's not feasible to for me to attempt a deployment there. Have you experienced the same Exception or know something about it?
OK, I figured it out. If you add a SOAPHandler in the handler chain and then that handler returns false for any reason it automatically reverses the direction of the message flow. Therefore if you were handling an OUTBOUND message and then return false from your handler the JAX-WS runtime treats it now as an INBOUND message and attempts to parse it as such. In other words, it tries to parse the OUTBOUND message REQUEST as an INBOUND message RESPONSE. Since the operation that was trying to be called was 'getRepositories' and the expected response was supposed to contain a 'getRepositoriesResponse' element as its ROOT the Exception now makes sense.
I'm not sure if the reason the runtime tries to parse the OUTBOUND message as an INBOUND message is because the handleFault method of the SOAPHandler either returned false or threw an Exception. I don't have the time to narrow it down any further than what I have. Nonetheless, if you get a Fault(Exception) akin to the one that originally spawned this thread you might be able to solve it by inspecting your handlers to validate that they are working as designed and aren't throwing Exceptions unbeknownst to you!
Hopefully this explanation will help someone other than me.