Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » BPEL Designer » Deploying processes to Apache Ode
Deploying processes to Apache Ode [message #7599] Tue, 01 May 2007 17:54 Go to next message
Jonathan Coogan is currently offline Jonathan Coogan
Messages: 1
Registered: July 2009
Junior Member
Has anyone been able to deploy BPEL Designer processes to Apache Ode?

Just curious.
-Jon
Re: Deploying processes to Apache Ode [message #7912 is a reply to message #7599] Fri, 18 May 2007 10:46 Go to previous messageGo to next message
Bruno Wassermann is currently offline Bruno Wassermann
Messages: 21
Registered: July 2009
Junior Member
How to you deploy to Apache Ode?
We can deploy to ActiveBPEL via a plug-in making use of the runtime
framework in BPEL Designer. The runtime framework allows people to develop
plug-ins for third-party BPEL engines so that users can deploy to these
engines straight from BPEL Designer.

I am not aware of any such plug-in for Apache Ode. Are you?

Regards,

-- Bruno



"Jonathan Coogan" <Jonathan.Coogan@Attachmate.com> wrote in message
news:C25D0536.1BB4%Jonathan.Coogan@Attachmate.com...
> Has anyone been able to deploy BPEL Designer processes to Apache Ode?
>
> Just curious.
> -Jon
>
Re: Deploying processes to Apache Ode [message #8079 is a reply to message #7912] Fri, 25 May 2007 20:20 Go to previous messageGo to next message
Eclipse User
Originally posted by: atoulme.intalio.com

Hi,

there is a runtime API to deploy to Ode.
Basically, you need to bundle the BPEL and WSDL files into a zip and
send it to Ode.

You would also need to add a deployment descriptor: deploy.xml.
You can see how to create it here:
http://incubator.apache.org/ode/creating-a-process.html

The deploy.xml's schema is located here:
http://svn.apache.org/repos/asf/incubator/ode/trunk/bpel-sch emas/src/main/xsd/dd.xsd

Here is the code that deploys to Ode (it uses Axis2 to call a deployment
web service) :

OMFactory _factory = OMAbstractFactory.getOMFactory();
ServiceClientUtil _client = new ServiceClientUtil();

// Use the factory to create three elements
OMNamespace depns = _factory.createOMNamespace(
Namespaces.ODE_PMAPI, "deployapi");
OMElement root = _factory.createOMElement("deploy", null);
OMElement namePart = _factory.createOMElement("name", depns);
namePart.setText(_info.getDeploymentBundleName());
OMElement zipPart = _factory.createOMElement("package", depns);
OMElement zipElmt = _factory.createOMElement("zip", depns);

// Add the zip to deploy
InputStream is;
// important, loads the right factory for stax
System.setProperty("javax.xml.stream.XMLInputFactory",
"com.ctc.wstx.stax.WstxInputFactory");
System.setProperty("javax.xml.stream.XMLOutputFactory",
"com.ctc.wstx.stax.WstxOutputFactory");
is = _stream;
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
for (int b = is.read(); b >= 0; b = is.read()) {
outputStream.write((byte) b);
}
is.close();
String base64Enc = Base64.encode(outputStream.toByteArray());
OMText zipContent = _factory.createOMText(base64Enc,
"application/zip", true);
root.addChild(namePart);
root.addChild(zipPart);
zipPart.addChild(zipElmt);
zipElmt.addChild(zipContent);

// Deploy
_client.send(root, deploymentServiceUrl);

There is more information on the Ode website.

I hope this helps.

Antoine

Bruno Wassermann wrote:
> How to you deploy to Apache Ode?
> We can deploy to ActiveBPEL via a plug-in making use of the runtime
> framework in BPEL Designer. The runtime framework allows people to develop
> plug-ins for third-party BPEL engines so that users can deploy to these
> engines straight from BPEL Designer.
>
> I am not aware of any such plug-in for Apache Ode. Are you?
>
> Regards,
>
> -- Bruno
>
>
>
> "Jonathan Coogan" <Jonathan.Coogan@Attachmate.com> wrote in message
> news:C25D0536.1BB4%Jonathan.Coogan@Attachmate.com...
>> Has anyone been able to deploy BPEL Designer processes to Apache Ode?
>>
>> Just curious.
>> -Jon
>>
>
>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: Deploying processes to Apache Ode [message #8757 is a reply to message #8079] Wed, 25 July 2007 11:30 Go to previous messageGo to next message
Eclipse User
Originally posted by: anup.chandran.3ds.com

Antoine Toulme wrote:

> Hi,

> there is a runtime API to deploy to Ode.
> Basically, you need to bundle the BPEL and WSDL files into a zip and
> send it to Ode.

> You would also need to add a deployment descriptor: deploy.xml.
> You can see how to create it here:
> http://incubator.apache.org/ode/creating-a-process.html

> The deploy.xml's schema is located here:
>
http://svn.apache.org/repos/asf/incubator/ode/trunk/bpel-sch emas/src/main/xsd/dd.xsd

> Here is the code that deploys to Ode (it uses Axis2 to call a deployment
> web service) :

> OMFactory _factory = OMAbstractFactory.getOMFactory();
> ServiceClientUtil _client = new ServiceClientUtil();

> // Use the factory to create three elements
> OMNamespace depns = _factory.createOMNamespace(
> Namespaces.ODE_PMAPI, "deployapi");
> OMElement root = _factory.createOMElement("deploy", null);
> OMElement namePart = _factory.createOMElement("name", depns);
> namePart.setText(_info.getDeploymentBundleName());
> OMElement zipPart = _factory.createOMElement("package", depns);
> OMElement zipElmt = _factory.createOMElement("zip", depns);

> // Add the zip to deploy
> InputStream is;
> // important, loads the right factory for stax
> System.setProperty("javax.xml.stream.XMLInputFactory",
> "com.ctc.wstx.stax.WstxInputFactory");
> System.setProperty("javax.xml.stream.XMLOutputFactory",
> "com.ctc.wstx.stax.WstxOutputFactory");
> is = _stream;
> ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
> for (int b = is.read(); b >= 0; b = is.read()) {
> outputStream.write((byte) b);
> }
> is.close();
> String base64Enc = Base64.encode(outputStream.toByteArray());
> OMText zipContent = _factory.createOMText(base64Enc,
> "application/zip", true);
> root.addChild(namePart);
> root.addChild(zipPart);
> zipPart.addChild(zipElmt);
> zipElmt.addChild(zipContent);

> // Deploy
> _client.send(root, deploymentServiceUrl);

> There is more information on the Ode website.

> I hope this helps.

> Antoine

> Bruno Wassermann wrote:
>> How to you deploy to Apache Ode?
>> We can deploy to ActiveBPEL via a plug-in making use of the runtime
>> framework in BPEL Designer. The runtime framework allows people to develop
>> plug-ins for third-party BPEL engines so that users can deploy to these
>> engines straight from BPEL Designer.
>>
>> I am not aware of any such plug-in for Apache Ode. Are you?
>>
>> Regards,
>>
>> -- Bruno
>>
>>
>>
>> "Jonathan Coogan" <Jonathan.Coogan@Attachmate.com> wrote in message
>> news:C25D0536.1BB4%Jonathan.Coogan@Attachmate.com...
>>> Has anyone been able to deploy BPEL Designer processes to Apache Ode?
>>>
>>> Just curious.
>>> -Jon
>>>
>>
>>


Hi Antoine,

I have been trying to create the deploy.xml but deploy fails for my sample
"helloworld" process that BPEL Designer created.

The WSDL looks a bit different from the sample provided ODE and what is
generated by the BPEL Designer.

Here is the WSDL file that got generated :

<?xml version="1.0"?>
<definitions name="HelloWorld"
targetNamespace="http://sample.bpel.org/bpel/sample"
xmlns:tns="http://sample.bpel.org/bpel/sample"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
TYPE DEFINITION - List of services participating in this BPEL process
The default output of the BPEL designer uses strings as input and
output to the BPEL Process. But you can define or import any XML
Schema type and us them as part of the message types.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
-->
<types>
<schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://sample.bpel.org/bpel/sample"
xmlns="http://www.w3.org/2001/XMLSchema"
>

<element name="HelloWorldRequest">
<complexType>
<sequence>
<element name="input" type="string" />
</sequence>
</complexType>
</element>

<element name="HelloWorldResponse">
<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="HelloWorldRequestMessage">
<part name="payload" element="tns:HelloWorldRequest"/>
</message>

<message name="HelloWorldResponseMessage">
<part name="payload" element="tns:HelloWorldResponse"/>
</message>


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
PORT TYPE DEFINITION - A port type groups a set of operations into
a logical service unit.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
-->
<!-- portType implemented by the HelloWorld BPEL process -->
<portType name="HelloWorld">
<operation name="initiate">
<input message="tns:HelloWorldRequestMessage"/>
</operation>
</portType>

<!-- portType implemented by the requester of HelloWorld BPEL process
for asynchronous callback purposes
-->
<portType name="HelloWorldCallback">
<operation name="onResult">
<input message="tns:HelloWorldResponseMessage"/>
</operation>
</portType>


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
PARTNER LINK TYPE DEFINITION
the HelloWorld partnerLinkType binds the provider and
requester portType into an asynchronous conversation.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
-->
<plnk:partnerLinkType name="HelloWorld">
<plnk:role name="HelloWorldProvider" portType="tns:HelloWorld"/>
<plnk:role name="HelloWorldRequester"
portType="tns:HelloWorldCallback"/>
</plnk:partnerLinkType>

</definitions>



My Deploy.xml is

<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
xmlns:pns="http://sample.bpel.org/bpel/sample"
xmlns:wns="http://sample.bpel.org/bpel/sample">


<process name="pns:HelloWorld">
<active>true</active>
<provide partnerLink="client">
<service name="wns:HelloWorld" port="HelloWorld"/>
</provide>
</process>
</deploy>




This is the Error i get :

11:13:24,345 ERROR [DeploymentPoller] Deployment of HelloWorld failed,
aborting
for now.
org.apache.ode.bpel.iapi.ContextException: Unable to access WSDL
definition to a
ctivate MyRole endpoint for service
{http://sample.bpel.org/bpel/sample}HelloWor
ld and port HelloWorld
at
org.apache.ode.axis2.BindingContextImpl.activateMyRoleEndpoi nt(Bindin
gContextImpl.java:55)



What is not clear to me is the WSDL file generated by BPEL Designer does
not have something like this :

<wsdl:service name="HelloService">
<wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
<soap:address
location="http://localhost:8080/ode/processes/helloWorld"/>
</wsdl:port>
</wsdl:service>

which needs to be refered in the deploy.xml....

Let me know what needs to be added in the wsdl file? thanks in advance.
Re: Deploying processes to Apache Ode [message #8768 is a reply to message #8757] Wed, 25 July 2007 11:38 Go to previous messageGo to next message
Eclipse User
Originally posted by: anup.chandran.3ds.com

I guess one has to add binding information into the WSDL doc before we can
deploy?
Re: Deploying processes to Apache Ode [message #8791 is a reply to message #8757] Wed, 25 July 2007 17:23 Go to previous messageGo to next message
Eclipse User
Originally posted by: atoulme.intalio.com

Hi Anup,

in the future please address the Ode user list for problems regarding
the Ode deployment service.
> What is not clear to me is the WSDL file generated by BPEL Designer does
> not have something like this :
>
> <wsdl:service name="HelloService">
> <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
> <soap:address
> location="http://localhost:8080/ode/processes/helloWorld"/>
> </wsdl:port>
> </wsdl:service>
>
> which needs to be refered in the deploy.xml....

You need to add a service, otherwise the port type you defined in your
WSDL does not rely on a real binding (ie somewhere where you can send
your SOAP messages). So just add a service and a port, refer to it in
the deploy.xml, and that should do it.
--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: Deploying processes to Apache Ode [message #8812 is a reply to message #8791] Fri, 27 July 2007 10:40 Go to previous message
Eclipse User
Originally posted by: anup.chandran.3ds.com

Antoine, Thanks for the answer. Yes i had to add the binding info to the
abstract WSDL that BPEL designer generates. After adding the Service /
Port definitions i was able to deploy successfully to ODE.

Hopefully BPEL designer will also provide utilities to define target
runtime bindings.

- Anup
Previous Topic:BPEL Designer
Next Topic:ActiveBPEL Runtime Plug-in 0.4 Available for Download
Goto Forum:
  


Current Time: Sat Aug 02 02:47:11 EDT 2014

Powered by FUDForum. Page generated in 0.01705 seconds