March 2007 - Posts

W3C on SML and WSDL 2.0

Good news from W3C, SML and WSDL 2.0 are almost out the door:

·         The Web Services Description Working Group released three Last Call Working Drafts for the Web Services Description Language (WSDL) Version 2.0: Part 0: Primer, Part 1: Core Language and Part 2: Adjuncts. Comments are welcome through 15 April on this brief Last Call for changes since Candidate Recommendation review. WSDL RDF Mapping and SOAP 1.1 Binding are updated Working Drafts. WSDL 2.0 models and describes modular Web services and is used to document distributed systems and to automate communication between applications.

 

·         W3C has acknowledged receipt of a Member Submission for the Service Modeling Language (SML) specification, which may be used to model complex IT services and systems, including their structure, constraints, policies, and best practices. The submission request was made by BEA, CA, Cisco, EMC (Documentum), HP, IBM, Intel, Microsoft, and Sun Microsystems with the recommendation that W3C form a Working Group whose mission would be "to produce W3C Recommendations for Services Modeling Language by refining the Submission, addressing implementation experience, and interoperability feedback from the Submission."

Posted by gsusx | 7 comment(s)
Filed under:

JMS based Web Services in Oracle App Server Part 1: WCF Interoperability

By Jesus Rodriguez

This is the first of two articles intended to illustrate Java Messaging Service (JMS)-based Web Services using Oracle Application Server. Specifically, this article focuses on how to achieve JMS .NET interoperability through JMS-based Web Services.

Java Messaging Service (JMS) is one of the key components of the J2EE model. Nowadays there are thousands of applications built on top of the different JMS implementations available. However, JMS still remains an almost exclusive technology of the J2EE stack, commonly obscure to .NET developers. That, among other factors, creates an interesting and always challenging endeavor with JMS .NET interoperability.

The emergence of Web Services technologies has brought new alternatives to achieve JMS-.NET interoperability. Assembling Web Services endpoints on top of JMS artifacts, like destinations, connections, etc., allows interaction with those artifacts from non J2EE environments like .NET.

Among the existing J2EE Web Services technologies, Oracle Application Server extensively leverages the rich JMS feature set. Oracle Application Server allows you to assemble Web Services on top of native JMS destinations like queues or topics. That functionally allows abstracting JMS native concepts behind a Web Services contract mainly composed of basic operations like Send and Receive. Additionally, the Web Services can rely on low-level, one-way JMS send-receive operations to implement more complex message exchange patterns like Request-Response.

An Oracle JMS endpoint Web service can have the following operations.

·         Send: the XML payload (SOAP body element) is sent to the corresponding JMS destination. A send operation can be configured so that JMS message properties can be set on each sent message to indicate the JMS reply-to destination, priority, expiration, and so on.

·         Receive: a message is retrieved from the corresponding JMS destination, the content of the JMS message is used to create the SOAP response message body payload.

·         Both: a service can offer both operations.

The great benefit of this approach is that it is provided as part of the platform. In other words, it standardizes the way JMS endpoints are exposed as Web Services using common contracts and tools. The following section will explore the steps required to assemble a Web Service from a set of JMS destinations.

Implementing a JMS based Web Services in Oracle App Server

For purposes of this example we will use a JMS queue named demoQueue.

·         Once the JMS destination is available we can create a new JMS Web Service following the JDeveloper project template with the same name.

·         Next, we need to implement the Send operation and bind it to the correct JMS destination.

 

Figure1: Web Service Send Request: JMS binding configuration

  

·         In case of request-response operations the JMS destination used for the reply message must also specified.

   

 

Figure2: Web Service Send Response: JMS binding configuration

  

·         Similar steps have to be followed for the Receive operation.

 

Figure 3: Web Service Receive Request: JMS binding configuration

The following figure shows the WSDL generated after completing the previous steps.

<definitions

          name="MyWebService1"

          targetNamespace="http://jmsservices/MyWebService1.wsdl"

          xmlns="http://schemas.xmlsoap.org/wsdl/"

          xmlns:tns="http://jmsservices/MyWebService1.wsdl"

          xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"

          xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"

          xmlns:tns0="http://jmsservices/MyWebService1.wsdl/types/"

          xmlns:xsd="http://www.w3.org/2001/XMLSchema"

          xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"

        >

            <types>

                        <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://jmsservices/MyWebService1.wsdl/types/"

                          elementFormDefault="qualified" xmlns:tns="http://jmsservices/MyWebService1.wsdl/types/"

                          xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                          xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/">

                                    <element name="receiveElement">

                                                <complexType>

                                                            <sequence/>

                                                </complexType>

                                    </element>

                                    <element name="receiveResponseElement">

                                                <complexType>

                                                            <sequence>

                                                                        <element name="result" nillable="true">

                                                                                    <complexType>

                                                                                                <sequence>

                                                                                                            <any/>

                                                                                                </sequence>

                                                                                    </complexType>

                                                                        </element>

                                                            </sequence>

                                                </complexType>

                                    </element>

                                    <element name="sendElement">

                                                <complexType>

                                                            <sequence>

                                                                        <element name="input" nillable="true">

                                                                                    <complexType>

                                                                                                <sequence>

                                                                                                            <any/>

                                                                                                </sequence>

                                                                                    </complexType>

                                                                        </element>

                                                            </sequence>

                                                </complexType>

                                    </element>

                                    <element name="sendResponseElement">

                                                <complexType>

                                                            <sequence/>

                                                </complexType>

                                    </element>

                        </schema>

            </types>

            <message name="JmsDestination_receive">

                        <part name="parameters" element="tns0:receiveElement"/>

            </message>

            <message name="JmsDestination_receiveResponse">

                        <part name="parameters" element="tns0:receiveResponseElement"/>

            </message>

            <message name="JmsDestination_send">

                        <part name="parameters" element="tns0:sendElement"/>

            </message>

            <message name="JmsDestination_sendResponse">

                        <part name="parameters" element="tns0:sendResponseElement"/>

            </message>

            <portType name="JmsDestination">

                        <operation name="receive">

                                    <input message="tns:JmsDestination_receive"/>

                                    <output message="tns:JmsDestination_receiveResponse"/>

                        </operation>

                        <operation name="send">

                                    <input message="tns:JmsDestination_send"/>

                                    <output message="tns:JmsDestination_sendResponse"/>

                        </operation>

            </portType>

            <binding name="MyWebService1SoapHttp" type="tns:JmsDestination">

                        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

                        <operation name="receive">

                                    <soap:operation soapAction="http://jmsservices/MyWebService1.wsdl/receive"/>

                                    <input>

                                                <soap:body use="literal"/>

                                    </input>

                                    <output>

                                                <soap:body use="literal"/>

                                    </output>

                        </operation>

                        <operation name="send">

                                    <soap:operation soapAction="http://jmsservices/MyWebService1.wsdl/send"/>

                                    <input>

                                                <soap:body use="literal"/>

                                    </input>

                                    <output>

                                                <soap:body use="literal"/>

                                    </output>

                        </operation>

            </binding>

            <service name="MyWebService1">

                        <port name="MyWebService1SoapHttpPort" binding="tns:MyWebService1SoapHttp">

                                    <soap:address location="http://MyServer/WSInterop-JMSServices-context-root/MyWebService1SoapHttpPort"/>

                        </port>

            </service>

</definitions>

  

  

This example allows you to send and receive arbitrary xml messages. In order to create fully typed contracts we should use the Java binding capabilities exposed on the wizard.

Implementing a JMS WCF client

The abstractions created in Oracle make the creation of a JMS .NET client no different from any other WS-I compliant Web Service. For the purpose of this example we use a WCF client as illustrated in the following code.

JMSServices.JmsDestinationClient proxy = new      JMSClient.JMSServices.JmsDestinationClient();

XmlDocument msgDoc = new XmlDocument();

msgDoc.LoadXml("<msg>JMS .NET message</msg>");

proxy.send(msgDoc.DocumentElement);

 After executing the above code the message is delivered to JMSDemoQueue.

Either basicHttpBinding or wsHttpBinding can be used to achieve the communication with the Oracle Web Service.

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

        <system.serviceModel>

                <bindings>

                        <basicHttpBinding>

                                <binding name="JMSDestServiceSoapHttp">

                                        <security mode="None">

                                                <transport clientCredentialType="None" proxyCredentialType="None"

                                                        realm="" />

                                                <message clientCredentialType="UserName" algorithmSuite="Default" />

                                        </security>

                                </binding>

                        </basicHttpBinding>

                </bindings>

                <client>

                        <endpoint address="http://oracleappserver/WSInterop-JMSServices-context-root/JMSDestServiceSoapHttpPort"

                                binding="basicHttpBinding" bindingConfiguration="JMSDestServiceSoapHttp"

                                contract="JMSClient.JMSServices.JmsDestination" name="JMSDestServiceSoapHttpPort" />

                </client>

        </system.serviceModel>

</configuration>

  

Summary

This article has explained how to achieve JMS .NET interoperability exposing JMS destinations as Oracle Web Services. Oracle Application Server provides the mechanism to create WS-I compatible Web Services based on JMS destinations. This process facilitates the creation.NET clients that follow Standard SOAP-based interaction with the JMS destinations. The next article will explore how to use JMS as a transport for persistent communication with Oracle App Server Web Services.

My session slides

Thanks to all the people who attended to my session Unifying Integration: Building Line of Business Adapters with WCF Deep Dive at the MVP summit. My co-speaker Sonu Arora has uploaded the slides to https://msmvps.team.partners.extranet.microsoft.com/windowsserver/pgsites/default.aspx. Given NDA reasons we can’t share all the content but I’ll be blogging about the demos in the next weeks.

Posted by gsusx | 1 comment(s)

SCA v1.0 released

Some of the main J2EE vendors released today the first series of SCA specifications. The series includes bindings for integrating some of the main SOA-J2EE technologies

Posted by gsusx | 4 comment(s)
Filed under: ,

Database transactions and EBay

Large-scale distributed systems often require the use of non-traditional techniques in order to improve performance. Martin Fowler (Chief Scientist ThougthWorks) explains how EBay avoid the use of database transactions.

Posted by gsusx | with no comments

WF and WS-BPEL 1.1

The first CTP of the WS-BPEL 1.1 activities for Windows Workflow Foundation are now available. A later release plans to support WS-BPEL 2.0

Posted by gsusx | with no comments

MVPSummit 2007 summary

The MVP Summit finalized yesterday. I had a wonderful time and enjoyed the sessions. Was a good time to catch up with some friends and also the opportunity to finally met people like: Charles Young , Dr Nick among others.  At the dinner my friend Harry Pierson and I started bombarding Dr Nick with the necessity to implement durable duplex (a.k,a Service Broker bindings) in WCF.

Also at the dinner I had a great conversation with Steve Swartz (CSD Architect) , Gregor Hohpe (Mr Integration Patterns) and Clemens Vasters.  It is nice to see Gregor, who now works for Google, working hard to keep his MVP.

Posted by gsusx | with no comments
Filed under: ,

MVPSummit 2007

The conference season is starting. I have a few presentations scheduled for the first part of the year including Microsoft Teched and SOAWorld. Next week I am heading towards Redmon for the MVPSummit where I’ll have the pleasure of sharing stage with Sonu Arora (Program Manager BizTalk Server). Our session is going to dive deep into the .NET 3.0 adapter framework components including some of the tips and tricks for building adapters with the new framework. We’ve prepared some cool content and demos. If you are attending to the summit, swing by our session, we promised to keep it excited :D.

Posted by gsusx | 4 comment(s)

Microsoft will support WS-BPEL 2.0

I know it is been a few days since the announcement but I am really happy to see Microsoft embracing WS-BPEL 1.1 and 2.0.
Posted by gsusx | 2 comment(s)
More Posts