Archive

Archive for April, 2010

How To: Implementing Chained Service Calls with Generated Code

April 27th, 2010

How To: Implement Chained Service Calls with Generated Code and Typed PAPI

The Scenario

Let’s say you want service X to call an operation of service Y as a service consumer. Here’s the scenario in the form of a sequential diagram for you to follow:
chained_svc_call1

Now, let’s try implementing this!

Follow these steps:

  1. Design a WSDL(SDX/SPDX) for both services.
  2. Generate code for the consumer and provider of the Service X.
  3. Generate code for the consumer and provider of the Service Y.
  4. Implement the business code for the provider of the Service Y.

At this point you’ll have to make a few changes in the generated consumer code of Service Y, ServiceYConsumerImpl.java. These changes are described in this ordered list.

  1. For all operations that will be called from Service X, add public methods after the Additional Code section. Implementations of these methods simply delegate the call to the corresponding generated consumer methods

    Note that the generated consumer methods cannot be called directly, because they have default access levels and are accessible only from the same package

  2. Add the public method getParticipantIdentity() returning the participantIdentity variable.
Here is the sample code
/******************************************************************
**
**  Additional Code
**
**  Put extra (unmodeled) fields and methods after this comment
**
*********************************************************************/

public ElementYResponse operationYExtern(ElementY request) throws
TechnicalException {
return operationY(request);
}

public ParticipantIdentity getParticipantIdentity() {
return participantIdentity;
}
Now Start the Call Operation

This is what you need to do in advance:

  1. Add dependencies to the common and consumer projects of Service Y to the provider project of Service X.
  2. Implement the business code for the provider of Service X

To call operations of Service Y from Service X’s provider implementation class:

  1. Declare and instantiate the consumer of Service Y in ServiceXProviderImpl.java.
  2. /*****************************************************************
    **
    **  Additional Code
    **
    **  Put extra (unmodeled) fields and methods after this comment
    **
    *****************************************************************/
            private ServiceYConsumerImpl consumerY = new ServiceYConsumerImpl();
    
  3. Add start-up consumer code as shown in this code snippet.
  4. /* uid: _startupImpl_uid_ */
     /**
     * This is a hook that is called before the SBB is started up.
     * Add an implementation if you want to initialise other resources
      (e.g. open other connections).
     *
     *     It does not throw any checked exceptions - if there is an error,
     *     the program should either exit or throw an unchecked exception.
     */
     private void startupImpl() throws TechnicalException {
    
    	consumerY.startup(
    		     consumerY.getParticipantIdentity(),
    		     ServiceYConsumerImpl.getConsumerPolicy());
     }
    
  5. Add shut down consumer code as shown in this code snippet.
  6.     /* uid: _shutdownImpl_uid_ */
        /**
         * This is a hook that is called before the SBB is shut down.
         * Add an implementation if you want to release other resources
           (e.g. close obtained resources).
         *
         *     It does not throw any checked exceptions - if there is an error,
         *     the program should either exit or throw an unchecked exception.
         */
        private void shutdownImpl() {
        	consumerY.shutdown();
        }
    
  7. Use the consumer object to call operations of Service Y:
  8. /* uid: SoperaUID_operationX */
    /**
    * Synchronously execute a request to operation operationX, request-response
    * style (similar to JAX-WS).
    *
    * @param operationXRequest
    * the request
    * @return the response
    * @throws ParticipantException
    *             on technical error
    */
    public ElementXResponse operationX(final ElementX operationXRequest)
    	throws ParticipantException {
    	ObjectFactory ofX = new ObjectFactory();
    	ElementXResponse response = ofX.createElementXResponse();
    	// ... business code
    	try {
    		org.sopware.services.exampleuri_y.ObjectFactory of Y
    		= new org.sopware.services.exampleuri_y.ObjectFactory();
    		ElementY requestY = ofY.createElementY();
    		requestY.setIn("Request to service Y");
    		consumerY.operationYExtern(requestY);
    		} catch (TechnicalException e) {
    			throw new ParticipantException(
    				"Technical problem by Service Y call: "
    				+ e.getMessage(), e);
    		}
    		// ... business code
    		return response;
    }
    

Andrei Shakirin Development , , ,

Launch of the Eclipse SOA Industry Working Group

April 20th, 2010

Things have been rather quiet around the Eclipse SOA Intitative. The cause for that lies squarely with the exit of some commercial software vendors from the Industry Working Group shortly before it was to start in the fall of 2009.

I think that speaks volumes about the insecurity that these vendors are facing when dealing with Open Source projects. For the others, like Obeo, itemis & SOPERA whose business models are closely entwined with Open Source projects, the work has gone on. Recently, Engineering, Italy’s biggest system integrator joined the Industry Group in February 2010 and has offered up two new SOA projects: eBPM und eBAM giving the whole initiative a new momentum. As a result of which, half a year later, the Eclipse SOA Industry Working Group will now attend the SOA days at the Deutsche Post officially with a keynote presentation by Mike Milinkovich.

Ricco Deutscher Development, Management, Strategy , ,

How To: Deactivate Process to Process Communication in SOPERA BPM

April 15th, 2010

We have decided to publish a number of short, easy to follow, “How Tos” in our blog. Here is a short “how to” from our team related to Intalio and P2P.

Peer to Peer (P2P) Communication with Intalio 6.0.013

SOPERA BPM 2.0 allows the deactivation of process to process (peer to peer) communication. This feature is required for the implementation of the dual usage (invoke and provide) of one WSDL in BPM processes. This section describes how to do just that.

Disabling P2P Communication

To disable the P2P communication:

  1. Add the attribute usePeer2Peer in the project deploy.xml file.
  2. Set this attribute value to false in the project deploy.xml file for the specific partner link
Take a look at this example:


<dd:invoke partnerLink="..." usePeer2Peer="false">;
<dd:service name="..." port="..."/>
</dd:invoke>

That’s all!

Robert Lalyko Development

Attention Mac Users: Install and Run SOPERA ASF!

April 13th, 2010
SOPERA ASF on Mac OS X

Yes, it’s true! You can now install and run SOPERA ASF with very little effort on your Mac OS X. For information on prerequisites, installation instructions and tips, see Mac Quick Start.

Please send us your feedback on the article and let us know if you are interested in finding out more about running SOPERA on Mac OS X.

NOTE: There are two support categories defined by SOPERA, Supported
and Certified. The Mac OS X is neither supported nor certified by SOPERA.

Anne Aloysious Development ,

The SOPERA Partner Program!

April 1st, 2010
Extending our Reach

SOPERA’s SOA open source software is based on a building a community for developers. SOPERA has created a partner program to extend our ability to reach members of this community. Our partner pogram offers strategic alliances and enables us to offer customized and innovative solutions.

Types of Partnerships

SOPERA offers a partner program with various options for cooperation. Here is a short list of what our partner program covers:

  • System Integrators
  • Master Resellers
  • Independent Software Vendors
  • Technology Partners

For more information, see Partner Program.

Anne Aloysious Events, Strategy