Component

View: New views
3 Messages — Rating Filter:   Alert me  

Component

by Marco Mascia-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi All,
I have a very simple service as shown below with a component. In my component I would like to modify the message payload before being sent to the outbound router, however, in this example I just want to replicate a pass-through component. In the end I get a illegal char exception as shown below.
Any help would be appreciated. Thanks

 <service name="MyService">
                <inbound>
        <cxf:inbound-endpoint address="http://localhost:8888/services/myservice" proxy="true" synchronous="true" />
    </inbound>
                <component class="com.example.MyComponent"/>
        </service>

public class MyComponent implements Callable {
        public Object onCall(MuleEventContext eventContext) throws Exception {
                String content = eventContext.getMessageAsString();
                return content;
        }

org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
[com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character (NULL, unicode 0) encountered: not valid in any content
 at [row,col {unknown-source}]: [2,12]
        at com.ctc.wstx.exc.WstxLazyException.throwLazily(WstxLazyException.java:45)

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Component

by Blaise Tuffet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

if you are testing your webService using SOAPUI, make sure you don't  
send any comments in your query. It seems there is a problem around  
comments, at least in 2.2.1.

Does a query without any comment works ?

r.

Blaise

Quoting colvaman <mule.dev.relay@...>:

> Hi All,
> I have a very simple service as shown below with a component. In my  
> component I would like to modify the message payload before being  
> sent to the outbound router, however, in this example I just want to  
> replicate a pass-through component. In the end I get a illegal char  
> exception as shown below.
> Any help would be appreciated. Thanks
>
>  <service name="MyService">
> <inbound>
>         <cxf:inbound-endpoint  
> address="http://localhost:8888/services/myservice" proxy="true"  
> synchronous="true" />
>     </inbound>
> <component class="com.example.MyComponent"/>
>         </service>
>
> public class MyComponent implements Callable {
> public Object onCall(MuleEventContext eventContext) throws Exception {
> String content = eventContext.getMessageAsString();
> return content;
> }
>
> org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> [com.ctc.wstx.exc.WstxLazyException]  
> com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character  
> (NULL, unicode 0) encountered: not valid in any content
>  at [row,col {unknown-source}]: [2,12]
> at com.ctc.wstx.exc.WstxLazyException.throwLazily(WstxLazyException.java:45)
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>






---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Component

by Marco Mascia-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Many thanks Blaise. Without comments that solved the problems.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email