Author: objectiser
Date: 2010-01-22 10:38:40 -0500 (Fri, 22 Jan 2010)
New Revision: 472
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderWSDLTestCase.java
Removed:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderWSDLTestCasePending.java
Modified:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_hello_world_header_wsdl/bpel/HelloWorld.wsdl
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java
Log:
RIFTSAW-127 - retrieving WSDL bound soap header part was throwing PICK exception. This was
because the header was incorrectly being added twice to the consolidated message, the
second time was also contained in too many levels of 'part'.
Copied:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderWSDLTestCase.java
(from rev 438,
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderWSDLTestCasePending.java)
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderWSDLTestCase.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderWSDLTestCase.java 2010-01-22
15:38:40 UTC (rev 472)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.soa.bpel.tests.samples;
+
+import org.jboss.soa.bpel.tests.RiftSawTest;
+import org.jboss.soa.bpel.tests.RiftSawTestSetup;
+
+import junit.framework.Test;
+
+/**
+ * Test case for running the Quickstart_bpel_hello_world_header_wsdl sample.
+ */
+// TODO: Remove pending suffix when fixed (RIFTSAW-127)
+public class QuickstartBPELHelloWorldHeaderWSDLTestCase extends RiftSawTest {
+
+ private static final String TEST_NAME =
"Quickstart_bpel_hello_world_header_wsdl";
+
+ public QuickstartBPELHelloWorldHeaderWSDLTestCase() {
+ super(TEST_NAME);
+ }
+
+ public static Test suite() {
+ return(new RiftSawTestSetup(QuickstartBPELHelloWorldHeaderWSDLTestCase.class,
+ TEST_NAME, "Quickstart_bpel_hello_world_header_wsdl-1.jar"));
+ }
+
+ public void testSendHello() throws Exception {
+ String result=sendSOAPMessage("hello_request1.xml",
+ "http://localhost:8080/Quickstart_bpel_hello_world_header_wsdlWS");
+
+ assertMessageFromFile(result, "hello_response1.xml");
+ }
+}
Deleted:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderWSDLTestCasePending.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderWSDLTestCasePending.java 2010-01-22
15:35:44 UTC (rev 471)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderWSDLTestCasePending.java 2010-01-22
15:38:40 UTC (rev 472)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.soa.bpel.tests.samples;
-
-import org.jboss.soa.bpel.tests.RiftSawTest;
-import org.jboss.soa.bpel.tests.RiftSawTestSetup;
-
-import junit.framework.Test;
-
-/**
- * Test case for running the Quickstart_bpel_hello_world_header_wsdl sample.
- */
-// TODO: Remove pending suffix when fixed (RIFTSAW-127)
-public class QuickstartBPELHelloWorldHeaderWSDLTestCasePending extends RiftSawTest {
-
- private static final String TEST_NAME =
"Quickstart_bpel_hello_world_header_wsdl";
-
- public QuickstartBPELHelloWorldHeaderWSDLTestCasePending() {
- super(TEST_NAME);
- }
-
- public static Test suite() {
- return(new RiftSawTestSetup(QuickstartBPELHelloWorldHeaderWSDLTestCasePending.class,
- TEST_NAME, "Quickstart_bpel_hello_world_header_wsdl-1.jar"));
- }
-
- public void testSendHello() throws Exception {
- String result=sendSOAPMessage("hello_request1.xml",
- "http://localhost:8080/Quickstart_bpel_hello_world_header_wsdlWS");
-
- assertMessageFromFile(result, "hello_response1.xml");
- }
-}
Modified:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_hello_world_header_wsdl/bpel/HelloWorld.wsdl
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_hello_world_header_wsdl/bpel/HelloWorld.wsdl 2010-01-22
15:35:44 UTC (rev 471)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_hello_world_header_wsdl/bpel/HelloWorld.wsdl 2010-01-22
15:38:40 UTC (rev 472)
@@ -32,7 +32,7 @@
<xsd:element name="conversationId" type="xsd:string" />
</xsd:schema>
</wsdl:types>
-
+
<wsdl:message name="HelloMessage">
<wsdl:part name="TestPart" type="xsd:string"/>
<wsdl:part name="conversationId" element="types:conversationId"
/>
@@ -50,18 +50,18 @@
<wsdl:operation name="hello">
<soap:operation soapAction="" style="rpc"/>
<wsdl:input>
+ <soap:header message="tns:HelloMessage"
+ part="conversationId" use="literal"/>
<soap:body
namespace="http://www.jboss.org/bpel/examples/wsdl"
use="literal" parts="TestPart" />
+ </wsdl:input>
+ <wsdl:output>
<soap:header message="tns:HelloMessage"
part="conversationId" use="literal"/>
- </wsdl:input>
- <wsdl:output>
<soap:body
namespace="http://www.jboss.org/bpel/examples/wsdl"
use="literal" parts="TestPart" />
- <soap:header message="tns:HelloMessage"
- part="conversationId" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
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 2010-01-22
15:35:44 UTC (rev 471)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java 2010-01-22
15:38:40 UTC (rev 472)
@@ -394,10 +394,14 @@
if (headerEl == null) return;
+ /* RIFTSAW-127 - this was duplicating the header part in the consolidated (merged)
message stored in the
+ * BPEL process - but this code actually causes two levels of 'part' to be
defined - e.g.
+ * <conversionId><conversationId><details ....
/></conversatioId></conversationId>
Document doc = DOMUtils.newDocument();
Element destPart = doc.createElementNS(null, p.getName());
destPart.appendChild(doc.importNode(headerEl, true));
odeMessage.setHeaderPart(p.getName(), destPart);
+ */
}
private void extractSoapBodyParts(