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

RE: CXF outbound endpoint & MULE_ERROR-84

by antoine.borg :: Rate this Message:

Reply to Author | View in Thread

Hi,

I'm not sure if the client class matches the example you sent earlier - I
can't find a reference to
hr.srce.cp.sandbox.integration.mule.ws.cxf.complex.KreirajP
unoFirstname_Service unfortunately.

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

-----Original Message-----
From: Denis Kranjčec [mailto:denis.kranjcec@...]
Sent: Friday, September 05, 2008 1:32 PM
To: user@...
Subject: RE: [mule-user] CXF outbound endpoint & MULE_ERROR-84

Hi,

This is how I've generated client code:
D:\dev\java-lib\apache-cxf\apache-cxf-2.0.6\bin\wsdl2java -client -p
hr.srce.cp.sandbox.integration.mule.ws.issp.client
http://161.53.XXX.YYY/ISVURazmjena_Test/ISVURazmjena.asmx?WSDL

This is generated source:
package hr.srce.cp.sandbox.integration.mule.ws.issp.cxf.client;

import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;

/**
 * This class was generated by Apache CXF 2.1.1
 * Tue Sep 02 16:27:37 CEST 2008
 * Generated source version: 2.1.1
 *
 */
 
/*
 *
 */

@WebServiceClient(name = "ISVURazmjena",
                  wsdlLocation =
"http://161.53.XXX.YYY/ISVURazmjena_Test/ISVURazmjena.asmx?WSDL",
                  targetNamespace = "http://aaaa.bbbb.srce.hr/") public
class ISVURazmjena_Service extends Service {

    public final static URL WSDL_LOCATION;
    public final static QName SERVICE = new
QName("http://aaaa.bbbb.srce.hr/", "ISVURazmjena");
    public final static QName ISVURazmjena = new
QName("http://aaaa.bbbb.srce.hr/", "ISVURazmjena");
    public final static QName ISVURazmjena1 = new
QName("http://aaaa.bbbb.srce.hr/", "ISVURazmjena1");
    static {
        URL url = null;
        try {
            url = new
URL("http://161.53.XXX.YYY/ISVURazmjena_Test/ISVURazmjena.asmx?WSDL");
        } catch (MalformedURLException e) {
            System.err.println("Can not initialize the default wsdl from
http://161.53.XXX.YYY/ISVURazmjena_Test/ISVURazmjena.asmx?WSDL");
            // e.printStackTrace();
        }
        WSDL_LOCATION = url;
    }

    public ISVURazmjena_Service(URL wsdlLocation) {
        super(wsdlLocation, SERVICE);
    }

    public ISVURazmjena_Service(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

    public ISVURazmjena_Service() {
        super(WSDL_LOCATION, SERVICE);
    }

    /**
     *
     * @return
     *     returns ISVURazmjena
     */
    @WebEndpoint(name = "ISVURazmjena")
    public ISVURazmjena getISVURazmjena() {
        return super.getPort(ISVURazmjena, ISVURazmjena.class);
    }

    /**
     *
     * @param features
     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure
on the proxy.  Supported features not in the <code>features</code> parameter
will have their default values.
     * @return
     *     returns ISVURazmjena
     */
    @WebEndpoint(name = "ISVURazmjena")
    public ISVURazmjena getISVURazmjena(WebServiceFeature... features) {
        return super.getPort(ISVURazmjena, ISVURazmjena.class, features);
    }
    /**
     *
     * @return
     *     returns ISVURazmjena
     */
    @WebEndpoint(name = "ISVURazmjena1")
    public ISVURazmjena getISVURazmjena1() {
        return super.getPort(ISVURazmjena1, ISVURazmjena.class);
    }

    /**
     *
     * @param features
     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure
on the proxy.  Supported features not in the <code>features</code> parameter
will have their default values.
     * @return
     *     returns ISVURazmjena
     */
    @WebEndpoint(name = "ISVURazmjena1")
    public ISVURazmjena getISVURazmjena1(WebServiceFeature... features) {
        return super.getPort(ISVURazmjena1, ISVURazmjena.class, features);
    }

}


When I'm using CXF generated client (ISVURazmjena_ISVURazmjena1_Client),
WS call works fine.


Any ideas what's wrong with my config?


Regards,
Denis


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

Hi,

Doesn't look like anything's wrong at first glance.  What about your
clientClass:

clientClass="hr.srce.cp.sandbox.integration.mule.ws.cxf.complex.KreirajP
unoF
irstname_Service"

How do you generate it and what does it look like?

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

-----Original Message-----
From: Denis Kranjčec [mailto:denis.kranjcec@...]
Sent: Thursday, September 04, 2008 11:00 AM
To: user@...
Subject: RE: [mule-user] CXF outbound endpoint & MULE_ERROR-84

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
unoF
irstname_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



---------------------------------------------------------------------
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



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

    http://xircles.codehaus.org/manage_email


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