You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by YEMITOMI <og...@aciworldwide.com> on 2007/07/05 18:40:58 UTC

Failed to route message from local webservice to the external remote webservice

 I deployed the  webservices succefully on servicemix 3.1.1, but  when I
tried to use client to send a soap message, I got this error. The code used
was included in this message. Any help will be appreciated

ERROR MESSAGE:
org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested
exception is org.codehaus.xfire.fault.XFireFault: Error sending jbi exchange
org.codehaus.xfire.fault.XFireFault: Error sending jbi exchange
	at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
	at
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:30)
	at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
	at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
	at org.codehaus.xfire.client.Client.invoke(Client.java:335)
	at
org.apache.servicemix.jsr181.xfire.JbiProxy$JAXWSJBIClient.invoke(JbiProxy.java:228)
	at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
	at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
	at
org.apache.servicemix.jsr181.xfire.JbiProxyFactoryBean$1.invoke(JbiProxyFactoryBean.java:76)
	at $Proxy0.execute(Unknown Source)
	at
com.aciworldwide.scm.test.token.CTWebServiceServiceImpl.execute(CTWebServiceServiceImpl.java:15)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:54)
	at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(ServiceInvocationHandler.java:322)
	at
org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceInvocationHandler.java:86)
	at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(ServiceInvocationHandler.java:134)
	at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:109)
	at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
	at
org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
	at
org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
	at
org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.process(Jsr181ExchangeProcessor.java:113)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
	at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
	at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:595)
	at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
	at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
	at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
	at java.lang.Thread.run(Thread.java:595)
Caused by: org.codehaus.xfire.XFireException: Error sending jbi exchange
	at org.apache.servicemix.jsr181.xfire.JbiChannel.send(JbiChannel.java:155)
	at
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
	... 32 more
Caused by: org.codehaus.xfire.XFireRuntimeException: Couldn't get property
{http://dom.w3c.org}baseURI from bean
org.apache.xmlbeans.impl.store.Xobj$DocumentXobj@d88aa2. Nested exception is
java.lang.reflect.InvocationTargetException: null
	at
org.codehaus.xfire.aegis.type.basic.BeanType.readProperty(BeanType.java:471)
	at
org.codehaus.xfire.aegis.type.basic.BeanType.writeObject(BeanType.java:402)
	at
org.codehaus.xfire.aegis.type.basic.BeanType.writeObject(BeanType.java:417)
	at
org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindingProvider.java:200)
	at
org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(AbstractBinding.java:273)
	at
org.codehaus.xfire.service.binding.WrappedBinding.writeMessage(WrappedBinding.java:89)
	at
org.apache.servicemix.jsr181.xfire.JbiChannel.getContent(JbiChannel.java:173)
	at org.apache.servicemix.jsr181.xfire.JbiChannel.send(JbiChannel.java:122)
	... 33 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.codehaus.xfire.aegis.type.basic.BeanType.readProperty(BeanType.java:467)
	... 40 more
Caused by: java.lang.RuntimeException: DOM Level 3 Not implemented
	at
org.apache.xmlbeans.impl.store.DomImpl._node_getBaseURI(DomImpl.java:2534)
	at org.apache.xmlbeans.impl.store.Xobj$NodeXobj.getBaseURI(Xobj.java:2593)

Client code:
AnnotationServiceFactory asf = new AnnotationServiceFactory();
	AegisBindingProvider provider = new AegisBindingProvider(new
XmlBeansTypeRegistry());
asf.setBindingProvider(provider);
Service service = asf.create(CTWebService.class);
service.setProperty(XmlBeansType.XMLBEANS_NAMESPACE_HACK,"true");
XFire xfire = XFireFactory.newInstance().getXFire();
XFireProxyFactory factory = new XFireProxyFactory(xfire);
String serviceUrl ="http://localhost:8080/CTS/services/CTWebService/";
CTWebService servicem = (CTWebService)factory.create(service, serviceUrl);	
XmlObject xmlObject = servicem.execute(XmlObject.Factory.parse(new
File("D:/testing.xml")));
System.out.println(xmlObject.toString());
//////////////////////////////////
My SERVICEMIX-HTTP( Xbean.xml)

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0" 
      xmlns:cts="http://scm.com/test/token"
	xmlns:intf="http://3a:8071/cts/CTSWebService">

  <classpath>
    <location>.</location> 
  </classpath> 
    
    <http:endpoint service="cts:CTWebServiceService"
                 	endpoint="CTService"
                 	role="consumer"
                 
locationURI="http://0.0.0.0:8080/CTS/services/CTWebService/"
                 	defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
                 	soap="true"/>

	<http:endpoint service="intf:CTSWebServiceService"
                 endpoint="CTSWebService"
                 role="provider"
                 locationURI="http://3a:8071/cts/CTSWebService"
		     defaultMep="http://www.w3.org/2004/08/wsdl/in-out" 
                 soap="true"
		     wsdlResource="classpath:CTSWebService.wsdl" /> 	     
		   	
  </beans>

////////////////////////////
SERVICEMIX-JSR181(Xbean.xml):
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
	 xmlns:intf="http://3a:8071/cts/CTSWebService">
 
<jsr181:endpoint pojo="#cts"
                     wsdlResource="classpath:CWebservice.wsdl" 
                     annotations="jsr181"
			   typeMapping="xmlbeans"
                     style="rpc" />

<bean id="cts" class="com.scm.test.token.CTWebServiceServiceImpl">
    <property name="ctSWebService">
      <jsr181:proxy context="#context" 
                    type="com.aciworldwide.scm.test.CTSWebService"
                    service="intf:CTSWebServiceService" />
    </property>
</bean>

</beans>

//////////////////////////////////	
I used xfire to generated this code from the wsdl of external webservice:
WebService(serviceName = "CTSWebServiceService", targetNamespace =
"http://3a:8071/cts/CTSWebService", endpointInterface =
"com.aciworldwide.scm.test.CTSWebService")
public class CTSWebServiceServiceImpl
    implements CTSWebService
{


    public XmlObject execute(XmlObject xml) {
        throw new UnsupportedOperationException();
    }

}
@WebService(name = "CTSWebService", targetNamespace =
"http://3a:8071/cts/CTSWebService")
@SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.LITERAL,
parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface CTSWebService {


    @WebMethod(operationName = "execute", action = "")
    @WebResult(name = "executeReturn", targetNamespace =
"http://3a:8071/cts/CTSWebService")
    public XmlObject execute(
        @WebParam(name = "xml", targetNamespace =
"http://3a:8071/cts/CTSWebService")
        XmlObject xml);

}

///////////////////////////////////
I used xfire to generated this code from the wsdl of local webservice:
@WebService(serviceName = "CTWebServiceService", targetNamespace =
"http://scm.com/test/token", endpointInterface =
"com.scm.test.token.CTWebService")
public class CTWebServiceServiceImpl
    implements CTWebService
{
	private CTSWebService ctSWebService;

    public XmlObject execute(XmlObject xml) {
    	XmlObject	xmlObject= ctSWebService.execute(xml);
    	
    	return xmlObject;
    }
   public void setCtSWebService(CTSWebService ctSWebService){
	   	this.ctSWebService = ctSWebService;
   }
    
}

Any helps will be appreciated please.	 

-- 
View this message in context: http://www.nabble.com/Failed-to-route-message-from-local-webservice-to-the-external-remote-webservice-tf4030879s12049.html#a11450176
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


RE: Failed to route message from local webservice to the external remote webservice

Posted by ra...@wipro.com.
Please send these mails to servicemix-users mailing list rather than servicemix-dev..
 
 
Try adding the soapAction attribute to the following endpoint (for the external WS) as in this sample. You will get it in your WSDL (CTSWebService.wsdl). I am just guessing here as this is a kind of problem reported by someone else earlier. He did not let me know if it resolved his issue. If this does not resolve your issue, send the log with level set to DEBUG.
 
 
 
 <http:endpoint service="intf:CTSWebServiceService"
                 endpoint="CTSWebService"
                 role="provider"
                 locationURI="http://3a:8071/cts/CTSWebService"
                     defaultMep="http://www.w3.org/2004/08/wsdl/in-out <https://oma.wipro.com/exchweb/bin/redir.asp?URL=http://www.w3.org/2004/08/wsdl/in-out> "
                 soap="true"
                     wsdlResource="classpath:CTSWebService.wsdl" />    
 
This tutorial may also help 
http://incubator.apache.org/servicemix/orchestration-with-jsr181.html
Regards, 
Rabi Mishra 
http://rabisblog.blogspot.com/

________________________________

From: YEMITOMI [mailto:ogunjimij@aciworldwide.com]
Sent: Thu 7/5/2007 10:10 PM
To: servicemix-dev@geronimo.apache.org
Subject: Failed to route message from local webservice to the external remote webservice




 I deployed the  webservices succefully on servicemix 3.1.1, but  when I
tried to use client to send a soap message, I got this error. The code used
was included in this message. Any help will be appreciated

ERROR MESSAGE:
org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested
exception is org.codehaus.xfire.fault.XFireFault: Error sending jbi exchange
org.codehaus.xfire.fault.XFireFault: Error sending jbi exchange
        at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
        at
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:30)
        at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
        at org.codehaus.xfire.client.Client.invoke(Client.java:335)
        at
org.apache.servicemix.jsr181.xfire.JbiProxy$JAXWSJBIClient.invoke(JbiProxy.java:228)
        at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
        at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
        at
org.apache.servicemix.jsr181.xfire.JbiProxyFactoryBean$1.invoke(JbiProxyFactoryBean.java:76)
        at $Proxy0.execute(Unknown Source)
        at
com.aciworldwide.scm.test.token.CTWebServiceServiceImpl.execute(CTWebServiceServiceImpl.java:15)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:54)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(ServiceInvocationHandler.java:322)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceInvocationHandler.java:86)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(ServiceInvocationHandler.java:134)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:109)
        at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at
org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
        at
org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
        at
org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.process(Jsr181ExchangeProcessor.java:113)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:595)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.codehaus.xfire.XFireException: Error sending jbi exchange
        at org.apache.servicemix.jsr181.xfire.JbiChannel.send(JbiChannel.java:155)
        at
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
        ... 32 more
Caused by: org.codehaus.xfire.XFireRuntimeException: Couldn't get property
{http://dom.w3c.org <http://dom.w3c.org/> }baseURI from bean
org.apache.xmlbeans.impl.store.Xobj$DocumentXobj@d88aa2. Nested exception is
java.lang.reflect.InvocationTargetException: null
        at
org.codehaus.xfire.aegis.type.basic.BeanType.readProperty(BeanType.java:471)
        at
org.codehaus.xfire.aegis.type.basic.BeanType.writeObject(BeanType.java:402)
        at
org.codehaus.xfire.aegis.type.basic.BeanType.writeObject(BeanType.java:417)
        at
org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindingProvider.java:200)
        at
org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(AbstractBinding.java:273)
        at
org.codehaus.xfire.service.binding.WrappedBinding.writeMessage(WrappedBinding.java:89)
        at
org.apache.servicemix.jsr181.xfire.JbiChannel.getContent(JbiChannel.java:173)
        at org.apache.servicemix.jsr181.xfire.JbiChannel.send(JbiChannel.java:122)
        ... 33 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.xfire.aegis.type.basic.BeanType.readProperty(BeanType.java:467)
        ... 40 more
Caused by: java.lang.RuntimeException: DOM Level 3 Not implemented
        at
org.apache.xmlbeans.impl.store.DomImpl._node_getBaseURI(DomImpl.java:2534)
        at org.apache.xmlbeans.impl.store.Xobj$NodeXobj.getBaseURI(Xobj.java:2593)

Client code:
AnnotationServiceFactory asf = new AnnotationServiceFactory();
        AegisBindingProvider provider = new AegisBindingProvider(new
XmlBeansTypeRegistry());
asf.setBindingProvider(provider);
Service service = asf.create(CTWebService.class);
service.setProperty(XmlBeansType.XMLBEANS_NAMESPACE_HACK,"true");
XFire xfire = XFireFactory.newInstance().getXFire();
XFireProxyFactory factory = new XFireProxyFactory(xfire);
String serviceUrl ="http://localhost:8080/CTS/services/CTWebService/";
CTWebService servicem = (CTWebService)factory.create(service, serviceUrl);     
XmlObject xmlObject = servicem.execute(XmlObject.Factory.parse(new
File("D:/testing.xml")));
System.out.println(xmlObject.toString());
//////////////////////////////////
My SERVICEMIX-HTTP( Xbean.xml)

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
      xmlns:cts="http://scm.com/test/token"
        xmlns:intf="http://3a:8071/cts/CTSWebService">

  <classpath>
    <location>.</location>
  </classpath>
   
    <http:endpoint service="cts:CTWebServiceService"
                        endpoint="CTService"
                        role="consumer"
                
locationURI="http://0.0.0.0:8080/CTS/services/CTWebService/"
                        defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
                        soap="true"/>

        <http:endpoint service="intf:CTSWebServiceService"
                 endpoint="CTSWebService"
                 role="provider"
                 locationURI="http://3a:8071/cts/CTSWebService"
                     defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
                 soap="true"
                     wsdlResource="classpath:CTSWebService.wsdl" />         
                       
  </beans>

////////////////////////////
SERVICEMIX-JSR181(Xbean.xml):
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
         xmlns:intf="http://3a:8071/cts/CTSWebService">

<jsr181:endpoint pojo="#cts"
                     wsdlResource="classpath:CWebservice.wsdl"
                     annotations="jsr181"
                           typeMapping="xmlbeans"
                     style="rpc" />

<bean id="cts" class="com.scm.test.token.CTWebServiceServiceImpl">
    <property name="ctSWebService">
      <jsr181:proxy context="#context"
                    type="com.aciworldwide.scm.test.CTSWebService"
                    service="intf:CTSWebServiceService" />
    </property>
</bean>

</beans>

//////////////////////////////////     
I used xfire to generated this code from the wsdl of external webservice:
WebService(serviceName = "CTSWebServiceService", targetNamespace =
"http://3a:8071/cts/CTSWebService", endpointInterface =
"com.aciworldwide.scm.test.CTSWebService")
public class CTSWebServiceServiceImpl
    implements CTSWebService
{


    public XmlObject execute(XmlObject xml) {
        throw new UnsupportedOperationException();
    }

}
@WebService(name = "CTSWebService", targetNamespace =
"http://3a:8071/cts/CTSWebService")
@SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.LITERAL,
parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface CTSWebService {


    @WebMethod(operationName = "execute", action = "")
    @WebResult(name = "executeReturn", targetNamespace =
"http://3a:8071/cts/CTSWebService")
    public XmlObject execute(
        @WebParam(name = "xml", targetNamespace =
"http://3a:8071/cts/CTSWebService")
        XmlObject xml);

}

///////////////////////////////////
I used xfire to generated this code from the wsdl of local webservice:
@WebService(serviceName = "CTWebServiceService", targetNamespace =
"http://scm.com/test/token", endpointInterface =
"com.scm.test.token.CTWebService")
public class CTWebServiceServiceImpl
    implements CTWebService
{
        private CTSWebService ctSWebService;

    public XmlObject execute(XmlObject xml) {
        XmlObject       xmlObject= ctSWebService.execute(xml);
       
        return xmlObject;
    }
   public void setCtSWebService(CTSWebService ctSWebService){
                this.ctSWebService = ctSWebService;
   }
   
}

Any helps will be appreciated please.   

--
View this message in context: http://www.nabble.com/Failed-to-route-message-from-local-webservice-to-the-external-remote-webservice-tf4030879s12049.html#a11450176
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.






The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com