WSIFMessage inMsg = operation.createInputMessage();
WSIFMessage outMsg = operation.createOutputMessage();
WSIFMessage faultMsg = operation.createFaultMessage();
SimpleDocument_ElemType sdtet = new SimpleDocument_ElemType();
SimpleDocument_Type sdt = new SimpleDocument_Type();
sdt.setValue("petra");
sdtet.setSimpleDocument(sdt);
inMsg.setObjectPart("parameters", sdtet);
boolean ok =
operation.executeRequestResponseOperation(
inMsg,
outMsg,
faultMsg);
assertTrue("operation returned false!!", ok);
Object o = null;
try {
o = outMsg.getObjectPart("outputDoc");
assertTrue("response is null!!!", o != null);
} catch (WSIFException e) {
assertTrue("response part 'outputDoc' not found in output message!!!", false);
}
assertTrue(
"response part has wrong type: " + o.getClass(),
SimpleDocumentResponse.class.isAssignableFrom(o.getClass()));
SimpleDocumentResponse response = (SimpleDocumentResponse) o;
SimpleDocument_Type sdtResponse = response.getSimpleDocument();
assertNotNull("response SimpleDocument is null!!!", sdtResponse);
assertTrue(
"document value wrong: " + sdtResponse.getValue(),
sdt.getValue().equals(sdtResponse.getValue()));
} catch (Exception ex) {
ex.printStackTrace();
assertTrue(
"InteropDocTest.doitSimpleDocumentDII("