riftsaw SVN: r332 - trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2009-11-25 16:39:25 -0500 (Wed, 25 Nov 2009)
New Revision: 332
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java
Log:
RIFTSAW-74, adding parsing of SOAPHeaders
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-25 13:56:46 UTC (rev 331)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java 2009-11-25 21:39:25 UTC (rev 332)
@@ -34,6 +34,7 @@
import javax.wsdl.*;
import javax.wsdl.extensions.ElementExtensible;
import javax.wsdl.extensions.soap.SOAPBinding;
+import javax.wsdl.extensions.soap.SOAPHeader;
import javax.xml.namespace.QName;
import javax.xml.soap.*;
import java.util.*;
@@ -101,7 +102,7 @@
}
}
- public void createSoapRequest(SOAPMessage soapMessage, Message odeRequestMessage, Operation wsdlOperation)
+ public void createSoapRequest(SOAPMessage soapMessage, Message odeRequestMessage, Operation wsdlOperation)
{
BindingOperation bop = binding.getBindingOperation(wsdlOperation.getName(), null, null);
if (bop == null)
@@ -213,7 +214,7 @@
}
catch (SOAPException e)
{
- throw new RuntimeException("Failed ot create soap body",e);
+ throw new RuntimeException("Failed to create soap body",e);
}
}
@@ -221,7 +222,22 @@
javax.wsdl.Message wsdlMessageDef,
Map<String, Node> headerParts)
{
- log.warn("createSoapHeaders() not implemented");
+ try {
+ javax.xml.soap.SOAPHeader soapHeader = soapMessage.getSOAPHeader();
+ if (soapHeader==null) soapHeader = soapMessage.getSOAPPart().getEnvelope().addHeader();
+ for (Node headerNode : headerParts.values()) {
+ if (headerNode.getNodeType() == Node.ELEMENT_NODE) {
+ if (getFirstChildWithName(new QName(headerNode.getNamespaceURI(), headerNode.getLocalName()),soapHeader) == null) {
+ SOAPElement partElement = soapFactory.createElement((Element) headerNode);
+ soapHeader.addChildElement(partElement);
+ }
+ } else {
+ throw new RuntimeException("SOAP header must be a node_element " + headerNode);
+ }
+ }
+ } catch (SOAPException e) {
+ throw new RuntimeException("Failed to create soap header",e);
+ }
}
public void parseSoapResponse(org.apache.ode.bpel.iapi.Message odeMessage,
@@ -235,7 +251,7 @@
throw new RuntimeException("Binding output not found on "+serviceName+"/"+portName);
extractSoapBodyParts(odeMessage, soapMessage, getSOAPBody(bo), odeOperation.getOutput().getMessage(), odeOperation.getName() + "Response");
- extractSoapHeaderParts(odeMessage, soapMessage, odeOperation.getOutput().getMessage());
+ extractSoapHeaderParts(odeMessage, soapMessage, getSOAPHeaders(bo), odeOperation.getOutput().getMessage());
}
public void parseSoapRequest(
@@ -254,7 +270,7 @@
throw new RuntimeException("Binding input not found"+serviceName+"/"+portName);
extractSoapBodyParts(odeMessage, soapMessage, getSOAPBody(bi), op.getInput().getMessage(), op.getName());
- extractSoapHeaderParts(odeMessage, soapMessage, op.getInput().getMessage());
+ extractSoapHeaderParts(odeMessage, soapMessage, getSOAPHeaders(bi), op.getInput().getMessage());
}
public void createSoapFault(SOAPMessage soapMessage, Element message, QName faultName, Operation op)
@@ -307,11 +323,74 @@
return detail;
}
- private void extractSoapHeaderParts(Message odeMessage, SOAPMessage soapMessage, javax.wsdl.Message wsdlMessageDef)
+ private void extractSoapHeaderParts(Message odeMessage, SOAPMessage soapMessage, List<SOAPHeader> headerDefs,javax.wsdl.Message wsdlMessageDef)
{
- log.warn("extractSoapHeaderParts() not implemented");
+ try {
+ javax.xml.soap.SOAPHeader soapHeader = soapMessage.getSOAPHeader();
+ // Checking that the definitions we have are at least there
+ for (SOAPHeader headerDef : headerDefs)
+ handleSoapHeaderPartDef(odeMessage, soapHeader, headerDef, wsdlMessageDef);
+
+ // Extracting whatever header elements we find in the message, binding and abstract parts
+ // 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());
+ Document doc = DOMUtils.newDocument();
+ Element destPart = doc.createElementNS(null, partName);
+ destPart.appendChild(doc.importNode(header, true));
+ odeMessage.setHeaderPart(partName, destPart);
+ }
+ }
+ catch (SOAPException e)
+ {
+ throw new RuntimeException("Failed to extracts header parts",e);
+ }
}
+
+ private String findHeaderPartName(List<SOAPHeader> headerDefs, QName elmtName) {
+ for (SOAPHeader headerDef : headerDefs) {
+ javax.wsdl.Message hdrMsg = wsdl.getMessage(headerDef.getMessage());
+ for (Object o : hdrMsg.getParts().values()) {
+ Part p = (Part) o;
+ if (p.getElementName().equals(elmtName)) return p.getName();
+ }
+ }
+ return elmtName.getLocalPart();
+ }
+
+ private void handleSoapHeaderPartDef(Message odeMessage, javax.xml.soap.SOAPHeader header, SOAPHeader headerdef,
+ javax.wsdl.Message msgType) {
+ // Is this header part of the "payload" messsage?
+ boolean payloadMessageHeader = headerdef.getMessage() == null || headerdef.getMessage().equals(msgType.getQName());
+ boolean requiredHeader = payloadMessageHeader || (headerdef.getRequired() != null && headerdef.getRequired());
+ if (requiredHeader && header == null)
+ throw new RuntimeException("Soap Header is missing a required field " + headerdef.getElementType());
+
+ if (header == null)
+ return;
+
+ javax.wsdl.Message hdrMsg = wsdl.getMessage(headerdef.getMessage());
+ if (hdrMsg == null)
+ return;
+ Part p = hdrMsg.getPart(headerdef.getPart());
+ if (p == null || p.getElementName() == null)
+ return;
+
+ SOAPElement headerEl = getFirstChildWithName(p.getElementName(), header);
+ if (requiredHeader && headerEl == null)
+ throw new RuntimeException("Soap Header is missing a required field " + headerdef.getElementType());
+
+ if (headerEl == null) return;
+
+ 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(
Message odeMessage,
SOAPMessage soapMessage,
15 years
Build failed in Hudson: RiftSaw-derby #9
by jboss-qa-internal@redhat.com
See http://hudson.qa.jboss.com/hudson/job/RiftSaw-derby/9/changes
Changes:
[jeff.yuchang] * update it back to 2.0-SNAPSHOT
------------------------------------------
[...truncated 1870 lines...]
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.jboss.soa.bpel.tests.RiftSawTestHelper.getServer(RiftSawTestHelper.java:71)
... 20 more
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.105 sec <<< FAILURE!
Running org.jboss.soa.bpel.tests.samples.QuickstartBPELHelloWorldTestCase
java.lang.RuntimeException: Cannot obtain MBeanServerConnection using jndi props: {java.naming.provider.url=localhost:1099, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces:org.jnp.interfaces, hostKey=localhost/127.0.0.1:1099}
at org.jboss.soa.bpel.tests.RiftSawTestHelper.getServer(RiftSawTestHelper.java:75)
at org.jboss.soa.bpel.tests.RiftSawTestHelper.getDeployer(RiftSawTestHelper.java:82)
at org.jboss.soa.bpel.tests.RiftSawTestHelper.deploy(RiftSawTestHelper.java:48)
at org.jboss.soa.bpel.tests.RiftSawTestSetup.setUp(RiftSawTestSetup.java:104)
at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.extensions.TestSetup.run(TestSetup.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Caused by: javax.naming.NameNotFoundException: jmx not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.jboss.soa.bpel.tests.RiftSawTestHelper.getServer(RiftSawTestHelper.java:71)
... 20 more
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.24 sec <<< FAILURE!
Running org.jboss.soa.bpel.tests.samples.QuickstartESBBPELHelloWorldTestCase
java.lang.RuntimeException: Cannot obtain MBeanServerConnection using jndi props: {java.naming.provider.url=localhost:1099, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces:org.jnp.interfaces, hostKey=localhost/127.0.0.1:1099}
at org.jboss.soa.bpel.tests.RiftSawTestHelper.getServer(RiftSawTestHelper.java:75)
at org.jboss.soa.bpel.tests.RiftSawTestHelper.getDeployer(RiftSawTestHelper.java:82)
at org.jboss.soa.bpel.tests.RiftSawTestHelper.deploy(RiftSawTestHelper.java:48)
at org.jboss.soa.bpel.tests.RiftSawTestSetup.setUp(RiftSawTestSetup.java:104)
at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.extensions.TestSetup.run(TestSetup.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Caused by: javax.naming.NameNotFoundException: jmx not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.jboss.soa.bpel.tests.RiftSawTestHelper.getServer(RiftSawTestHelper.java:71)
... 20 more
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.12 sec <<< FAILURE!
Running org.jboss.soa.bpel.tests.samples.QuickstartESBBPELLoanFaultTestCase
java.lang.RuntimeException: Cannot obtain MBeanServerConnection using jndi props: {java.naming.provider.url=localhost:1099, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces:org.jnp.interfaces, hostKey=localhost/127.0.0.1:1099}
at org.jboss.soa.bpel.tests.RiftSawTestHelper.getServer(RiftSawTestHelper.java:75)
at org.jboss.soa.bpel.tests.RiftSawTestHelper.getDeployer(RiftSawTestHelper.java:82)
at org.jboss.soa.bpel.tests.RiftSawTestHelper.deploy(RiftSawTestHelper.java:48)
at org.jboss.soa.bpel.tests.RiftSawTestSetup.setUp(RiftSawTestSetup.java:104)
at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.extensions.TestSetup.run(TestSetup.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Caused by: javax.naming.NameNotFoundException: jmx not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.jboss.soa.bpel.tests.RiftSawTestHelper.getServer(RiftSawTestHelper.java:71)
... 20 more
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.122 sec <<< FAILURE!
Results :
Tests in error:
org.jboss.soa.bpel.tests.samples.QuickstartBPELSimpleCorrelationTestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELLoanApprovalTestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELSimpleInvokeTestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELHelloWorldTestCase
org.jboss.soa.bpel.tests.samples.QuickstartESBBPELHelloWorldTestCase
org.jboss.soa.bpel.tests.samples.QuickstartESBBPELLoanFaultTestCase
Tests run: 6, Failures: 0, Errors: 6, Skipped: 0
[ERROR] There are test failures.
Please refer to http://hudson.qa.jboss.com/hudson/job/RiftSaw-derby/ws/riftsaw-derby/inte... for the individual test results.
[INFO] [antrun:run {execution: undeploy-riftsaw}]
[INFO] Executing tasks
stop-server:
[echo] Stopping the server
[echo] Server is at http://hudson.qa.jboss.com/hudson/job/RiftSaw-derby/ws/riftsaw-2.0-SNAPSH...
[java] Exception in thread "main" javax.naming.NameNotFoundException: jmx not bound
[java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
[java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
[java] at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
[java] at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
[java] at sun.rmi.transport.Transport$1.run(Transport.java:159)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
[java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
[java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
[java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[java] at java.lang.Thread.run(Thread.java:619)
[java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
[java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
[java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at org.jboss.Shutdown.main(Shutdown.java:219)
[java] Java Result: 1
[echo] Shutdown rc = 1
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An Ant BuildException has occured: The following error occurred while executing this line:
http://hudson.qa.jboss.com/hudson/job/RiftSaw-derby/ws/riftsaw-derby/inte... :106: Unable to shut down JBoss (maybe it hasn't fully started yet?).
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 minutes 38 seconds
[INFO] Finished at: Wed Nov 25 03:41:51 EST 2009
[INFO] Final Memory: 56M/508M
[INFO] ------------------------------------------------------------------------
Recording test results
15 years
riftsaw SVN: r331 - in trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime: ws and 1 other directory.
by riftsaw-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-11-25 08:56:46 -0500 (Wed, 25 Nov 2009)
New Revision: 331
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/AbstractWebServiceEndpoint.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/Runner.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLParser.java
Log:
Fix RIFTSAW-120: Failed to find doclit operation on nested imports
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java 2009-11-25 13:26:21 UTC (rev 330)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java 2009-11-25 13:56:46 UTC (rev 331)
@@ -111,7 +111,7 @@
{
WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
Definition def = wsdlReader.readWSDL(f.toURL().toExternalForm());
- URL url = WSDLParser.getServiceLocationURL(def, myRoleEndpoint.serviceName, myRoleEndpoint.portName);
+ URL url = new WSDLParser(def).getServiceLocationURL(myRoleEndpoint.serviceName, myRoleEndpoint.portName);
if(url!=null)
{
targetWsdlFile = f;
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/AbstractWebServiceEndpoint.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/AbstractWebServiceEndpoint.java 2009-11-25 13:26:21 UTC (rev 330)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/AbstractWebServiceEndpoint.java 2009-11-25 13:56:46 UTC (rev 331)
@@ -129,8 +129,8 @@
else
{
QName elementName = new QName(payload.getNamespaceURI(), payload.getLocalName());
- Operation op = WSDLParser.getDocLitOperation(
- this.serviceQName, getPortName(), elementName , wsdlDefinition
+ Operation op = new WSDLParser(wsdlDefinition).getDocLitOperation(
+ this.serviceQName, getPortName(), elementName
);
return op.getName();
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2009-11-25 13:26:21 UTC (rev 330)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2009-11-25 13:56:46 UTC (rev 331)
@@ -108,7 +108,7 @@
ClassLoaderFactory clf = new DelegatingClassLoaderFactory(classLoader);
// WebMetaData
- URL serviceUrl = WSDLParser.getServiceLocationURL(wsdlRef.getDefinition(), metaData.getServiceName(), metaData.getPortName());
+ URL serviceUrl = new WSDLParser(wsdlRef.getDefinition()).getServiceLocationURL(metaData.getServiceName(), metaData.getPortName());
String[] webContext = deriveWebContextFromServiceUrl(serviceUrl);
WebMetaDataFactory wmdFactory = new WebMetaDataFactory(
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/Runner.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/Runner.java 2009-11-25 13:26:21 UTC (rev 330)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/Runner.java 2009-11-25 13:56:46 UTC (rev 331)
@@ -37,20 +37,27 @@
// HelloWorldProcessRequest
WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
- Definition wsdlDefinition = wsdlReader.readWSDL("file:///Users/hbraun/Downloads/HelloWorldProcessArtifacts.wsdl");
+ Definition wsdlDefinition = wsdlReader.readWSDL(
+ "file:///Users/hbraun/dev/env/riftsaw-distro/jbossesb-4.6/samples/quickstarts/webservice_esb_bpel/bpel/wsdl/BPELRetailer.wsdl"
+ );
- service = new QName("http://jboss.com/bpel/helloWorld", "HelloWorldProcessService");
- port = "HelloWorldProcessServicePort";
+ service = new QName("http://www.jboss.org/samples/bpel/Retailer.wsdl", "RetailerService");
+ port = "RetailerPort";
SOAPMessageAdapter soapAdapter =new SOAPMessageAdapter(wsdlDefinition, service, port);
System.out.println("RPC ? "+soapAdapter.isRPC());
- Operation op = WSDLParser.getDocLitOperation(
- service, port, new QName("http://jboss.com/bpel/helloWorld", "HelloWorldProcessRequest"), wsdlDefinition
+ WSDLParser parser = new WSDLParser(wsdlDefinition);
+ Operation op = parser.getDocLitOperation(
+ service, port, new QName("http://www.jboss.org/samples/bpel/CustomerOrder.xsd", "customerOrder")
);
System.out.println("operation: "+op.getName());
+
+ System.out.println(
+ "URL: " + parser.getServiceLocationURL(service, port)
+ );
}
}
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLParser.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLParser.java 2009-11-25 13:26:21 UTC (rev 330)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLParser.java 2009-11-25 13:56:46 UTC (rev 331)
@@ -31,10 +31,57 @@
/**
* WSDL helper class
*/
-public class WSDLParser
+public final class WSDLParser
{
- public static Operation getDocLitOperation(QName service, String port, QName payloadName, Definition wsdl)
+
+ private Definition wsdlDefinition;
+ private int dfsDepth = 0;
+
+ public WSDLParser(Definition wsdlDefinition)
{
+ this.wsdlDefinition = wsdlDefinition;
+ }
+
+ public void reset()
+ {
+ dfsDepth = 0;
+ }
+
+ public Operation getDocLitOperation(QName service, String port, QName payloadName)
+ {
+ reset();
+ return _getDocLitOperation(this.wsdlDefinition, service, port, payloadName);
+ }
+
+ private Operation _getDocLitOperation(Definition wsdl, QName service, String port, QName payloadName)
+ {
+ Operation match = null;
+ dfsDepth++;
+
+ if(dfsDepth>50) // easier then retaining references
+ throw new IllegalStateException("Recursive loop detected. DFS depth reached limit");
+
+ // namespace / java.util.List of imports
+ Map<String, List<Import>> imports = wsdl.getImports();
+ for(String ns : imports.keySet())
+ {
+ List<Import> importNS = imports.get(ns);
+ for(Import wsdlImport : importNS)
+ {
+ Operation result = _getDocLitOperation(wsdlImport.getDefinition(), service, port, payloadName);
+ if(result!=null)
+ {
+ match = result;
+ break;
+ }
+ }
+
+ if(match!=null) break;
+ }
+
+ if(match!=null) // DFS results
+ return match;
+
// resolve wsdl:message
Map<QName, Message> messages = wsdl.getMessages();
QName relatedMessage = null;
@@ -80,10 +127,41 @@
return relatedOperation;
}
- public static URL getServiceLocationURL(Definition wsdl, QName serviceQName, String portName)
+ public URL getServiceLocationURL(QName serviceQName, String portName)
{
- URL url = null;
+ reset();
+ return _getServiceLocationURL(this.wsdlDefinition, serviceQName, portName);
+ }
+ public URL _getServiceLocationURL(Definition wsdl, QName serviceQName, String portName)
+ {
+ URL match = null;
+ dfsDepth++;
+
+ if(dfsDepth>50) // easier then retaining references
+ throw new IllegalStateException("Recursive loop detected. DFS depth reached limit");
+
+ // namespace / java.util.List of imports
+ Map<String, List<Import>> imports = wsdl.getImports();
+ for(String ns : imports.keySet())
+ {
+ List<Import> importNS = imports.get(ns);
+ for(Import wsdlImport : importNS)
+ {
+ URL result = _getServiceLocationURL(wsdlImport.getDefinition(), serviceQName, portName);
+ if(result!=null)
+ {
+ match = result;
+ break;
+ }
+ }
+
+ if(match!=null) break;
+ }
+
+ if(match!=null) // DFS results
+ return match;
+
try
{
Service service = wsdl.getService(serviceQName);
@@ -111,13 +189,13 @@
// --
if(soapAddress!=null)
- url = new URL(soapAddress.getLocationURI());
+ match = new URL(soapAddress.getLocationURI());
}
catch (Exception e)
{
throw new RuntimeException("Failed to parse " + wsdl, e);
}
- return url;
+ return match;
}
}
15 years, 1 month
riftsaw SVN: r330 - in trunk: runtime/engine-assembly and 1 other directories.
by riftsaw-commits@lists.jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-11-25 08:26:21 -0500 (Wed, 25 Nov 2009)
New Revision: 330
Modified:
trunk/console/identity/
trunk/runtime/engine-assembly/
trunk/runtime/jbossesb-bpel-assembly/
Log:
RIFTSAW-34: ignore eclipse .classpath in java-packaged modules
Property changes on: trunk/console/identity
___________________________________________________________________
Name: svn:ignore
- target
.project
*.iml
.settings
+ target
.project
*.iml
.settings
.classpath
Property changes on: trunk/runtime/engine-assembly
___________________________________________________________________
Name: svn:ignore
- *.iml
*.ipr
*.iws
target
.project
.settings
+ *.iml
*.ipr
*.iws
target
.project
.settings
.classpath
Property changes on: trunk/runtime/jbossesb-bpel-assembly
___________________________________________________________________
Name: svn:ignore
- *.iml
*.ipr
*.iws
target
.project
.settings
+ *.iml
*.ipr
*.iws
target
.project
.settings
.classpath
15 years, 1 month
riftsaw SVN: r329 - in trunk: integration-tests/src/test/resources/samples/Quickstart_bpel_travel_agency/bpel and 1 other directories.
by riftsaw-commits@lists.jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-11-25 08:23:00 -0500 (Wed, 25 Nov 2009)
New Revision: 329
Modified:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/travel/TravelService.java
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_travel_agency/bpel/trip.wsdl
trunk/samples/quickstart/travel_agency/bpel/trip.wsdl
Log:
RIFTSAW-34: change travel agent port address to prevent conflict at deployment time
Modified: trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/travel/TravelService.java
===================================================================
--- trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/travel/TravelService.java 2009-11-25 12:41:56 UTC (rev 328)
+++ trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/travel/TravelService.java 2009-11-25 13:23:00 UTC (rev 329)
@@ -19,7 +19,7 @@
static final String SERVICE_NAME = "TravelService";
static final String TARGET_NAMESPACE = "http://jbpm.org/examples/trip";
static final String WSDL_LOCATION =
- "http://127.0.0.1:8080/Quickstart_bpel_travel_agency/travelAgent?wsdl";
+ "http://127.0.0.1:8080/Quickstart_bpel_travel_agencyWS?wsdl";
private final static URL WSDL_URL = createURL(WSDL_LOCATION);
Modified: trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_travel_agency/bpel/trip.wsdl
===================================================================
--- trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_travel_agency/bpel/trip.wsdl 2009-11-25 12:41:56 UTC (rev 328)
+++ trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_travel_agency/bpel/trip.wsdl 2009-11-25 13:23:00 UTC (rev 329)
@@ -157,7 +157,7 @@
<service name="TravelService">
<port name="TravelAgentPort" binding="tns:TravelAgentBinding">
<soap:address
- location="http://127.0.0.1:8080/Quickstart_bpel_travel_agency/travelAgent" />
+ location="http://127.0.0.1:8080/Quickstart_bpel_travel_agencyWS" />
</port>
</service>
Modified: trunk/samples/quickstart/travel_agency/bpel/trip.wsdl
===================================================================
--- trunk/samples/quickstart/travel_agency/bpel/trip.wsdl 2009-11-25 12:41:56 UTC (rev 328)
+++ trunk/samples/quickstart/travel_agency/bpel/trip.wsdl 2009-11-25 13:23:00 UTC (rev 329)
@@ -157,7 +157,7 @@
<service name="TravelService">
<port name="TravelAgentPort" binding="tns:TravelAgentBinding">
<soap:address
- location="http://127.0.0.1:8080/Quickstart_bpel_travel_agency/travelAgent" />
+ location="http://127.0.0.1:8080/Quickstart_bpel_travel_agencyWS" />
</port>
</service>
15 years, 1 month
riftsaw SVN: r328 - trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/messages.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2009-11-25 07:41:56 -0500 (Wed, 25 Nov 2009)
New Revision: 328
Modified:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/messages/hello_response1.xml
Log:
Updated test result to reflect fix for RIFTSAW-118
Modified: trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/messages/hello_response1.xml
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/messages/hello_response1.xml 2009-11-25 12:12:36 UTC (rev 327)
+++ trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/messages/hello_response1.xml 2009-11-25 12:41:56 UTC (rev 328)
@@ -1,7 +1,5 @@
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
- <soapenv:Body>
- <TestOrchestrationProcessResponse xmlns="http://www.jboss.org/riftsaw/acs">
- <result xmlns:tns="http://www.jboss.org/riftsaw/acs">World</result>
- </TestOrchestrationProcessResponse>
- </soapenv:Body>
-</soapenv:Envelope>
\ No newline at end of file
+<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><TestOrchestrationProcessResponse xmlns='http://www.jboss.org/riftsaw/acs'>
+ <tns:result xmlns:tns='http://www.jboss.org/riftsaw/acs'>
+
+ World</tns:result>
+ </TestOrchestrationProcessResponse></env:Body></env:Envelope>
\ No newline at end of file
15 years, 1 month
riftsaw SVN: r327 - in trunk/samples/esb/webservice_esb_bpel: bpel/wsdl and 1 other directory.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2009-11-25 07:12:36 -0500 (Wed, 25 Nov 2009)
New Revision: 327
Modified:
trunk/samples/esb/webservice_esb_bpel/bpel/wsdl/Customer.wsdl
trunk/samples/esb/webservice_esb_bpel/bpel/wsdl/Retailer.wsdl
trunk/samples/esb/webservice_esb_bpel/readme.txt
Log:
Updates related to RIFTSAW-56
Modified: trunk/samples/esb/webservice_esb_bpel/bpel/wsdl/Customer.wsdl
===================================================================
--- trunk/samples/esb/webservice_esb_bpel/bpel/wsdl/Customer.wsdl 2009-11-25 11:54:05 UTC (rev 326)
+++ trunk/samples/esb/webservice_esb_bpel/bpel/wsdl/Customer.wsdl 2009-11-25 12:12:36 UTC (rev 327)
@@ -48,7 +48,7 @@
<wsdl:service name="CustomerService">
<wsdl:port name="CustomerSoap" binding="tns:CustomerSoap">
<soap:address
- location="http://localhost:8080/bpel/processes/ABI_Customer" />
+ location="http://localhost:8080/Webservice_esb_bpel_ABI_Customer" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Modified: trunk/samples/esb/webservice_esb_bpel/bpel/wsdl/Retailer.wsdl
===================================================================
--- trunk/samples/esb/webservice_esb_bpel/bpel/wsdl/Retailer.wsdl 2009-11-25 11:54:05 UTC (rev 326)
+++ trunk/samples/esb/webservice_esb_bpel/bpel/wsdl/Retailer.wsdl 2009-11-25 12:12:36 UTC (rev 327)
@@ -46,7 +46,7 @@
</wsdl:binding>
<wsdl:service name="RetailerService">
<wsdl:port name="RetailerPort" binding="tns:RetailerBinding">
- <soap:address location="http://localhost:8080/bpel/processes/Retailer" />
+ <soap:address location="http://localhost:8080/Webservice_esb_bpel_Retailer" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Modified: trunk/samples/esb/webservice_esb_bpel/readme.txt
===================================================================
--- trunk/samples/esb/webservice_esb_bpel/readme.txt 2009-11-25 11:54:05 UTC (rev 326)
+++ trunk/samples/esb/webservice_esb_bpel/readme.txt 2009-11-25 12:12:36 UTC (rev 327)
@@ -23,7 +23,7 @@
and a more detailed descripton of the different ways to run the quickstarts.
NOTE: This Quickstart DOES NOT run Standalone, or on the ESB Server. It only runs on the
- JBoss Application Server (v4.2.xGA).
+ JBoss Application Server.
1. Ensure that the value of the 'directory' attribute on the
@@ -31,19 +31,15 @@
'order.approval.drop.location' property in
'webservice_esb_bpel/services/order-manager/order-manager.properties',
and that the directory exists.
- 2. In the run.bat/run.sh start script for your JBoss Appllication Server,
- set the Permanent Generation space size by adding the following to the
- "JAVA_OPTS" setting:
- -XX:MaxPermSize=128m
- 3. Restart your JBoss Application Server.
- 4. Goto the BPEL Console (http://localhost:8080/bpel) and confirm
+ 2. Restart your JBoss Application Server.
+ 3. Goto the BPEL Console (http://localhost:8080/bpel-console) and confirm
it displays.
To Run:
=======
1. In a command terminal window in this folder, type 'ant deploy'.
2. Goto 'Processes' on the BPEL Console
- (http://localhost:8080/bpel) and confirm that the 'Customer' and
+ (http://localhost:8080/bpel-console) and confirm that the 'Customer' and
'OrderProcess' BPEL processes are deployed.
3. Start your favorite SOAP client (e.g. SOAPUI) and load the
'Retailer' WSDL located in the sample's 'bpel/wsdl' folder.
15 years, 1 month
riftsaw SVN: r326 - in trunk: runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws and 1 other directories.
by riftsaw-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-11-25 06:54:05 -0500 (Wed, 25 Nov 2009)
New Revision: 326
Added:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/Runner.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLParser.java
Removed:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLQuery.java
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/AbstractWebServiceEndpoint.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java
trunk/samples/quickstart/hello_world/bpel/HelloWorld.wsdl
Log:
Fix RIFTSAW-118: Wrong op name on doclit requests
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java 2009-11-25 11:00:37 UTC (rev 325)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java 2009-11-25 11:54:05 UTC (rev 326)
@@ -21,10 +21,7 @@
import org.apache.commons.logging.LogFactory;
import org.apache.ode.bpel.iapi.*;
import org.jboss.soa.bpel.runtime.engine.PartnerChannel;
-import org.jboss.soa.bpel.runtime.ws.EndpointManager;
-import org.jboss.soa.bpel.runtime.ws.EndpointMetaData;
-import org.jboss.soa.bpel.runtime.ws.WSDLQuery;
-import org.jboss.soa.bpel.runtime.ws.WSDLReference;
+import org.jboss.soa.bpel.runtime.ws.*;
import javax.wsdl.Definition;
import javax.wsdl.PortType;
@@ -114,7 +111,7 @@
{
WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
Definition def = wsdlReader.readWSDL(f.toURL().toExternalForm());
- URL url = new WSDLQuery(def).query(myRoleEndpoint.serviceName, myRoleEndpoint.portName);
+ URL url = WSDLParser.getServiceLocationURL(def, myRoleEndpoint.serviceName, myRoleEndpoint.portName);
if(url!=null)
{
targetWsdlFile = f;
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/AbstractWebServiceEndpoint.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/AbstractWebServiceEndpoint.java 2009-11-25 11:00:37 UTC (rev 325)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/AbstractWebServiceEndpoint.java 2009-11-25 11:54:05 UTC (rev 326)
@@ -32,6 +32,7 @@
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.wsdl.Definition;
+import javax.wsdl.Operation;
import javax.wsdl.WSDLException;
import javax.wsdl.factory.WSDLFactory;
import javax.wsdl.xml.WSDLReader;
@@ -53,6 +54,7 @@
private SOAPMessageAdapter soapAdapter;
private QName serviceQName;
+ private Definition wsdlDefinition;
private boolean isInitialized;
@@ -63,7 +65,7 @@
try
{
WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
- Definition wsdlDefinition = wsdlReader.readWSDL(getWsdlLocation());
+ this.wsdlDefinition = wsdlReader.readWSDL(getWsdlLocation());
this.serviceQName = QName.valueOf(getServiceName());
this.soapAdapter = new SOAPMessageAdapter(wsdlDefinition, serviceQName, getPortName());
}
@@ -90,8 +92,10 @@
log.debug( "ODE inbound message: \n" +DOMWriter.printNode(soapEnvelope, true) );
// Create invocation context
+ final String operationName = resolveOperationName(messageElement);
+
WSInvocationAdapter invocationContext = new WSInvocationAdapter(
- messageElement.getLocalName(),
+ operationName,
serviceQName,
soapAdapter
);
@@ -116,6 +120,23 @@
}
}
+ public String resolveOperationName(Element payload)
+ {
+ if(soapAdapter.isRPC())
+ {
+ return payload.getLocalName();
+ }
+ else
+ {
+ QName elementName = new QName(payload.getNamespaceURI(), payload.getLocalName());
+ Operation op = WSDLParser.getDocLitOperation(
+ this.serviceQName, getPortName(), elementName , wsdlDefinition
+ );
+
+ return op.getName();
+ }
+ }
+
public static Element getMessagePayload(SOAPEnvelope soapEnvelope)
throws SOAPException
{
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2009-11-25 11:00:37 UTC (rev 325)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2009-11-25 11:54:05 UTC (rev 326)
@@ -108,8 +108,7 @@
ClassLoaderFactory clf = new DelegatingClassLoaderFactory(classLoader);
// WebMetaData
- WSDLQuery addressQuery = new WSDLQuery(wsdlRef.getDefinition());
- URL serviceUrl = addressQuery.query(metaData.getServiceName(), metaData.getPortName());
+ URL serviceUrl = WSDLParser.getServiceLocationURL(wsdlRef.getDefinition(), metaData.getServiceName(), metaData.getPortName());
String[] webContext = deriveWebContextFromServiceUrl(serviceUrl);
WebMetaDataFactory wmdFactory = new WebMetaDataFactory(
Added: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/Runner.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/Runner.java (rev 0)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/Runner.java 2009-11-25 11:54:05 UTC (rev 326)
@@ -0,0 +1,56 @@
+/*
+ * 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.runtime.ws;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Operation;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+public class Runner
+{
+ static QName service;
+ static String port;
+
+ public static void main(String[] args) throws Exception
+ {
+ // HelloWorldProcessRequest
+
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ Definition wsdlDefinition = wsdlReader.readWSDL("file:///Users/hbraun/Downloads/HelloWorldProcessArtifacts.wsdl");
+
+ service = new QName("http://jboss.com/bpel/helloWorld", "HelloWorldProcessService");
+ port = "HelloWorldProcessServicePort";
+
+ SOAPMessageAdapter soapAdapter =new SOAPMessageAdapter(wsdlDefinition, service, port);
+
+ System.out.println("RPC ? "+soapAdapter.isRPC());
+
+ Operation op = WSDLParser.getDocLitOperation(
+ service, port, new QName("http://jboss.com/bpel/helloWorld", "HelloWorldProcessRequest"), wsdlDefinition
+ );
+
+ System.out.println("operation: "+op.getName());
+ }
+
+}
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-25 11:00:37 UTC (rev 325)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java 2009-11-25 11:54:05 UTC (rev 326)
@@ -133,6 +133,11 @@
}
+ public boolean isRPC()
+ {
+ return isRPC;
+ }
+
public void createSoapResponse(SOAPMessage soapMessage, Message odeResponseMessage, Operation wsdlOperation)
{
@@ -341,9 +346,19 @@
}
else
{
- // In doc-literal style, we expect the elements in the body to correspond (in order) to the
- // parts defined in the binding. All the parts should be element-typed, otherwise it is a mess.
- Iterator<SOAPElement> srcParts = soapBody.getChildElements();
+ // In doc-literal style, we expect the elements in the body to correspond (in order)
+ // to the parts defined in the binding.
+ // All the parts should be element-typed, otherwise it is a mess.
+ List<SOAPElement> childElements = new ArrayList<SOAPElement>();
+ final Iterator children = soapBody.getChildElements() ;
+ while(children.hasNext())
+ {
+ final Node node = (Node)children.next() ;
+ if (node instanceof SOAPElement)
+ childElements.add((SOAPElement)node);
+ }
+
+ Iterator<SOAPElement> srcParts = childElements.iterator();
for(Part part : parts)
{
SOAPElement srcPart = srcParts.next();
Added: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLParser.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLParser.java (rev 0)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLParser.java 2009-11-25 11:54:05 UTC (rev 326)
@@ -0,0 +1,123 @@
+/*
+ * 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.runtime.ws;
+
+import javax.wsdl.*;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.xml.namespace.QName;
+import java.net.URL;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * WSDL helper class
+ */
+public class WSDLParser
+{
+ public static Operation getDocLitOperation(QName service, String port, QName payloadName, Definition wsdl)
+ {
+ // resolve wsdl:message
+ Map<QName, Message> messages = wsdl.getMessages();
+ QName relatedMessage = null;
+ for(QName qname : messages.keySet())
+ {
+ Message candidate = messages.get(qname);
+ Map<String, Part> parts = candidate.getParts();
+ for(String s : parts.keySet())
+ {
+ Part p = parts.get(s);
+ if(p.getElementName().equals(payloadName))
+ {
+ relatedMessage = qname;
+ break;
+ }
+ }
+ }
+
+ if(null==relatedMessage)
+ throw new IllegalArgumentException("Unable to find WSDL Message for element "+payloadName);
+
+ // resolve the port & operation
+ Operation relatedOperation = null;
+
+ Service s = wsdl.getService(service);
+ Port p = s.getPort(port);
+ Binding b = p.getBinding();
+
+ PortType portType = b.getPortType();
+ List<Operation> operations = portType.getOperations();
+ for(Operation op : operations)
+ {
+ if(op.getInput().getMessage().getQName().equals(relatedMessage))
+ {
+ relatedOperation = op;
+ break;
+ }
+ }
+
+ if(null==relatedOperation)
+ throw new IllegalArgumentException("Unable to find WSDL Operation for Message "+relatedMessage);
+
+ return relatedOperation;
+ }
+
+ public static URL getServiceLocationURL(Definition wsdl, QName serviceQName, String portName)
+ {
+ URL url = null;
+
+ try
+ {
+ Service service = wsdl.getService(serviceQName);
+ Port port = null;
+ SOAPAddress soapAddress = null;
+
+ // --
+
+ if(service!=null)
+ {
+ port = service.getPort(portName);
+ if(port!=null)
+ {
+ for(Object obj : port.getExtensibilityElements())
+ {
+ if(obj instanceof SOAPAddress)
+ {
+ soapAddress = (SOAPAddress)obj;
+ }
+ }
+
+ }
+ }
+
+ // --
+
+ if(soapAddress!=null)
+ url = new URL(soapAddress.getLocationURI());
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to parse " + wsdl, e);
+ }
+
+ return url;
+ }
+}
Deleted: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLQuery.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLQuery.java 2009-11-25 11:00:37 UTC (rev 325)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLQuery.java 2009-11-25 11:54:05 UTC (rev 326)
@@ -1,85 +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.runtime.ws;
-
-import javax.wsdl.Definition;
-import javax.wsdl.Port;
-import javax.wsdl.Service;
-import javax.wsdl.extensions.soap.SOAPAddress;
-import javax.xml.namespace.QName;
-import java.net.URL;
-
-/**
- * Queries a service URL soap address.
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class WSDLQuery
-{
- private Definition definition;
-
- public WSDLQuery(Definition wsdl)
- {
- this.definition = wsdl;
- }
-
- public URL query(QName serviceQName, String portName)
- {
- URL url = null;
-
- try
- {
- Service service = definition.getService(serviceQName);
- Port port = null;
- SOAPAddress soapAddress = null;
-
- // --
-
- if(service!=null)
- {
- port = service.getPort(portName);
- if(port!=null)
- {
- for(Object obj : port.getExtensibilityElements())
- {
- if(obj instanceof SOAPAddress)
- {
- soapAddress = (SOAPAddress)obj;
- }
- }
-
- }
- }
-
- // --
-
- if(soapAddress!=null)
- url = new URL(soapAddress.getLocationURI());
- }
- catch (Exception e)
- {
- throw new RuntimeException("Failed to parse " + definition, e);
- }
-
- return url;
- }
-}
Modified: trunk/samples/quickstart/hello_world/bpel/HelloWorld.wsdl
===================================================================
--- trunk/samples/quickstart/hello_world/bpel/HelloWorld.wsdl 2009-11-25 11:00:37 UTC (rev 325)
+++ trunk/samples/quickstart/hello_world/bpel/HelloWorld.wsdl 2009-11-25 11:54:05 UTC (rev 326)
@@ -17,51 +17,51 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-<wsdl:definitions
- targetNamespace="http://www.jboss.org/bpel/examples/wsdl"
- xmlns="http://schemas.xmlsoap.org/wsdl/"
- xmlns:tns="http://www.jboss.org/bpel/examples/wsdl"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
-
+<wsdl:definitions
+ targetNamespace="http://www.jboss.org/bpel/examples/wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://www.jboss.org/bpel/examples/wsdl"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+
<wsdl:message name="HelloMessage">
<wsdl:part name="TestPart" type="xsd:string"/>
</wsdl:message>
-
+
<wsdl:portType name="HelloPortType">
<wsdl:operation name="hello">
<wsdl:input message="tns:HelloMessage" name="TestIn"/>
<wsdl:output message="tns:HelloMessage" name="TestOut"/>
- </wsdl:operation>
+ </wsdl:operation>
</wsdl:portType>
-
- <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+
+ <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="hello">
<soap:operation soapAction="" style="rpc"/>
<wsdl:input>
<soap:body
- namespace="http://www.jboss.org/bpel/examples/wsdl"
- use="literal"/>
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body
- namespace="http://www.jboss.org/bpel/examples/wsdl"
- use="literal"/>
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="HelloService">
- <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
- <soap:address location="http://localhost:8080/Quickstart_bpel_hello_worldWS"/>
- </wsdl:port>
- </wsdl:service>
+ <wsdl:service name="HelloService">
+ <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+ <soap:address location="http://localhost:8080/Quickstart_bpel_hello_worldWS"/>
+ </wsdl:port>
+ </wsdl:service>
- <plnk:partnerLinkType name="HelloPartnerLinkType">
- <plnk:role name="me" portType="tns:HelloPortType"/>
- <plnk:role name="you" portType="tns:HelloPortType"/>
- </plnk:partnerLinkType>
+ <plnk:partnerLinkType name="HelloPartnerLinkType">
+ <plnk:role name="me" portType="tns:HelloPortType"/>
+ <plnk:role name="you" portType="tns:HelloPortType"/>
+ </plnk:partnerLinkType>
</wsdl:definitions>
15 years, 1 month
riftsaw SVN: r325 - in trunk/integration-tests: src/test/java/org/jboss/soa/bpel/tests and 6 other directories.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2009-11-25 06:00:37 -0500 (Wed, 25 Nov 2009)
New Revision: 325
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw118TestCase.java
trunk/integration-tests/src/test/resources/testcases/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/bpel/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/bpel/TestOrchestrationProcess.bpel
trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/bpel/TestOrchestrationProcessArtifacts.wsdl
trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/bpel/bpel-deploy.xml
trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/build.xml
trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/messages/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/messages/hello_request1.xml
trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/messages/hello_response1.xml
Modified:
trunk/integration-tests/build.xml
Log:
Integration test to support RIFTSAW-118 - doclit support for WS integration.
Modified: trunk/integration-tests/build.xml
===================================================================
--- trunk/integration-tests/build.xml 2009-11-25 08:27:24 UTC (rev 324)
+++ trunk/integration-tests/build.xml 2009-11-25 11:00:37 UTC (rev 325)
@@ -127,5 +127,8 @@
<ant antfile="src/test/resources/samples/Quickstart_esb_bpel_hello_world/build.xml" />
<ant antfile="src/test/resources/samples/Quickstart_esb_bpel_loan_fault/build.xml" />
+
+ <ant antfile="src/test/resources/testcases/RiftSaw_118/build.xml" />
+
</target>
</project>
Added: trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw118TestCase.java
===================================================================
--- trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw118TestCase.java (rev 0)
+++ trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw118TestCase.java 2009-11-25 11:00:37 UTC (rev 325)
@@ -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.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_10_doclit testcase.
+ */
+public class RiftSaw118TestCase extends RiftSawTest {
+
+ private static final String TEST_NAME = "RiftSaw_118";
+
+ public RiftSaw118TestCase() {
+ super(TEST_NAME);
+ }
+
+ public static Test suite() {
+ return(new RiftSawTestSetup(RiftSaw118TestCase.class,
+ TEST_NAME, "RiftSaw_118-1.jar"));
+ }
+
+ public void testSendHello() throws Exception {
+ String result=sendSOAPMessage("hello_request1.xml",
+ "http://localhost:8080/RiftSaw_118WS");
+
+ // Comment out until RIFTSAW-118 is fixed
+ assertMessageFromFile(result, "hello_response1.xml");
+ }
+}
Added: trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/bpel/TestOrchestrationProcess.bpel
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/bpel/TestOrchestrationProcess.bpel (rev 0)
+++ trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/bpel/TestOrchestrationProcess.bpel 2009-11-25 11:00:37 UTC (rev 325)
@@ -0,0 +1,114 @@
+<bpel:process name="TestOrchestrationProcess"
+ targetNamespace="http://www.jboss.org/riftsaw/acs"
+ suppressJoinFailure="yes"
+ xmlns:tns="http://www.jboss.org/riftsaw/acs"
+ xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ >
+
+ <!-- Import the client WSDL -->
+ <bpel:import location="TestOrchestrationProcessArtifacts.wsdl" namespace="http://www.jboss.org/riftsaw/acs"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <!-- ================================================================= -->
+ <!-- PARTNERLINKS -->
+ <!-- List of services participating in this BPEL process -->
+ <!-- ================================================================= -->
+ <bpel:partnerLinks>
+ <!-- The 'client' role represents the requester of this service. -->
+ <bpel:partnerLink name="client"
+ partnerLinkType="tns:TestOrchestrationProcess"
+ myRole="TestOrchestrationProcessProvider"
+ />
+ </bpel:partnerLinks>
+
+ <!-- ================================================================= -->
+ <!-- VARIABLES -->
+ <!-- List of messages and XML documents used within this BPEL process -->
+ <!-- ================================================================= -->
+ <bpel:variables>
+ <!-- Reference to the message passed as input during initiation -->
+ <bpel:variable name="input"
+ messageType="tns:TestOrchestrationProcessRequestMessage"/>
+
+ <!--
+ Reference to the message that will be returned to the requester
+ -->
+ <bpel:variable name="output"
+ messageType="tns:TestOrchestrationProcessResponseMessage"/>
+
+ </bpel:variables>
+
+ <!-- ================================================================= -->
+ <!-- ORCHESTRATION LOGIC -->
+ <!-- Set of activities coordinating the flow of messages across the -->
+ <!-- services integrated within this business process -->
+ <!-- ================================================================= -->
+ <bpel:sequence name="Sequence">
+
+ <!-- Receive input from requester.
+ Note: This maps to operation defined in TestOrchestrationProcess.wsdl
+ -->
+ <bpel:receive name="start" partnerLink="client"
+ portType="tns:TestOrchestrationProcess"
+ operation="process" createInstance="yes" variable="input"/>
+
+ <!-- Generate reply to synchronous request -->
+ <bpel:assign validate="no" name="assignHelloMesg">
+ <bpel:copy>
+ <bpel:from>
+ <bpel:literal xml:space="preserve">
+ <tns:TestOrchestrationProcessRequest xmlns:tns="http://www.jboss.org/riftsaw/acs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <tns:input></tns:input>
+ </tns:TestOrchestrationProcessRequest>
+ </bpel:literal>
+ </bpel:from>
+
+ <bpel:to variable="input" part="payload"></bpel:to>
+ </bpel:copy>
+
+ <bpel:copy>
+ <bpel:from>
+ <bpel:literal xml:space="preserve">
+ <tns:TestOrchestrationProcessResponse xmlns:tns="http://www.jboss.org/riftsaw/acs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <tns:result></tns:result>
+ </tns:TestOrchestrationProcessResponse>
+ </bpel:literal>
+ </bpel:from>
+ <bpel:to variable="output" part="payload"></bpel:to>
+ </bpel:copy>
+
+ <bpel:copy>
+ <bpel:from part="payload" variable="input">
+ <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
+ <![CDATA[tns:input]]>
+ </bpel:query>
+ </bpel:from>
+ <bpel:to part="payload" variable="output">
+ <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
+ <![CDATA[tns:result]]>
+ </bpel:query>
+ </bpel:to>
+ </bpel:copy>
+
+ <bpel:copy>
+ <bpel:from>
+
+ <![CDATA[concat($output.payload,' World')]]>
+ </bpel:from>
+ <bpel:to part="payload" variable="output">
+ <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
+ <![CDATA[tns:result]]>
+ </bpel:query>
+ </bpel:to>
+ </bpel:copy>
+
+ </bpel:assign>
+ <bpel:reply name="end"
+ partnerLink="client"
+ portType="tns:TestOrchestrationProcess"
+ operation="process"
+ variable="output"
+ />
+ </bpel:sequence>
+</bpel:process>
+
Added: trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/bpel/TestOrchestrationProcessArtifacts.wsdl
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/bpel/TestOrchestrationProcessArtifacts.wsdl (rev 0)
+++ trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/bpel/TestOrchestrationProcessArtifacts.wsdl 2009-11-25 11:00:37 UTC (rev 325)
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+<definitions name="TestOrchestrationProcess"
+ targetNamespace="http://www.jboss.org/riftsaw/acs"
+ xmlns:tns="http://www.jboss.org/riftsaw/acs"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ TYPE DEFINITION - List of types participating in this BPEL process
+ The BPEL Designer will generate default request and response types
+ but you can define or import any XML Schema type and use them as part
+ of the message types.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <types>
+ <schema attributeFormDefault="unqualified" elementFormDefault="qualified"
+ targetNamespace="http://www.jboss.org/riftsaw/acs"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="TestOrchestrationProcessRequest">
+ <complexType>
+ <sequence>
+ <element name="input" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="TestOrchestrationProcessResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </types>
+
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ MESSAGE TYPE DEFINITION - Definition of the message types used as
+ part of the port type defintions
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <message name="TestOrchestrationProcessRequestMessage">
+ <part name="payload" element="tns:TestOrchestrationProcessRequest"/>
+ </message>
+ <message name="TestOrchestrationProcessResponseMessage">
+ <part name="payload" element="tns:TestOrchestrationProcessResponse"/>
+ </message>
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ PORT TYPE DEFINITION - A port type groups a set of operations into
+ a logical service unit.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+
+ <!-- portType implemented by the TestOrchestrationProcess BPEL process -->
+ <portType name="TestOrchestrationProcess">
+ <operation name="process">
+ <input message="tns:TestOrchestrationProcessRequestMessage" />
+ <output message="tns:TestOrchestrationProcessResponseMessage"/>
+ </operation>
+ </portType>
+
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ PARTNER LINK TYPE DEFINITION
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <plnk:partnerLinkType name="TestOrchestrationProcess">
+ <plnk:role name="TestOrchestrationProcessProvider" portType="tns:TestOrchestrationProcess"/>
+ </plnk:partnerLinkType>
+
+ <binding name="HelloSoapBinding"
+ type="tns:TestOrchestrationProcess">
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="process">
+ <soap:operation
+ soapAction="http://www.jboss.org/riftsaw/acs/process" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="HelloService">
+ <port name="HelloPort" binding="tns:HelloSoapBinding">
+ <soap:address location="http://localhost:8080/RiftSaw_118WS" />
+ </port>
+ </service>
+</definitions>
Added: trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/bpel/bpel-deploy.xml
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/bpel/bpel-deploy.xml (rev 0)
+++ trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/bpel/bpel-deploy.xml 2009-11-25 11:00:37 UTC (rev 325)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03" xmlns:acs="http://www.jboss.org/riftsaw/acs">
+ <process name="acs:TestOrchestrationProcess">
+ <process-events generate="all"/>
+ <provide partnerLink="client">
+ <service name="acs:HelloService" port="HelloPort"/>
+ </provide>
+ </process>
+
+
+</deploy>
Added: trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/build.xml
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/build.xml (rev 0)
+++ trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/build.xml 2009-11-25 11:00:37 UTC (rev 325)
@@ -0,0 +1,30 @@
+<project name="RiftSaw_118" 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="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}/${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}/${jar.name}" />
+ </target>
+
+</project>
Added: trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/messages/hello_request1.xml
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/messages/hello_request1.xml (rev 0)
+++ trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/messages/hello_request1.xml 2009-11-25 11:00:37 UTC (rev 325)
@@ -0,0 +1,8 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:acs="http://www.jboss.org/riftsaw/acs">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <acs:TestOrchestrationProcessRequest>
+ <acs:input>HELLO</acs:input>
+ </acs:TestOrchestrationProcessRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file
Added: trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/messages/hello_response1.xml
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/messages/hello_response1.xml (rev 0)
+++ trunk/integration-tests/src/test/resources/testcases/RiftSaw_118/messages/hello_response1.xml 2009-11-25 11:00:37 UTC (rev 325)
@@ -0,0 +1,7 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Body>
+ <TestOrchestrationProcessResponse xmlns="http://www.jboss.org/riftsaw/acs">
+ <result xmlns:tns="http://www.jboss.org/riftsaw/acs">World</result>
+ </TestOrchestrationProcessResponse>
+ </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file
15 years, 1 month