Which version of the xfire-all jar are you running with? Also, which build
of the various components are you running off of?

> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Simon Carni
> Sent: Thursday, January 12, 2006 4:01 PM
> To: [email protected]
> Subject: [servicemix-user] Re: Exception in SaajMarshaler...
> 
> 
> Hi Guillaume,
> 
> I think I know where the problem is :
> 
> document.appendChild(node.cloneNode(true));
>  in method createSOAPMessage in SaajMarshaller  throws A node 
> is used in a 
> different document than the one that created it exception.
> The workaround is to replace this with
> document.appendChild(document.importNode(node,true));
> I had simillar issue on some other project...
> 
> Now there's another issue:
> when the message is routed back to Axis client seems like 
> xmlns attribute 
> gets gets lost.
> Here's the document returned to AxisClient when the WS is 
> called directly:
> 
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><soapenv
> :Body><ns1:serviceMethodResponse 
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
> xmlns:ns1="http://example3.userguide.samples";><serviceMethodReturn 
> xsi:type="xsd:string">simon</serviceMethodReturn></ns1:service
> MethodResponse></soapenv:Body></soapenv:Envelope>
> 
> and here's the document returned when using SM as a "broker":
> <?xml version='1.0' encoding='UTF-8'?><soap:Envelope 
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><soap:Bo
> dy><ns1:serviceMethodResponse 
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><service
> MethodReturn 
> xsi:type="xsd:string">simon</serviceMethodReturn></ns1:service
> MethodResponse></soap:Body></soap:Envelope>
> 
> You can see xmlns:ns1="http://example3.userguide.samples"; 
> missing in second 
> doc.
> As result I get  org.xml.sax.SAXParseException: The prefix 
> "ns1" for element 
> "ns1:serviceMethodResponse" is not bound
> at Axis client.
> The attribute exists  before 
> org.codehaus.xfire.soap.handler.SoapSerializerHandler is 
> invoked, so that 
> could be the spot.
> 
> Maybe I just missed something...
> Anyway thanx in advance
> Cheers,
>  Simon
> 
> 
> "Guillaume Nodet" <[EMAIL PROTECTED]> 
> wrote in message news:[EMAIL PROTECTED]
> > Could you raise a jira, specifying this stacktrace and the 
> exact classpath 
> > used.
> > The most important is the saaj implementation and dom 
> implementation.
> >
> > Cheers,
> > Guillaume Nodet
> >
> > Simon Èarni wrote:
> >
> >>Hi,
> >>
> >>While trying to execute following scenario on SM 3.0-SNAPSHOT;
> >>
> >>Axis SOAP Client --> HttpSoapConnector --> SaajBinding --> SOAP WS,
> >>
> >>I get exception:
> >>
> >>DEBUG - DefaultEndpoint.handleException(76) | Fault occurred!
> >>org.codehaus.xfire.fault.XFireFault: WRONG_DOCUMENT_ERR: A 
> node is used in 
> >>a dif
> >>ferent document than the one that created it.
> >>        at 
> >> 
> org.apache.servicemix.components.http.HttpSoapInOutBinding.invokeInOu
> >>t(HttpSoapInOutBinding.java:143)
> >>        at 
> >> 
> org.apache.servicemix.components.http.HttpSoapInOutBinding$InOutServi
> >>ce.invokeInOut(HttpSoapInOutBinding.java:221)
> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0 
> (Native Method)
> >>        at 
> >> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> >>java:39)
> >>        at 
> >> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> >>sorImpl.java:25)
> >>        at java.lang.reflect.Method.invoke(Method.java:585)
> >>        at 
> >> 
> org.codehaus.xfire.service.binding.ObjectInvoker.invoke(ObjectInvoker
> >>.java:87)
> >>        at 
> >> 
> org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessa
> >>ge(ServiceInvocationHandler.java:110)
> >>        at 
> >> 
> org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(Se
> >>rviceInvocationHandler.java:72)
> >>        at org.codehaus.xfire.handler.HandlerPipeline.invoke 
> >> (HandlerPipeline.jav
> >>a:97)
> >>        at 
> >> 
> org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoin
> >>t.java:58)
> >>        at 
> >> 
> org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.
> >>java:38)
> >>        at 
> >> 
> org.codehaus.xfire.transport.http.XFireServletController.invoke(XFire
> >>ServletController.java:278)
> >>        at 
> >> 
> org.codehaus.xfire.transport.http.XFireServletController.doService(XF
> >>ireServletController.java :144)
> >>        at org.apache.servicemix.component 
> >> s.http.HttpSoapInOutBinding.process(Ht
> >>tpSoapInOutBinding.java:94)
> >>        at 
> >> 
> org.apache.servicemix.components.http.BindingServlet.doPost(BindingSe
> >>rvlet.java:75)
> >>        at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
> >>        at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
> >>        at 
> >> 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java :428
> >>)
> >>        at 
> >> 
> org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java
> >>:666)
> >>        at 
> >> 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
> >>68)
> >>        at org.mortbay.http.HttpContext.handle 
> (HttpContext.java:1530)
> >>        at 
> org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
> >>        at org.mortbay.http.HttpServer.service(HttpServer.java:909)
> >>        at org.mortbay.http.HttpConnection.service 
> >> (HttpConnection.java:816)
> >>        at 
> >> org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
> >>        at 
> org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
> >>        at org.mortbay.http.SocketListener.handleConnection 
> >> (SocketListener.java:
> >>244)
> >>        at 
> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
> >>        at 
> org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
> >>Caused by: org.w3c.dom.DOMException : WRONG_DOCUMENT_ERR: A 
> node is used 
> >>in a dif
> >>ferent document than the one that created it.
> >>        at 
> org.apache.xerces.dom.ParentNode.internalInsertBefore(Unknown 
> >> Source)
> >>
> >>        at 
> org.apache.xerces.dom.ParentNode.insertBefore(Unknown Source)
> >>        at 
> org.apache.xerces.dom.CoreDocumentImpl.insertBefore(Unknown 
> >> Source)
> >>        at 
> org.apache.xerces.dom.NodeImpl.appendChild(Unknown Source)
> >>        at 
> >> 
> org.apache.servicemix.components.saaj.SaajMarshaler.createSOAPMessage
> >>(SaajMarshaler.java:140)
> >>        at 
> org.apache.servicemix.components.saaj.SaajBinding.onMessageExc 
> >> hange(S
> >>aajBinding.java:88)
> >>        at 
> >> 
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> >>d(DeliveryChannelImpl.java:587)
> >>        at 
> >> 
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> >>w.java:179)
> >>        at 
> >> 
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doSend(SedaFlow.java
> >>:137)
> >>        at 
> >> 
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.jav
> >>a:121)
> >>        at org.apache.servicemix.jbi.nmr.Broker.sendExchangePacket 
> >> (Broker.java:2
> >>85)
> >>        at 
> >> 
> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBICont
> >>ainer.java:586)
> >>        at 
> >> 
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(Delive
> >>ryChannelImpl.java :346)
> >>        at 
> >> 
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(Deli
> >>veryChannelImpl.java:420)
> >>        at 
> >> 
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(Deli
> >>veryChannelImpl.java :397)
> >>        at 
> >> 
> org.apache.servicemix.components.http.HttpSoapInOutBinding.invokeInOu
> >>t(HttpSoapInOutBinding.java:132)
> >>        ... 29 more
> >>DEBUG - HandlerPipeline.invoke(95) | Invoking handler 
> >>org.codehaus.xfire.soap.ha
> >>ndler.FaultSoapSerializerHandler in phase post-invoke
> >>DEBUG - HandlerPipeline.invoke(95) | Invoking handler 
> >>org.codehaus.xfire.handler
> >>
> >>...
> >>
> >>Any ideas???
> >>
> >>
> >>
> >>
> >>
> >>
> >
> > 
> 
> 
> 

Reply via email to