Lehmann Blogger

  Monday, August 23, 2004


XMLType from a PLSQL Web Services Perspective

A customer today asked a common question of: how the heck do you return XML from a PL/SQL Web service? The unsaid reason for the question was that most PL/SQL Web services examples show primitive types or abstract types as return types.

There are a number of ways but the one that came to mind first was to simply use the database XMLType.  Using sample data from my blog Publishing XMLType Web Services I changed the Java Web services implementation from that sample to be PL/SQL centric.  The moving parts are as follows:

1. PLSQL Package

PACKAGE "PURCHASEORDER" AS
FUNCTION GETPO (PONUM NUMBER)
RETURN XMLTYPE;
END;

2. PLSQL Package Body

PACKAGE BODY "PURCHASEORDER" AS
FUNCTION GETPO (PONUM NUMBER)
RETURN XMLTYPE IS
v_xml XMLTYPE;
BEGIN
  select e.XPO
  into v_xml
  from po_xml e
  where e.xpo.extract('/PURCHASEORDER/@PONO').getNumberVal() = PONUM;
RETURN v_xml;
END GETPO;
END PURCHASEORDER;

3. Table create and insert

See the SQLPlus code example here http://radio.weblogs.com/0132036/2003/11/29.html

Once you have done that both JDeveloper and the Web services assembler will be happy as punch to publish the PURCHASEORDER procedure as a Web service. This example Publish PL/SQL Web Services shows how to do it with Web Services Assembler (replace the DBFUNC naming with the above package) and this example from OTN - http://www.oracle.com/technology/tech/webservices/htdocs/series/plsql/index.html shows how to do it from JDeveloper.

Other interesting return types such as result sets, BLOBs and idiosyncratic PL/SQL types can be found here http://www.oracle.com/technology/sample_code/tech/java/jsp/dbwebservices.html.



comment []
11:50:10 PM    

  Thursday, August 12, 2004


Planning for Service Management Within a Service-Oriented Computing Infrastructure

Bill Jones and Kevin Minder did a great job of outlining Web services management issues in this article published in Web Services Journal this month:

Planning for Service Management Within a Service-Oriented Computing Infrastructure

Management of Web services and all the associated issues is fast becoming a priority in our customer base and a big increase in capability  will be in our OracleAS 10.1.3 release that I have been writing about for sometime now.



comment []
1:30:25 PM    

  Monday, August 09, 2004


Web Services Complexity in Perspective

Today, one of the engineers I work with, Eric Rajkovic , made an insightful remark on my blog against the vagaries of JAX-RPC complexity today that I thought would be useful to serve as a counterpoint to that somewhat pessimistic entry.   

He noted quite often where simplicity matters is more on the Web service client rather than the Web service implementation.  He reminded me of a customer who spent a lot of time crafting his WSDL and implementation so that his .NET clients got the maximum ease of use when incorporating his service into their applications.  This is not to say development of a Web service implementation shouldn't be easy; rather to note that those doing the service implementation are often somewhat more sophisticated than those doing the consumption.

This client friendly approach is a common for popular Web services - take a look at Amazon's, EBay's or Google's WSDL for their services. Frequently these and others have nicely annotated WSDLs and at the very least they have nice meaningful service, operation and parameter names in them.  Further, these highly public Web services often ship an SDK with sample clients in a variety of languages.  This is a popular approach we see in our customers. 

The goal here, of course, is to ensure that your service achieves maximum usage with minimum of fuss from the end users.  If you have to pay some amount of complexity on the server to get the right namespaces, the right service names or whatever it is you need to get a WSDL that has maximum "consumptionability" that's probably not a bad thing given the number of satisfied customers you are out to achieve.

This jibed with a subsequent conversation I had with another engineer today as we worked through some namespace bugs where we continued to seek out usability for the default bottom up and top down cases but correspondingly always had the crutch of the JAX-RPC mapping file to resolve those difficult to work around namespace mapping issues that defaulting or some extra command line option wasn't going to help.



comment []
10:52:34 PM    

RFID and WiFi in Libraries

I visited the newly upgraded Hillsdale Public Library today where they appear to have RFID for checking out books ... cool ... I think.  Information on what is going on under the covers is skimpy and there are a few minor user kinks to work out - such as dealing with magazines.  The other thing that seems to be pretty happening in local libraries these days is WiFi as a number of San Mateo libraries seem to be certifiable hot spots.   Makes The Real Time Enterprise and BPEL a little closer to home when myself and my six year old daughter are living it in our daily lives.  For some background see:

- http://www.engadget.com/entry/0401742317562628/

- http://www.ci.sanmateo.ca.us/downloads/government/commissions/library/lib_min_04_05_20.pdf



comment []
9:51:28 PM    

  Sunday, August 01, 2004


The Real Time Enterprise and BPEL - Thomas Kurian

Thomas Kurian is the VP of the Oracle Appplication Server here at Oracle.  Normally when he does a presentation it is deeply technical, however in this talk at Oracle OpenWorld Shanghai he uplevels the story to cover RFID, Customer Data Hub, BPEL and Grid in the context of a cell phone manufacturer:

http://www.oracle.com/broadband/showtripane.html?3232269

Its 42 minutes well spent to get a pretty compelling use case of how some disparate parts of Oracle's platform story come together to create business value rather than just technology value.

I was there also giving the OracleAS BPEL Process Manager and OracleAS Web Services session presentations amongst others.  The BPEL PM talk was an overflowing room so it appears the interest in this standards based process languages really is global in nature.  The Web services talk was also well attended with a number of interesting questions around performance indicating some fairly serious Web services usage in China.



comment []
2:54:22 AM