Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2668

JaxWsProxyFactoryBean and JaxWsServerFactoryBean communication broken

    XMLWordPrintableJSON

Details

    Description

      When using JaxWsProxyFactoryBean and JaxWsServerFactoryBean with AegisDataBinding some interfaces is broken and all methods call result in NULL.

      When contract interface contains method with return type "List<String>" then client assume wrong namespace and all method call is broken.

      When I change "List<String>" to "List<MyVOWithOneString>" all working fine.

      Server code:

              JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
              serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); //WSImpl.class
              serverFactoryBean.setServiceBean(implementor);             //WSImpl.class
              serverFactoryBean.setDataBinding(new AegisDatabinding());
              serverFactoryBean.setAddress(url);
              serverFactoryBean.setBus(cxfServlet.getBus());
              serverFactoryBean.create();
      

      Client code:

                  JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
                  factory.setServiceClass(resultInterfaceClass);                 //WS.class
                  factory.setAddress(asURL);
                  factory.setDataBinding(new AegisDatabinding());
                  Object remoteInterfaceImpl = factory.create();
      

      Interface:

      @WebService(name="datove_zdroje", targetNamespace="http://ns1")
      public interface WS {
                 List<String> getCodes(@WebParam(name = "baseCode") String baseCode);
      }
      

      Implementation:

      @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS")
      public class WSImpl implements WS {
      
          @Override
          public List<String> getCodes(final String baseCode) {
              return new ArrayList<String>();
          }
      }
      

      This is a general error in CXF client that assume wrong namespaces.

      Attachments

        1. cxf-jaxws-aegis-testcase.zip
          3 kB
          Jara Cesnek

        Issue Links

          Activity

            People

              dkulp Daniel Kulp
              cesnek Jara Cesnek
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: