« September 2008 | Main | November 2008 »

October 2008 Archives

October 3, 2008

Calling BPEL from Oracle Service Bus

Calling BPEL from the Oracle Service Bus

The latest SOA Suite from Oracle now includes the former AquaLogic Service Bus (ALSB), now known as the Oracle Service Bus (OSB).  The old Oracle Enterprise Service Bus (ESB) is still available but the preferred Service Bus in Oracle is now the OSB.  Currently OSB is only available on WebLogic platform whilst ESB is supported on all SOA Suite platforms.  This entry details the steps that I had go through to call BPEL (version 10.1.3.4) from ALSB (version 3.0 which can be downloaded from here).  When the Oracle badged version is released some of the problems I had should go away.  So here is what I did to get OSB to call BPEL.

Creating the Project and Directories

I began by creating a project in the service bus, I tend to separate components out into sub-folders such as WSDL, Schemas, Proxy and Business Services.  This makes it easier for me to find things.

Loading the WSDL

In the BPEL console I navigated to the WSDL for the process I wanted to call and saved it locally.  In my OSB projects WSDL folder I then uploaded the BPEL WSDL.  After doing this it complained that:

The WSDL "AddBPELProcess.wsdl" was successfully created with validation errors. View the WSDL/Conflicts to see detailed diagnostic messages.

Drilling down into the loaded WSDL I got a more specific error message explaining what the conflict was:

One of the WSDL dependencies is invalid.

By default JDeveloper creates a WSDL that imports its type definitions from a separate XML schema.  This XML schema file by default has the same name as the WDSL file but with a .xsd extension.  The service bus was complaining because it couldn’t find that schema.  I would obviously have to fix this.

Loading the Schema and Resolving the Reference

BPEL stores the schema at the same location as the WSDL file.  So if the URL of my WSDL file was “http://w2k3/orabpel/default/AddBPELProcess/1.0/AddBPELProcess?wsdl” then the URL of my XSD would be “http://w2k3/orabpel/default/AddBPELProcess/1.0/AddBPELProcess.xsd”.  I needed to first of all download from BPEL the schema file and then I uploaded it to the Schema folder I had created in my service bus project.  I then went back to my WSDL folder, drilled down into my BPEL process WSDL and went into the the “Edit References” screen.  Here I was able to browse for my uploaded schema and match it to the schema expected by the WSDL.  Saving these changes gave me a WSDL that the service bus was happy with.

Creating the Business Service

My BPEL process was to be a back end service or business service in the service bus.  having loaded the WSDL for the service I was now ready to create a business service.  I went to the BusinessServices folder and added a business service using the WSDL I had just uploaded.  I chose to use the port rather than the binding in the WSDL as this would provide me with the physical endpoint of the service from the WSDL, avoiding me having to specify it.  After creating the business service I then activated my changes so I could test out the business service from the service bus test screen.

Testing the Business Service

After activating my changes I clicked on the little bug icon next to my business service expecting to see a nice test screen, but all I got was an ugly error message.

Error Accessing Test Configuration

Underneath this message was some more detail.

An unexpected error occured accessing information about the WSDL of the service:
com.bea.wli.config.component.NotFoundException: Can not compute effective WSDL for : BusinessService Chapter19/BusinessServices/AddIntegers

Still not very helpful.  A quick search of the internet turned up this useful blog entry by Berthold Maier (thank goodness for my schoolboy German).

Fixing the WSDL

It turns out that the service bus didn’t like the partner link elements at the end of the WSDL.  Personally I think it should have ignored them if it didn’t understand them, but c’est la vie!  I edited the WSDL in the service bus and commented out the partner link information.

<!--
  <plnk:partnerLinkType name="AddBPELProcess">
    <plnk:role name="AddBPELProcessProvider">
      <plnk:portType name="tns:AddBPELProcess"/>
    </plnk:role>
  </plnk:partnerLinkType>
-->

I was then able to commit the changes and go back to the business service test screen which now appeared correctly and allowed me to invoke the BPEL process.

More Thoughts on WSDL

The above steps let me call my process, but I did have to manually edit the WSDL.  I could have avoided this by uploading to the service bus the WSDL from within my JDeveloper project which is missing the binding information.  But this raises another set of issues and I prefer to work with what is deployed, particularly as I cannot guarantee access to the JDeveloper version of the WSDL and even if I had access I have no guarantee that the deployed WSDL and the WSDL in JDeveloper are the same.

Summary

When calling BPEL from the service bus remember two key things

  1. Upload any referenced schema or wsdl files into the service bus.
  2. Remove the partner link information from the wsdl obtained from JDeveloper.

Apart from those two issues everything else seemed to work fine.

I have to say that I find the newly acquired Oracle Service Bus very capable and has lots of nice features such as support for throttling, configuration history and dashboards.  And best of all the next release will have tighter integration with BPEL, what's not to like?

October 8, 2008

Which JDev is Right for me?

Which JDeveloper is Right for Me?

Yesterday saw the release of JDeveloper 11g, whilst back in July we saw the release of JDeveloper 10.1.3.4, so now 11g is here do I still need 10.1.3.4.  Well the answer is a very firm, it depends.  Currently there are three ‘current’ versions of JDeveloper that you may want to use, and each of them has its own benefits.

JDeveloper 10.1.3.4

This version was released in July alongside SOA Suite 10.1.3.4 and still uses Oracle Internet Application Server (OC4J).  It is the most complete JDeveloper to date and includes support for Oracle SOA Suite.  If you are doing SOA development then this is the version that you need.  It provides the BPEL designer as well as the ESB designer.  Note that this version doesn’t support the Oracle Service Bus, that should come in a future 11g release.

JDeveloper 11.1.1.0.0

This version released yesterday is the first version of JDeveloper to ship with Oracle WebLogic Server as the embedded application server.  I have just tried out a couple of simple applications and I can confirm that it works at least as well if not better than the embedded OC4J that used to be included with JDeveloper.  Timing a simple servlet application it took 18 seconds to launch WebLogic, deploy the application and show the first page in the browser, this is comparable to 11g TP4 but slower than 10.1.3.4.  Note that there is no support for SOA Suite in this release, if you need to do BPEL development you still need 10.1.3.4.

JDeveloper 11g TP4

This version is the preview version of the SOA Suite 11g.  It doesn’t have support for Oracle Service Bus yet but it does have the preview versions of 11g SOA Suite editors including the SCA Assembly editor and the BPEL editor.  If you want to see what 11g SOA Suite looks like then this is the release for you, but I wouldn’t use it for anything that needs to go into production in the near future.  This version is still based on OC4J although obviously at some point in the near future all this functionality will become available on a WebLogic version of JDeveloper.  I haven’t checked but it would seem sensible to me to make the SOA Suite components available as tech preview plug-ins to the 11.1.1.0.0 release.  I don’t know when this will occur though.

Summary

So today you have 3 JDevelopers to choose from.  Choosing between them is pretty straightforward.

  • Choose JDeveloper 10.1.3.4 if you are doing SOA development that needs to be deployed in the next 6-12 months.
  • Choose JDeveloper 11.1.1.0.0 if you are doing pure JEE development, particularly if you are targeting WebLogic.  This is Oracles strategic development platform.
  • Choose JDeveloper 11g TP4 if you want to explore the next generation of Oracle SOA Suite but don’t need to be in production for a while.

The following table helps to summarise the features in each different JDeveloper release.  The table matches the version of JDeveloper with its JEE container (Embedded Container), its support for SOA Suite, the version of JEE it supports and the version of the JDK it ships with.  It also gives the time to start the embedded container, deploy a simple servlet and get the page up in a browser.  Finally the production status of the release is given.

JDeveloper Version Embedded Container SOA Suite Support JEE JVM Test Time Status
10.1.3.4 10.1.3.4 OC4J 10.1.3.4 (no Oracle Service Bus) 1.4+ 5 9 sec Production
11.1.1.0.0 10.3 WLS Web Service Only 5 6 18 sec Production
11g TP4 11g OC4J 11g (no Oracle Service Bus) 1.4+ 5 18 sec Technology Preview

About October 2008

This page contains all entries posted to Antony Reynolds' Blog in October 2008. They are listed from oldest to newest.

September 2008 is the previous archive.

November 2008 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle