Question

I'm using an Axis2 client to access an external Webservice, whose WSDL starts with the following content:

<?xml version="1.0" encoding="UTF-8"?><!--Created by TIBCO WSDL--><wsdl:definitions xmlns:wsdl=...

My call to sendReceive crashes with the following error:

com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'C' (code 67) in prolog; expected '<'

The 'C' is the first character on the comment in the WSDL. Without that comment everything works fine, but as far as my knowledge of basic XML dictates that comment is correct. My question would be: Is this a bug in Axis2 or is the accessed WSDL malformed? Is there any way to prevent Axis2 from crashing under these circumstances?

Was it helpful?

Solution 2

After debugging the communications, I found out that the "C" was a red herring, and in fact the supplier's server was responding with the following text error message: Can not get operation configuration - invalid soapAction for input message.

The problem was that the soapAction header was not being sent in the HTTP request, after adding it everything worked fine.

OTHER TIPS

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top