riftsaw SVN: r585 - trunk/docs/docbook/userguide/src/main/module.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2010-03-22 17:42:53 -0400 (Mon, 22 Mar 2010)
New Revision: 585
Modified:
trunk/docs/docbook/userguide/src/main/module/uddi.xml
Log:
RIFTSAW-158, Deploytime lookup of partnerChannel WSDL Endpoints. Updating Documentation.
Modified: trunk/docs/docbook/userguide/src/main/module/uddi.xml
===================================================================
--- trunk/docs/docbook/userguide/src/main/module/uddi.xml 2010-03-22 21:41:15 UTC (rev 584)
+++ trunk/docs/docbook/userguide/src/main/module/uddi.xml 2010-03-22 21:42:53 UTC (rev 585)
@@ -14,8 +14,10 @@
UDDI v3 complaint registry.
</para>
- <para>Upon deployment both the Service and its BindingTemplate (EndPoint information) are registered, upon undeployment
- the BindingTemplate is removed.
+ <para>Upon deployment both the Service and its BindingTemplate (EndPoint information) are registered, and a
+ partnerLinkChannel is created for each partnerLink. UDDI lookup will obtain the WSDL Endpoint from the
+ UDDI and access this URL to obtain the WSDL straight from the Service. Upon undeployment the
+ BindingTemplate is removed from the UDDI Registry.
</para>
</section>
@@ -30,80 +32,92 @@
<emphasis>bpel.properties</emphasis> file.
</para>
- <para>
- The UDDI properties in the bpel.properties file are:
- </para>
-
- <itemizedlist>
- <listitem>
- <para>
- bpel.uddi.registration
- </para>
- <para>
- boolean
- </para>
- <para>
- If set to 'false', the UDDI integration is turned off. The RiftSaw installation process
- sets this value to 'true' only if the jbossesb-registry.sar is detected containing a jUDDI v3
- registry. In all other case it is defaulted to false.
- </para>
- </listitem>
- <listitem>
- <para>
- bpel.uddi.client.impl
- </para>
- <para>
- String
- </para>
- <para>
- Name of the a class that implements the org.jboss.soa.bpel.runtime.engine.ode.UDDIRegistration interface.
- The RiftSaw installation process set this value to org.jboss.soa.bpel.uddi300.UDDI300RegistrationImpl
- if JBossESB-4.7 is detected. JBossESB-4.7 uses
- the jUDDI-3.0.0 client libary, while SOA-P-5.0.0 and future version of JBossESB will use jUDDI-3.0.1 or higher and
- for those it is set to org.jboss.soa.bpel.uddi.UDDIRegistrationImpl.
- </para>
- </listitem>
- <listitem>
- <para>
- bpel.uddi.clerk.config
- </para>
- <para>
- String
- </para>
- <para>
- Defines the path to the bpel.uddi.client.xml config file. This can be left commented out if
- you want to use the jbossesb.sar/esb.uddi.client.xml. However in that case a bpel.uddi.clerk.manager
- needs to be defined.
- </para>
- </listitem>
- <listitem>
- <para>
- bpel.uddi.clerk.manager
- </para>
- <para>
- String
- </para>
- <para>
- Defines the ClerkManager name that will be used if the bpel.uddi.clerk.config is left commented out.
- This value should correspond to the name of the manager
- in the esb.juddi.client.xml. For JBossESB-4.7 this is 'test-manager', while for SOA-P-5.0.0
- and newer version of JBossESB it is 'esb-registry'. Note that if the bpel.uddi.clerk.manager is defined, the
- setting of the bpel.uddi.clerk.manager is ignored.
- </para>
- </listitem>
- <listitem>
- <para>
- bpel.uddi.clerk
- </para>
- <para>
- String
- </para>
- <para>
- Defines the Clerk name that will be used. This value should correspond to the name of the clerk
- in the esb.juddi.client.xml. By default this is set to 'BPEL_clerk'.
- </para>
- </listitem>
- </itemizedlist>
+ <table>
+ <title>The UDDI related properties in the bpel.properties</title>
+ <tgroup cols="3" >
+ <colspec colnum="1" colname="col1" />
+ <colspec colnum="2" colname="col2" />
+ <colspec colnum="3" colname="col3" />
+ <thead>
+ <row>
+ <entry>attribute</entry><entry>type (default)</entry><entry>description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>bpel.uddi.registration</entry>
+ <entry>boolean (true)</entry>
+ <entry>
+ If set to 'false', the UDDI integration is turned off. The RiftSaw installation process
+ sets this value to 'true' only if the jbossesb-registry.sar is detected containing a jUDDI v3
+ registry. In all other case it is defaulted to false.
+ </entry>
+ </row>
+ <row>
+ <entry>bpel.webservice.secure</entry>
+ <entry>boolean (false)</entry>
+ <entry>
+ The UDDI Registration process registers an WSDL AccessPoint in the BindingTemplate for the
+ BPEL Service it is registering. The BPEL server exposes the service WSDL Endpoint on the
+ WS stack (Currently we support JBossWS and CXF), if your WS stack is configured to a use
+ a secure (https) protocol, then you need to switch this setting to 'true'. Note that this
+ setting is used during the registration process only.
+ </entry>
+ </row>
+ <row>
+ <entry>bpel.uddi.client.impl</entry>
+ <entry>String (org.jboss.soa.bpel.uddi.UDDIRegistrationImpl)</entry>
+ <entry>
+ Name of the a class that implements the org.jboss.soa.bpel.runtime.engine.ode.UDDIRegistration interface.
+ The RiftSaw installation process set this value to org.jboss.soa.bpel.uddi300.UDDI300RegistrationImpl
+ if JBossESB-4.7 is detected. JBossESB-4.7 uses
+ the jUDDI-3.0.0 client libary, while SOA-P-5.0.0 and future version of JBossESB will use jUDDI-3.0.1 or higher and
+ for those it is set to org.jboss.soa.bpel.uddi.UDDIRegistrationImpl.
+ </entry>
+ </row>
+ <row>
+ <entry>bpel.uddi.clerk.config</entry>
+ <entry>String (not used by default)</entry>
+ <entry>
+ Defines the path to the bpel.uddi.client.xml config file. This can be left commented out if
+ you want to use the jbossesb.sar/esb.uddi.client.xml. However in that case a bpel.uddi.clerk.manager
+ needs to be defined.
+ </entry>
+ </row>
+ <row>
+ <entry>bpel.uddi.clerk.manager</entry>
+ <entry>String (esb-registry)</entry>
+ <entry>
+ Defines the ClerkManager name that will be used if the bpel.uddi.clerk.config is left commented out.
+ This value should correspond to the name of the manager
+ in the esb.juddi.client.xml. For JBossESB-4.7 this is 'test-manager', while for SOA-P-5.0.0
+ and newer version of JBossESB it is 'esb-registry'. Note that if the bpel.uddi.clerk.config is defined, the
+ setting of the bpel.uddi.clerk.manager is ignored.
+ </entry>
+ </row>
+ <row>
+ <entry>bpel.uddi.clerk</entry>
+ <entry>String (BPEL_clerk)</entry>
+ <entry>
+ Defines the Clerk name that will be used. This value should correspond to the name of the clerk
+ in the esb.juddi.client.xml. By default this is set to 'BPEL_clerk'.
+ </entry>
+ </row>
+ <row>
+ <entry>bpel.uddi.lookup</entry>
+ <entry>boolean (true)</entry>
+ <entry>
+ If set to true, the creating process of the partner channel will do a lookup by serviceName in the
+ UDDI, and a WSDL Endpoint is retrieved. This WSDL Endpoint is the then used to obtain the WSDL. This
+ process makes it easier to move Endpoints around within your deployment, without having to update
+ the partnerlink WSDL files in your bpel deployments. Note that an it is still a requirement to
+ deploy the initial partnerlink WSDL file for each partnerLink.
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
</section>
<section>
@@ -158,10 +172,11 @@
to turn this value to "false" once you are content with the UDDI Seed Data.
</para>
- <warning>When running on JBossESB-4.7, the root seed data will only be installed if the UDDI tables are
+
+ <warning><para>When running on JBossESB-4.7, the root seed data will only be installed if the UDDI tables are
still empty. This means that you need to make sure that the jUDDI Root Seed Data install process
did not run before installing RiftSaw. In other words, do not start JBossESB-4.7 before installing
- RiftSaw.</warning>
+ RiftSaw.</para></warning>
</section>
14 years, 2 months
riftsaw SVN: r584 - in trunk/runtime: engine/src/main/java/org/jboss/soa/bpel/runtime/ws and 13 other directories.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2010-03-22 17:41:15 -0400 (Mon, 22 Mar 2010)
New Revision: 584
Added:
trunk/runtime/uddi/src/test/
trunk/runtime/uddi/src/test/java/
trunk/runtime/uddi/src/test/java/org/
trunk/runtime/uddi/src/test/java/org/jboss/
trunk/runtime/uddi/src/test/java/org/jboss/soa/
trunk/runtime/uddi/src/test/java/org/jboss/soa/bpel/
trunk/runtime/uddi/src/test/java/org/jboss/soa/bpel/uddi/
trunk/runtime/uddi/src/test/java/org/jboss/soa/bpel/uddi/UDDIRegistrationTest.java
trunk/runtime/uddi300/src/test/
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/UDDIRegistration.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/WSDLReference.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceProviderFactory.java
trunk/runtime/uddi/
trunk/runtime/uddi/pom.xml
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java
trunk/runtime/uddi300/
trunk/runtime/uddi300/pom.xml
trunk/runtime/uddi300/src/main/java/org/jboss/soa/bpel/uddi300/UDDI300RegistrationImpl.java
Log:
RIFTSAW-158, Deploytime lookup of partnerChannel WSDL Endpoints
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 2010-03-22 17:59:37 UTC (rev 583)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java 2010-03-22 21:41:15 UTC (rev 584)
@@ -21,9 +21,10 @@
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.integration.ServerConfigFactory;
import org.jboss.soa.bpel.runtime.ws.*;
-import org.jboss.soa.bpel.runtime.*;
+
import javax.wsdl.Definition;
import javax.wsdl.PortType;
import javax.wsdl.factory.WSDLFactory;
@@ -43,13 +44,37 @@
public class JAXWSBindingContext implements BindingContext
{
protected final Log log = LogFactory.getLog(getClass());
+//we should consider having our own OdeConfigProperties class if we need more properties
+ public final static String BPEL_UDDI_LOOKUP = "uddi.lookup";
+ public final static String BPEL_WEBSERVICE_SECURE = "webservice.secure";
+ public final static String BPEL_WEBSERVICE_BASEURL = "webservice.baseurl";
private BPELEngineImpl engine;
private EndpointManager endpointManager;
+ private UDDIRegistration uddiRegistration = null;
public JAXWSBindingContext(BPELEngineImpl server) {
this.engine = server;
this.endpointManager = new EndpointManager(this.engine);
+ if (isUDDILookup()) {
+ try {
+ String webServiceHost = ServerConfigFactory.getServerConfig().getWebServiceHost();
+ int webServicePort = ServerConfigFactory.getServerConfig().getWebServicePort();
+ URL url = new URL("http://" + webServiceHost + ":" + webServicePort);
+ if (isWebserviceSecure()) {
+ int secureWebServicePort = ServerConfigFactory.getServerConfig().getWebServicePort();
+ url = new URL("https://" + webServiceHost + ":" + secureWebServicePort);
+ }
+ //give the user the option to override
+ if (server.getOdeConfig().getProperty(BPEL_WEBSERVICE_BASEURL)==null) {
+ server.getOdeConfig().getProperties().setProperty(BPEL_WEBSERVICE_BASEURL, url.toExternalForm());
+ }
+ uddiRegistration = UDDIClientFactory.newInstance(server.getOdeConfig().getProperties());
+ } catch (Exception e) {
+ log.error(e.getMessage());
+ log.error("Continuing without UDDI integration.");
+ }
+ }
}
public org.apache.ode.bpel.iapi.EndpointReference getEndpoint(QName serviceName, String portName) {
@@ -101,7 +126,7 @@
{
File targetWSDLFile = findWSDLFile(processId, myRoleEndpoint);
Definition wsdlDefinition = getWSDLDefinition(processId, myRoleEndpoint.serviceName);
- return new WSDLReference(wsdlDefinition, targetWSDLFile);
+ return new WSDLReference(wsdlDefinition, targetWSDLFile.toURI());
}
private File findWSDLFile(QName processId, Endpoint myRoleEndpoint)
@@ -169,9 +194,25 @@
public PartnerRoleChannel createPartnerRoleChannel(QName processId, PortType portType,
Endpoint initialPartnerEndpoint) {
// NOTE: This implementation assumes that the initial value of the
- // partner role determines the binding.
- WSDLReference wsdlReference = createWSDLReference(processId, initialPartnerEndpoint);
-
+ // partner role determines the binding.
+ Definition wsdlDefinition = null;
+ URL wsdlUrl = null;
+ if (isUDDILookup()) {
+ WSDLReference wsdlReference = uddiRegistration.lookupWSDL(
+ initialPartnerEndpoint.serviceName,
+ initialPartnerEndpoint.portName);
+ if (wsdlReference!=null) {
+ wsdlDefinition = wsdlReference.getDefinition();
+ wsdlUrl = wsdlReference.getWsdlURL();
+ }
+ }
+ if (isUDDILookup()==false || wsdlUrl==null) {
+ WSDLReference wsdlReference = createWSDLReference(processId, initialPartnerEndpoint);
+ wsdlDefinition = wsdlReference.getDefinition();
+ wsdlUrl = wsdlReference.getWsdlURL();
+ }
+
+
// TODO: TEAM_ODE:
// 1) try to obtain EPR from wsdl, associated with service and port name - see createExternalService
// code below for possible use of ProcessConf to get external service WSDL
@@ -188,7 +229,7 @@
try
{
- PartnerChannel channel = endpointManager.createClient(endpointMD, wsdlReference);
+ PartnerChannel channel = endpointManager.createClient(endpointMD, wsdlDefinition, wsdlUrl);
return new PartnerRoleChannelImpl(channel);
}
@@ -214,5 +255,13 @@
// TODO Auto-generated method stub
return 0;
}
+
+ public boolean isUDDILookup() {
+ return Boolean.valueOf(engine.getOdeConfig().getProperty(BPEL_UDDI_LOOKUP, "false"));
+ }
+
+ public boolean isWebserviceSecure() {
+ return Boolean.valueOf(engine.getOdeConfig().getProperty(BPEL_WEBSERVICE_SECURE, "false"));
+ }
}
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIRegistration.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIRegistration.java 2010-03-22 17:59:37 UTC (rev 583)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIRegistration.java 2010-03-22 21:41:15 UTC (rev 584)
@@ -43,9 +43,14 @@
public void registerEPR(EndpointMetaData metaData, WSDLReference wsdlRef);
/**
* UnRegisters the binding from the UDDI Registry.
- * @param EPR
- * @param metaData
- * @param wsdlRef
+ * @param QName of the service
+ * @param port name
*/
public void unRegisterEPR(QName service, String port);
+ /**
+ *
+ * @param service
+ * @param port
+ */
+ public WSDLReference lookupWSDL(QName serviceQName, String portName);
}
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 2010-03-22 17:59:37 UTC (rev 583)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2010-03-22 21:41:15 UTC (rev 584)
@@ -43,6 +43,7 @@
import org.jboss.virtual.VFS;
import org.jboss.virtual.VirtualFile;
+import javax.wsdl.Definition;
import javax.xml.namespace.QName;
import java.io.File;
import java.io.IOException;
@@ -96,7 +97,7 @@
// create deployment structure (maybe replaced by shrinkwrap)
File warArchive = new DeploymentBuilder(serverConfig)
.setEndpoint(metaData.getEndpointId())
- .setWSDL(wsdlRef.getWsdlFile())
+ .setWSDL(new File(wsdlRef.getWsdlURL().toURI()))
.build();
//Deployment deployment = createInMemoryDeployment(endpointId);
@@ -289,13 +290,13 @@
}
public WebServiceClient createClient(
- EndpointMetaData metaData,WSDLReference wsdlRef)
+ EndpointMetaData metaData,Definition wsdlDefinition, URL wsdlUrl)
throws EndpointManagementException
{
try
{
WebServiceClient client =
- new WebServiceClient(metaData, wsdlRef, executionEnvironment);
+ new WebServiceClient(metaData, wsdlDefinition, wsdlUrl, executionEnvironment);
return client;
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLReference.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLReference.java 2010-03-22 17:59:37 UTC (rev 583)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLReference.java 2010-03-22 21:41:15 UTC (rev 584)
@@ -22,7 +22,7 @@
package org.jboss.soa.bpel.runtime.ws;
import javax.wsdl.Definition;
-import java.io.File;
+import java.net.URI;
import java.net.URL;
import java.net.MalformedURLException;
@@ -33,16 +33,18 @@
* @see org.jboss.soa.bpel.runtime.ws.EndpointManager
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
+ * @author Kurt.Stam <kurt.stam(a)jboss.com>
+ *
*/
public final class WSDLReference
{
private Definition definition;
- private File wsdlFile;
+ private URI wsdlURI;
- public WSDLReference(Definition definition, File wsdlFile)
+ public WSDLReference(Definition definition, URI wsdlURI)
{
this.definition = definition;
- this.wsdlFile = wsdlFile;
+ this.wsdlURI = wsdlURI;
}
public Definition getDefinition()
@@ -50,16 +52,11 @@
return definition;
}
- public File getWsdlFile()
+ public URL getWsdlURL()
{
- return wsdlFile;
- }
-
- public URL getWsdlFileURL()
- {
try
{
- return getWsdlFile().toURL();
+ return wsdlURI.toURL();
}
catch (MalformedURLException e)
{
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java 2010-03-22 17:59:37 UTC (rev 583)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java 2010-03-22 21:41:15 UTC (rev 584)
@@ -75,12 +75,12 @@
private ExecutionEnvironment executionEnvironment;
- public WebServiceClient(EndpointMetaData metaData, WSDLReference wsdlRef, ExecutionEnvironment env)
+ public WebServiceClient(EndpointMetaData metaData, Definition wsdlDefintion, URL wsdlUrl , ExecutionEnvironment env)
{
this.executionEnvironment = env;
this.metaData = metaData;
- this.wsdlDefintion = wsdlRef.getDefinition();
- this.wsdlUrl = wsdlRef.getWsdlFileURL();
+ this.wsdlDefintion = wsdlDefintion;
+ this.wsdlUrl = wsdlUrl;
this.id = metaData.getEndpointId();
this.serviceName = metaData.getServiceName();
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceProviderFactory.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceProviderFactory.java 2010-03-22 17:59:37 UTC (rev 583)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceProviderFactory.java 2010-03-22 21:41:15 UTC (rev 584)
@@ -84,7 +84,7 @@
// AbstractWebServiceEndpoint.wsdlLocation property
CtField wsdlLocationField = new CtField(stringType, "wsdlLocation", impl);
wsdlLocationField.setModifiers(Modifier.PUBLIC);
- impl.addField(wsdlLocationField, "\""+wsdlRef.getWsdlFileURL().toExternalForm()+"\"");
+ impl.addField(wsdlLocationField, "\""+wsdlRef.getWsdlURL().toExternalForm()+"\"");
// AbstractWebServiceEndpoint.portName property
CtField portNameField = new CtField(stringType, "portName", impl);
@@ -126,7 +126,7 @@
);
providerAnnotation.addMemberValue(
"wsdlLocation",
- new StringMemberValue(wsdlRef.getWsdlFileURL().toExternalForm(), constantPool)
+ new StringMemberValue(wsdlRef.getWsdlURL().toExternalForm(), constantPool)
);
attr.addAnnotation(providerAnnotation);
Property changes on: trunk/runtime/uddi
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Modified: trunk/runtime/uddi/pom.xml
===================================================================
--- trunk/runtime/uddi/pom.xml 2010-03-22 17:59:37 UTC (rev 583)
+++ trunk/runtime/uddi/pom.xml 2010-03-22 21:41:15 UTC (rev 584)
@@ -35,6 +35,12 @@
<version>${riftsaw.engine.version}</version>
</dependency>
+ <dependency>
+ <groupId>wsdl4j</groupId>
+ <artifactId>wsdl4j</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
</dependencies>
Modified: trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java
===================================================================
--- trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java 2010-03-22 17:59:37 UTC (rev 583)
+++ trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java 2010-03-22 21:41:15 UTC (rev 584)
@@ -21,10 +21,21 @@
*/
package org.jboss.soa.bpel.uddi;
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.rmi.RemoteException;
+import java.util.List;
import java.util.Map;
import java.util.Properties;
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
import javax.xml.namespace.QName;
import org.apache.commons.configuration.ConfigurationException;
@@ -37,6 +48,7 @@
import org.apache.juddi.v3.client.config.UDDIClerkManager;
import org.apache.juddi.v3.client.config.UDDIClientContainer;
import org.apache.juddi.v3.client.transport.TransportException;
+import org.jboss.soa.bpel.runtime.engine.ode.JAXWSBindingContext;
import org.jboss.soa.bpel.runtime.engine.ode.UDDIRegistration;
import org.jboss.soa.bpel.runtime.ws.EndpointMetaData;
import org.jboss.soa.bpel.runtime.ws.WSDLReference;
@@ -46,7 +58,12 @@
import org.uddi.api_v3.BusinessService;
import org.uddi.api_v3.CategoryBag;
import org.uddi.api_v3.Description;
+import org.uddi.api_v3.FindQualifiers;
+import org.uddi.api_v3.FindService;
+import org.uddi.api_v3.GetAuthToken;
import org.uddi.api_v3.Name;
+import org.uddi.api_v3.ServiceInfo;
+import org.uddi.api_v3.ServiceList;
import org.uddi.api_v3.TModelInstanceDetails;
import org.uddi.api_v3.TModelInstanceInfo;
import org.uddi.v3_service.DispositionReportFaultMessage;
@@ -65,6 +82,7 @@
private final static String DEFAULT_BPEL_UDDI_CLERK_MANAGER = "esb.manager";
private final static String DEFAULT_BPEL_UDDI_CLERK = "BPELClerk";
private Properties properties = new Properties();
+ UDDIClerk bpelClerk = null;
public static final String DEFAULT_SERVICE_KEY_FORMAT = "uddi:${keyDomain}:bpel-services-";
public static final String DEFAULT_BINDING_KEY_FORMAT = "uddi:${keyDomain}:bindings-";
@@ -116,6 +134,22 @@
private String getClerkName() {
return (properties.getProperty(BPEL_UDDI_CLERK, DEFAULT_BPEL_UDDI_CLERK));
}
+
+ private String getWebserviceBaseUrl() {
+ return (properties.getProperty(JAXWSBindingContext.BPEL_WEBSERVICE_BASEURL, "http://localhost:8080"));
+ }
+
+ private UDDIClerk getBPELClerk() throws ConfigurationException {
+ if (bpelClerk==null) {
+ UDDIClerkManager clerkManager = UDDIClientContainer.getUDDIClerkManager(getClerkManagerName());
+ Map<String,UDDIClerk> clerks = clerkManager.getClientConfig().getUDDIClerks();
+ UDDIClerk bpelClerk = clerks.get(getClerkName());
+ if (bpelClerk==null) {
+ throw new ConfigurationException("Could not find UDDI Clerk named "+ getClerkName());
+ }
+ }
+ return bpelClerk;
+ }
/**
* Registers a BPEL ServiceEndpointReference (EPR) into a UDDI registry using the jUDDI client code.
@@ -287,7 +321,13 @@
AccessPoint accessPoint = new AccessPoint();
accessPoint.setUseType(AccessPointType.WSDL_DEPLOYMENT.toString());
- accessPoint.setValue(wsdlRef.getWsdlFileURL().toString());
+ URL accessUrl = wsdlRef.getWsdlURL();
+ try {
+ accessUrl = rewriteWSDLURL(wsdlRef.getWsdlURL());
+ } catch (MalformedURLException e) {
+ log.error(e.getMessage(),e);
+ }
+ accessPoint.setValue(accessUrl.toExternalForm());
bindingTemplate.setAccessPoint(accessPoint);
//default tModelKeys on the binding
@@ -314,6 +354,143 @@
return bindingTemplate;
}
+ /**
+ * Looks up the WSDL for the requested service and portName. The BPELClerk
+ * is used to lookup the service in the UDDI Registry by ServiceName. For
+ * each Service, it will loop over the BindingTemplates. If a BindingTemplate
+ * is found containing an AccessPointType of "wsdlDeployment" then this
+ * URL is used to obtain the WSDL. If successful the WSDLReference is returned,
+ * if not successful the next bindingTemplate is tried. A null result will be
+ * returned if none of the attempts are successful.
+ */
+ public WSDLReference lookupWSDL(QName serviceQName, String portName) {
+
+ try {
+ UDDIClerk bpelClerk = getBPELClerk();
+ FindService findService = new FindService();
+ findService.setAuthInfo(getAuthToken(bpelClerk));
+ Name serviceName = new Name();
+
+ String lang = "en";
+ if (properties.containsKey(LANG)) lang = properties.getProperty(LANG);
+ serviceName.setLang(lang);
+ serviceName.setValue(serviceQName.getLocalPart());
+ findService.getName().add(serviceName);
+
+ FindQualifiers findQualifiers = new FindQualifiers();
+ findQualifiers.getFindQualifier().add("exactMatch");
+ findService.setFindQualifiers(findQualifiers);
+
+ ServiceList serviceList = bpelClerk.getUDDINode().getTransport().getUDDIInquiryService().findService(findService);
+ //Loop over all services found.
+ if (serviceList.getServiceInfos()!=null) {
+ List<ServiceInfo> serviceInfos = serviceList.getServiceInfos().getServiceInfo();
+ for (ServiceInfo serviceInfo : serviceInfos) {
+ String serviceKey = serviceInfo.getServiceKey();
+ log.info("Found service " + serviceQName.getLocalPart()
+ + " with serviceKey '" + serviceInfo.getServiceKey() + "'");
+ BusinessService service = bpelClerk.findService(serviceKey, bpelClerk.getUDDINode().getApiNode());
+ BindingTemplates bindingservices = service.getBindingTemplates();
+ //Loop over all bindingTemplates found
+ for (BindingTemplate bindingTemplate : bindingservices.getBindingTemplate()) {
+ AccessPoint accessPoint = bindingTemplate.getAccessPoint();
+ if (AccessPointType.WSDL_DEPLOYMENT.toString().equals(accessPoint.getUseType())) {
+ URL url = null;
+ try {
+ url = new URL(accessPoint.getValue());
+ log.info("wsdlUrl for service " + serviceQName.getLocalPart() + " is " + url);
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ Definition def = wsdlReader.readWSDL(url.toExternalForm());
+ if (log.isDebugEnabled()) {
+ log.debug(getWSDL(url));
+ }
+ //Checking if this WSDL contains the right port name.
+ Port port = def.getService(serviceQName).getPort(portName);
+ if (port!=null) {
+ //Current policy: "FirstSuccess" :)
+ return new WSDLReference(def, url.toURI());
+ } else {
+ log.info("PortName " + portName + " could not be found in WSDL");
+ }
+ } catch (Exception e) {
+ log.warn("Unable to obtain WSDL from " + url + ". " + e.getMessage(),e);
+ }
+ } else {
+ log.debug("This accessPoint is of type " + accessPoint.getUseType() + " only "
+ + AccessPointType.WSDL_DEPLOYMENT + " is supported at the moment.");
+ }
+ }
+ }
+ } else {
+ log.info("No Service by the name " + serviceQName.getLocalPart() + " was found in the registry.");
+ }
+
+ } catch (Exception e) {
+ log.error(e.getMessage(),e);
+ }
+ log.info("No WSDL could be obtained using the UDDI Registry Lookup.");
+ return null;
+ }
+ /**
+ * Obtains an authToken for this clerk.
+ *
+ * @param clerk
+ * @return
+ * @throws TransportException
+ * @throws DispositionReportFaultMessage
+ * @throws RemoteException
+ */
+ private String getAuthToken(UDDIClerk clerk) throws TransportException, DispositionReportFaultMessage, RemoteException {
+
+ String endpointURL = clerk.getUDDINode().getApiNode().getSecurityUrl();
+ GetAuthToken getAuthToken = new GetAuthToken();
+ getAuthToken.setUserID(clerk.getPublisher());
+ getAuthToken.setCred(clerk.getPassword());
+ String authToken = clerk.getUDDINode().getTransport().getUDDISecurityService(endpointURL).getAuthToken(getAuthToken).getAuthInfo();
+
+ return authToken;
+ }
+ /**
+ * Reads the WSDL from an endpoint URL and returns it in a formatted String.
+ *
+ * @param url - url of a WSDL Endpoint.
+ * @return - Formatted WSDL
+ * @throws IOException when there are IO issues reading the WSDL content from the url.
+ */
+ private String getWSDL(URL url) throws IOException {
+
+ BufferedInputStream inputStream = (BufferedInputStream) url.getContent();
+ BufferedReader in = new BufferedReader(new InputStreamReader(inputStream));
+ StringBuffer buffer = new StringBuffer();
+ String inputLine;
+ while ((inputLine = in.readLine()) != null) {
+ buffer.append(inputLine).append("\r\n");
+ }
+ in.close();
+ return buffer.toString();
+ }
+ /**
+ * file:/Users/kstam/apps/jboss-5.1.0.GA/riftesb-4.7/
+ * server/default/tmp/5c4o1j-2geosb-g71xfu32-1-g71xxyiq-bt/
+ * BPEL_BluePrint1-1.jar/InventoryService.wsdl
+ *
+ * to
+ *
+ * http://localhost:8080/BPEL_BluePrint1_InventoryService?wsdl
+ *
+ * @param urlIn
+ * @return
+ * @throws MalformedURLException
+ */
+ public URL rewriteWSDLURL(URL urlIn) throws MalformedURLException {
+
+ String[] path=urlIn.toExternalForm().split("/");
+ String wsdlElement = path[path.length-1].replace(".wsdl", "?wsdl"); //InventoryService.wsdl
+ String serviceName = path[path.length-2].substring(0,path[path.length-2].lastIndexOf("-"));
+ String urlString = getWebserviceBaseUrl() + "/" + serviceName + "_" + wsdlElement;
+ URL outUrl = new URL(urlString);
+ return outUrl;
+ }
}
Added: trunk/runtime/uddi/src/test/java/org/jboss/soa/bpel/uddi/UDDIRegistrationTest.java
===================================================================
--- trunk/runtime/uddi/src/test/java/org/jboss/soa/bpel/uddi/UDDIRegistrationTest.java (rev 0)
+++ trunk/runtime/uddi/src/test/java/org/jboss/soa/bpel/uddi/UDDIRegistrationTest.java 2010-03-22 21:41:15 UTC (rev 584)
@@ -0,0 +1,23 @@
+package org.jboss.soa.bpel.uddi;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.jboss.soa.bpel.uddi.UDDIRegistrationImpl;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+
+public class UDDIRegistrationTest extends TestCase {
+
+ public void testUrlRewrite() throws MalformedURLException {
+ String inUrl = "file:/Users/kstam/apps/jboss-5.1.0.GA/riftesb-4.7/server/default/tmp/5c4o1j-2geosb-g71xfu32-1-g71xxyiq-bt/BPEL_BluePrint1-1.jar/InventoryService.wsdl";
+ String expectedUrl = "http://localhost:8080/BPEL_BluePrint1_InventoryService?wsdl";
+ UDDIRegistrationImpl registration = new UDDIRegistrationImpl(new Properties());
+ String actualUrl = registration.rewriteWSDLURL(new URL(inUrl)).toExternalForm();
+ Assert.assertEquals(expectedUrl, actualUrl.toString());
+ }
+
+}
Property changes on: trunk/runtime/uddi300
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Modified: trunk/runtime/uddi300/pom.xml
===================================================================
--- trunk/runtime/uddi300/pom.xml 2010-03-22 17:59:37 UTC (rev 583)
+++ trunk/runtime/uddi300/pom.xml 2010-03-22 21:41:15 UTC (rev 584)
@@ -35,6 +35,12 @@
<version>${riftsaw.engine.version}</version>
</dependency>
+ <dependency>
+ <groupId>wsdl4j</groupId>
+ <artifactId>wsdl4j</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
</dependencies>
Modified: trunk/runtime/uddi300/src/main/java/org/jboss/soa/bpel/uddi300/UDDI300RegistrationImpl.java
===================================================================
--- trunk/runtime/uddi300/src/main/java/org/jboss/soa/bpel/uddi300/UDDI300RegistrationImpl.java 2010-03-22 17:59:37 UTC (rev 583)
+++ trunk/runtime/uddi300/src/main/java/org/jboss/soa/bpel/uddi300/UDDI300RegistrationImpl.java 2010-03-22 21:41:15 UTC (rev 584)
@@ -21,10 +21,21 @@
*/
package org.jboss.soa.bpel.uddi300;
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.rmi.RemoteException;
+import java.util.List;
import java.util.Map;
import java.util.Properties;
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
import javax.xml.namespace.QName;
import org.apache.commons.configuration.ConfigurationException;
@@ -36,6 +47,7 @@
import org.apache.juddi.v3.client.config.UDDIClerk;
import org.apache.juddi.v3.client.config.UDDIClerkManager;
import org.apache.juddi.v3.client.transport.TransportException;
+import org.jboss.soa.bpel.runtime.engine.ode.JAXWSBindingContext;
import org.jboss.soa.bpel.runtime.engine.ode.UDDIRegistration;
import org.jboss.soa.bpel.runtime.ws.EndpointMetaData;
import org.jboss.soa.bpel.runtime.ws.WSDLReference;
@@ -45,7 +57,12 @@
import org.uddi.api_v3.BusinessService;
import org.uddi.api_v3.CategoryBag;
import org.uddi.api_v3.Description;
+import org.uddi.api_v3.FindQualifiers;
+import org.uddi.api_v3.FindService;
+import org.uddi.api_v3.GetAuthToken;
import org.uddi.api_v3.Name;
+import org.uddi.api_v3.ServiceInfo;
+import org.uddi.api_v3.ServiceList;
import org.uddi.api_v3.TModelInstanceDetails;
import org.uddi.api_v3.TModelInstanceInfo;
import org.uddi.v3_service.DispositionReportFaultMessage;
@@ -58,8 +75,8 @@
public class UDDI300RegistrationImpl extends AnnotationProcessor implements UDDIRegistration {
protected static final Log log = LogFactory.getLog(UDDI300RegistrationImpl.class);
- @SuppressWarnings("unused")
private Properties properties = new Properties();
+ private UDDIClerk bpelClerk = null;
private final static String BPEL_UDDI_CLERK = "bpel.uddi.clerk";
private final static String DEFAULT_BPEL_UDDI_CLERK = "BPELClerk";
public static final String DEFAULT_SERVICE_KEY_FORMAT = "uddi:${keyDomain}:bpel-services-";
@@ -82,6 +99,21 @@
private String getClerkName() {
return (properties.getProperty(BPEL_UDDI_CLERK, DEFAULT_BPEL_UDDI_CLERK));
}
+
+ private String getWebserviceBaseUrl() {
+ return (properties.getProperty(JAXWSBindingContext.BPEL_WEBSERVICE_BASEURL, "http://localhost:8080"));
+ }
+
+ private UDDIClerk getBPELClerk() throws ConfigurationException {
+ if (bpelClerk==null) {
+ Map<String,UDDIClerk> clerks = UDDIClerkManager.getClientConfig().getUDDIClerks();
+ bpelClerk = clerks.get(getClerkName());
+ if (bpelClerk==null) {
+ throw new ConfigurationException("Could not find UDDI Clerk named "+ getClerkName());
+ }
+ }
+ return bpelClerk;
+ }
/**
* Registers a BPEL ServiceEndpointReference (EPR) into a UDDI registry using the jUDDI client code.
* If the serviceKey does not already exist we register the service along with the EPR.
@@ -95,21 +127,16 @@
try {
selfRegister = UDDIClerkManager.getClientConfig().isRegisterOnStartup();
if (selfRegister) {
- Map<String,UDDIClerk> clerks = UDDIClerkManager.getClientConfig().getUDDIClerks();
- UDDIClerk bpelClerk = clerks.get(getClerkName());
- if (bpelClerk!=null) {
- try {
- BusinessService service = createBusinessService(bpelClerk, metaData, wsdlRef);
- bpelClerk.register(service, bpelClerk.getUDDINode().getApiNode());
- } catch (Exception e) {
- log.error("Unable to register service " + metaData.getServiceName()
- + " ." + e.getMessage(),e);
- } catch (Throwable t) {
- log.error("Unable to register service " + metaData.getServiceName()
- + " ." + t.getMessage(),t);
- }
- } else {
- throw new ConfigurationException("Could not find UDDI Clerk named "+ getClerkName());
+ UDDIClerk bpelClerk = getBPELClerk();
+ try {
+ BusinessService service = createBusinessService(bpelClerk, metaData, wsdlRef);
+ bpelClerk.register(service, bpelClerk.getUDDINode().getApiNode());
+ } catch (Exception e) {
+ log.error("Unable to register service " + metaData.getServiceName()
+ + " ." + e.getMessage(),e);
+ } catch (Throwable t) {
+ log.error("Unable to register service " + metaData.getServiceName()
+ + " ." + t.getMessage(),t);
}
}
} catch (ConfigurationException ce) {
@@ -250,7 +277,13 @@
AccessPoint accessPoint = new AccessPoint();
accessPoint.setUseType(AccessPointType.WSDL_DEPLOYMENT.toString());
- accessPoint.setValue(wsdlRef.getWsdlFileURL().toString());
+ URL accessUrl = wsdlRef.getWsdlURL();
+ try {
+ accessUrl = rewriteWSDLURL(wsdlRef.getWsdlURL());
+ } catch (MalformedURLException e) {
+ log.error(e.getMessage(),e);
+ }
+ accessPoint.setValue(accessUrl.toExternalForm());
bindingTemplate.setAccessPoint(accessPoint);
//default tModelKeys on the binding
@@ -276,7 +309,142 @@
return bindingTemplate;
}
+ /**
+ * Looks up the WSDL for the requested service and portName. The BPELClerk
+ * is used to lookup the service in the UDDI Registry by ServiceName. For
+ * each Service, it will loop over the BindingTemplates. If a BindingTemplate
+ * is found containing an AccessPointType of "wsdlDeployment" then this
+ * URL is used to obtain the WSDL. If successful the WSDLReference is returned,
+ * if not successful the next bindingTemplate is tried. A null result will be
+ * returned if none of the attempts are successful.
+ */
+ public WSDLReference lookupWSDL(QName serviceQName, String portName) {
+
+ try {
+ UDDIClerk bpelClerk = getBPELClerk();
+ FindService findService = new FindService();
+ findService.setAuthInfo(getAuthToken(bpelClerk));
+ Name serviceName = new Name();
+
+ String lang = "en";
+ if (properties.containsKey(LANG)) lang = properties.getProperty(LANG);
+ serviceName.setLang(lang);
+ serviceName.setValue(serviceQName.getLocalPart());
+ findService.getName().add(serviceName);
+
+ FindQualifiers findQualifiers = new FindQualifiers();
+ findQualifiers.getFindQualifier().add("exactMatch");
+ findService.setFindQualifiers(findQualifiers);
+
+ ServiceList serviceList = bpelClerk.getUDDINode().getTransport().getUDDIInquiryService().findService(findService);
+ //Loop over all services found.
+ if (serviceList.getServiceInfos()!=null) {
+ List<ServiceInfo> serviceInfos = serviceList.getServiceInfos().getServiceInfo();
+ for (ServiceInfo serviceInfo : serviceInfos) {
+ String serviceKey = serviceInfo.getServiceKey();
+ log.info("Found service " + serviceQName.getLocalPart()
+ + " with serviceKey '" + serviceInfo.getServiceKey() + "'");
+ BusinessService service = bpelClerk.findService(serviceKey, bpelClerk.getUDDINode().getApiNode());
+ BindingTemplates bindingservices = service.getBindingTemplates();
+ //Loop over all bindingTemplates found
+ for (BindingTemplate bindingTemplate : bindingservices.getBindingTemplate()) {
+ AccessPoint accessPoint = bindingTemplate.getAccessPoint();
+ if (AccessPointType.WSDL_DEPLOYMENT.toString().equals(accessPoint.getUseType())) {
+ URL url = null;
+ try {
+ url = new URL(accessPoint.getValue());
+ log.info("wsdlUrl for service " + serviceQName.getLocalPart() + " is " + url);
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ Definition def = wsdlReader.readWSDL(url.toExternalForm());
+ if (log.isDebugEnabled()) {
+ log.debug(getWSDL(url));
+ }
+ //Checking if this WSDL contains the right port name.
+ Port port = def.getService(serviceQName).getPort(portName);
+ if (port!=null) {
+ //Current policy: "FirstSuccess" :)
+ return new WSDLReference(def, url.toURI());
+ } else {
+ log.info("PortName " + portName + " could not be found in WSDL");
+ }
+ } catch (Exception e) {
+ log.warn("Unable to obtain WSDL from " + url + ". " + e.getMessage(),e);
+ }
+ } else {
+ log.debug("This accessPoint is of type " + accessPoint.getUseType() + " only "
+ + AccessPointType.WSDL_DEPLOYMENT + " is supported at the moment.");
+ }
+ }
+ }
+ } else {
+ log.info("No Service by the name " + serviceQName.getLocalPart() + " was found in the registry.");
+ }
+
+ } catch (Exception e) {
+ log.error(e.getMessage(),e);
+ }
+ log.info("No WSDL could be obtained using the UDDI Registry Lookup.");
+ return null;
+ }
+ /**
+ * Obtains an authToken for this clerk.
+ *
+ * @param clerk
+ * @return
+ * @throws TransportException
+ * @throws DispositionReportFaultMessage
+ * @throws RemoteException
+ */
+ private String getAuthToken(UDDIClerk clerk) throws TransportException, DispositionReportFaultMessage, RemoteException {
+
+ String endpointURL = clerk.getUDDINode().getApiNode().getSecurityUrl();
+ GetAuthToken getAuthToken = new GetAuthToken();
+ getAuthToken.setUserID(clerk.getPublisher());
+ getAuthToken.setCred(clerk.getPassword());
+ String authToken = clerk.getUDDINode().getTransport().getUDDISecurityService(endpointURL).getAuthToken(getAuthToken).getAuthInfo();
+
+ return authToken;
+ }
+ /**
+ * Reads the WSDL from an endpoint URL and returns it in a formatted String.
+ *
+ * @param url - url of a WSDL Endpoint.
+ * @return - Formatted WSDL
+ * @throws IOException when there are IO issues reading the WSDL content from the url.
+ */
+ private String getWSDL(URL url) throws IOException {
+
+ BufferedInputStream inputStream = (BufferedInputStream) url.getContent();
+ BufferedReader in = new BufferedReader(new InputStreamReader(inputStream));
+ StringBuffer buffer = new StringBuffer();
+ String inputLine;
+ while ((inputLine = in.readLine()) != null) {
+ buffer.append(inputLine).append("\r\n");
+ }
+ in.close();
+ return buffer.toString();
+ }
-
-
+ /**
+ * file:/Users/kstam/apps/jboss-5.1.0.GA/riftesb-4.7/
+ * server/default/tmp/5c4o1j-2geosb-g71xfu32-1-g71xxyiq-bt/
+ * BPEL_BluePrint1-1.jar/InventoryService.wsdl
+ *
+ * to
+ *
+ * http://localhost:8080/BPEL_BluePrint1_InventoryService?wsdl
+ *
+ * @param urlIn
+ * @return
+ * @throws MalformedURLException
+ */
+ public URL rewriteWSDLURL(URL urlIn) throws MalformedURLException {
+
+ String[] path=urlIn.toExternalForm().split("/");
+ String wsdlElement = path[path.length-1].replace(".wsdl", "?wsdl"); //InventoryService.wsdl
+ String serviceName = path[path.length-2].substring(0,path[path.length-2].lastIndexOf("-"));
+ String urlString = getWebserviceBaseUrl() + "/" + serviceName + "_" + wsdlElement;
+ URL outUrl = new URL(urlString);
+ return outUrl;
+ }
}
14 years, 2 months
riftsaw SVN: r583 - in trunk: integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples and 5 other directories.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2010-03-22 13:59:37 -0400 (Mon, 22 Mar 2010)
New Revision: 583
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELSimpleCorrelationWithOneWayTestCase.java
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/bpel/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/bpel/HelloGoodbye.bpel
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/bpel/HelloGoodbye.wsdl
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/bpel/bpel-deploy.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/build.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/messages/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/messages/goodbye_request1.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/messages/goodbye_response1.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/messages/hello_request1.xml
Modified:
trunk/integration-tests/build.xml
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/BaseWebServiceEndpoint.java
Log:
RIFTSAW-154 - fix one-way request issue.
Modified: trunk/integration-tests/build.xml
===================================================================
--- trunk/integration-tests/build.xml 2010-03-22 05:01:51 UTC (rev 582)
+++ trunk/integration-tests/build.xml 2010-03-22 17:59:37 UTC (rev 583)
@@ -128,6 +128,7 @@
<ant antfile="src/test/resources/samples/Quickstart_bpel_hello_world_header_ode/build.xml" />
<ant antfile="src/test/resources/samples/Quickstart_bpel_hello_world_header_wsdl/build.xml" />
<ant antfile="src/test/resources/samples/Quickstart_bpel_simple_correlation/build.xml" />
+ <ant antfile="src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/build.xml" />
<ant antfile="src/test/resources/samples/Quickstart_bpel_simple_invoke/build.xml" />
<ant antfile="src/test/resources/samples/Quickstart_bpel_simple_pick/build.xml" />
<ant antfile="src/test/resources/samples/Quickstart_bpel_loan_approval/build.xml" />
Added: trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELSimpleCorrelationWithOneWayTestCase.java
===================================================================
--- trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELSimpleCorrelationWithOneWayTestCase.java (rev 0)
+++ trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELSimpleCorrelationWithOneWayTestCase.java 2010-03-22 17:59:37 UTC (rev 583)
@@ -0,0 +1,71 @@
+/*
+ * 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_simple_correlation_with_oneway sample.
+ */
+public class QuickstartBPELSimpleCorrelationWithOneWayTestCase extends RiftSawTest {
+
+ private static final String TEST_NAME = "Quickstart_bpel_simple_correlation_with_oneway";
+
+ public QuickstartBPELSimpleCorrelationWithOneWayTestCase() {
+ super(TEST_NAME);
+ }
+
+ public static Test suite() {
+ return(new RiftSawTestSetup(QuickstartBPELSimpleCorrelationWithOneWayTestCase.class,
+ TEST_NAME, "Quickstart_bpel_simple_correlation_with_oneway-1.jar"));
+ }
+
+ public void testSendHelloGoodbye() throws Exception {
+
+ sendSOAPMessage("hello_request1.xml",
+ "http://localhost:8080/Quickstart_bpel_simple_correlation_onewayWS");
+
+ try {
+ synchronized(this) {
+ wait(5000);
+ }
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ String result2=sendSOAPMessage("goodbye_request1.xml",
+ "http://localhost:8080/Quickstart_bpel_simple_correlation_onewayWS");
+
+ // If testing against cxf, then result is presented slightly differently
+ if (result2.indexOf("SOAP-ENV") != -1) {
+ result2 = result2.replaceAll("SOAP-ENV", "env");
+ result2 = result2.replaceAll(" xmlns=\"\"","");
+ result2 = result2.replaceAll("\"","'");
+ result2 = result2.replaceAll("<env:Header />","<env:Header></env:Header>");
+ }
+
+ assertMessageFromFile(result2, "goodbye_response1.xml");
+ }
+}
Added: trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/bpel/HelloGoodbye.bpel
===================================================================
--- trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/bpel/HelloGoodbye.bpel (rev 0)
+++ trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/bpel/HelloGoodbye.bpel 2010-03-22 17:59:37 UTC (rev 583)
@@ -0,0 +1,93 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<process name="HelloGoodbyeOneWay"
+ targetNamespace="http://www.jboss.org/bpel/examples"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:tns="http://www.jboss.org/bpel/examples"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:intf="http://www.jboss.org/bpel/examples/wsdl"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+ <import location="HelloGoodbye.wsdl"
+ namespace="http://www.jboss.org/bpel/examples/wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <partnerLinks>
+ <partnerLink name="helloGoodbyeOneWayPartnerLink"
+ partnerLinkType="intf:HelloGoodbyeOneWayPartnerLinkType"
+ myRole="me" />
+ </partnerLinks>
+
+ <correlationSets xmlns:cor="http://example.com/supplyCorrelation">
+ <correlationSet name="Session"
+ properties="intf:SessionID" />
+ </correlationSets>
+
+ <variables>
+ <variable name="myHelloVar" messageType="intf:HelloMessage"/>
+ <variable name="myGoodbyeVar" messageType="intf:GoodbyeMessage"/>
+ <variable name="mesgVar" type="xsd:string"/>
+ </variables>
+
+ <sequence>
+ <receive
+ name="start"
+ partnerLink="helloGoodbyeOneWayPartnerLink"
+ portType="intf:HelloGoodbyeOneWayPortType"
+ operation="hello"
+ variable="myHelloVar"
+ createInstance="yes">
+ <correlations>
+ <correlation set="Session" initiate="yes" />
+ </correlations>
+ </receive>
+
+ <receive
+ name="start"
+ partnerLink="helloGoodbyeOneWayPartnerLink"
+ portType="intf:HelloGoodbyeOneWayPortType"
+ operation="goodbye"
+ variable="myGoodbyeVar">
+ <correlations>
+ <correlation set="Session" initiate="no" />
+ </correlations>
+ </receive>
+
+ <assign name="assignGoodbyeMesg">
+ <copy>
+ <from variable="myGoodbyeVar" part="Message"/>
+ <to variable="mesgVar"/>
+ </copy>
+ <copy>
+ <from>concat($mesgVar,' World')</from>
+ <to variable="myGoodbyeVar" part="Message"/>
+ </copy>
+ </assign>
+ <reply name="end"
+ partnerLink="helloGoodbyeOneWayPartnerLink"
+ portType="intf:HelloGoodbyeOneWayPortType"
+ operation="goodbye"
+ variable="myGoodbyeVar">
+ <correlations>
+ <correlation set="Session" initiate="no" />
+ </correlations>
+ </reply>
+ </sequence>
+</process>
Added: trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/bpel/HelloGoodbye.wsdl
===================================================================
--- trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/bpel/HelloGoodbye.wsdl (rev 0)
+++ trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/bpel/HelloGoodbye.wsdl 2010-03-22 17:59:37 UTC (rev 583)
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ 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:types="http://www.jboss.org/bpel/examples/xsd"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+
+ <wsdl:types>
+ <xsd:schema targetNamespace="http://www.jboss.org/bpel/examples/xsd">
+ <xsd:complexType name="SessionIdentity">
+ <xsd:sequence>
+ <xsd:element name="id" type="xsd:int" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="HelloMessage">
+ <wsdl:part name="ID" type="types:SessionIdentity"/>
+ <wsdl:part name="Message" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:message name="GoodbyeMessage">
+ <wsdl:part name="ID" type="types:SessionIdentity"/>
+ <wsdl:part name="Message" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloGoodbyeOneWayPortType">
+ <wsdl:operation name="hello">
+ <wsdl:input message="tns:HelloMessage" name="HelloIn"/>
+ </wsdl:operation>
+ <wsdl:operation name="goodbye">
+ <wsdl:input message="tns:GoodbyeMessage" name="GoodbyeIn"/>
+ <wsdl:output message="tns:GoodbyeMessage" name="GoodbyeOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloGoodbyeOneWaySoapBinding" type="tns:HelloGoodbyeOneWayPortType">
+ <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"/>
+ </wsdl:input>
+ </wsdl:operation>
+ <wsdl:operation name="goodbye">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body
+ 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"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HelloGoodbyeOneWayService">
+ <wsdl:port name="HelloGoodbyeOneWayPort" binding="tns:HelloGoodbyeOneWaySoapBinding">
+ <soap:address location="http://localhost:8080/Quickstart_bpel_simple_correlation_onewayWS"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="HelloGoodbyeOneWayPartnerLinkType">
+ <plnk:role name="me" portType="tns:HelloGoodbyeOneWayPortType"/>
+ <plnk:role name="you" portType="tns:HelloGoodbyeOneWayPortType"/>
+ </plnk:partnerLinkType>
+
+ <vprop:property name="SessionID" type="xsd:int" />
+
+ <vprop:propertyAlias propertyName="tns:SessionID"
+ messageType="tns:HelloMessage" part="ID">
+ <vprop:query>id</vprop:query>
+ </vprop:propertyAlias>
+
+ <vprop:propertyAlias propertyName="tns:SessionID"
+ messageType="tns:GoodbyeMessage" part="ID">
+ <vprop:query>id</vprop:query>
+ </vprop:propertyAlias>
+
+
+</wsdl:definitions>
+
Added: trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/bpel/bpel-deploy.xml
===================================================================
--- trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/bpel/bpel-deploy.xml (rev 0)
+++ trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/bpel/bpel-deploy.xml 2010-03-22 17:59:37 UTC (rev 583)
@@ -0,0 +1,29 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
+ xmlns:bpl="http://www.jboss.org/bpel/examples"
+ xmlns:intf="http://www.jboss.org/bpel/examples/wsdl">
+
+ <process name="bpl:HelloGoodbyeOneWay">
+ <active>true</active>
+ <provide partnerLink="helloGoodbyeOneWayPartnerLink">
+ <service name="intf:HelloGoodbyeOneWayService" port="HelloGoodbyeOneWayPort"/>
+ </provide>
+ </process>
+</deploy>
Added: trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/build.xml
===================================================================
--- trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/build.xml (rev 0)
+++ trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/build.xml 2010-03-22 17:59:37 UTC (rev 583)
@@ -0,0 +1,29 @@
+<project name="Quickstart_bpel_simple_correlation_with_oneway" 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/samples/${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>
Added: trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/messages/goodbye_request1.xml
===================================================================
--- trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/messages/goodbye_request1.xml (rev 0)
+++ trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/messages/goodbye_request1.xml 2010-03-22 17:59:37 UTC (rev 583)
@@ -0,0 +1,11 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://www.jboss.org/bpel/examples/wsdl">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <wsdl:goodbye>
+ <ID>
+ <id>1</id>
+ </ID>
+ <Message>Goodbye</Message>
+ </wsdl:goodbye>
+ </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file
Added: trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/messages/goodbye_response1.xml
===================================================================
--- trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/messages/goodbye_response1.xml (rev 0)
+++ trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/messages/goodbye_response1.xml 2010-03-22 17:59:37 UTC (rev 583)
@@ -0,0 +1,3 @@
+<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><odens:goodbyeResponse xmlns:odens='http://www.jboss.org/bpel/examples/wsdl'><ID>
+ <id>1</id>
+ </ID><Message>Goodbye World</Message></odens:goodbyeResponse></env:Body></env:Envelope>
\ No newline at end of file
Added: trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/messages/hello_request1.xml
===================================================================
--- trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/messages/hello_request1.xml (rev 0)
+++ trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_simple_correlation_with_oneway/messages/hello_request1.xml 2010-03-22 17:59:37 UTC (rev 583)
@@ -0,0 +1,11 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://www.jboss.org/bpel/examples/wsdl">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <wsdl:hello>
+ <ID>
+ <id>1</id>
+ </ID>
+ <Message>Hello</Message>
+ </wsdl:hello>
+ </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/BaseWebServiceEndpoint.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/BaseWebServiceEndpoint.java 2010-03-22 05:01:51 UTC (rev 582)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/BaseWebServiceEndpoint.java 2010-03-22 17:59:37 UTC (rev 583)
@@ -119,6 +119,13 @@
log.debug( "ODE no outbound message");
}
+ if (responseMessage == null) {
+ log.debug("No response, probably due to oneway request");
+
+ // Need to create an empty response to avoid npe in jbossws (RIFTSAW-154)
+ responseMessage = MessageFactory.newInstance().createMessage();
+ }
+
return responseMessage;
}
catch (Exception e)
14 years, 2 months
riftsaw SVN: r582 - trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2010-03-22 01:01:51 -0400 (Mon, 22 Mar 2010)
New Revision: 582
Modified:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw163TestCase.java
Log:
* remove the result printing for test case.
Modified: trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw163TestCase.java
===================================================================
--- trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw163TestCase.java 2010-03-19 13:54:42 UTC (rev 581)
+++ trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw163TestCase.java 2010-03-22 05:01:51 UTC (rev 582)
@@ -46,7 +46,6 @@
String result=sendSOAPMessage("hello_request1.xml",
"http://localhost:8080/RiftSaw_163WS");
- System.out.println(result);
// If testing against cxf, then result is presented slightly differently
if (result.indexOf("SOAP-ENV") != -1) {
result = result.replaceAll("SOAP-ENV", "env");
14 years, 2 months
Build failed in Hudson: RiftSaw-derby #15
by jboss-qa-internal@redhat.com
See http://hudson.qa.jboss.com/hudson/job/RiftSaw-derby/15/changes
Changes:
[objectiser] RIFTSAW-127 - added test and example associated with a BPEL process accessing a SOAP header mapped to a message part. Currently commented out test assertion until ODE bug is fixed.
[heiko.braun(a)jboss.com] Update riftsaw-124 test case
[objectiser] RIFTSAW-74 - fixed npe related to header processing.
[heiko.braun(a)jboss.com] Added test case for riftsaw-124
------------------------------------------
[...truncated 1159 lines...]
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.128 sec <<< FAILURE!
Running org.jboss.soa.bpel.tests.testcases.RiftSaw118TestCase
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: invoker 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 org.jnp.server.NamingServer.lookup(NamingServer.java:399)
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.253 sec <<< FAILURE!
Running org.jboss.soa.bpel.tests.samples.QuickstartBPELHelloWorldHeaderWSDLTestCase
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: invoker 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 org.jnp.server.NamingServer.lookup(NamingServer.java:399)
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.331 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: invoker 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 org.jnp.server.NamingServer.lookup(NamingServer.java:399)
at sun.reflect.GeneratedMethodAccessor236.invoke(Unknown Source)
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.144 sec <<< FAILURE!
Results :
Tests in error:
org.jboss.soa.bpel.tests.samples.QuickstartBPELSimpleCorrelationTestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELHelloWorldHeaderODETestCase
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.testcases.RiftSaw118TestCase
org.jboss.soa.bpel.tests.samples.QuickstartBPELHelloWorldHeaderWSDLTestCase
org.jboss.soa.bpel.tests.samples.QuickstartESBBPELLoanFaultTestCase
Tests run: 9, Failures: 0, Errors: 9, 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.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: invoker not bound]
[java] at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1352)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:817)
[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] Caused by: javax.naming.NameNotFoundException: invoker 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 org.jnp.server.NamingServer.lookup(NamingServer.java:399)
[java] at sun.reflect.GeneratedMethodAccessor236.invoke(Unknown Source)
[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.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1346)
[java] ... 4 more
[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: 4 minutes 17 seconds
[INFO] Finished at: Tue Dec 01 13:06:19 EST 2009
[INFO] Final Memory: 59M/508M
[INFO] ------------------------------------------------------------------------
Recording test results
14 years, 2 months
riftsaw SVN: r581 - in trunk: runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/service and 1 other directories.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2010-03-19 09:54:42 -0400 (Fri, 19 Mar 2010)
New Revision: 581
Modified:
trunk/distribution/src/main/release/db/jboss/jboss-beans.xml
trunk/runtime/engine-assembly/src/main/resources/META-INF/jboss-beans.xml
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/service/BPELEngineService.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/service/BPELEngineServiceMBean.java
Log:
Register the ODE ProcessManagementFacade API to enable server modules to directly access it rather going through the RiftSaw BPELEngine abstraction.
Modified: trunk/distribution/src/main/release/db/jboss/jboss-beans.xml
===================================================================
--- trunk/distribution/src/main/release/db/jboss/jboss-beans.xml 2010-03-19 01:03:29 UTC (rev 580)
+++ trunk/distribution/src/main/release/db/jboss/jboss-beans.xml 2010-03-19 13:54:42 UTC (rev 581)
@@ -14,6 +14,7 @@
name="BPELEngine">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.bpel:service=BPELEngine", exposedInterface=org.jboss.soa.bpel.runtime.engine.service.BPELEngineServiceMBean.class,registerDirectly=true)</annotation>
<property name="jndiName"><value>bpel/Engine</value></property>
+ <property name="pmapiJndiName"><value>bpel/PMAPI</value></property>
<depends>jboss:service=Naming</depends>
<depends>BPELDatabaseInitializer</depends>
<depends>BPELDeployer</depends>
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/service/BPELEngineService.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/service/BPELEngineService.java 2010-03-19 01:03:29 UTC (rev 580)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/service/BPELEngineService.java 2010-03-19 13:54:42 UTC (rev 581)
@@ -35,6 +35,7 @@
private final static Logger logger = Logger.getLogger(BPELEngineService.class);
private String m_jndiName=null;
+ private String m_pmapiJndiName=null;
private BPELEngine m_bpelEngine=null;
/**
@@ -55,6 +56,8 @@
rebind();
m_bpelEngine.init();
+
+ rebindPMAPI();
}
/**
@@ -87,7 +90,7 @@
* @throws NamingException Failed to register BPEL engine against
* the JNDI name
*/
- public void setJndiName(String jndiName)throws NamingException {
+ public void setJndiName(String jndiName) throws NamingException {
String oldName = m_jndiName;
m_jndiName = jndiName;
@@ -103,6 +106,42 @@
}
}
+ /**
+ * This method returns the JNDI name used to register the
+ * BPEL Process Management API.
+ */
+ public String getPmapiJndiName() {
+ return m_jndiName;
+ }
+
+ /**
+ * This method sets the JNDI name associated with the
+ * BPEL Process Management API.
+ *
+ * @param jndiName The JNDI name
+ * @throws NamingException Failed to register BPEL Process Management API against
+ * the JNDI name
+ */
+ public void setPmapiJndiName(String jndiName) throws NamingException {
+ String oldName = m_pmapiJndiName;
+ m_pmapiJndiName = jndiName;
+
+ if (super.getState() == STARTED) {
+
+ if (oldName != null) {
+ unbind(oldName);
+ }
+
+ try {
+ rebindPMAPI();
+ } catch(Exception e) {
+ NamingException ne = new NamingException("Failed to update PMAPI jndiName");
+ ne.setRootCause(e);
+ throw ne;
+ }
+ }
+ }
+
private void rebind() throws NamingException {
InitialContext rootCtx = new InitialContext();
Name fullName = rootCtx.getNameParser("").parse(m_jndiName);
@@ -119,4 +158,13 @@
logger.error("Failed to unbind map", e);
}
}
+
+ private void rebindPMAPI() throws NamingException {
+ if (m_pmapiJndiName != null) {
+ InitialContext rootCtx = new InitialContext();
+ Name fullName = rootCtx.getNameParser("").parse(m_pmapiJndiName);
+ logger.info("pmapi fullName="+fullName);
+ NonSerializableFactory.rebind(fullName, m_bpelEngine.getManagementInterface(), true);
+ }
+ }
}
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/service/BPELEngineServiceMBean.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/service/BPELEngineServiceMBean.java 2010-03-19 01:03:29 UTC (rev 580)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/service/BPELEngineServiceMBean.java 2010-03-19 13:54:42 UTC (rev 581)
@@ -45,4 +45,20 @@
*/
public void setJndiName(String jndiName) throws javax.naming.NamingException;
+ /**
+ * This method returns the JNDI name used to register the
+ * BPEL Process Management API.
+ */
+ public String getPmapiJndiName();
+
+ /**
+ * This method sets the JNDI name associated with the
+ * BPEL Process Management API.
+ *
+ * @param jndiName The JNDI name
+ * @throws NamingException Failed to register BPEL Process Management API against
+ * the JNDI name
+ */
+ public void setPmapiJndiName(String jndiName) throws NamingException;
+
}
Modified: trunk/runtime/engine-assembly/src/main/resources/META-INF/jboss-beans.xml
===================================================================
--- trunk/runtime/engine-assembly/src/main/resources/META-INF/jboss-beans.xml 2010-03-19 01:03:29 UTC (rev 580)
+++ trunk/runtime/engine-assembly/src/main/resources/META-INF/jboss-beans.xml 2010-03-19 13:54:42 UTC (rev 581)
@@ -14,6 +14,7 @@
name="BPELEngine">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.bpel:service=BPELEngine", exposedInterface=org.jboss.soa.bpel.runtime.engine.service.BPELEngineServiceMBean.class,registerDirectly=true)</annotation>
<property name="jndiName"><value>bpel/Engine</value></property>
+ <property name="pmapiJndiName"><value>bpel/PMAPI</value></property>
<depends>jboss:service=Naming</depends>
<depends>BPELDatabaseInitializer</depends>
<depends>BPELDeployer</depends>
14 years, 2 months
riftsaw SVN: r580 - trunk/console.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2010-03-18 21:03:29 -0400 (Thu, 18 Mar 2010)
New Revision: 580
Modified:
trunk/console/
Log:
adding to svn ignore
Property changes on: trunk/console
___________________________________________________________________
Name: svn:ignore
- *.iml
target
+ *.iml
target
.classpath
.project
.settings
14 years, 2 months
riftsaw SVN: r579 - trunk/docs/docbook/gettingstartedguide.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2010-03-18 21:00:14 -0400 (Thu, 18 Mar 2010)
New Revision: 579
Modified:
trunk/docs/docbook/gettingstartedguide/
Log:
adding to svn ignore
Property changes on: trunk/docs/docbook/gettingstartedguide
___________________________________________________________________
Name: svn:ignore
- target
.project
.settings
+ target
.project
.settings
.classpath
bin
14 years, 2 months