ode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Toulme" <atou...@intalio.com>
Subject Re: [RESULT] [VOTE] Release ODE 1.1 (final)
Date Wed, 29 Aug 2007 10:11:51 GMT
FYI I submitted a code snippet to the bpel-designer newsgroup regarding
deployment to Apache Ode.
Here is the link to the message and the full text is copied below too.

news://news.eclipse.org:119/f37uh3$t75$1@build.eclipse.org

The Eclipse STP project has shown interest regarding the development of a
deployment platform that would include Apache Ode.

Maybe there is something to build there ?

// original message to BPEL newsgroup
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-schemas/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

On 8/29/07, Tammo van Lessen <tvanlessen@gmail.com> wrote:
>
> 2007/8/28, Matthieu Riou <matthieu@offthelip.org>:
> > On 8/27/07, Tammo van Lessen <tvanlessen@gmail.com> wrote:
> >> I can announce the release in the german java magazin, I guess they
> > > are glad to get the information straight from the horse's mouth :)
> Thats done. It has not been published yet, may be they are waiting for
> the ode site update.
>
> > That'd be great. I plan on pinging the usual suspects: serverside,
> java.net,
> > javalobby. We also have infoq covered. Anything else you can think of is
> > good.
> Nope, thats everything I'm aware of. Blogging might be also good
> (targeting Planet WS/Apache).
>
> > I know that Paul tried Lomboz and it worked pretty well. We should also
> link
> > them from our tools page (always forgot so far). Actually I was thinking
> of
> > checking with the Eclipse BPEL guys if they would be interested by our
> > compiler, to add validation on the BPEL they generate.
> I also thought about writing an eclipse plugin which creates our
> deployment bundles and deploys them via the deployment WS. Well the
> lomboz guys were faster with grabbing the low-hanging fruits and did a
> great job. However it does not support remote deployment. May be such
> a light-weight deployment integration would be still helpful? I'm not
> sure whether we want to jump on this tool-integration train as well.
> Ideas?
>
> Cheers,
>   Tammo
>



-- 
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: http://bpms.intalio.com</a>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message