/** * Get payload from a given ODEMessage * @param odeMessage - the ODE message * @return the payload of the Message, as a DOM Element */ private Element getPayload(Message odeMessage) { Element payload = null; // Get the message parts - these correspond to the message parts for the invocation // as defined in the WSDL for the service operation being invoked List<String> parts = odeMessage.getParts(); if( parts.size() == 0 ) return null; // For the present, just deal with the ** FIRST ** part // TODO Deal with operations that have messages with multiple parts // - that will require returning an array of Elements, one for each part Element part = odeMessage.getPart(parts.get(0)); // Get the payload which is the First child if (part != null && part.hasChildNodes()) { payload = (Element)part.getFirstChild(); } return payload; } // end getPayload
private void populateSOAPBody(SOAPEnvelope soapEnvelope, PartnerRoleMessageExchange partnerRoleMessageExchange) { org.apache.ode.bpel.iapi.Message messageToSend = partnerRoleMessageExchange.getRequest(); if (messageToSend.getParts().size() == 1) { soapEnvelope.getBody().addChild(OMUtils.toOM( getPartContent(messageToSend.getPart(messageToSend.getParts().get(0))), soapEnvelope.getOMFactory())); } else { throw new IllegalArgumentException("HTTP Binding doesn't support multiple message part as the input."); } }
if (partElement == null && messageFromOde.getParts().size() > 0 && !isHeaderElementAPartOfPayload) { try { partElement = (Element) messageFromOde.getPart(soapHeaderElementDefinition.getPart());