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><GetPers
onResponse
xmlns="http://servicemix.apache.org/samples/wsdl-first";><personId
xmlns="http://servicemix.apache.org/samples/wsdl-first/types";>world</per
sonId><ssn
xmlns="http://servicemix.apache.org/samples/wsdl-first/types";>000-000-00
00</ssn><name
xmlns="http://servicemix.apache.org/samples/wsdl-first/types";>Guillaume<
/name></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]
8. 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
.java:34)
        at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoke
r.java:54)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(
ServiceInvocationHandler.java:322)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(Servic
eInvocationHandler.java:86)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(Serv
iceInvocationHandler.java:134)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(Servi
ceInvocationHandler.java:109)
        at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:1
31)
        at
org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.j
ava:64)
        at
org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.jav
a:38)
        at
org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.process(Jsr181Excha
ngeProcessor.java:114)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeC
ycle.java:538)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas
eLifeCycle.java:490)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc
le.java:46)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D
eliveryChannelImpl.java:610)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j
ava:170)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java
:167)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:1
34)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
r.java:650)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va: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]
8. 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.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.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:3
77)
        at
org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindin
gProvider.java:222)
        at
org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(Abstra
ctBinding.java:273)
        at
org.codehaus.xfire.handler.CustomFaultHandler.handleFault(CustomFaultHan
dler.java:64)
        at
org.codehaus.xfire.handler.CustomFaultHandler.invoke(CustomFaultHandler.
java:51)
        at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:1
31)
        at
org.codehaus.xfire.handler.DefaultFaultHandler.sendFault(DefaultFaultHan
dler.java:88)
        at
org.codehaus.xfire.handler.DefaultFaultHandler.invoke(DefaultFaultHandle
r.java:51)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(Servic
eInvocationHandler.java:99)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(Serv
iceInvocationHandler.java:134)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(Servi
ceInvocationHandler.java:109)
        at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:1
31)
        at
org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.j
ava:64)
        at
org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.jav
a:38)
        at
org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.process(Jsr181Excha
ngeProcessor.java:114)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeC
ycle.java:538)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas
eLifeCycle.java:490)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc
le.java:46)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D
eliveryChannelImpl.java:610)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j
ava:170)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java
:167)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:1
34)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
r.java:650)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va: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(S
ourceTransformer.java:248)
        at
org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMSource(SourceTrans
former.java:161)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeDetails(SoapWriter
.java:337)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSoap11Fault(SoapWr
iter.java:267)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeFault(SoapWriter.j
ava:226)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSoapEnvelope(SoapW
riter.java:209)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(Soap
Writer.java:113)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:9
2)
        at
org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(Consum
erProcessor.java:277)
        at
org.apache.servicemix.http.processors.ConsumerProcessor.processFault(Con
sumerProcessor.java:234)
        at
org.apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
Processor.java:201)
        at
org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
va: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(ContextHandler
Collection.java:211)
        at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
a:114)
        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(Selec
tChannelConnector.java:511)
        at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
va: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(S
ourceTransformer.java:248)
        at
org.apache.servicemix.jbi.jaxp.SourceTransformer.toDOMSource(SourceTrans
former.java:161)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeDetails(SoapWriter
.java:337)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSoap11Fault(SoapWr
iter.java:267)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeFault(SoapWriter.j
ava:226)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSoapEnvelope(SoapW
riter.java:209)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(Soap
Writer.java:113)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:9
2)
        at
org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(Consum
erProcessor.java:277)
        at
org.apache.servicemix.http.processors.ConsumerProcessor.processFault(Con
sumerProcessor.java:234)
        at
org.apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
Processor.java:201)
        at
org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
va: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(ContextHandler
Collection.java:211)
        at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
a:114)
        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(Selec
tChannelConnector.java:511)
        at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
va:442)

Any ideas why this ServiceMix example is not working?

Martin



 
Sitz der Gesellschaft / Corporate Headquarters: Lufthansa Systems Business 
Solutions GmbH, Raunheim, Registereintragung / Registration: Amtsgericht 
Darmstadt 83850
Geschaeftsfuehrung / Management Board: Bernd Appel

 

Reply via email to