Author: heiko.braun(a)jboss.com
Date: 2009-12-01 07:43:48 -0500 (Tue, 01 Dec 2009)
New Revision: 349
Added:
trunk/runtime/engine/src/test/java/riftsaw124/
trunk/runtime/engine/src/test/java/riftsaw124/Riftsaw124TestCase.java
trunk/runtime/engine/src/test/resources/riftsaw124/
trunk/runtime/engine/src/test/resources/riftsaw124/HelloWS.wsdl
trunk/runtime/engine/src/test/resources/riftsaw124/HelloWorldInvokeProcessArtifacts.wsdl
Log:
Added test case for riftsaw-124
Added: trunk/runtime/engine/src/test/java/riftsaw124/Riftsaw124TestCase.java
===================================================================
--- trunk/runtime/engine/src/test/java/riftsaw124/Riftsaw124TestCase.java
(rev 0)
+++ trunk/runtime/engine/src/test/java/riftsaw124/Riftsaw124TestCase.java 2009-12-01
12:43:48 UTC (rev 349)
@@ -0,0 +1,62 @@
+/*
+ * 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 riftsaw124;
+
+import junit.framework.TestCase;
+import org.jboss.soa.bpel.runtime.ws.WSDLParser;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Operation;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+/**
+ *
https://jira.jboss.org/jira/browse/RIFTSAW-124
+ */
+public class Riftsaw124TestCase extends TestCase
+{
+ final String WSDL_FILE =
"src/test/resources/riftsaw124/HelloWorldInvokeProcessArtifacts.wsdl";
+
+ private static final String TNS = "http://jboss.com/bpel/HelloWorldInvoke";
+ final QName messageElementName = new QName(TNS,
"HelloWorldInvokeProcessRequest");
+ final QName serviceName = new QName(TNS, "HelloWorldInvokeService");
+ final String portName = "HelloWorldInvokePort";
+
+ private WSDLParser wsdlParser;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ Definition wsdlDefinition = wsdlReader.readWSDL(WSDL_FILE);
+ wsdlParser = new WSDLParser(wsdlDefinition);
+ }
+
+ public void testParse() throws Exception
+ {
+ Operation op = wsdlParser.getDocLitOperation(serviceName, portName,
messageElementName);
+ assertNotNull(op);
+
+ System.out.println("WSDL Operation: " +op.getName());
+ }
+}
Added: trunk/runtime/engine/src/test/resources/riftsaw124/HelloWS.wsdl
===================================================================
--- trunk/runtime/engine/src/test/resources/riftsaw124/HelloWS.wsdl
(rev 0)
+++ trunk/runtime/engine/src/test/resources/riftsaw124/HelloWS.wsdl 2009-12-01 12:43:48
UTC (rev 349)
@@ -0,0 +1,78 @@
+<definitions name='HelloWSService'
targetNamespace='http://jboss.com/examples/ws/Hello'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://jboss.com/examples/ws/Hello'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <xs:schema
targetNamespace='http://jboss.com/examples/ws/Hello'
version='1.0'
xmlns:tns='http://jboss.com/examples/ws/Hello'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+ <xs:element name='goodbye' type='tns:goodbye'/>
+ <xs:element name='goodbyeResponse' type='tns:goodbyeResponse'/>
+ <xs:element name='hello' type='tns:hello'/>
+ <xs:element name='helloResponse' type='tns:helloResponse'/>
+ <xs:complexType name='hello'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='name'
type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name='helloResponse'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='return'
type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name='goodbye'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='name'
type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name='goodbyeResponse'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='return'
type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+ <message name='HelloWS_goodbyeResponse'>
+ <part element='tns:goodbyeResponse'
name='goodbyeResponse'></part>
+ </message>
+ <message name='HelloWS_helloResponse'>
+ <part element='tns:helloResponse'
name='helloResponse'></part>
+ </message>
+ <message name='HelloWS_hello'>
+ <part element='tns:hello' name='hello'></part>
+ </message>
+ <message name='HelloWS_goodbye'>
+ <part element='tns:goodbye' name='goodbye'></part>
+ </message>
+ <portType name='HelloWS'>
+ <operation name='goodbye' parameterOrder='goodbye'>
+ <input message='tns:HelloWS_goodbye'></input>
+ <output message='tns:HelloWS_goodbyeResponse'></output>
+ </operation>
+ <operation name='hello' parameterOrder='hello'>
+ <input message='tns:HelloWS_hello'></input>
+ <output message='tns:HelloWS_helloResponse'></output>
+ </operation>
+ </portType>
+ <binding name='HelloWSBinding' type='tns:HelloWS'>
+ <soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='goodbye'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ <operation name='hello'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='HelloWSService'>
+ <port binding='tns:HelloWSBinding' name='HelloWSPort'>
+ <soap:address location='http://127.0.0.1:8080/helloWS/HelloWS'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Added:
trunk/runtime/engine/src/test/resources/riftsaw124/HelloWorldInvokeProcessArtifacts.wsdl
===================================================================
---
trunk/runtime/engine/src/test/resources/riftsaw124/HelloWorldInvokeProcessArtifacts.wsdl
(rev 0)
+++
trunk/runtime/engine/src/test/resources/riftsaw124/HelloWorldInvokeProcessArtifacts.wsdl 2009-12-01
12:43:48 UTC (rev 349)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
+<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://jboss.com/bpel/HelloWorldInvoke"
xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
xmlns:wsdl="http://jboss.com/examples/ws/Hello"
name="HelloWorldInvokeProcess"
targetNamespace="http://jboss.com/bpel/HelloWorldInvoke">
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 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.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <plnk:partnerLinkType name="HelloWSPartnerLinkType">
+ <plnk:role name="HelloWSRole" portType="wsdl:HelloWS"/>
+ </plnk:partnerLinkType>
+ <import location="HelloWS.wsdl"
namespace="http://jboss.com/examples/ws/Hello"/>
+ <types>
+ <schema
xmlns="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="http://jboss.com/bpel/HelloWorldInvoke">
+
+ <element name="HelloWorldInvokeProcessRequest">
+ <complexType>
+ <sequence>
+ <element name="input" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="HelloWorldInvokeProcessResponse">
+ <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="HelloWorldInvokeProcessRequestMessage">
+ <part element="tns:HelloWorldInvokeProcessRequest"
name="payload"/>
+ </message>
+ <message name="HelloWorldInvokeProcessResponseMessage">
+ <part element="tns:HelloWorldInvokeProcessResponse"
name="payload"/>
+ </message>
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ PORT TYPE DEFINITION - A port type groups a set of operations into
+ a logical service unit.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+
+ <!-- portType implemented by the HelloWorldInvokeProcess BPEL process -->
+ <portType name="HelloWorldInvokeProcess">
+ <operation name="process">
+ <input message="tns:HelloWorldInvokeProcessRequestMessage"/>
+ <output
message="tns:HelloWorldInvokeProcessResponseMessage"/>
+ </operation>
+ </portType>
+
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ PARTNER LINK TYPE DEFINITION
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <plnk:partnerLinkType name="HelloWorldInvokeProcess">
+ <plnk:role name="HelloWorldInvokeProcessProvider"
portType="tns:HelloWorldInvokeProcess"/>
+ </plnk:partnerLinkType>
+
+ <binding name="HelloWorldInvokeBinding"
type="tns:HelloWorldInvokeProcess">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="process">
+ <soap:operation
soapAction="http://jboss.com/bpel/HelloWorldInvoke/process"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="HelloWorldInvokeService">
+ <port binding="tns:HelloWorldInvokeBinding"
name="HelloWorldInvokePort">
+ <soap:address
location="http://localhost:8180/bpel/processes/HelloWorldInvoke"/>
+ </port>
+ </service>
+</definitions>