[jboss-user] [JBoss jBPM] - bpel execution failed :no port implements the required port

LakshmiPrasad do-not-reply at jboss.com
Tue Dec 9 06:04:42 EST 2008


Hi,
  we are using, jboss4.2.3GA as app server and jbpm-bpel-1.1.1 for JBPM'S BPEL  for orchestration of webservices. we have one webservice running on another machine in tomcat. when we tried to access that webservice, it is giving the below exception stack..

16:20:17,734 ERROR [GraphElement] action threw exception: no port implements the required port type: portType={http://jbpm.org/examples/converter}CurrencyConverter
org.jbpm.bpel.BpelException: no port implements the required port type: portType={http://jbpm.org/examples/converter}CurrencyConverter

my hello.bpel file is 
<?xml version="1.0" encoding="UTF-8"?>
  | <bpws:process exitOnStandardFault="yes" name="HelloWorld"
  |     xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
  |     xmlns:ns="http://jbpm.org/examples/helloArtifacts"
  |     xmlns:ns0="http://jbpm.org/examples/converter" 
  |     xmlns:tns="http://jbpm.org/examples/hello"
  |     targetNamespace="http://jbpm.org/examples/hello">
  |    
  |     <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
  |         location="hello.wsdl" namespace="http://jbpm.org/examples/hello"/>
  |     <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
  |         location="ravi.wsdl" namespace="http://jbpm.org/examples/converter"/>	
  |     <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
  |         location="helloArtifacts.wsdl" namespace="http://jbpm.org/examples/helloArtifacts"/>
  |      
  |      <bpws:partnerLinks>
  |         <bpws:partnerLink myRole="Greeter" name="caller" partnerLinkType="tns:Greeter-Caller">            
  |         </bpws:partnerLink>
  |         <bpws:partnerLink name="ConverterPLink"
  |             partnerLinkType="ns:ConverterPLTName" partnerRole="converterRole"/>
  |     </bpws:partnerLinks>
  |   
  |     
  |     <bpws:variables>
  |         <bpws:variable messageType="tns:nameMessage" name="request" />
  |         <bpws:variable messageType="tns:greetingMessage" name="response" />
  |         <bpws:variable messageType="ns0:convertAmountRequest" name="Request">10.0</bpws:variable>
  |         <bpws:variable messageType="ns0:convertAmountResponse" name="convertResponse"/>
  |     </bpws:variables>
  |     <bpws:sequence name="MainSeq">
  |         <bpws:receive createInstance="yes" name="ReceiveName"
  |             operation="sayHello" partnerLink="caller"
  |             portType="tns:Greeter" variable="request">
  |             <bpws:documentation>receive the name of a person</bpws:documentation>
  |         </bpws:receive>
  |         <bpws:assign name="ComposeGreeting" validate="no">
  |             <bpws:documentation>compose a greeting phrase</bpws:documentation>
  |             <bpws:copy>
  |                 <bpws:from><![CDATA[concat('Hello, ', $request.name, '!')]]></bpws:from>
  |                 <bpws:to part="greeting" variable="response"/>		
  |             </bpws:copy>
  |         </bpws:assign>
  |         <bpws:invoke inputVariable="Request" name="Invoke"
  |             operation="convertAmount" outputVariable="convertResponse"
  |             partnerLink="ConverterPLink" portType="ns0:CurrencyConverter"/>
  |         <bpws:reply name="SendGreeting" operation="sayHello"
  |             partnerLink="caller" portType="tns:Greeter" variable="response">
  |             <bpws:documentation>send greeting back to caller</bpws:documentation>
  |         </bpws:reply>
  |     </bpws:sequence>
  | </bpws:process>
  | 

my hello.wsdl is 
<?xml version="1.0" encoding="UTF-8"?>
  | <definitions 
  |  targetNamespace="http://jbpm.org/examples/hello"
  |   xmlns:tns="http://jbpm.org/examples/hello" 
  |   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  |   xmlns:plt="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
  |   xmlns="http://schemas.xmlsoap.org/wsdl/">
  | 
  | <import location="ravi.wsdl" namespace="http://jbpm.org/examples/converter" />
  | 
  | 
  | 	<types>  
  | 		<schema attributeFormDefault="unqualified" 
  | 			elementFormDefault="qualified" 
  | 			targetNamespace="http://jbpm.org/examples/hello" 
  | 			xmlns="http://www.w3.org/2001/XMLSchema"
  | 			>
  | 			
  | 		    <element name="GreetingMessageRequest">
  | 			<complexType>
  | 			    <sequence>
  | 				<element name="input" type="string" />
  | 			    </sequence>
  | 			</complexType>
  | 		    </element>
  | 			  
  | 		    <element name="NameMessageRequest">
  | 			<complexType>
  | 			    <sequence>
  | 				<element name="result" type="string"/>
  | 			    </sequence>
  | 			</complexType>
  | 		    </element>
  | 		    
  | 		</schema>
  | 	    </types>
  | 
  | 
  |   <message name="greetingMessage">
  |     <documentation>carries the greeting</documentation>
  |     <part name="greeting" type="xsd:string" />
  |   </message>
  | 
  |   <message name="nameMessage">
  |     <documentation>carries the name of a person</documentation>
  |     <part name="name" type="xsd:string" />
  |   </message>
  | 
  |   <portType name="Greeter">
  |     <documentation>describes the interface presented to callers</documentation>
  |     <operation name="sayHello">
  |       <input message="tns:nameMessage" />
  | 
  |       <output message="tns:greetingMessage" />
  |     </operation>
  |   </portType>
  | 
  |   <plt:partnerLinkType name="Greeter-Caller">
  |     <plt:documentation>
  |       characterizes the relationship between the greeter and its caller
  |     </plt:documentation>
  |     <plt:role name="Greeter" portType="tns:Greeter">
  |       <plt:documentation>
  |         Caller does not provide services to Greeter, hence the "Caller" role is omitted
  |       </plt:documentation>
  |     </plt:role>
  |   </plt:partnerLinkType>
  | 
  | </definitions>
  | 


my helloArtifacts.wsdl is 
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  | 
  | <definitions name="helloArtifacts" 
  | xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" 
  | xmlns:tns="http://jbpm.org/examples/helloArtifacts" 
  | xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" 
  | xmlns:wsdl="http://jbpm.org/examples/converter" 
  | targetNamespace="http://jbpm.org/examples/helloArtifacts"
  | xmlns="http://schemas.xmlsoap.org/wsdl/">
  | 
  | <import location="ravi.wsdl" namespace="http://jbpm.org/examples/converter"/>
  |   <plnk:partnerLinkType name="ConverterPLTName">
  |     <plnk:role name="converterRole" portType="wsdl:CurrencyConverter"/>
  |   </plnk:partnerLinkType>
  |  
  | </definitions>

my external wsdl file ravi.wsdl is 
<?xml version="1.0" encoding="UTF-8" ?> 
  |  <definitions name ="converter" 
  |  targetNamespace="http://jbpm.org/examples/converter" 
  |  xmlns:apachesoap="http://xml.apache.org/xml-soap" 
  |  xmlns:impl="http://jbpm.org/examples/converter" 
  |  xmlns:intf="http://jbpm.org/examples/converter" 
  |  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:tns="http://jbpm.org/examples/converter"
  |         xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
  |         xmlns="http://schemas.xmlsoap.org/wsdl/">
  | 
  |  <message name="convertAmountResponse">
  |   <part name="convertAmountReturn" type="xsd:double" /> 
  |   </message>
  | 
  |  <message name="convertAmountRequest">
  |   <part name="in0" type="xsd:double" /> 
  |   </message>
  | 
  |  <portType name="CurrencyConverter">
  | 	<operation name="convertAmount" parameterOrder="in0">
  | 	  <input message="impl:convertAmountRequest" name="convertAmountRequest" /> 
  | 	  <output message="impl:convertAmountResponse" name="convertAmountResponse" /> 
  | 	</operation>
  |   </portType>
  | 
  |  <binding name="converterSoapBinding" type="impl:CurrencyConverter">
  | 	<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> 
  | 	<operation name="convertAmount">
  | 		<wsdlsoap:operation soapAction="" /> 
  | 		<input name="convertAmountRequest">
  | 			  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://jbpm.org/example/converter" use="encoded" /> 
  | 		</input>
  | 		<output name="convertAmountResponse">
  | 		  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://jbpm.org/example/converter" use="encoded" /> 
  | 		</output>
  | 	</operation>
  |   </binding>
  | 
  |  <service name="CurrencyConverterService">
  | 	 <port binding="impl:converterSoapBinding" name="converter">
  | 		 <wsdlsoap:address location="http://10.116.11.32:8080/axis/services/converter" /> 
  | 	</port>
  |   </service>
  |   </definitions>
my client program is 

/*
  |  * JBoss, Home of Professional Open Source
  |  * Copyright 2005, JBoss Inc., and individual contributors as indicated
  |  * by the @authors tag.
  |  *
  |  * This is free software; you can redistribute it and/or modify it
  |  * under the terms of the JBPM BPEL PUBLIC LICENSE AGREEMENT as
  |  * published by JBoss Inc.; either version 1.0 of the License, or
  |  * (at your option) any later version.
  |  *
  |  * This software is distributed in the hope that it will be useful,
  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  |  */
  | package org.jbpm.bpel.tutorial.hello;
  | 
  | import javax.naming.InitialContext;
  | import javax.xml.namespace.QName;
  | import javax.xml.rpc.Call;
  | 
  | import junit.framework.Test;
  | import junit.framework.TestCase;
  | 
  | import org.jbpm.bpel.tools.ModuleDeployTestSetup;
  | 
  | /**
  |  * @author Alejandro Guizar
  |  * @version $Revision: 1.4 $ $Date: 2007/11/06 22:06:25 $
  |  */
  | public class HelloTest extends TestCase {
  | 
  |   private HelloWorldService helloService;
  | 
  |   protected void setUp() throws Exception {
  |     InitialContext iniCtx = new InitialContext();
  |     /*
  |      * "service/Hello" is the JNDI name of the service interface instance relative to the client
  |      * environment context. This name matches the <service-ref-name> in application-client.xml
  |      */
  |     helloService = (HelloWorldService) iniCtx.lookup("java:comp/env/service/Hello");
  |   }
  | 
  |   public void testSayHello_proxy() throws Exception {
  |     // obtain dynamic proxy for web service port
  |     Greeter proxy = helloService.getGreeterPort();
  |     // use proxy as local java object
  |     String greeting = proxy.sayHello("Popeye");
  | 	System.out.println("I Came Here...........   ");
  |     // check proper greeting
  |     assertEquals("Hello, Popeye!", greeting);
  |   }
  | 
  |   public void testSayHello_dii() throws Exception {
  |     String portTypeNS = "http://jbpm.org/examples/hello";
  |     // obtain dynamic invocation instance
  |     Call call = helloService.createCall(new QName(portTypeNS, "GreeterPort"), "sayHello");
  |     // invoke operation using request/response interaction mode
  |     String greeting = (String) call.invoke(new Object[] { "Olive" });
  |     // check proper greeting
  |     assertEquals("Hello, Olive!", greeting);
  |   }
  | 
  |   public static Test suite() {
  |     return new ModuleDeployTestSetup(HelloTest.class, "hello-client.jar");
  |   }
  | }

the deployment is done without any issues. when i am really accessing from the client i am having these issues.. please help to resolve this.. Thanx in advance.

Regards,
Lakshmi Prasad.K


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4195290#4195290

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4195290



More information about the jboss-user mailing list