Author: objectiser
Date: 2010-12-08 06:59:55 -0500 (Wed, 08 Dec 2010)
New Revision: 1197
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw326TestCase.java
trunk/integration-tests/src/test/resources/testcases/RiftSaw_326/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_326/bpel/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_326/build.xml
trunk/integration-tests/src/test/resources/testcases/RiftSaw_326/messages/
Modified:
trunk/integration-tests/build.xml
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/EndpointReferenceContextImpl.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/ODEServiceEndpointReference.java
Log:
RIFTSAW-326 - fix npe when running dynpartner ODE example in riftsaw.
Modified: trunk/integration-tests/build.xml
===================================================================
--- trunk/integration-tests/build.xml 2010-12-08 09:57:23 UTC (rev 1196)
+++ trunk/integration-tests/build.xml 2010-12-08 11:59:55 UTC (rev 1197)
@@ -201,6 +201,7 @@
<ant antfile="src/test/resources/testcases/RiftSaw_299_peer/build.xml"
/>
<ant antfile="src/test/resources/testcases/RiftSaw_299_ws/build.xml"
/>
<ant antfile="src/test/resources/testcases/RiftSaw_312/build.xml" />
+ <ant antfile="src/test/resources/testcases/RiftSaw_326/build.xml" />
<ant antfile="src/test/resources/management/RiftSaw_238/build.xml" />
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw326TestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw326TestCase.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw326TestCase.java 2010-12-08
11:59:55 UTC (rev 1197)
@@ -0,0 +1,53 @@
+/*
+ * 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.testcases;
+
+import org.jboss.soa.bpel.tests.RiftSawTest;
+import org.jboss.soa.bpel.tests.RiftSawTestSetup;
+
+import junit.framework.Test;
+
+/**
+ * Test case for running the RiftSaw_326 testcase.
+ */
+public class RiftSaw326TestCase extends RiftSawTest {
+
+ private static final String TEST_NAME = "RiftSaw_326";
+
+ public RiftSaw326TestCase() {
+ super(TEST_NAME);
+ }
+
+ public static Test suite() {
+ return(new RiftSawTestSetup(RiftSaw326TestCase.class,
+ TEST_NAME, "RiftSaw_326-1.jar"));
+ }
+
+ public void testSendHello() throws Exception {
+ String result=sendSOAPMessage("request.xml",
+ "http://localhost:8080/dynpartner/DynMainService");
+
+ result = processResult(result);
+
+ assertMessageFromFile(result, "response.xml");
+ }
+}
Added: trunk/integration-tests/src/test/resources/testcases/RiftSaw_326/build.xml
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_326/build.xml
(rev 0)
+++ trunk/integration-tests/src/test/resources/testcases/RiftSaw_326/build.xml 2010-12-08
11:59:55 UTC (rev 1197)
@@ -0,0 +1,30 @@
+<project name="RiftSaw_326" default="deploy"
basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <property name="version" value="1" />
+
+ <property name="deploy.dir" value="${basedir}/target/tests"/>
+ <property name="test.dir"
value="${basedir}/src/test/resources/testcases/${ant.project.name}" />
+
+ <property name="sample.jar.name"
value="${ant.project.name}-${version}.jar" />
+
+ <target name="deploy">
+ <echo>Deploy ${ant.project.name}</echo>
+ <mkdir dir="${deploy.dir}/${ant.project.name}" />
+ <jar basedir="${test.dir}/bpel"
destfile="${deploy.dir}/${ant.project.name}/${sample.jar.name}" />
+
+ <copy todir="${deploy.dir}/${ant.project.name}">
+ <fileset dir="${test.dir}/messages"/>
+ </copy>
+ </target>
+
+ <target name="undeploy">
+ <echo>Undeploy ${ant.project.name}</echo>
+ <delete file="${deploy.dir}/${sample.jar.name}" />
+ </target>
+
+</project>
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/EndpointReferenceContextImpl.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/EndpointReferenceContextImpl.java 2010-12-08
09:57:23 UTC (rev 1196)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/EndpointReferenceContextImpl.java 2010-12-08
11:59:55 UTC (rev 1197)
@@ -45,6 +45,8 @@
}
public EndpointReference convertEndpoint(QName qName, Element element) {
+ if (log.isDebugEnabled())
+ log.debug("Convert endpoint reference: qname="+qName+"
element="+DOMUtils.domToString(element));
EndpointReference endpoint = EndpointFactory.convert(qName, element);
return endpoint;
}
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/ODEServiceEndpointReference.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/ODEServiceEndpointReference.java 2010-12-08
09:57:23 UTC (rev 1196)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/ODEServiceEndpointReference.java 2010-12-08
11:59:55 UTC (rev 1197)
@@ -22,6 +22,7 @@
package org.jboss.soa.bpel.runtime.ws;
import org.apache.ode.bpel.iapi.EndpointReference;
+import org.apache.ode.utils.Namespaces;
import org.w3c.dom.Document;
import org.jboss.soa.dsp.ServiceEndpointReference;
@@ -44,7 +45,7 @@
try {
ret =
javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
- org.w3c.dom.Element elem=ret.createElement("attr");
+ org.w3c.dom.Element elem=ret.createElementNS(Namespaces.SOAP_NS,
"address");
elem.setAttribute("location", getServiceUrl().toExternalForm());
elem.setAttribute("endpointId", getEndpointId());
elem.setAttribute("deploymentName", getDeploymentName());