Author: objectiser
Date: 2009-11-26 12:40:48 -0500 (Thu, 26 Nov 2009)
New Revision: 341
Modified:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderODETestCase.java
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_hello_world_header_ode/messages/hello_response1.xml
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java
Log:
RIFTSAW-74 - fixed issues with ODE specific header access approach. Still need example
using soap:header definition in the WSDL binding.
Modified:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderODETestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderODETestCase.java 2009-11-26
17:24:07 UTC (rev 340)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderODETestCase.java 2009-11-26
17:40:48 UTC (rev 341)
@@ -47,6 +47,6 @@
"http://localhost:8080/Quickstart_bpel_hello_world_header_odeWS");
// TODO: Commented out until fixed
- //assertMessageFromFile(result, "hello_response1.xml");
+ assertMessageFromFile(result, "hello_response1.xml");
}
}
Modified:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_hello_world_header_ode/messages/hello_response1.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_hello_world_header_ode/messages/hello_response1.xml 2009-11-26
17:24:07 UTC (rev 340)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_hello_world_header_ode/messages/hello_response1.xml 2009-11-26
17:40:48 UTC (rev 341)
@@ -1 +1 @@
-<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:...
xmlns:odens='http://www.jboss.org/bpel/examples/wsdl'><Test...
World
conversationId=12345</TestPart></odens:helloResponse></env:Body></env:Envelope>
\ No newline at end of file
+<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:...
xmlns:ns='http://www.jboss.org/cid'>12345</ns:conversationI...
xmlns:odens='http://www.jboss.org/bpel/examples/wsdl'><Test...
World
conversationId=12345</TestPart></odens:helloResponse></env:Body></env:Envelope>
\ No newline at end of file
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java 2009-11-26
17:24:07 UTC (rev 340)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java 2009-11-26
17:40:48 UTC (rev 341)
@@ -335,12 +335,17 @@
// aren't reliable enough given what people do out there.
Iterator headersIter = soapHeader.getChildElements();
while (headersIter.hasNext()) {
- javax.xml.soap.SOAPHeader header = (javax.xml.soap.SOAPHeader)
headersIter.next();
- String partName = findHeaderPartName(headerDefs, header.getElementQName());
+ javax.xml.soap.SOAPHeaderElement headerElem = (javax.xml.soap.SOAPHeaderElement)
headersIter.next();
+ String partName = findHeaderPartName(headerDefs,
headerElem.getElementQName());
Document doc = DOMUtils.newDocument();
- Element destPart = doc.createElementNS(null, partName);
- destPart.appendChild(doc.importNode(header, true));
- odeMessage.setHeaderPart(partName, destPart);
+
+ // RIFTSAW-74 - slight modification to avoid jbossws exception when
reconstructing the
+ // SOAP message.
+
+ //Element destPart = doc.createElementNS(null, partName);
+ //destPart.appendChild(doc.importNode(headerElem, true));
+ //odeMessage.setHeaderPart(partName, destPart);
+ odeMessage.setHeaderPart(partName, (Element)doc.importNode(headerElem,
true));
}
}
catch (SOAPException e)