Cannot unmarshall SOAPMessage
ppoliani Nov 30, 2011 6:00 PMI have the following client which is created with the aid of apache CFX within SOAPUI :
/** Code taken from jbossts xts example */
System.out.println("CLIENT: obtaining userTransaction...");
UserTransaction ut = UserTransactionFactory.userTransaction();
System.out.println("CLIENT: starting the transaction...");
try {
ut.begin();
} catch (WrongStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SystemException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("CLIENT: transaction ID= " + ut.toString());
System.out.println("CLIENT: calling business Web Services...");
{
/** Calling flight web service */
System.out.println("Invoking checkFlightAvailability...");
System.out.println("Dummy Implementation of operation checkAvailability in FlightService");
FlightRequestInfo req = new FlightRequestInfo();
req.setDestination("Athens");
FlightStatus status = flightAT.checkFlightAvailability(req);
System.out.println("Flight service checkFlightAvailability the source city is="
+ status.getSource() + "\n");
}
System.out.println("CLIENT: calling commit on the transaction...");
try {
ut.commit();
} catch (Exception e) {
}
The transaction starts sucessfully because i can see the result of System.out.println("CLIENT: transaction ID= " + ut.toString());
However, when i call the service FlightStatus status = flightAT.checkFlightAvailability(req);
i get the following exception:
22:42:25,354 ERROR [SOAPMessageUnMarshallerHTTP] Cannot unmarshall SOAPMessage
javax.xml.soap.SOAPException: Unsupported content type: text/html; charset=UTF-8