You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Pablo García Sánchez <fe...@gmail.com> on 2006/11/30 14:13:31 UTC
Can't invoke an axis2 webservice from BPEL
Hi all!
I'm using NetBeans 5.5 to develope a simple bpel module. I deploy it in the
Sun Java System Application Server 9, but when I'm trying to invoke an axis2
service the proccess stop with an error.
I opened the SynchronousSample example. I copied the version.wsdl files to
the src directory and I dragged the version.wsdl files to the BPEL editor. I
created the variables, and I connected the INVOKE in the bpel module to the
operation of the partner link.
With Alfresco webservices I haven't any problem, they work fine, but with
the Axis2 services (even the version webservice, the most simple) I can't
connect.
I've uploaded the .bpel file if someone wants to have a look, but is quite
simple, I guess:
<i>
<?xml version="1.0" encoding="UTF-8"?>
<process
name="SynchronousSample"
targetNamespace="
http://enterprise.netbeans.org/bpel/SynchronousSample/SynchronousSample_1"
xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
xmlns:wsdlNS="
http://enterprise.netbeans.org/bpel/SynchronousSample/SynchronousSample_1"
xmlns:ns1="http://localhost/SynchronousSample/SynchronousSample" xmlns:ns2="
http://ws.apache.org/axis2" xmlns:ns0="
http://xml.netbeans.org/schema/SynchronousSample">
<import location="SynchronousSample.xsd" importType="
http://www.w3.org/2001/XMLSchema" namespace="
http://xml.netbeans.org/schema/SynchronousSample"/>
<import namespace="http://localhost/SynchronousSample/SynchronousSample"
location="SynchronousSample.wsdl" importType="
http://schemas.xmlsoap.org/wsdl/"/>
<import namespace="http://ws.apache.org/axis2"
location="localhost_8080/axis2/services/version.wsdl" importType="
http://schemas.xmlsoap.org/wsdl/"/>
<partnerLinks>
<partnerLink name="PartnerLink1" partnerLinkType="ns2:versionLinkType"
partnerRole="versionRole"/>
<partnerLink name="SynchronousSample"
partnerLinkType="ns1:partnerlinktype1" myRole="partnerlinktyperole1"/>
</partnerLinks>
<variables>
<variable name="GetVersionOut1" messageType="ns2:getVersionResponse"/>
<variable name="GetVersionIn1" messageType="ns2:getVersionMessage"/>
<variable name="outputVar" messageType="ns1:responseMessage"/>
<variable name="inputVar" messageType="ns1:requestMessage"/>
</variables>
<sequence>
<receive name="start" partnerLink="SynchronousSample"
operation="operation1" portType="ns1:portType1" variable="inputVar"
createInstance="yes"/>
<invoke name="Invoke1" partnerLink="PartnerLink1" operation="getVersion"
portType="ns2:versionPortType" inputVariable="GetVersionIn1"
outputVariable="GetVersionOut1"/>
<assign name="Assign1">
<copy>
<from>$GetVersionOut1.part1/return</from>
<to>$outputVar.resultType/ns0:paramA</to>
</copy>
</assign>
<reply name="end" partnerLink="SynchronousSample" operation="operation1"
portType="ns1:portType1" variable="outputVar"/>
</sequence>
</process>
</i>
The version.wsdl of axis2 has no changes.
I've tested the version webservice in XMLSpy, and it works. I've tested it
with a new NetBeans test (only to the webservice, not the bpel complete
test) and it works too.
But with the TestCase0 to the SynchronousSample I always receive:
<i>
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://schemas.xmlsoap.org/soap/envelope/
http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring/>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</i>
The debugger crash in the <invoke> statement.
What's wrong to this example? If it doesn't work in NetBeans... could it
work in ODE or in ServiceMix?
Sorry about my English, and thanks to all.
--
Pablo
Re: Can't invoke an axis2 webservice from BPEL
Posted by Alex Boisvert <bo...@intalio.com>.
I can't say why it doesn't work on Sun's app server but I'm certain you can
run your use-case on Ode. You would only need to add a deployment
descriptor (deploy.xml) to bind your partnerLinks to specific services and
send SOAP messages to the right URL (e.g. localhost:8080/ode/processes/xxx).
Try it and let us know how it goes!
alex
On 11/30/06, Pablo García Sánchez <fe...@gmail.com> wrote:
>
> Hi all!
>
> I'm using NetBeans 5.5 to develope a simple bpel module. I deploy it in
> the
> Sun Java System Application Server 9, but when I'm trying to invoke an
> axis2
> service the proccess stop with an error.
>
> I opened the SynchronousSample example. I copied the version.wsdl files to
> the src directory and I dragged the version.wsdl files to the BPEL editor.
> I
> created the variables, and I connected the INVOKE in the bpel module to
> the
> operation of the partner link.
>
> With Alfresco webservices I haven't any problem, they work fine, but with
> the Axis2 services (even the version webservice, the most simple) I can't
> connect.
>
> I've uploaded the .bpel file if someone wants to have a look, but is quite
> simple, I guess:
> <i>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <process
> name="SynchronousSample"
> targetNamespace="
> http://enterprise.netbeans.org/bpel/SynchronousSample/SynchronousSample_1"
> xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
> xmlns:wsdlNS="
> http://enterprise.netbeans.org/bpel/SynchronousSample/SynchronousSample_1"
> xmlns:ns1="http://localhost/SynchronousSample/SynchronousSample"
> xmlns:ns2="
> http://ws.apache.org/axis2" xmlns:ns0="
> http://xml.netbeans.org/schema/SynchronousSample">
> <import location="SynchronousSample.xsd" importType="
> http://www.w3.org/2001/XMLSchema" namespace="
> http://xml.netbeans.org/schema/SynchronousSample"/>
> <import namespace="http://localhost/SynchronousSample/SynchronousSample"
> location="SynchronousSample.wsdl" importType="
> http://schemas.xmlsoap.org/wsdl/"/>
> <import namespace="http://ws.apache.org/axis2"
> location="localhost_8080/axis2/services/version.wsdl" importType="
> http://schemas.xmlsoap.org/wsdl/"/>
> <partnerLinks>
> <partnerLink name="PartnerLink1" partnerLinkType="ns2:versionLinkType"
> partnerRole="versionRole"/>
> <partnerLink name="SynchronousSample"
> partnerLinkType="ns1:partnerlinktype1" myRole="partnerlinktyperole1"/>
> </partnerLinks>
>
> <variables>
> <variable name="GetVersionOut1" messageType="ns2:getVersionResponse"/>
> <variable name="GetVersionIn1" messageType="ns2:getVersionMessage"/>
> <variable name="outputVar" messageType="ns1:responseMessage"/>
> <variable name="inputVar" messageType="ns1:requestMessage"/>
> </variables>
>
> <sequence>
> <receive name="start" partnerLink="SynchronousSample"
> operation="operation1" portType="ns1:portType1" variable="inputVar"
> createInstance="yes"/>
> <invoke name="Invoke1" partnerLink="PartnerLink1" operation="getVersion"
> portType="ns2:versionPortType" inputVariable="GetVersionIn1"
> outputVariable="GetVersionOut1"/>
> <assign name="Assign1">
> <copy>
> <from>$GetVersionOut1.part1/return</from>
> <to>$outputVar.resultType/ns0:paramA</to>
> </copy>
> </assign>
> <reply name="end" partnerLink="SynchronousSample" operation="operation1"
> portType="ns1:portType1" variable="outputVar"/>
> </sequence>
> </process>
>
>
> </i>
>
> The version.wsdl of axis2 has no changes.
>
> I've tested the version webservice in XMLSpy, and it works. I've tested it
> with a new NetBeans test (only to the webservice, not the bpel complete
> test) and it works too.
>
> But with the TestCase0 to the SynchronousSample I always receive:
>
> <i>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> http://schemas.xmlsoap.org/soap/envelope/
> http://schemas.xmlsoap.org/soap/envelope/">
> <SOAP-ENV:Header/>
> <SOAP-ENV:Body>
> <SOAP-ENV:Fault>
> <faultcode>SOAP-ENV:Server</faultcode>
> <faultstring/>
> </SOAP-ENV:Fault>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> </i>
>
> The debugger crash in the <invoke> statement.
>
> What's wrong to this example? If it doesn't work in NetBeans... could it
> work in ODE or in ServiceMix?
>
> Sorry about my English, and thanks to all.
>
> --
> Pablo
>
>