Author: heiko.braun(a)jboss.com
Date: 2009-11-05 16:25:30 -0500 (Thu, 05 Nov 2009)
New Revision: 239
Modified:
branches/hbraun/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java
Log:
use adapter to parse SOAPResponse
Modified:
branches/hbraun/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java
===================================================================
---
branches/hbraun/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java 2009-11-05
21:03:41 UTC (rev 238)
+++
branches/hbraun/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java 2009-11-05
21:25:30 UTC (rev 239)
@@ -41,7 +41,6 @@
import org.jboss.soa.bpel.runtime.engine.BPELEngine;
import org.jboss.soa.bpel.runtime.engine.BPELFault;
import org.jboss.soa.bpel.runtime.engine.IntegrationLayer;
-import org.jboss.soa.bpel.runtime.ws.AbstractWebServiceEndpoint;
import org.jboss.soa.bpel.runtime.ws.MessageContext;
import org.jboss.soa.bpel.runtime.ws.MessageContextAssoc;
import org.jboss.soa.bpel.runtime.ws.SOAPMessageAdapter;
@@ -50,9 +49,10 @@
import javax.sql.DataSource;
import javax.transaction.*;
import javax.transaction.xa.XAResource;
-import javax.wsdl.Definition;
import javax.xml.namespace.QName;
-import javax.xml.soap.*;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPMessage;
import java.util.StringTokenizer;
import java.util.concurrent.*;
@@ -139,7 +139,7 @@
SOAPMessageAdapter soapAdapter =
new SOAPMessageAdapter(
inboundMessageContext.getWsdlDefinition(),
- odeMex.getServiceName(),
+ inboundMessageContext.getServiceName(),
inboundMessageContext.getPortName()
);
soapAdapter.parseSoapRequest(odeRequest, soapMessage, odeMex.getOperation());
@@ -273,12 +273,21 @@
{
// create SOAPEnvelope
SOAPMessage soapResponse = MessageFactory.newInstance().createMessage();
- SOAPBody responseBody = soapResponse.getSOAPBody();
+ /*SOAPBody responseBody = soapResponse.getSOAPBody();
SOAPFactory soapFactory = SOAPFactory.newInstance();
SOAPElement responseElement =
soapFactory.createElement(mex.getResponse().getMessage());
responseBody.appendChild(responseElement);
- ret = soapResponse.getSOAPPart().getEnvelope();
+ ret = soapResponse.getSOAPPart().getEnvelope();*/
+ MessageContext inboundMessageContext = MessageContextAssoc.getInbound();
+ SOAPMessageAdapter soapAdapter =
+ new SOAPMessageAdapter(
+ inboundMessageContext.getWsdlDefinition(),
+ inboundMessageContext.getServiceName(),
+ inboundMessageContext.getPortName()
+ );
+ soapAdapter.createSoapResponse(soapResponse, mex.getResponse(),
mex.getOperation());
+ ret = soapResponse.getSOAPPart().getEnvelope();
MessageContextAssoc.createOutbound().setMessage(soapResponse);
}
else