Martin,

the XFire component is a lightweight component in smx. These lw components
are no longer maintained. I would suggest to you using servicemix-cxf-* 
components for building webservices.

Regards
Lars



On Thursday 26 June 2008 10:24:18 [EMAIL PROTECTED] wrote:
> After doing some research I found out that the same scenario is working
> when I am using CXF instead of XFire (cxf-wsdl-first example). I was really
> surprised that ServiceMix  XFire is not working correctly with something
> basic like faults.
>
> Which servicemix component should I use for building a web service in
> general? Are there any best practices which framework to choose? Pro and
> cons XFire vs. CXF?
>
> Thanks,
> Martin
>
>
>
>
> Sitz der Gesellschaft / Corporate Headquarters: Lufthansa Systems Business
> Solutions GmbH, Raunheim, Registereintragung / Registration: Amtsgericht
> Darmstadt 83850 Geschaeftsfuehrung / Management Board: Bernd Appel
>
>  -----Ursprüngliche Nachricht-----
>
> Von: GROSS, MARTIN
> Gesendet: Montag, 23. Juni 2008 19:55
> An: '[email protected]'
> Betreff: XFireRuntimeException while running example wsdl_first with Fault
>
> Hi,
>
> I am using ServiceMix 3.2.1 . I created a JSR181 web service with some
> custom defined faults. As I got an XFireRuntimeException when a fault was
> created I tried the provided ServiceMix wsdl_first example to find out what
> is wrong with my service.
>
> When I run the wsdl_first example
> (apache-servicemix-3.2.1\examples\wsdl-first) as described with the
> client.html. Everything is ok as long as I use preset values like:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";
>              
> xmlns:tns="http://servicemix.apache.org/samples/wsdl-first/types";>
> <env:Body>
>     <tns:GetPerson>
>       <tns:personId>world</tns:personId>
>     </tns:GetPerson>
>   </env:Body>
> </env:Envelope>
>
> The result is as it should be:
>
> STATUS: 200
> <?xml version='1.0' encoding='UTF-8'?><env:Envelope
> xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";><env:Body><GetPersonR
>esponse xmlns="http://servicemix.apache.org/samples/wsdl-first";><personId
> xmlns="http://servicemix.apache.org/samples/wsdl-first/types";>world</person
>Id><ssn
> xmlns="http://servicemix.apache.org/samples/wsdl-first/types";>000-000-0000<
>/ssn><name
> xmlns="http://servicemix.apache.org/samples/wsdl-first/types";>Guillaume</na
>me></GetPersonResponse></env:Body></env:Envelope>
>
>
> Now, if I want to test the UnknownPersonFault setting the personId to
> empty: ...
> <tns:personId></tns:personId>
> ...
>
> I get an HTTP Error 500 back to the client.html:
>
> STATUS: 500
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
> <title>Error 500 </title> </head> <body><h2>HTTP ERROR:
> 500</h2><pre>Premature end of file.</pre>
> <p>RequestURI=/PersonService/</p><h3>Caused
> by:</h3><pre>org.xml.sax.SAXParseException: Premature end of file. ...
>
> On the ServiceMix side a Fault is created as expected and should be sent to
> the client. But then this fault causes a XFireRuntimeException ending in a
> HTTP 500 error:
>
> 17:20:26,531 | ERROR | pool-flow.seda.servicemix-jsr181-thread-2 |
> DefaultFaultHandler      | re.handler.DefaultFaultHandler   96 | Could not
> send fault. org.codehaus.xfire.XFireRuntimeException: Couldn't get property
> {http://wsdl_first.samples.servicemix.apache.org}faultInfo from bean
> [EMAIL PROTECTED]
> Nested exception is java.lang.IllegalArgumentException: object is not an
> instance of declaring class
>
> _Full_ Servicemix log:
> 17:18:34,281 | INFO  | RMI TCP Connection(4)-57.57.247.229 |
> ServiceAssemblyLifeCycle | ework.ServiceAssemblyLifeCycle  111 | Starting
> service assembly: wsdl-first-sa 17:18:34,296 | INFO  | RMI TCP
> Connection(4)-57.57.247.229 | ServiceUnitLifeCycle     |
> framework.ServiceUnitLifeCycle   78 | Initializing service unit:
> wsdl-first-jsr181-su 17:18:34,296 | INFO  | RMI TCP
> Connection(4)-57.57.247.229 | ServiceUnitLifeCycle     |
> framework.ServiceUnitLifeCycle   78 | Initializing service unit:
> wsdl-first-http-su 17:18:34,296 | INFO  | RMI TCP
> Connection(4)-57.57.247.229 | ServiceUnitLifeCycle     |
> framework.ServiceUnitLifeCycle   97 | Starting service unit:
> wsdl-first-jsr181-su 17:18:34,484 | INFO  | RMI TCP
> Connection(4)-57.57.247.229 | ServiceUnitLifeCycle     |
> framework.ServiceUnitLifeCycle   97 | Starting service unit:
> wsdl-first-http-su 17:18:34,765 | INFO  | RMI TCP
> Connection(4)-57.57.247.229 | jetty                    |
> ervicemix.http.jetty.JCLLogger   83 | jetty-6.1.5 17:18:34,828 | INFO  |
> RMI TCP Connection(4)-57.57.247.229 | jetty                    |
> ervicemix.http.jetty.JCLLogger   83 | Started
> [EMAIL PROTECTED]:8192 17:20:26,515 | INFO  |
> pool-flow.seda.servicemix-jsr181-thread-2 | DefaultFaultHandler      |
> re.handler.DefaultFaultHandler   39 | Fault occurred!
> org.apache.servicemix.samples.wsdl_first.UnknownPersonFault
>       at
> org.apache.servicemix.samples.wsdl_first.PersonImpl.getPerson(PersonImpl.ja
>va:34) at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
>       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:585)
>       at
> org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.j
>ava:54) at
> org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(Ser
>viceInvocationHandler.java:322) at
> org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceIn
>vocationHandler.java:86) at
> org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(Service
>InvocationHandler.java:134) at
> org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceI
>nvocationHandler.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:3
>8) at
> org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.process(Jsr181Exchange
>Processor.java:114) at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycl
>e.java:538) at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLi
>feCycle.java:490) at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.
>java:46) at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(Deli
>veryChannelImpl.java:610) at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java
>:170) at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:16
>7) at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j
>ava:650) at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
>675) at java.lang.Thread.run(Thread.java:595)
> 17:20:26,531 | ERROR | pool-flow.seda.servicemix-jsr181-thread-2 |
> DefaultFaultHandler      | re.handler.DefaultFaultHandler   96 | Could not
> send fault. org.codehaus.xfire.XFireRuntimeException: Couldn't get property
> {http://wsdl_first.samples.servicemix.apache.org}faultInfo from bean
> [EMAIL PROTECTED]
> Nested exception is java.lang.IllegalArgumentException: object is not an
> instance of declaring class java.lang.IllegalArgumentException: object is
> not an instance of declaring class at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:585)
>       at
> org.codehaus.xfire.aegis.type.basic.BeanType.readProperty(BeanType.java:442
>) at
> org.codehaus.xfire.aegis.type.basic.BeanType.writeObject(BeanType.java:377)
> at
> org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindingPr
>ovider.java:222) at
> org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(AbstractB
>inding.java:273) at
> org.codehaus.xfire.handler.CustomFaultHandler.handleFault(CustomFaultHandle
>r.java:64) at
> org.codehaus.xfire.handler.CustomFaultHandler.invoke(CustomFaultHandler.jav
>a:51) at
> org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
> at
> org.codehaus.xfire.handler.DefaultFaultHandler.sendFault(DefaultFaultHandle
>r.java:88) at
> org.codehaus.xfire.handler.DefaultFaultHandler.invoke(DefaultFaultHandler.j
>ava:51) at
> org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceIn
>vocationHandler.java:99) at
> org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(Service
>InvocationHandler.java:134) at
> org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceI
>nvocationHandler.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:3
>8) at
> org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.process(Jsr181Exchange
>Processor.java:114) at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycl
>e.java:538) at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLi
>feCycle.java:490) at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.
>java:46) at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(Deli
>veryChannelImpl.java:610) at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java
>:170) at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:16
>7) at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j
>ava:650) at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
>675) at java.lang.Thread.run(Thread.java:595)
> 17:20:26,546 | WARN  | btpool1-1  | jetty                    |
> ervicemix.http.jetty.JCLLogger   96 | Nested in
> javax.servlet.ServletException: Failed to process request:
> org.xml.sax.SAXParseException: Premature end of file.:
> org.xml.sax.SAXParseException: Premature end of file.
>       at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>       at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>       at
> org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMSourceFromStream(Sour
>ceTransformer.java:248) at
> org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMSource(SourceTransfor
>mer.java:161) at
> org.apache.servicemix.soap.marshalers.SoapWriter.writeDetails(SoapWriter.ja
>va:337) at
> org.apache.servicemix.soap.marshalers.SoapWriter.writeSoap11Fault(SoapWrite
>r.java:267) at
> org.apache.servicemix.soap.marshalers.SoapWriter.writeFault(SoapWriter.java
>:226) at
> org.apache.servicemix.soap.marshalers.SoapWriter.writeSoapEnvelope(SoapWrit
>er.java:209) at
> org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWri
>ter.java:113) at
> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
> at
> org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerP
>rocessor.java:277) at
> org.apache.servicemix.http.processors.ConsumerProcessor.processFault(Consum
>erProcessor.java:234) at
> org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerPro
>cessor.java:201) at
> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:
>71) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>       at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>       at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCol
>lection.java:211) at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:1
>14) at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at
> org.mortbay.jetty.Server.handle(Server.java:313)
>       at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
>       at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:375)
>       at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396
>) at
> org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation.run(SelectCh
>annelConnector.java:511) at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:
>442) 17:20:26,546 | WARN  | btpool1-1  | jetty                    |
> ervicemix.http.jetty.JCLLogger   96 | /PersonService/
> org.xml.sax.SAXParseException: Premature end of file.
>       at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>       at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>       at
> org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMSourceFromStream(Sour
>ceTransformer.java:248) at
> org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMSource(SourceTransfor
>mer.java:161) at
> org.apache.servicemix.soap.marshalers.SoapWriter.writeDetails(SoapWriter.ja
>va:337) at
> org.apache.servicemix.soap.marshalers.SoapWriter.writeSoap11Fault(SoapWrite
>r.java:267) at
> org.apache.servicemix.soap.marshalers.SoapWriter.writeFault(SoapWriter.java
>:226) at
> org.apache.servicemix.soap.marshalers.SoapWriter.writeSoapEnvelope(SoapWrit
>er.java:209) at
> org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWri
>ter.java:113) at
> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
> at
> org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerP
>rocessor.java:277) at
> org.apache.servicemix.http.processors.ConsumerProcessor.processFault(Consum
>erProcessor.java:234) at
> org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerPro
>cessor.java:201) at
> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:
>71) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>       at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>       at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCol
>lection.java:211) at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:1
>14) at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at
> org.mortbay.jetty.Server.handle(Server.java:313)
>       at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
>       at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:375)
>       at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396
>) at
> org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation.run(SelectCh
>annelConnector.java:511) at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:
>442)
>
> Any ideas why this ServiceMix example is not working?
>
> Martin


Reply via email to