You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by YEMITOMI <og...@aciworldwide.com> on 2007/07/05 18:23:12 UTC
Failed to route message from local webservice to the external
remote webservice
Hi All,
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.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/services/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/services/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/services/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.aciworldwide.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-tf4030781s12049.html#a11449875
Sent from the ServiceMix - User mailing list archive at Nabble.com.