You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by tomalley <to...@mail.com> on 2010/10/27 23:29:53 UTC

ContextException: Unknown endpoint

I installed the example "cxf-wsdl-first-osgi-package" I was able to invoke
the service with the provided client and soapUI. I then created a BPEL
process to invoke the service. I have the BPEL process service unit an a
http service unit in a service assembly. I'm able to access the wsdl:
http://localhost:8192/PersonInvokeService/main.wsdl, but when I use soapUI
to send a message to PersonInvokeMessage ServiceMix throws the following
exception:
org.apache.ode.bpel.iapi.ContextException: Unknown endpoint:
{http://servicemix.apache.org/samples/wsdl-first}PersonService:soap
	at
org.apache.ode.jbi.JbiEndpointReference.getServiceEndpoint(JbiEndpointReference.java:102)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.jbi.EndpointReferenceContextImpl.getConfigLookup(EndpointReferenceContextImpl.java:119)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.store.ProcessConfImpl.getEndpointProperties(ProcessConfImpl.java:461)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.bpel.engine.BpelProcess.getTimeout(BpelProcess.java:1115)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.bpel.engine.BpelRuntimeContextImpl.scheduleInvokeCheck(BpelRuntimeContextImpl.java:926)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.bpel.engine.BpelRuntimeContextImpl.invoke(BpelRuntimeContextImpl.java:864)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.bpel.runtime.INVOKE.run(INVOKE.java:100)[186:ode-jbi-bundle:1.3.4]
	at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_17]
	at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_17]
	at
org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:451)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:960)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeNewInstance(PartnerLinkMyRoleImpl.java:208)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.bpel.engine.BpelProcess$1.invoke(BpelProcess.java:283)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:238)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:279)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.bpel.engine.BpelProcess.handleJobDetails(BpelProcess.java:426)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:460)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:450)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:518)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:513)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:284)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:239)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:512)[186:ode-jbi-bundle:1.3.4]
	at
org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:496)[186:ode-jbi-bundle:1.3.4]
	at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_17]
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_17]
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_17]
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_17]
	at java.lang.Thread.run(Thread.java:619)[:1.6.0_17]

Should I be able to invoke a web service thru the binding component in my
BPEL process?

Thanks,

~Tim O

Here is my deploy.xml:
<?xml version="1.0" encoding="UTF-8"?>
<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
xmlns:personInvokeService="urn:personInvokeService"
xmlns:wsdl-first="http://servicemix.apache.org/samples/wsdl-first">
  <process name="personInvokeService:PersonInvokeService">
    <active>true</active>
    <retired>false</retired>
    <process-events generate="all"/>
    <provide partnerLink="client">
      <service name="personInvokeService:PersonInvokeService"
port="PersonInvokeServicePort"/>
    </provide>
    <invoke partnerLink="PersonPL">
      <service name="wsdl-first:PersonService" port="soap"/>
    </invoke>
  </process>
</deploy>

My PersonInvokeService.bpel:
<!-- PersonInvokeService BPEL Process [Generated by the Eclipse BPEL
Designer] -->
<bpel:process name="PersonInvokeService"
         targetNamespace="urn:personInvokeService"
         suppressJoinFailure="yes"
         xmlns:tns="urn:personInvokeService"
        
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
         xmlns:ns1="http://servicemix.apache.org/samples/wsdl-first"
xmlns:xsd="http://servicemix.apache.org/samples/wsdl-first/types">

    <!-- Import the client WSDL -->
    <bpel:import namespace="http://servicemix.apache.org/samples/wsdl-first"
location="person.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
    <bpel:import location="PersonInvokeServiceArtifacts.wsdl"
namespace="urn:personInvokeService" 
	        importType="http://schemas.xmlsoap.org/wsdl/" />
         
    <!-- =================================================================
-->         
    <!-- PARTNERLINKS                                                     
-->
    <!-- List of services participating in this BPEL process              
-->
    <!-- =================================================================
-->         
    <bpel:partnerLinks>
        <!-- The 'client' role represents the requester of this service. -->
        <bpel:partnerLink name="client"
                     partnerLinkType="tns:PersonInvokeService"
                     myRole="PersonInvokeServiceProvider"
                     />
        <bpel:partnerLink name="PersonPL" partnerLinkType="tns:PersonPLT"
partnerRole="PersonProvider"></bpel:partnerLink>
    </bpel:partnerLinks>
  
    <!-- =================================================================
-->         
    <!-- VARIABLES                                                        
-->
    <!-- List of messages and XML documents used within this BPEL process 
-->
    <!-- =================================================================
-->         
    <bpel:variables>
        <!-- Reference to the message passed as input during initiation -->
        <bpel:variable name="input"
                  messageType="tns:PersonInvokeServiceRequestMessage"/>
                  
        <!-- 
          Reference to the message that will be returned to the requester
          -->
        <bpel:variable name="output"
                  messageType="tns:PersonInvokeServiceResponseMessage"/>
        <bpel:variable name="PersonRequest"
messageType="ns1:GetPersonRequest"></bpel:variable>
        <bpel:variable name="PersonResponse"
messageType="ns1:GetPersonResponse"></bpel:variable>
    </bpel:variables>

    <!-- =================================================================
-->         
    <!-- ORCHESTRATION LOGIC                                              
-->
    <!-- Set of activities coordinating the flow of messages across the   
-->
    <!-- services integrated within this business process                 
-->
    <!-- =================================================================
-->         
    <bpel:sequence name="main">
        
        <!-- Receive input from requester. 
             Note: This maps to operation defined in
PersonInvokeService.wsdl 
             -->
        <bpel:receive name="receiveInput" partnerLink="client"
                 portType="tns:PersonInvokeService"
                 operation="process" variable="input"
                 createInstance="yes"/>
        
        <!-- Generate reply to synchronous request -->
        <bpel:assign validate="no" name="PreparePersonRequest">
            <bpel:copy>
                <bpel:from><bpel:literal><typens:GetPerson
xmlns:typens="http://servicemix.apache.org/samples/wsdl-first/types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <typens:personId></typens:personId>
</typens:GetPerson>
</bpel:literal></bpel:from>
                <bpel:to variable="PersonRequest" part="payload"></bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="payload" variable="input">
                    <bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:input]]></bpel:query>
                </bpel:from>
                <bpel:to part="payload" variable="PersonRequest">
                    <bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[xsd:personId]]></bpel:query>
                </bpel:to>
            </bpel:copy>
        </bpel:assign>
        <bpel:invoke name="InvokeGetPerson" partnerLink="PersonPL"
operation="GetPerson" portType="ns1:Person" inputVariable="PersonRequest"
outputVariable="PersonResponse"></bpel:invoke>
        <bpel:assign validate="no" name="PrepareOutput">
            <bpel:copy>
                <bpel:from><bpel:literal><tns:PersonInvokeServiceResponse
xmlns:tns="urn:personInvokeService"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <tns:result></tns:result>
</tns:PersonInvokeServiceResponse>
</bpel:literal></bpel:from>
                <bpel:to variable="output" part="payload"></bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="payload" variable="PersonResponse">
                    <bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[xsd:name]]></bpel:query>
                </bpel:from>
                <bpel:to part="payload" variable="output">
                    <bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
                </bpel:to>
            </bpel:copy>
        </bpel:assign>
        <bpel:reply name="replyOutput" 
               partnerLink="client"
               portType="tns:PersonInvokeService"
               operation="process" 
               variable="output"
               />
    </bpel:sequence>
</bpel:process>

My PersonInvokeServiceArtifacts.wsdl:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="urn:personInvokeService"
xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
xmlns:wsdl="http://servicemix.apache.org/samples/wsdl-first"
name="PersonInvokeService" targetNamespace="urn:personInvokeService">

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     TYPE DEFINITION - List of types participating in this BPEL process 
     The BPEL Designer will generate default request and response types
     but you can define or import any XML Schema type and use them as part 
     of the message types.
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->    
    <plnk:partnerLinkType name="PersonPLT">
    <plnk:role name="PersonProvider" portType="wsdl:Person"/>
  </plnk:partnerLinkType>
    <import location="person.wsdl"
namespace="http://servicemix.apache.org/samples/wsdl-first"/>
    <types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="urn:personInvokeService">

            <element name="PersonInvokeServiceRequest">
                <complexType>
                    <sequence>
                        <element name="input" type="string"/>
                    </sequence>
                </complexType>
            </element>

            <element name="PersonInvokeServiceResponse">
                <complexType>
                    <sequence>
                        <element name="result" type="string"/>
                    </sequence>
                </complexType>
            </element>
        </schema>
    </types>


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     MESSAGE TYPE DEFINITION - Definition of the message types used as 
     part of the port type defintions
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->    
    <message name="PersonInvokeServiceRequestMessage">
        <part element="tns:PersonInvokeServiceRequest" name="payload"/>
    </message>
    <message name="PersonInvokeServiceResponseMessage">
        <part element="tns:PersonInvokeServiceResponse" name="payload"/>
    </message>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     PORT TYPE DEFINITION - A port type groups a set of operations into
     a logical service unit.
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->    

    <!-- portType implemented by the PersonInvokeService BPEL process -->
    <portType name="PersonInvokeService">
        <operation name="process">
            <input message="tns:PersonInvokeServiceRequestMessage"/>
            <output message="tns:PersonInvokeServiceResponseMessage"/>
        </operation>
    </portType>   
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     PARTNER LINK TYPE DEFINITION
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->    
    <plnk:partnerLinkType name="PersonInvokeService">
        <plnk:role name="PersonInvokeServiceProvider"
portType="tns:PersonInvokeService"/>
    </plnk:partnerLinkType>
    

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     BINDING DEFINITION - Defines the message format and protocol details
     for a web service.
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
    <binding name="PersonInvokeServiceBinding"
type="tns:PersonInvokeService">
    	<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
    	<operation name="process">
    		<soap:operation soapAction="urn:personInvokeService/process"/>
    		<input>
    			<soap:body use="literal"/>
    		</input>
    		<output>
    			<soap:body use="literal"/>
    		</output>
    	</operation>
    </binding>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     SERVICE DEFINITION - A service groups a set of port into
     a service unit.
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
    <service name="PersonInvokeService">
    	<port binding="tns:PersonInvokeServiceBinding"
name="PersonInvokeServicePort">
    		<soap:address location="http://localhost:8192/PersonInvokeService"/>
    	</port>
    </service>
</definitions>

The wsdl-first-cxfbc-bundle example beans.xml:
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
       xmlns:person="http://servicemix.apache.org/samples/wsdl-first"
        xsi:schemaLocation="
                http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
                http://servicemix.apache.org/cxfbc/1.0
http://servicemix.apache.org/cxfbc/1.0/servicemix-cxf-bc.xsd">

  <cxfbc:consumer wsdl="classpath:person.wsdl"
                      targetService="person:PersonService"
                      targetInterface="person:Person"
                      targetEndpoint="soap"/>
  <bean class="org.apache.servicemix.common.osgi.EndpointExporter" />

</beans>

The example person.wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="wsdl-first"
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:tns="http://servicemix.apache.org/samples/wsdl-first"
	xmlns:typens="http://servicemix.apache.org/samples/wsdl-first/types"
	targetNamespace="http://servicemix.apache.org/samples/wsdl-first">

	<wsdl:types>
		<xsd:schema
targetNamespace="http://servicemix.apache.org/samples/wsdl-first/types"
		            elementFormDefault="qualified">
			<xsd:element name="GetPerson">
			  <xsd:complexType>
					<xsd:sequence>
						<xsd:element name="personId" type="xsd:string"/>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="GetPersonResponse">
			  <xsd:complexType>
					<xsd:sequence>
					    <xsd:element name="personId" type="xsd:string"/>
						<xsd:element name="ssn" type="xsd:string"/>
						<xsd:element name="name" type="xsd:string"/>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="UnknownPersonFault">
			  <xsd:complexType>
					<xsd:sequence>
					    <xsd:element name="personId" type="xsd:string"/>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:schema>
  </wsdl:types>
	
	<wsdl:message name="GetPersonRequest">
		<wsdl:part name="payload" element="typens:GetPerson"/>
	</wsdl:message>
	<wsdl:message name="GetPersonResponse">
		<wsdl:part name="payload" element="typens:GetPersonResponse"/>
	</wsdl:message>
	<wsdl:message name="UnknownPersonFault">
		<wsdl:part name="payload" element="typens:UnknownPersonFault"/>
	</wsdl:message>

    <wsdl:portType name="Person">
		<wsdl:operation name="GetPerson">
			<wsdl:input message="tns:GetPersonRequest"/>
			<wsdl:output message="tns:GetPersonResponse"/>
			<wsdl:fault name="UnknownPerson" message="tns:UnknownPersonFault"/>
		</wsdl:operation>
	</wsdl:portType>
	
    <wsdl:binding name="PersonSOAPBinding" type="tns:Person">
    	<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
		<wsdl:operation name="GetPerson">
			<wsdl:input>
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal" />
			</wsdl:output>
			<wsdl:fault name="UnknownPerson">
				<soap:fault use="literal" name="UnknownPerson" />
			</wsdl:fault>
       </wsdl:operation>
   </wsdl:binding>

	<wsdl:service name="PersonService">
    	<wsdl:port binding="tns:PersonSOAPBinding" name="soap">
           <soap:address location="http://localhost:8092/PersonService/" />
       </wsdl:port>
   </wsdl:service>

</wsdl:definitions>

-- 
View this message in context: http://servicemix.396122.n5.nabble.com/ContextException-Unknown-endpoint-tp3239556p3239556.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.