eskalera
eskalera

Reputation: 1092

How do I consume a real web service from a BPEL Process?

I've been doing some research on BPEL for about two weeks now and still don't quite get it.

I have deployed the HelloWorld sample in ODE and have also managed to deploy this other one.

My intention was to do something like the second example but with my own real WS deployed and working.

I'm now at the point of having a process with no errors and correctly deployed in ODE with the following structure:

enter image description here

I have started the project from a service definition importing my Multiply.wsdl. The Designer has composed the import tag into the MuktiplyProcessArtifacts.wsdl next to the PartnerLinkTypes all automagically so I assume all namespaces, etc are ok.

There is a few concepts I misundertand in order to make all of this work:

  1. In my original Multiply.wsdl I have

soap:address location="http://localhost:8080/WS-multiply/multiply"

but ODE tells me my soap:address must have the form host.port/ode/processes..

This doesn't sound reasonable to me since my WS could be implemented anywhere outside my ODE_HOME.

  1. The second example I mentioned before explains how the Designer presumably creates a "Caller.wsdl", which in fact has the function I would desire, which is to implement a "wrapper" WSDL, providing the BPEL process with entry and exit points. The issue is the Designer does not generate that interface. Am I supposed to create it myself? Do I have to create it at all?

  2. If that 3rd wsdl is really needed, is it the one I would have to call if I wanted to test the whole process?

Upvotes: 3

Views: 2992

Answers (3)

Pablo
Pablo

Reputation: 90

Its mandatory to have Ode.war deployed at tomcat server, tomcat create a path like the picture, you need to config your endpoit with the complete path /ode/processes

c:\apache-tomcat-7.0.55\webapps\ode\WEB-INF\processes\BPEL_WS\

Upvotes: 0

vanto
vanto

Reputation: 3142

It looks like your partner WSDL is associated to a myrole of a partnerlink. Partnerlinks and partnerlink types are a concept in BPEL that is used to define dual interfaces in a sense that if a partner A wants to communicate with a BPEL process as a buyer, it needs to provide a certain set of functionality that the process can use for further communications (i.e. sending a shipment confirmation to the buyer). Thus, a partnerlink maintains two roles, the myRole is the portType (aka interface) that the process itself provides, the partnerRole refers to a portType the process expects to be implemented by the partner. MyRoles must be of course implemented by the BPEL process and thus needs to have an endpoint that is exposed by the BPEL engine. PartnerRoles can be bound to arbitrary endpoints. This happens in the deployment descriptor, which is the deploy.xml in ODE.

I guess you can fix your process by assigning your partner WSDL to a partner role.

Upvotes: 4

Related Questions