It appears you service+port references in deploy.xml are inconsistent with
the WSDL.
In deploy.xml you have:
<invoke partnerLink="matrixPartnerLink">
<service name="mws:HelloMatrixService" port="JpoTestHelloMatrix"/>
</invoke>
with xmlns:mws="http://client.jpo.test"
whereas in the WSDL you have
1) targetNamespace="http://client.test.jpo"
2) service name is "HelloMatrixMatrixServiceService"
3) port name is "JpoTestHelloMatrixMatrixService"
I'll improve the error reporting for this case.
alex
On 8/5/07, Anup Chandran <[EMAIL PROTECTED]> wrote:
>
>
> Hello All,
>
> I have been trying to get ODE to invoke an external webservice, however it
> throws the following error, not sure what is the issue.
>
> 21:18:28,180 DEBUG [ODEAxisDispatcher] Checking for Service using target
> endpoin
> t address : http://localhost:8080/ode/processes/helloMatrixServiceProcess
> DEBUG - GeronimoLog.debug(66) | Found service in registry from name
> helloMatrixS
> erviceProcess: [EMAIL PROTECTED]
> 21:18:28,180 DEBUG [ODEAxisDispatcher] Found service in registry from name
> hello
> MatrixServiceProcess: [EMAIL PROTECTED]
> DEBUG - GeronimoLog.debug(66) | Checking for Operation using SOAP message
> body's
> first child's local name : hello
> 21:18:28,190 DEBUG [ODEAxisDispatcher] Checking for Operation using SOAP
> message
> body's first child's local name : hello
> DEBUG - GeronimoLog.debug(66) | Found operation
> org.apache.axis2.description.InO
> [EMAIL PROTECTED]
> 21:18:28,190 DEBUG [ODEAxisDispatcher] Found operation
> org.apache.axis2.descript
> [EMAIL PROTECTED]
> DEBUG - GeronimoLog.debug(66) | Received request message for
> helloMatrixServiceP
> rocess.hello
> 21:18:28,190 DEBUG [ODEMessageReceiver] Received request message for
> helloMatrix
> ServiceProcess.hello
> DEBUG - GeronimoLog.debug(66) | Starting transaction.
> 21:18:28,190 DEBUG [ODEService] Starting transaction.
> DEBUG - GeronimoLog.debug(66) | Routed: svcQname
> {http://ode/bpel/unit-test.wsdl
> }HelloService -->
> BpelProcess[{http://ode/bpel/unit-test}HelloMatrixServiceProce
> ss-40]
> 21:18:28,200 DEBUG [BpelEngineImpl] Routed: svcQname
> {http://ode/bpel/unit-test.
> wsdl}HelloService -->
> BpelProcess[{http://ode/bpel/unit-test}HelloMatrixServiceP
> rocess-40]
> DEBUG - GeronimoLog.debug(66) | Rehydrating process
> {http://ode/bpel/unit-test}H
> elloMatrixServiceProcess-40
> 21:18:28,200 DEBUG [BpelProcess] Rehydrating process
> {http://ode/bpel/unit-test}
> HelloMatrixServiceProcess-40
> DEBUG - GeronimoLog.debug(66) | Processing <invoke> element for process
> {http://
> ode/bpel/unit-test}HelloMatrixServiceProcess-40: partnerlink
> matrixPartnerLink -
> -> {http://client.jpo.test}HelloMatrixService:JpoTestHelloMatrix
> 21:18:28,410 DEBUG [BpelProcess] Processing <invoke> element for process
> {http:/
> /ode/bpel/unit-test}HelloMatrixServiceProcess-40: partnerlink
> matrixPartnerLink
> --> {http://client.jpo.test}HelloMatrixService:JpoTestHelloMatrix
> ERROR - GeronimoLog.error(108) | Could not create external service.
> java.lang.NullPointerException: Null wsdl def.
> at
> org.apache.ode.axis2.util.SoapMessageConverter.<init>(SoapMessageConv
> erter.java:102)
> at
> org.apache.ode.axis2.ExternalService.<init>(ExternalService.java:83)
> at
> org.apache.ode.axis2.ODEServer.createExternalService(ODEServer.java:3
> 26)
> at
> org.apache.ode.axis2.BindingContextImpl.createPartnerRoleChannel(Bind
> ingContextImpl.java:73)
> at
> org.apache.ode.bpel.engine.BpelProcess.hydrate(BpelProcess.java:520)
> at
> org.apache.ode.bpel.engine.BpelProcess.getEndpointToMyRoleMap(BpelPro
> cess.java:565)
> at
> org.apache.ode.bpel.engine.BpelProcess.initMyRoleMex(BpelProcess.java
> :168)
> at
> org.apache.ode.bpel.engine.BpelEngineImpl.createMessageExchange(BpelE
> ngineImpl.java:131)
> at
> org.apache.ode.bpel.engine.BpelEngineImpl.createMessageExchange(BpelE
> ngineImpl.java:138)
> at
> org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java
> :110)
>
>
> The BPEL definition :
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <bpws:process
> xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
> xmlns:ns="http://client.test.jpo"
> xmlns:test="http://ode/bpel/unit-test.wsdl"
> xmlns:tns="http://ode/bpel/unit-test"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" exitOnStandardFault="yes"
> name="HelloMatrixServiceProcess"
> targetNamespace="http://ode/bpel/unit-test">
> <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
> location="HelloMatrix.wsdl" namespace="http://ode/bpel/unit-test.wsdl"/>
> <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
> location="JpoTestHelloMatrixMatrixService.wsdl"
> namespace="http://client.test.jpo"/>
> <bpws:partnerLinks>
> <bpws:partnerLink myRole="me" name="helloPartnerLink"
> partnerLinkType="test:HelloPartnerLinkType"/>
> <bpws:partnerLink name="matrixPartnerLink"
> partnerLinkType="ns:HelloMatrixPartnerLinkType" partnerRole="you"/>
> </bpws:partnerLinks>
> <bpws:variables>
> <bpws:variable messageType="test:HelloMessage" name="myVar"/>
> <bpws:variable name="tmpVar" type="xsd:string"/>
> <bpws:variable messageType="ns:connectResponse"
> name="matrixPartnerLinkResponse"/>
> <bpws:variable messageType="ns:connectRequest"
> name="matrixPartnerLinkRequest"/>
> </bpws:variables>
> <bpws:sequence>
> <bpws:receive createInstance="yes" name="start" operation="hello"
> partnerLink="helloPartnerLink" portType="test:HelloPortType"
> variable="myVar"/>
> <bpws:assign name="AssignUsername" validate="no">
> <bpws:copy>
> <bpws:from>
> <bpws:literal>
> <bpws:literal>
> <bpws:literal>Test Everything</bpws:literal>
> </bpws:literal>
> </bpws:literal>
> </bpws:from>
> <bpws:to part="username" variable="matrixPartnerLinkRequest"/>
> </bpws:copy>
> </bpws:assign>
> <bpws:assign name="AssignPassword" validate="no">
> <bpws:copy>
> <bpws:from>
> <bpws:literal>
> <bpws:literal>
> <bpws:literal>1234</bpws:literal>
> </bpws:literal>
> </bpws:literal>
> </bpws:from>
> <bpws:to part="password" variable="matrixPartnerLinkRequest"/>
> </bpws:copy>
> </bpws:assign>
> <bpws:invoke inputVariable="matrixPartnerLinkRequest"
> name="InvokeMatrixWebService" operation="connect"
> outputVariable="matrixPartnerLinkResponse" partnerLink="matrixPartnerLink"
> portType="ns:HelloMatrix"/>
> <bpws:assign name="AssignResults" validate="no">
> <bpws:copy>
> <bpws:from part="connectReturn"
> variable="matrixPartnerLinkResponse"/>
> <bpws:to part="TestPart" variable="myVar"/>
> </bpws:copy>
> </bpws:assign>
> <bpws:reply name="end" operation="hello"
> partnerLink="helloPartnerLink"
> portType="test:HelloPortType" variable="myVar"/>
> </bpws:sequence>
> </bpws:process>
>
>
> The WSDL file for the Process :
>
> <?xml version="1.0" encoding="utf-8" ?>
> <!--
> ~ Licensed to the Apache Software Foundation (ASF) under one
> ~ or more contributor license agreements. See the NOTICE file
> ~ distributed with this work for additional information
> ~ regarding copyright ownership. The ASF licenses this file
> ~ to you under the Apache License, Version 2.0 (the
> ~ "License"); you may not use this file except in compliance
> ~ with the License. You may obtain a copy of the License at
> ~
> ~ http://www.apache.org/licenses/LICENSE-2.0
> ~
> ~ Unless required by applicable law or agreed to in writing,
> ~ software distributed under the License is distributed on an
> ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> ~ KIND, either express or implied. See the License for the
> ~ specific language governing permissions and limitations
> ~ under the License.
> -->
>
> <wsdl:definitions
> targetNamespace="http://ode/bpel/unit-test.wsdl"
> xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:tns="http://ode/bpel/unit-test.wsdl"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
> xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
>
> <wsdl:message name="HelloMessage">
> <wsdl:part name="TestPart" type="xsd:string"/>
> </wsdl:message>
>
> <wsdl:portType name="HelloPortType">
> <wsdl:operation name="hello">
> <wsdl:input message="tns:HelloMessage" name="TestIn"/>
> <wsdl:output message="tns:HelloMessage" name="TestOut"/>
> </wsdl:operation>
> </wsdl:portType>
>
> <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
> <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="hello">
> <soap:operation soapAction="" style="rpc"/>
> <wsdl:input>
> <soap:body
> namespace="http://ode/bpel/unit-test.wsdl"
> use="literal"/>
> </wsdl:input>
> <wsdl:output>
> <soap:body
> namespace="http://ode/bpel/unit-test.wsdl"
> use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="HelloService">
> <wsdl:port name="HelloPort"
> binding="tns:HelloSoapBinding">
> <soap:address
> location="http://localhost:8080/ode/processes/helloMatrixServiceProcess"/>
> </wsdl:port>
> </wsdl:service>
>
> <plnk:partnerLinkType name="HelloPartnerLinkType">
> <plnk:role name="me" portType="tns:HelloPortType"/>
> <plnk:role name="you" portType="tns:HelloPortType"/>
> </plnk:partnerLinkType>
> </wsdl:definitions>
>
>
> The WSDL that defines the external service :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="http://client.test.jpo"
> xmlns:apachesoap="http://xml.apache.org/xml-soap"
> xmlns:impl="http://client.test.jpo" xmlns:intf="http://client.test.jpo"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
> <wsdl:types/>
> <wsdl:message name="connectRequest">
> <wsdl:part name="username" type="xsd:string"/>
> <wsdl:part name="password" type="xsd:string"/>
> </wsdl:message>
> <wsdl:message name="connectResponse">
> <wsdl:part name="connectReturn" type="xsd:string"/>
> </wsdl:message>
> <wsdl:portType name="HelloMatrixMatrixService">
> <wsdl:operation name="connect" parameterOrder="username password">
> <wsdl:input message="impl:connectRequest" name="connectRequest"/>
> <wsdl:output message="impl:connectResponse" name="connectResponse"/>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="JpoTestHelloMatrixMatrixServiceSoapBinding"
> type="impl:HelloMatrixMatrixService">
> <wsdlsoap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="connect">
> <wsdlsoap:operation soapAction=""/>
> <wsdl:input name="connectRequest">
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://client.test.jpo" use="encoded"/>
> </wsdl:input>
> <wsdl:output name="connectResponse">
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://client.test.jpo" use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="HelloMatrixMatrixServiceService">
> <wsdl:port binding="impl:JpoTestHelloMatrixMatrixServiceSoapBinding"
> name="JpoTestHelloMatrixMatrixService">
> <wsdlsoap:address
> location="
> http://localhost:8080/ematrix/services/JpoTestHelloMatrixMatrixService"/>
> </wsdl:port>
> </wsdl:service>
>
> <plnk:partnerLinkType name="HelloMatrixPartnerLinkType">
> <plnk:role name="me" portType="impl:HelloMatrixMatrixService"/>
> <plnk:role name="you" portType="impl:HelloMatrixMatrixService"/>
> </plnk:partnerLinkType>
>
> </wsdl:definitions>
>
>
> The deploy file :
>
> <deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
> xmlns:pns="http://ode/bpel/unit-test"
> xmlns:wns="http://ode/bpel/unit-test.wsdl"
>
> xmlns:mws="http://client.jpo.test">
>
>
> <process name="pns:HelloMatrixServiceProcess">
> <active>true</active>
> <provide partnerLink="helloPartnerLink">
> <service name="wns:HelloService"
> port="HelloPort"/>
> </provide>
> <invoke partnerLink="matrixPartnerLink">
>
> <service name="mws:HelloMatrixService"
> port="JpoTestHelloMatrix"/>
>
> </invoke>
>
> </process>
> </deploy>
>
>
> Please let me know if something is amiss in my definitions.. Thanks.
> --
> View this message in context:
> http://www.nabble.com/Invoking-Web-Service-tf4221853.html#a12010024
> Sent from the Apache Ode User mailing list archive at Nabble.com.
>
>