1 Reply Latest reply on Feb 21, 2007 9:48 PM by Alejandro Guizar

    Help: BPEL: Invoke external web service

    Agustín Gañan Newbie

      I'm working with jbpm.bpel-1.1-beta2 and jBoss 4.04 GA.
      I want to write a simple bpel process with a invocation to a external web service like this http://www.oorsprong.org/websamples.countryinfo/CountryInfoService.wso
      Does anyone know how?
      should I include a partner link definition in the wsdl file?
      should I remove the binding and service definitions?
      In the user guide there are examples but nothing about external web services.



        • 1. Re: Help: BPEL: Invoke external web service
          Alejandro Guizar Master

          Invoking a web service deployed in a different host is no different than invoking one deployed in the local host. It is just a matter of referencing the remote WSDL document from your service catalog instead of referencing a local document.

          That said, here is what I would do:
          Save the external WSDL document locally.
          At design time, the BPEL process is only concerned with the messages and port types of partner services. So I remove the binding and service elements from my *local* WSDL, and reference it from bpel-definition.xml
          I package the BPEL process and my local WSDL document in the jBPM process archive.
          Once I'm ready to deploy, the process will need the binding and service information to actually invoke the service. So I reference the external WSDL document from bpel-application.xml.What is the point of this two-step approach? Well, it allows for building your process by contract. You can define your process in its entirety even before the partner services are deployed. You can test your process using local versions of the partner services. Once they become available, all you need to do is update your service catalog and you are done.