I should warn you that is is quite likely that a CXF Aegis client will
be UNABLE to talk to an XFire server. Aegis is/was not tightly
specified. If you want to talk to an XFire server with a CXF client, I
recommend that you use wsdl2java to generate a JAX-WS+JAXB client.

On Wed, Nov 11, 2009 at 11:53 AM, Alpin, Luba <luba.al...@lsi.com> wrote:
>
> Attached are:
>
> 1. The http://localhost:8080/demo/services/Demo?wsdl file (created by XFire).
>
> 2. The 'src.rar' - my service implementation.
>
> 3. 'WEB-INF.rar' - my service configuration. I load service with Tomcat or 
> Jetty.
>
> And this is my XFire Client test method that works good.
>
> public void XFireClientTest() {
>        AnnotationServiceFactory asFactory = new AnnotationServiceFactory();
>        XFire xfire = XFireFactory.newInstance().getXFire();
>        XFireProxyFactory proxyFactory = new XFireProxyFactory(xfire);
>        HashMap<String, Object> map = new HashMap<String, Object>();
>        map.put(AegisBindingProvider.READ_XSI_TYPE_KEY, Boolean.TRUE);
>        ArrayList<String> l = new ArrayList<String>();
>        l.add(demowar.dto.VolumePropertiesDTO.class.getName());
>        map.put(AegisBindingProvider.OVERRIDE_TYPES_KEY, l);
>        try {
>            demowar.server.IDemo demo = (demowar.server.IDemo) 
> proxyFactory.create(asFactory.create(demowar.server.IDemo.class, map),
>                    "http://135.24.169.23:8080/demo/services/Demo";);
>            demowar.dto.VolumePropertiesDTO v = demo.getVolume("v-1");
>            System.out.println(v.getName());
>            demowar.dto.VolumePropertiesDTO v1 = demo.getVolume("v-1", 123);
>            System.out.println(v1.getName() + "," + v1.getSize());
>        } catch (MalformedURLException ex) {
>            ex.printStackTrace();
>        }
>    }
>
>
>
> Sorry, I don't familiar with JIRA.
>
> Thanks,
> Luba A.
>
>
>
>
> -----Original Message-----
> From: Benson Margulies [mailto:bimargul...@gmail.com]
> Sent: Wednesday, November 11, 2009 15:34 PM
> To: users@cxf.apache.org
> Subject: Re: How to configure CXF client consume wsdl with overloaded methods?
>
> Post a JIRA and attach the wsdl and we'll try to help.
>
>
> On Wed, Nov 11, 2009 at 7:02 AM, Alpin, Luba <luba.al...@lsi.com> wrote:
>
> > I need a help to configure my CXF client to use XFire SOAP service with
> > overloaded methods.
> >
> >
> >
> > IVolume interface has two method 'getVolumes' with different signature
> >
> >
> >
> > Wsdl has one 'getVolumes' and second 'getVolumes1'
> >
> >
> >
> > This is the dump of error:
> >
> >
> >
> > INFO: Creating Service {http://xfire.codehaus.org/IVolume}IVolume from
> > WSDL: http://localhost:8080/public/services/IVolume?wsdl
> >
> > Nov 11, 2009 1:46:48 PM
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> > initializeWSDLOperations
> >
> > WARNING: Could not find a matching method for operation {
> > http://xfire.codehaus.org/IVolume}getVolumes1. Operation will be
> > unavailable.
> >
> > java.lang.NullPointerException
> >
> >      at
> > org.apache.cxf.aegis.databinding.AegisDatabinding.getParameterType(AegisDatabinding.java:581)
> >
> >      at
> > org.apache.cxf.aegis.databinding.AegisDatabinding.initializeMessage(AegisDatabinding.java:342)
> >
> >      at
> > org.apache.cxf.aegis.databinding.AegisDatabinding.initializeOperation(AegisDatabinding.java:303)
> >
> >      at
> > org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(AegisDatabinding.java:267)
> >
> >      at
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:363)
> >
> >      at
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:459)
> >
> >      at
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:212)
> >
> >      at
> > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:163)
> >
> >      at
> > org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
> >
> >      at
> > org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
> >
> >      at
> > org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
> >
> >      at
> > org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115)
> >
> >      at
> > com.lsi.xfireConnector.CXFUtil.typedServiceProxyCreator(CXFUtil.java:67)
> >
> >
> >
> > This is my client:
> >
> >
> >
> >      JaxWsProxyFactoryBean client = new JaxWsProxyFactoryBean();
> >
> >      client.setServiceClass(clazz);
> >
> >      client.setAddress(url);
> >
> >      client.setWsdlURL(url + "?wsdl");
> >
> >      AegisDatabinding db = new AegisDatabinding();
> >
> >      AegisContext context = new AegisContext();
> >
> >      context.setWriteXsiTypes(false);
> >
> >      context.setReadXsiTypes(true);
> >
> >      db.setAegisContext(context);
> >
> >      client.setDataBinding(db);
> >
> >      IVolume object = (IVolume) client.create();
> >
> >
> >
> > Thanks,
> >
> > Luba A.
> >

Reply via email to