You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by pchakinala <pr...@planetsoft.com> on 2011/05/06 18:22:05 UTC

org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch exchange. No matching endpoints

Hi,
 I am working with cxf bc provider and consumer to call  Third Party Web
Service and my usecase flow is like below.


Client ---> Servicemix CXFBC Consumer --->Servicemix CXFBC Provider ---->
Thid Party Service.

As per the client requirement WSDL targetnamespace should be  different for
CXF BC Consumer and CXF BC Provider.

CXF BC Consumer uses IHUBTPP.WSDL File and targetnamespace is
"http://www.planetsoft.com/tpp/"
CXF BC Provider uses TPP.WSDL File and targetnamesoace is "tpps"


To achieve this requirement i followed below steps.

1. Constructed 2 WSDL Files one for consumer and one for
provider.targetnamespace  is the only change in both of the WSDLs and
remaining  are same.

2.Created consumer Endpoint

Consumer Endpoint:
----------------
 <cxfbc:consumer wsdl="classpath:IHUBTPP.wsdl"         <!-- Its pointing to
IHUBTPP.WSDL -->
                  
locationURI="https://localhost:9001/tpp-web/services/TPPService"
                    targetService="tpp:TPPServiceService"
                      targetInterface="tpp:TPPServiceSoapBinding"
                      targetEndpoint="TPPProcessPort1"
					  delegateToJaas="false"
					  useJBIWrapper="false"
		useSOAPEnvelope="false"
					  x509="false"> 
<cxfbc:inInterceptors>

		  	<bean id="wss4jIn"
class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
			 <constructor-arg>
                  <map>
				 				 	  
	              <entry key="action" value="UsernameToken Signature"/>
				 
3.Created Provider Endpoint.
  ------------------------
   
 <cxfbc:provider
	     wsdl="classpath:TPP.wsdl"          <!-- Its pointing to TPP.WSDL -->
        locationURI="http://xyz:7001/tpp-web/services/TPPService"
		  service="tpp1:TPPServiceService"
        endpoint="TPPProcessPort1" 
		useJBIWrapper="false"
		useSOAPEnvelope="false"
		
		 > 
4. As per the requirement there is no security requirment at Thid Party
Service.Thats reason i did not configure wss4jInterceptor for BC Provider.


Please update me whether my approach is correct or not.

Observed below exception with above configuration.If my approach is correct
please update me the root cause of this error.


Exception:
interceptor
org.apache.servicemix.cxfbc.interceptors.JbiInWsdl1Interceptor@c5659c
21:28:46,359 | WARN  | vices/TPPService | NMR                              |
83 - org.apache.servicemix.nmr.core - 1.4.0 | Error processing exchange [
  id:        2a67cd4a-aa4a-42a7-b983-bbe3fb9ecad4
  mep:       InOut
  status:    Active
  role:      Consumer
  target:   
PropertyMatchingReference[{SERVICE_NAME={http://www.planetsoft.com/tpp/}TPPServiceService}]
  operation: {http://www.planetsoft.com/tpp/}process1122Response
  properties: [
      org.apache.servicemix.senderEndpoint =
{http://www.planetsoft.com/tpp/}TPPServiceService:TPPService
      javax.jbi.messaging.MessageExchange =
org.apache.servicemix.jbi.runtime.impl.InOutImpl@5c5ce3
      javax.jbi.messaging.sendSync = <null>
      javax.jbi.InterfaceName =
{http://www.planetsoft.com/tpp/}TPPServiceSoapBinding
      javax.jbi.transaction.jta = <null>
      org.apache.servicemix.correlationId =
2a67cd4a-aa4a-42a7-b983-bbe3fb9ecad4
      javax.jbi.ServiceName =
{http://www.planetsoft.com/tpp/}TPPServiceService
  ]
]

org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch
exchange. No matching endpoints.


Here attached WSDL,xbean.xml,error log Files.
Please Suggest.

Regards,
Praveen Chakinala
http://servicemix.396122.n5.nabble.com/file/n4376478/config.zip config.zip 

--
View this message in context: http://servicemix.396122.n5.nabble.com/org-apache-servicemix-nmr-api-ServiceMixException-Could-not-dispatch-exchange-No-matching-endpoints-tp4376478p4376478.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch exchange. No matching endpoints

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Your approach isn't correct.

The error
org.apache.servicemix.nmr.api.ServiceMixException: Could not  
dispatchexchange. No matching endpoints.

is caused by different namespace used by your consumer and provider,  
the dispatch target is composited by namespace and service/endpoint name

If you directly route cxf bc consumer to cxf bc provider, the logic  
part of the wsdl used by your consumer and provider endpoint must be  
same, otherwise you need use some transform endpoint between consumer  
and provider to match the namespace.

Or as Kurt pointed out,  use a cxfse proxy inside servicemix container  
to call cxf bc provider,  but you can still keep external client, the  
flow looks like

external client ====(wsdl1 with namespace 1)===> cxf bc  
consumer==(wsdl1 with namespace 1)===>cxf se====(normal java object  
invocation inside cxf se impl)===> cxf se proxy====(wsdl2 with  
namespace 2)===(wsdl2 with namespace 2)===>cxf bc provider====>  
external service

Freeman

On 2011-5-7, at 上午12:22, pchakinala wrote:

> Hi,
> I am working with cxf bc provider and consumer to call  Third Party  
> Web
> Service and my usecase flow is like below.
>
>
> Client ---> Servicemix CXFBC Consumer --->Servicemix CXFBC Provider  
> ---->
> Thid Party Service.
>
> As per the client requirement WSDL targetnamespace should be   
> different for
> CXF BC Consumer and CXF BC Provider.
>
> CXF BC Consumer uses IHUBTPP.WSDL File and targetnamespace is
> "http://www.planetsoft.com/tpp/"
> CXF BC Provider uses TPP.WSDL File and targetnamesoace is "tpps"
>
>
> To achieve this requirement i followed below steps.
>
> 1. Constructed 2 WSDL Files one for consumer and one for
> provider.targetnamespace  is the only change in both of the WSDLs and
> remaining  are same.
>
> 2.Created consumer Endpoint
>
> Consumer Endpoint:
> ----------------
> <cxfbc:consumer wsdl="classpath:IHUBTPP.wsdl"         <!-- Its  
> pointing to
> IHUBTPP.WSDL -->
>
> locationURI="https://localhost:9001/tpp-web/services/TPPService"
>                    targetService="tpp:TPPServiceService"
>                      targetInterface="tpp:TPPServiceSoapBinding"
>                      targetEndpoint="TPPProcessPort1"
> 					  delegateToJaas="false"
> 					  useJBIWrapper="false"
> 		useSOAPEnvelope="false"
> 					  x509="false">
> <cxfbc:inInterceptors>
>
> 		  	<bean id="wss4jIn"
> class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
> 			 <constructor-arg>
>                  <map>
> 				 				 	
> 	              <entry key="action" value="UsernameToken Signature"/>
> 				
> 3.Created Provider Endpoint.
>  ------------------------
>
> <cxfbc:provider
> 	     wsdl="classpath:TPP.wsdl"          <!-- Its pointing to  
> TPP.WSDL -->
>        locationURI="http://xyz:7001/tpp-web/services/TPPService"
> 		  service="tpp1:TPPServiceService"
>        endpoint="TPPProcessPort1"
> 		useJBIWrapper="false"
> 		useSOAPEnvelope="false"
> 		
> 		 >
> 4. As per the requirement there is no security requirment at Thid  
> Party
> Service.Thats reason i did not configure wss4jInterceptor for BC  
> Provider.
>
>
> Please update me whether my approach is correct or not.
>
> Observed below exception with above configuration.If my approach is  
> correct
> please update me the root cause of this error.
>
>
> Exception:
> interceptor
> org.apache.servicemix.cxfbc.interceptors.JbiInWsdl1Interceptor@c5659c
> 21:28:46,359 | WARN  | vices/TPPService |  
> NMR                              |
> 83 - org.apache.servicemix.nmr.core - 1.4.0 | Error processing  
> exchange [
>  id:        2a67cd4a-aa4a-42a7-b983-bbe3fb9ecad4
>  mep:       InOut
>  status:    Active
>  role:      Consumer
>  target:
> PropertyMatchingReference[{SERVICE_NAME={http://www.planetsoft.com/tpp/ 
> }TPPServiceService}]
>  operation: {http://www.planetsoft.com/tpp/}process1122Response
>  properties: [
>      org.apache.servicemix.senderEndpoint =
> {http://www.planetsoft.com/tpp/}TPPServiceService:TPPService
>      javax.jbi.messaging.MessageExchange =
> org.apache.servicemix.jbi.runtime.impl.InOutImpl@5c5ce3
>      javax.jbi.messaging.sendSync = <null>
>      javax.jbi.InterfaceName =
> {http://www.planetsoft.com/tpp/}TPPServiceSoapBinding
>      javax.jbi.transaction.jta = <null>
>      org.apache.servicemix.correlationId =
> 2a67cd4a-aa4a-42a7-b983-bbe3fb9ecad4
>      javax.jbi.ServiceName =
> {http://www.planetsoft.com/tpp/}TPPServiceService
>  ]
> ]
>
> org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch
> exchange. No matching endpoints.
>
>
> Here attached WSDL,xbean.xml,error log Files.
> Please Suggest.
>
> Regards,
> Praveen Chakinala
> http://servicemix.396122.n5.nabble.com/file/n4376478/config.zip  
> config.zip
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/org-apache-servicemix-nmr-api-ServiceMixException-Could-not-dispatch-exchange-No-matching-endpoints-tp4376478p4376478.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Connect at CamelOne May 24-26
The Open Source Integration Conference









Re: org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch exchange. No matching endpoints

Posted by Kurt Westerfeld <ku...@gmail.com>.
You don't need the consumer in this case.  The consumer is usually attached
to an internal NMR endpoint, such as a CXF SE or ODE BPEL endpoint.  In your
case, your client should simply call the CXF BC provider.  If your client in
this case is a java program, you simply use the cxfse proxy mechanism and
generate client-side bindings using wsdl2java.  Your BC also needs the WSDL
available to direct/marshal messages to the external service.

On Fri, May 6, 2011 at 12:22 PM, pchakinala <
praveen.chakinala@planetsoft.com> wrote:

> Hi,
>  I am working with cxf bc provider and consumer to call  Third Party Web
> Service and my usecase flow is like below.
>
>
> Client ---> Servicemix CXFBC Consumer --->Servicemix CXFBC Provider ---->
> Thid Party Service.
>
> As per the client requirement WSDL targetnamespace should be  different for
> CXF BC Consumer and CXF BC Provider.
>
> CXF BC Consumer uses IHUBTPP.WSDL File and targetnamespace is
> "http://www.planetsoft.com/tpp/"
> CXF BC Provider uses TPP.WSDL File and targetnamesoace is "tpps"
>
>
> To achieve this requirement i followed below steps.
>
> 1. Constructed 2 WSDL Files one for consumer and one for
> provider.targetnamespace  is the only change in both of the WSDLs and
> remaining  are same.
>
> 2.Created consumer Endpoint
>
> Consumer Endpoint:
> ----------------
>  <cxfbc:consumer wsdl="classpath:IHUBTPP.wsdl"         <!-- Its pointing to
> IHUBTPP.WSDL -->
>
> locationURI="https://localhost:9001/tpp-web/services/TPPService"
>                    targetService="tpp:TPPServiceService"
>                      targetInterface="tpp:TPPServiceSoapBinding"
>                      targetEndpoint="TPPProcessPort1"
>                                          delegateToJaas="false"
>                                          useJBIWrapper="false"
>                useSOAPEnvelope="false"
>                                          x509="false">
> <cxfbc:inInterceptors>
>
>                        <bean id="wss4jIn"
> class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
>                         <constructor-arg>
>                  <map>
>
>                      <entry key="action" value="UsernameToken Signature"/>
>
> 3.Created Provider Endpoint.
>  ------------------------
>
>  <cxfbc:provider
>             wsdl="classpath:TPP.wsdl"          <!-- Its pointing to
> TPP.WSDL -->
>        locationURI="http://xyz:7001/tpp-web/services/TPPService"
>                  service="tpp1:TPPServiceService"
>        endpoint="TPPProcessPort1"
>                useJBIWrapper="false"
>                useSOAPEnvelope="false"
>
>                 >
> 4. As per the requirement there is no security requirment at Thid Party
> Service.Thats reason i did not configure wss4jInterceptor for BC Provider.
>
>
> Please update me whether my approach is correct or not.
>
> Observed below exception with above configuration.If my approach is correct
> please update me the root cause of this error.
>
>
> Exception:
> interceptor
> org.apache.servicemix.cxfbc.interceptors.JbiInWsdl1Interceptor@c5659c
> 21:28:46,359 | WARN  | vices/TPPService | NMR
>  |
> 83 - org.apache.servicemix.nmr.core - 1.4.0 | Error processing exchange [
>  id:        2a67cd4a-aa4a-42a7-b983-bbe3fb9ecad4
>  mep:       InOut
>  status:    Active
>  role:      Consumer
>  target:
> PropertyMatchingReference[{SERVICE_NAME={
> http://www.planetsoft.com/tpp/}TPPServiceService}]
>  operation: {http://www.planetsoft.com/tpp/}process1122Response
>  properties: [
>      org.apache.servicemix.senderEndpoint =
> {http://www.planetsoft.com/tpp/}TPPServiceService:TPPService
>      javax.jbi.messaging.MessageExchange =
> org.apache.servicemix.jbi.runtime.impl.InOutImpl@5c5ce3
>      javax.jbi.messaging.sendSync = <null>
>      javax.jbi.InterfaceName =
> {http://www.planetsoft.com/tpp/}TPPServiceSoapBinding
>      javax.jbi.transaction.jta = <null>
>      org.apache.servicemix.correlationId =
> 2a67cd4a-aa4a-42a7-b983-bbe3fb9ecad4
>      javax.jbi.ServiceName =
> {http://www.planetsoft.com/tpp/}TPPServiceService
>  ]
> ]
>
> org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch
> exchange. No matching endpoints.
>
>
> Here attached WSDL,xbean.xml,error log Files.
> Please Suggest.
>
> Regards,
> Praveen Chakinala
> http://servicemix.396122.n5.nabble.com/file/n4376478/config.zip config.zip
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/org-apache-servicemix-nmr-api-ServiceMixException-Could-not-dispatch-exchange-No-matching-endpoints-tp4376478p4376478.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>