« Return to Thread: CXF outbound endpoint & MULE_ERROR-84

RE: CXF outbound endpoint & MULE_ERROR-84

by Denis Kranjcec :: Rate this Message:

Reply to Author | View in Thread

Hi!

Thanks for reply.

I've looked that troubleshooting section for CXF, but error that mule
throws looks to me like internal mule error?

In example where outbound endpoint is CXF WS, when there is wrong number
of arguments, different error (stacktrace) is thrown:
DEBUG Finished creating instance of bean
'org.apache.cxf.binding.soap.SoapTransportFactory'
DEBUG Returning cached instance of singleton bean
'org.apache.cxf.binding.soap.SoapTransportFactory'
2008.09.04 10:34:25
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service
{http://ws.mule.integration.sandbox.cp.srce.hr/}KreirajPunoFirstname
from WSDL: http://localhost:63081/firstname?wsdl
DEBUG Service helloService polling queue helloService.component,
tfirstnameout = 3000

nullDEBUG Service
_cxfServiceComponent{http://ws.mule.integration.sandbox.cp.srce.hr/}Krei
rajPunoFirstname16754411 polling queue
_cxfServiceComponent{http://ws.mule.integration.sandbox.cp.srce.hr/}Krei
rajPunoFirstname16754411.component, tfirstnameout = 3000
INFO  Connected: CxfMessageDispatcher{this=1566a6c,
endpoint=http://localhost:63081/firstname, disposed=false}
ERROR Caught exception in Exception Strategy: wrong number of arguments
java.lang.IllegalArgumentException: wrong number of arguments
        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:597)
        at
org.mule.transport.cxf.CxfMessageDispatcher.doSendWithProxy(CxfMessageDi
spatcher.java:155)
        at
org.mule.transport.cxf.CxfMessageDispatcher.doSend(CxfMessageDispatcher.
java:133)
        at
org.mule.transport.cxf.CxfMessageDispatcher.doDispatch(CxfMessageDispatc
her.java:219)
        at
org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessageD
ispatcher.java:262)
        at org.mule.work.WorkerContext.run(WorkerContext.java:310)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWor
ker(ThreadPoolExecutor.java:1061)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
.run(ThreadPoolExecutor.java:575)
        at java.lang.Thread.run(Thread.java:619)


mule-config:
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:spring="http://www.springframework.org/schema/beans"
        xmlns:cxf="http://www.mulesource.org/schema/mule/cxf/2.0"
        xmlns:stdio="http://www.mulesource.org/schema/mule/stdio/2.0"
        xsi:schemaLocation="
               http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
               http://www.mulesource.org/schema/mule/core/2.0
http://www.mulesource.org/schema/mule/core/2.0/mule.xsd
               http://www.mulesource.org/schema/mule/stdio/2.0
http://www.mulesource.org/schema/mule/stdio/2.0/mule-stdio.xsd
               http://www.mulesource.org/schema/mule/cxf/2.0
http://www.mulesource.org/schema/mule/cxf/2.0/mule-cxf.xsd">

        <model name="CxfComplexClient">
                <service name="cxfComplexExample">
                        <inbound>
                                <stdio:inbound-endpoint system="IN" />
                        </inbound>
                        <component
       
class="hr.srce.cp.sandbox.integration.mule.ws.CxfComplexHelloWorldCompon
ent" />
                        <outbound>
                                <outbound-pass-through-router>
                                        <cxf:outbound-endpoint
       
address="http://localhost:63081/name"
       
clientClass="hr.srce.cp.sandbox.integration.mule.ws.cxf.complex.KreirajP
unoFirstname_Service"
       
operation="kreirajPunoFirstname"
       
wsdlPort="CxfComplexHelloWorldImplPort"
       
wsdlLocation="http://localhost:63081/name?wsdl"
                                                synchronous="true">
                                        </cxf:outbound-endpoint>
                                </outbound-pass-through-router>
                        </outbound>
                </service>
        </model>

        <!-- Ovo glumi vanjski web servise koji ima 2 parametra -->
        <model name="CxfVanjski">
                <service name="helloService">
                        <inbound>
                                <cxf:inbound-endpoint
       
address="http://localhost:63081/name" />
                        </inbound>
                        <component
       
class="hr.srce.cp.sandbox.integration.mule.ws.CxfComplexHelloWorldImpl">
                        </component>
                </service>
        </model>

</mule>


CxfComplexHelloWorldComponent implementation with wrong number of
arguments:
   public Object[] obradiZahtjev( String text ) {
      Object[] rez = new String[1];
      rez[0] = "Richard";
      logger.info( "Received '" + text + "', returning '" + rez + "'" );
      return rez;
   }

CxfComplexHelloWorldComponent implementation with correct number of
arguments:
   public Object[] obradiZahtjev( String text ) {
      Object[] rez = new String[2];
      rez[0] = "Richard";
      rez[1] = "Dawkins";      
      logger.info( "Received '" + text + "', returning '" + rez + "'" );
      return rez;
   }


WS implementation:
@WebService( endpointInterface =
"hr.srce.cp.sandbox.integration.mule.ws.CxfComplexHelloWorld",
serviceName = "KreirajPunoFirstname" )
public class CxfComplexHelloWorldImpl implements CxfComplexHelloWorld {

   Logger logger = Logger.getLogger( CxfComplexHelloWorldImpl.class );

   @Override
   public String kreirajPunoFirstname( String firstname, String lastname
) {
      String result = firstname + " " + lastname;
      logger.info( "Received " + firstname + " " + lastname + ",
returning " + result );
      return result;
   }

}


Regards,
Denis

-----Original Message-----
From: Antoine Borg [mailto:antoine.borg@...]
Sent: Thursday, September 04, 2008 10:28 AM
To: user@...
Subject: RE: [mule-user] CXF outbound endpoint & MULE_ERROR-84

Hi,

The Mule wiki contains a troubleshooting section for CXF:
http://mule.mulesource.org/display/MULE2USER/CXF+Transport#CXFTransport-
Trou
bleshooting

It looks like the error message that you report is documented there.

Regards

A


Antoine Borg, Senior Consultant | Tel: +32 28 504 696
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM
email: antoine.borg@... | blog: blog.ricston.com | web:
ricston.com
...


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

    http://xircles.codehaus.org/manage_email


 « Return to Thread: CXF outbound endpoint & MULE_ERROR-84