Please do not double post.
Regards
Lars
Am Dienstag 28 Oktober 2008 10:09:01 schrieb baryzhongzsd:
> Hello everybody, i am really fresh about how to create own SE. In fact, i
> just want to try the example of Hello-World-SE in tutorials. What i wirte
> in MyEndpoint.java is as followed:
>
> public class MyEndpoint extends ProviderEndpoint implements
> ExchangeProcessor{
>
> protected void processInOut(MessageExchange exchange, NormalizedMessage
> in, NormalizedMessage out) throws Exception {
>
> SourceTransformer sourceTransformer = new SourceTransformer();
> String inMessage=sourceTransformer.toString((in.getContent()));
> System.out.println(inMessage);
> out.setContent(new StringSource("<hello>hello world! Message of
> request contains["+inMessage.getBytes().length+"] bytes</hello>."));
> if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
> //out.setContent(in.getContent());
> getChannel().send(exchange);
> }
> }
> }
> The deployment was successful but when i run my end-to-end client test, it
> shows some error in serviceMix, however client can receive right feedback,
> the error appeared as followed:
>
>
> [Fatal Error] :-1:-1: Premature end of file.
> [Fatal Error] :1:66: Content is not allowed in trailing section.
> ERROR - MyComponent - Error processing exchange InOut[
> id: ID:59.64.158.73-11d420e0785-11:0
> status: Active
> role: provider
> service: {http://companyxyz.com}helloWorld
> endpoint: helloWorld
> in: Unable to display: org.xml.sax.SAXParseException: Premature end of
> file.
> out: Unable to display: org.xml.sax.SAXParseException: Content is not
> allowed in trailing section.
> ]
> java.lang.IllegalStateException: component is not owner
> at
> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setProperty(Message
>ExchangeImpl.java:403) at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChanne
>lImpl.java:428) at
> org.apache.servicemix.common.EndpointDeliveryChannel.send(EndpointDeliveryC
>hannel.java:79) at
> org.apache.servicemix.common.endpoints.SimpleEndpoint.send(SimpleEndpoint.j
>ava:67) at
> org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEnd
>point.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)
> ERROR - MyComponent - Error setting exchange status to
> ERROR
> java.lang.IllegalStateException: component is not owner when trying to set
> error: java.lang.IllegalStateException: component
> is not owner
> at
> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setError(MessageExc
>hangeImpl.java:264) at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.
>java:57) 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)
> Caused by: java.lang.IllegalStateException: component is not owner
> at
> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setProperty(Message
>ExchangeImpl.java:403) at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChanne
>lImpl.java:428) at
> org.apache.servicemix.common.EndpointDeliveryChannel.send(EndpointDeliveryC
>hannel.java:79) at
> org.apache.servicemix.common.endpoints.SimpleEndpoint.send(SimpleEndpoint.j
>ava:67) at
> org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEnd
>point.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) ... 7 more
>
>
> Can any body help me about this mistake? I tried to search the related
> issure in forum but it appears that no useful infomation.