assertEquals("", portmapper.getSoapAction("foo"));
}
public void testParseRequest() throws Exception {
MessageContext msgCtx = new MessageContext();
MemBackedMessageImpl odeMsg1 = new MemBackedMessageImpl(null, req1.getDocumentElement(), null, false);
odeMsg1.setHeaderPart("DocumentumRequestHeader", DOMUtils.findChildByName(req1.getDocumentElement(),
new QName("http://documentum.com/ws/2005/services", "DocumentumSecurityToken")));
portmapper.createSoapRequest(msgCtx, odeMsg1, op1);
SOAPEnvelope env = msgCtx.getEnvelope();
System.out.println("testParseRequest: " + env);
Element odeMsgElmt = DOMUtils.stringToDOM("<message/>");
MemBackedMessageImpl odeMsg2 = new MemBackedMessageImpl(null, odeMsgElmt, null, false);
portmapper.parseSoapRequest(odeMsg2, env, op1);
System.out.println(DOMUtils.domToString(odeMsg2.getMessage()));
Element params = DOMUtils.findChildByName(odeMsg2.getMessage(), new QName(null, "parameters"));
assertNotNull(params);
// the part 'DocumentumRequestHeader' is bound to a soap:header, it should be accessible as a header part
assertNotNull(odeMsg2.getHeaderPart("DocumentumRequestHeader"));
Element hdrElmt = DOMUtils.findChildByName(odeMsg2.getHeaderPart("DocumentumRequestHeader"), new QName("http://documentum.com/ws/2005/services",
"DocumentumSecurityToken"));
assertNotNull(hdrElmt);
assertNull(odeMsg2.getPart("DocumentumRequestHeader"));
}