Commit 15c8f0a0 authored by Philippe Merle's avatar Philippe Merle

Added a new example illustrating a factorial service implemented as an SCA composite

containing a BPEL process and exposed as a Web Service and a REST resource.
WIP: The FraSCAti SCA Implementation BPEL will be committed soon.
parent 19c19474
============================================================================
OW2 FraSCAti Examples: Factorial BPEL
Copyright (C) 2010 INRIA, University of Lille 1
This library 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 of the License, or (at your option) any later version.
This library 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 library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: frascati@ow2.org
Author: Philippe Merle
Contributor(s):
============================================================================
Factorial BPEL:
---------------
This example illustrates a factorial service implemented as an SCA composite
containing a BPEL process and exposed as a Web Service and a REST resource.
This service computes factorial of given numbers.
Compilation with Maven:
-----------------------
mvn install
Execution with Maven:
---------------------
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
Use the factorial service:
--------------------------
* Open a Web Service Explorer like soapUI or Eclipse Web Services Explorer tools
and enter http://localhost:8090/ws/factorial?wsdl as URL to interact with
the factorial service as a SOAP Web Service.
* Open a Web Browser and enter http://localhost:8090/rest/factorial/5
as URL to interact with the factorial service as a REST resource.
* http://localhost:8090/rest/factorial?_wadl to obtain the WADL associated
to the factorial service.
Compilation and execution with the FraSCAti script:
---------------------------------------------------
TODO
<?xml version="1.0"?>
<!--
* OW2 FraSCAti Examples: Factorial BPEL
*
* Copyright (c) 2010 INRIA, University of Lille 1
*
* This library 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 of the License, or (at your option) any later version.
*
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Philippe Merle
*
* Contributor(s):
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.ow2.frascati.examples</groupId>
<artifactId>parent</artifactId>
<version>1.3-SNAPSHOT</version>
</parent>
<groupId>org.ow2.frascati.examples</groupId>
<artifactId>factorial-bpel</artifactId>
<packaging>jar</packaging>
<name>OW2 FraSCAti Examples: Factorial BPEL</name>
<properties>
<logging.conf.file>../../frascati/modules/logging.properties</logging.conf.file>
<composite.file>factorial</composite.file>
<service.name/>
<method.name/>
<method.params/>
</properties>
<build>
<plugins>
</plugins>
</build>
<dependencies>
<!-- Support for <sca:implementation.bpel> -->
<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-implementation-bpel</artifactId>
<version>${frascati.version}</version>
</dependency>
<!-- Support for <frascati:binding.rest> -->
<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-binding-rest</artifactId>
<version>${frascati.version}</version>
</dependency>
<!-- Support for <sca:binding.ws> -->
<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-binding-ws</artifactId>
<version>${frascati.version}</version>
</dependency>
<!-- For JUnit testing. -->
<dependency>
<groupId>org.ow2.frascati.examples.test</groupId>
<artifactId>frascati-test</artifactId>
<version>${frascati.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<!-- To execute an SCA composite with FraSCAti Explorer type 'mvn -Pexplorer'. -->
<profile>
<id>explorer</id>
<build>
<defaultGoal>exec:java</defaultGoal>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<systemProperties>
<systemProperty>
<!-- Warning, following is required by EasyViper: julia.cfg is the Julia config for EasyViper. -->
<key>julia.config</key>
<value>julia.cfg</value>
</systemProperty>
<systemProperty>
<!-- Following configures if EasyBPEL/Viper Explorer is launched at boot time. -->
<key>easybpel.explorer</key>
<value>true</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
/**
* OW2 FraSCAti Examples: Factorial BPEL
* Copyright (C) 2010 INRIA, University of Lille 1
*
* This library 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 of the License, or (at your option) any later version.
*
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Philippe Merle
*
* Contributor(s):
*
*/
package org.ow2.frascati.examples.factorial.bpel.api;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
/**
* This class was generated by Apache CXF 2.2.9
* Tue Jul 06 21:32:29 CEST 2010
* Generated source version: 2.2.9
*
*/
@WebService(targetNamespace = "http://frascati.ow2.org/examples/factorial/bpel/api", name = "Factorial")
@XmlSeeAlso({ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface Factorial {
@WebResult(name = "FactorialResponse", targetNamespace = "http://frascati.ow2.org/examples/factorial/bpel/api", partName = "value")
@WebMethod
@GET
@Path("/{value}")
@Produces("text/plain")
public int factorial(
@WebParam(partName = "value", name = "FactorialRequest", targetNamespace = "http://frascati.ow2.org/examples/factorial/bpel/api")
@PathParam("value")
int value
);
}
/**
* OW2 FraSCAti Examples: Factorial BPEL
* Copyright (C) 2010 INRIA, University of Lille 1
*
* This library 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 of the License, or (at your option) any later version.
*
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Philippe Merle
*
* Contributor(s):
*
*/
package org.ow2.frascati.examples.factorial.bpel.api;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the org.ow2.frascati.examples.factorial.bpel package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
private final static QName _FactorialResponse_QNAME = new QName("http://frascati.ow2.org/examples/factorial/bpel/api", "FactorialResponse");
private final static QName _FactorialRequest_QNAME = new QName("http://frascati.ow2.org/examples/factorial/bpel/api", "FactorialRequest");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.ow2.frascati.examples.factorial.bpel.api
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://frascati.ow2.org/examples/factorial/bpel/api", name = "FactorialResponse")
public JAXBElement<Integer> createFactorialResponse(Integer value) {
return new JAXBElement<Integer>(_FactorialResponse_QNAME, Integer.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://frascati.ow2.org/examples/factorial/bpel/api", name = "FactorialRequest")
public JAXBElement<Integer> createFactorialRequest(Integer value) {
return new JAXBElement<Integer>(_FactorialRequest_QNAME, Integer.class, null, value);
}
}
/**
* OW2 FraSCAti Examples: Factorial BPEL
* Copyright (C) 2010 INRIA, University of Lille 1
*
* This library 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 of the License, or (at your option) any later version.
*
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Philippe Merle
*
* Contributor(s):
*
*/
package org.ow2.frascati.examples.factorial.bpel.explorer;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextField;
import org.ow2.frascati.examples.factorial.bpel.api.Factorial;
import org.ow2.frascati.explorer.gui.AbstractSelectionPanel;
/**
* Is the FraSCAti Explorer plugin to show {@link Factorial} instances.
*
* @author Philippe Merle - INRIA
*/
@SuppressWarnings("serial")
public class FactorialPanel extends AbstractSelectionPanel<Factorial> {
/**
* Default constructor to create the panel.
*/
public FactorialPanel() {
super();
JButton button = new JButton("Factorial");
add(button);
add(new JLabel("("));
final JTextField valueField = new JTextField(5);
add(valueField);
add(new JLabel(") ==> "));
final JLabel resultLabel = new JLabel("");
add(resultLabel);
button.addActionListener( new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
// Get the user's input.
int value = Integer.valueOf(valueField.getText());
// Call the factorial service.
int result = selected.factorial(value);
// Display the result.
resultLabel.setText(Integer.toString(result));
} catch(NumberFormatException nfe) {
// Error when input is not an integer.
throw new RuntimeException(nfe);
// TODO: This will be better to display a graphical alert!
}
}
});
}
}
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!--
* ====================================================================
*
* OW2 FraSCAti Examples: Factorial BPEL
* Copyright (C) 2010 INRIA, University of Lille 1
*
* This library 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 of the License, or (at your option) any later version.
*
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* Contact: frascati@ow2.org
*
* Author: Philippe Merle
*
* Contributor(s):
* ====================================================================
-->
<explorer>
<!-- ================================================================= -->
<!-- FraSCAti Explorer plugins for this example. -->
<!-- ================================================================= -->
<node type-name="org.ow2.frascati.examples.factorial.bpel.api.Factorial">
<panel>
<code>org.ow2.frascati.examples.factorial.bpel.explorer.FactorialPanel</code>
</panel>
</node>
</explorer>
<?xml version="1.0" encoding="UTF-8"?>
<!--
* ====================================================================
*
* OW2 FraSCAti Examples: Factorial BPEL
* Copyright (C) 2010 INRIA, University of Lille 1
*
* This library 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 of the License, or (at your option) any later version.
*
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* Contact: frascati@ow2.org
*
* Author: Philippe Merle
*
* Contributor(s):
* ====================================================================
-->
<bpws:process exitOnStandardFault="yes" name="factorialPT"
targetNamespace="http://frascati.ow2.org/examples/factorial/bpel"
xmlns:addr="http://www.w3.org/2005/08/addressing"
xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:sref=" http://docs.oasis-open.org/wsbpel/2.0/serviceref"
xmlns:tns="http://frascati.ow2.org/examples/factorial/bpel/api"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
location="factorial.wsdl" namespace="http://frascati.ow2.org/examples/factorial/bpel/api"/>
<bpws:partnerLinks>
<bpws:partnerLink myRole="role" name="receiver" partnerLinkType="tns:factorialLT"/>
<bpws:partnerLink name="invoker"
partnerLinkType="tns:factorialLT" partnerRole="role"/>
</bpws:partnerLinks>
<bpws:variables>
<bpws:variable messageType="tns:FactorialRequest" name="input"/>
<bpws:variable messageType="tns:FactorialResponse" name="output"/>
<bpws:variable messageType="tns:FactorialRequest" name="callIn"/>
<bpws:variable messageType="tns:FactorialResponse" name="callOut"/>
</bpws:variables>
<bpws:sequence>
<bpws:receive createInstance="yes"
name="ReceiveFactorial" operation="factorial"
partnerLink="receiver" portType="tns:Factorial" variable="input"/>
<bpws:if name="condition">
<bpws:condition><![CDATA[$input.value >= 1]]></bpws:condition>
<bpws:sequence name="sequence" >
<bpws:assign name="decrement" validate="no">
<bpws:copy>
<bpws:from><![CDATA[$input.value - 1]]></bpws:from>
<bpws:to><![CDATA[$callIn.value]]></bpws:to>
</bpws:copy>
</bpws:assign>
<bpws:invoke inputVariable="callIn" name="recursiveCall"
operation="factorial" outputVariable="callOut"
partnerLink="invoker" portType="tns:Factorial"/>
<bpws:assign name="multiply" validate="no">
<bpws:copy>
<bpws:from><![CDATA[$input.value * $callOut]]></bpws:from>
<bpws:to><![CDATA[$output.value]]></bpws:to>
</bpws:copy>
</bpws:assign>
</bpws:sequence>
<bpws:else>
<bpws:assign name="defaultValue" validate="no">
<bpws:copy>
<bpws:from>
<bpws:literal>1</bpws:literal>
</bpws:from>
<bpws:to><![CDATA[$output.value]]></bpws:to>
</bpws:copy>
</bpws:assign>
</bpws:else>
</bpws:if>
<bpws:reply name="ReplyFactorial" operation="factorial" partnerLink="receiver"
portType="tns:Factorial" variable="output"/>
</bpws:sequence>
</bpws:process>
<?xml version="1.0" encoding="UTF-8"?>
<!-- OW2 FraSCAti: Factorial BPEL -->
<!-- Copyright (C) 2010 INRIA, University of Lille 1 -->
<!-- -->
<!-- This library 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 of the License, or (at your option) any later version. -->
<!-- -->
<!-- This library 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 library; if not, write to the Free Software -->
<!-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
<!-- -->
<!-- Contact: frascati@ow2.org -->
<!-- -->
<!-- Author: Philippe Merle -->
<!-- -->
<!-- Contributor(s): -->
<!-- -->
<!-- -->
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:ns="./src/main/resources"
xmlns:frascati="http://frascati.ow2.org/xmlns/sca/1.1" name="Factorial-BPEL">
<service name="factorial" promote="Factorial/receiver">
<interface.java interface="org.ow2.frascati.examples.factorial.bpel.api.Factorial"/>
<binding.ws uri="/ws/factorial"/>
<frascati:binding.rest uri="/rest/factorial"/>
</service>
<component name="Factorial">
<implementation.bpel process="ns:factorial.bpel"/>
<service name="receiver">
<interface.java interface="org.ow2.frascati.examples.factorial.bpel.api.Factorial"/>
</service>
<reference name="invoker" target="Factorial/receiver">
<interface.java interface="org.ow2.frascati.examples.factorial.bpel.api.Factorial"/>
</reference>
</component>
</composite>
<?xml version="1.0" encoding="UTF-8"?>
<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" xmi:id="_ZiGiEYaaEd-gm7EnfscNVg" type="Sca" measurementUnit="Pixel">
<children xmi:type="notation:Node" xmi:id="_aL8wUIaaEd-gm7EnfscNVg" type="2001">
<children xmi:type="notation:Node" xmi:id="_aL_MkIaaEd-gm7EnfscNVg" type="5008"/>
<children xmi:type="notation:Node" xmi:id="_aMBBwIaaEd-gm7EnfscNVg" type="7001">
<styles xmi:type="notation:SortingStyle" xmi:id="_aMBBwYaaEd-gm7EnfscNVg"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_aMBBwoaaEd-gm7EnfscNVg"/>
</children>
<children xmi:type="notation:Node" xmi:id="_aMBo0IaaEd-gm7EnfscNVg" type="7002">
<styles xmi:type="notation:SortingStyle" xmi:id="_aMBo0YaaEd-gm7EnfscNVg"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_aMBo0oaaEd-gm7EnfscNVg"/>
</children>
<children xmi:type="notation:Node" xmi:id="_aMCP4IaaEd-gm7EnfscNVg" type="7003">
<styles xmi:type="notation:SortingStyle" xmi:id="_aMCP4YaaEd-gm7EnfscNVg"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_aMCP4oaaEd-gm7EnfscNVg"/>
</children>
<children xmi:type="notation:Node" xmi:id="_aMC28IaaEd-gm7EnfscNVg" type="7004">
<children xmi:type="notation:Node" xmi:id="_ajGFAIaaEd-gm7EnfscNVg" type="3012">
<children xmi:type="notation:Node" xmi:id="_ajGsEIaaEd-gm7EnfscNVg" type="5007"/>
<children xmi:type="notation:Node" xmi:id="_ajHTIIaaEd-gm7EnfscNVg" type="7009">
<styles xmi:type="notation:SortingStyle" xmi:id="_ajHTIYaaEd-gm7EnfscNVg"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_ajHTIoaaEd-gm7EnfscNVg"/>
</children>
<children xmi:type="notation:Node" xmi:id="_ajHTI4aaEd-gm7EnfscNVg" type="7010">
<styles xmi:type="notation:SortingStyle" xmi:id="_ajHTJIaaEd-gm7EnfscNVg"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_ajHTJYaaEd-gm7EnfscNVg"/>
</children>
<children xmi:type="notation:Node" xmi:id="_ajIhQIaaEd-gm7EnfscNVg" type="7011">
<styles xmi:type="notation:SortingStyle" xmi:id="_ajIhQYaaEd-gm7EnfscNVg"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_ajIhQoaaEd-gm7EnfscNVg"/>
</children>
<children xmi:type="notation:Node" xmi:id="_ajJIUIaaEd-gm7EnfscNVg" type="7012">
<styles xmi:type="notation:SortingStyle" xmi:id="_ajJIUYaaEd-gm7EnfscNVg"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_ajJIUoaaEd-gm7EnfscNVg"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_ajGFAYaaEd-gm7EnfscNVg" fontName="Lucida Grande"/>
<element xmi:type="sca:Component" href="factorial.composite#//@composite/@component.0"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajGFAoaaEd-gm7EnfscNVg" x="70" y="17"/>
</children>
<styles xmi:type="notation:SortingStyle" xmi:id="_aMC28YaaEd-gm7EnfscNVg"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_aMC28oaaEd-gm7EnfscNVg"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_aL8wUYaaEd-gm7EnfscNVg" fontName="Lucida Grande"/>
<element xmi:type="sca:Composite" href="factorial.composite#//@composite"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_aL8wUoaaEd-gm7EnfscNVg" x="20" y="16" width="401" height="245"/>
</children>
<styles xmi:type="notation:DiagramStyle" xmi:id="_ZiHJIIaaEd-gm7EnfscNVg"/>
<element xmi:type="sca:DocumentRoot" href="factorial.composite#/"/>
</notation:Diagram>
<?xml version="1.0" encoding="UTF-8"?>
<!--
* ====================================================================
*
* OW2 FraSCAti Examples: Factorial BPEL
* Copyright (C) 2010 INRIA, University of Lille 1
*
* This library 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 of the License, or (at your option) any later version.
*
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* Contact: frascati@ow2.org
*
* Author: Philippe Merle
*
* Contributor(s):
* ====================================================================
-->
<wsdl:definitions name="Factorial"
targetNamespace="http://frascati.ow2.org/examples/factorial/bpel/api"
xmlns:ns1="http://schemas.xmlsoap.org/soap/http"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://frascati.ow2.org/examples/factorial/bpel/api"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:sref="http://docs.oasis-open.org/wsbpel/2.0/serviceref"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
>
<wsdl:types>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://frascati.ow2.org/examples/factorial/bpel/api" xmlns:tns="http://api.bpel.factorial.examples.frascati.ow2.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="FactorialRequest" type="xsd:int"/>
<xsd:element name="FactorialResponse" type="xsd:int"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="FactorialRequest">
<wsdl:part element="tns:FactorialRequest" name="value">
</wsdl:part>
</wsdl:message>
<wsdl:message name="FactorialResponse">
<wsdl:part element="tns:FactorialResponse" name="value">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="Factorial">
<wsdl:operation name="factorial">
<wsdl:input message="tns:FactorialRequest" name="factorialRequest"/>
<wsdl:output message="tns:FactorialResponse" name="factorialResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="FactorialSoapBinding" type="tns:Factorial">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="factorial">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="factorialRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="factorialResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="FactorialService">
<wsdl:port binding="tns:FactorialSoapBinding" name="FactorialPort">
<soap:address location="http://localhost:8090/ws/factorial"/>
</wsdl:port>
</wsdl:service>