assertEquals("", portmapper.getSoapAction("foo"));
}
public void testParseRequest() throws Exception {
MessageContext msgCtx = new MessageContext();
MessageImpl odeMsg1 = new MessageImpl(new MessageDAOImpl(null));
odeMsg1.setMessage(req1.getDocumentElement());
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/>");
MessageImpl odeMsg2 = new MessageImpl(new MessageDAOImpl(null));
odeMsg1.setMessage(odeMsgElmt);
portmapper.parseSoapRequest(odeMsg2, env, op1);
Element params = DOMUtils.findChildByName(odeMsg2.getMessage(), new QName(null, "parameters"));
assertNotNull(params);
assertNotNull(odeMsg2.getHeaderPart("DocumentumRequestHeader"));
Element hdrElmt = DOMUtils.findChildByName(odeMsg2.getHeaderPart("DocumentumRequestHeader"), new QName("http://documentum.com/ws/2005/services",
"DocumentumSecurityToken"));
assertNotNull(hdrElmt);
Element hdrBdyElmt = DOMUtils.findChildByName(odeMsg2.getPart("DocumentumRequestHeader"), new QName("http://documentum.com/ws/2005/services",
"DocumentumSecurityToken"));
assertNotNull(hdrBdyElmt);
}