<?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://namespace/amazons3/" xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:wsdl="http://s3.amazonaws.com/doc/2006-03-01/" name="amazonBPEL" targetNamespace="http://namespace/amazons3/" xmlns:p="http://www.w3.org/2001/XMLSchema">

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

         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="amazonLinkType">

        <plnk:role name="amazonRole" portType="wsdl:AmazonS3"/>

  </plnk:partnerLinkType>

        <import location="AmazonS3.wsdl" namespace="http://s3.amazonaws.com/doc/2006-03-01/"/>

        <types>

            <schema xmlns="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://namespace/amazons3/">

                <import schemaLocation="AmazonS3.xsd" namespace="http://s3.amazonaws.com/doc/2006-03-01/"></import>

                <element name="amazonBPELRequest">

                    <complexType>

                        <sequence>

                            <element name="awskey" type="string"/>

                            <element name="timestamp" type="dateTime"/>

                            <element name="sign" type="string"/>

                        </sequence>

                    </complexType>

                </element>

                <element name="amazonBPELResponse">

                    <complexType>

                        <sequence>

                            <element name="result"

                                    type="wsdl:ListAllMyBucketsResult" />

                        </sequence>

                    </complexType>

                </element>

                <element name="NewOperation">

                        <complexType>

                                <sequence>

                                        <element name="in" type="string"></element>

                                </sequence>

                        </complexType>

                </element>

                <element name="NewOperationResponse">

                        <complexType>

                                <sequence>

                                        <element name="out" type="string"></element>

                                </sequence>

                        </complexType>

                </element>

            </schema>

        </types>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

         MESSAGE TYPE DEFINITION - Definition of the message types used as

         part of the port type defintions

         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->    

        <message name="amazonBPELRequestMessage">

            <part element="tns:amazonBPELRequest" name="payload"/>

        </message>

        <message name="amazonBPELResponseMessage">

            <part element="tns:amazonBPELResponse" name="payload"/>

        </message>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

         PORT TYPE DEFINITION - A port type groups a set of operations into

         a logical service unit.

         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->    

        <!-- portType implemented by the amazonBPEL BPEL process -->

        <message name="NewOperationRequest">

            <part name="parameters" element="tns:NewOperation"></part>

        </message>

        <message name="NewOperationResponse">

            <part name="parameters" element="tns:NewOperationResponse"></part>

        </message>

        <portType name="amazonBPEL">

            <operation name="process">

                <input message="tns:amazonBPELRequestMessage"/>

                <output message="tns:amazonBPELResponseMessage"/>

            </operation>

        </portType>  

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

         PARTNER LINK TYPE DEFINITION

         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->    

        <plnk:partnerLinkType name="amazonBPEL">

            <plnk:role name="amazonBPELProvider" portType="tns:amazonBPEL"/>

        </plnk:partnerLinkType>

   

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

         BINDING DEFINITION - Defines the message format and protocol details

         for a web service.

         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

         SERVICE DEFINITION - A service groups a set of port into

         a service unit.

         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

        <binding name="amazonBPELBinding" type="tns:amazonBPEL">

            <soap:binding style="document"

                    transport="http://schemas.xmlsoap.org/soap/http" />

            <operation name="process">

                    <soap:operation

                            soapAction="http://namespace/amazons3/process" />

                    <input>

                            <soap:body use="literal" />

                    </input>

                    <output>

                            <soap:body use="literal" />

                    </output>

            </operation>

        </binding>

        <service name="amazonBPEL">

            <port binding="tns:amazonBPELBinding" name="amazonBPELPort">

                    <soap:address location="http://localhost:8080/amazonBPEL"/>

            </port>

        </service>

</definitions>