Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Axis2 problem - OMException (WstxUnexpectedCharException)  RSS feed

Marinus Geuze
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear forum-members,

I hope you can help me with this problem.

This is the situation. I use the Axis2 framework for accessing a WebService. When I use the generated Stub then everything works perfectly fine. However I want to obtain the actual message which is sent to and received from the WebService. This is for logging reasons. Here the problem starts. See my code example below.

The soapBodyIn.toString() throws a OMException with the errormessage ‘com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'V' (code 86) in epilog; expected '<' at [row,col {unknown-source}]: [1,593]’

The returned soap message is (obtained with use of TCPMON, and the message seems valid):

<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:xs="" xmlns:xsi="" ><SOAP-ENV:Body><rpl:cancelBookingResponse xmlns:rpl='urn:QuickCarRentalServiceVi'><Response>1 cancelled.</Response></rpl:cancelBookingResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

My question is this: Why does the output object work and why does the soapBodyIn.toString() fails? I really hope someone can help.

I use Axis version 1.4.1 and Axiom version 1.2.8.

Thanks in advantage.

Kind regards,
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!