Invoke BPEL from a Webservice in OpenESB - web-services

Right now i'm developing a composite application using Open ESB. I got my
application tested through a test case by sending a request SOAP message,
and it works great.
The problem is, i want my composite application to be able to be used like
a webservice so i could call the composite application from Python using SOAPpy,
not by sending an edited SOAP message like in the test case.
How can i achieve that? Should i invoke the BPEL process from a webservice?
I already read "A Gentle Introduction: Exploring OpenESB" and "Building SOA-Based
Composite Applications Using NetBeans IDE 6". Both of the books create an interface
for the composite application, not using the composite application like a webservice.
Thanks in advance,

Well, by definition, each BPEL process is rendered as a Web service. In other words: the only possibility to invoke a BPEL process is to invoke the web service interface provided by the BPEL process (the myRole of the partnerlink that is used for inbound message activties). When your test case also submits a SOAP message to the BPEL process, any other Web service client can do the same.

Sorry for late answer but this can help other users.
Of course they will not use the composite applications as web service simply because it - the composite app - is a client consuming the web service that you have defined using the BPEL ( Business Process Execution LANGUAGE ).
Now the question is, how to get the wsdl for our web service ?
Answer :
go to your composite application
select " wsdl ports " select the wsdl that you have created in "BPEL MODEL" project.
right click => properties => location , then copy location value
replace {httpdefaultport} by 9080
add ?wsdl to the end of the location

Related

How to handle SOAP service within persistent Perl web application with cookies?

Due to the fall of SOAP::WSDL which had generated me real Perl modules I have to look for something other in order to handle a SOAP service. The generated modules won't work starting from Perl v5.18.
I have the following situation with my web application.
I have a PSGI compatible, Dancer2 driven, persistent web application.
The web application handles multiple concurrent customers.
The web application is between the customer and an external SOAP service.
The SOAP service uses customer sessions via cookies which have to be integrated on the web application internally for the customer.
The web application holds an WSDL file copy of the SOAP service.
I'm looking for a module that creates an interface out of the WSDL file and handles parameter/schema validation and communication with the SOAP service. I would like to call a method (SOAP call) with parameters (SOAP call parameters) and receive a cleaned data or object structure of the response.
The problem is that the web application needs to handle multiple concurrent customer cookie sessions. So I need a module which offers the possibility to override the cookie jar for that particular request and extract the cookies after the request without causing interference with other concurrent requests.
I found XML::Compile which I can initialize as a singleton at web application start up. But with this solution I ran into problems with interfering other customer requests. So the requests are not separated. Initializing XML::Compile for every request is not the solution either because it will parse the WSDL and generate handlers over and over again for every request the customer sends to the web application.
Is there any solution/module that fits my needs or do I miss something with XML::Compile and it's possible with it?
Are you using Catalyst?
I've been happy using Catalyst::Controller::SOAP and its companion Catalyst::Model::SOAP to build SOAP/WSDL servers and consumers, being able to integrate Perl Applications even with Microsoft Document Literal-Wrapped thing.
Even if not using Catalyst you may probably learn from its code. It uses XML::Compile::WSDL11.

Can a wcf client handle 2 version of a SOAP response from the same url?

I imported a service reference to a SOAP web service from the customer and coded my client based on that.
After going to production, they said they will launch a new version of the web service with changes to the output type of one of the requests I make to the service (among new messages that I don't consume).
I know I can update my service reference and update my client code to process the updated wsdl and launch an update to my client at the same time the web service updates.
But, is it possible to instrument the WCF code in some way so that I can handle both versions of the response without having to coordinate the update of my client with the update of the web service?
In most cases, NO. It depends on what has changes in the service interface? In most cases you'll need (and want) to upgrade your client. You can always ask them to support more versions of their interfaces.

How to pass collection<?> over JAX-WS web service

In my project I need to write a web service which will receive Collection<?> as a parameter.. I am using apache CXF.. After I have written the service method I am unable to test it using SOAP UI (It is not generating any request).. My question is - Is it possible to receive Collection<?> over web service? I need to receive Collection of any object type.. Please help..
You need to work directly with SOAP messages.

Calling a back-end web service with IBM Message Broker

I was trying to deploy a back-end web service to IBM Message Broker. Then create a Java client to call Broker, which in turn calls the back-end web service.
If the Java client can call Broker, then so can any other Java app.
The IBM documentation on the subject is massive. So here are the steps that I took, plus a couple of issues I struggled with, and then resolved.
Two useful links:
Setting up a flow:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fad64230_.htm
Deploying a flow:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Faa40160_.htm
Create a new Application.
Within the Application, create a new Message Flow.
On the flow workspace, on the left menu column, select Web Services.
Select a SOAPInput, SOAPRequest, SOAPReply.
Connect the input to the request, and the output of the request to the reply.
When you double-click on the Request, it will be looking for a WSDL. Select import/create new at the bottom of the window. On the next window, select the bottom option to select a WSDL from outside the environment. Paste in the entire URL to your back-end web service.
Click next and finish on the following windows to get back to the Flow work space.
One point that I struggled with and was not obvious in the documentation, is that you will need to create a new flow for each method in your back-end web service.
In the SOAPRequest properties, set the "binding operation" to the method behind that flow.
Once you build and deploy the bar, you can right-click anywhere on the Flow work space and select Test...
The test tool will display the WSDL of the web service that is deployed to your Broker instance. You can grab that WSDL and use Ant or Maven to create a Java client and call your web service (which in turn calls the back-end service)
That's not strictly speaking true, you can route to a label based on the operation name in the wsdl or even use the SOAPInput node in generic gateway mode. Generally you'll want a flow per "service" not per method.

Forwarding web services through JMS

I'm trying to figure out how to forward web service requests from the web server to a remote application server through jms.
In my architecture there are web services client which communicate with some web server (Tomcat) which needs to forward the request to be executed on a remote application server and at the end get the result and push it back to the web service client.
Something like:
Web Service Client <-> HTTP <-> Tomcat <-> JMS <-> Application Server.
I want to use jax-ws so my methods will be called automatically in the application server.
Although I've expected this will be common approach, I didn't find any examples.
I would appreciate if someone can provide some links or tips on how such a configuration can be built.
Currently I'm using Metro but any other solution is valid as well.
Another aspect which I'm interested in, is whether I can use the fast-infoset over JMS to increase performance.
Thanks in advance,
Avner
you can try wso2MB as a JMS provider ...Check following links, would be useful
[1]http://wso2.org/library/message-broker
[2]http://pzf.fremantle.org/2011/04/introduction-to-wso2-message-broker_05.html
One option to solve it is using Apache Camel.
Then you can configure such a thing with an XML configuration file.