title: WebService property Apache CXF
body: <p>I'm using Apache CXF to work with webservices. I have a WSDL and I generated classes with wsdl2java. In the WSDL I have the following defintion </p>
  
  <pre><code>&lt;xs:complexType name="consultarTramitesPorOrganismoResponse"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element form="qualified" minOccurs="0" name="return" type="tns:consultarTramitesPorOrganismoWSResponseSalida"/&gt;
  &lt;/xs:sequence&gt;
  </code></pre>
  
  <p></p>
  
  <p>Java Class was generated right.</p>
  
  <p>I have the following client:</p>
  
  <pre><code>public class Cliente2 {
  
  private static final QName SERVICE_NAME = 
     new QName("http://ws.funcionario.map.es/", 
     "reaCXFWS");
  
  public Cliente2() {
      super();
  }
  
  public static void main(String[] args) {
      Cliente2 cliente2 = new Cliente2();
  
      System.out.println("principio de cliente");
  
  
      URL wsdlURL=null;
      try {
          wsdlURL = new URL("file:/D:/carlota/forja38315/reaCXFWS.wsdl");
      } catch (MalformedURLException e) {
      }
  
      System.out.println("cliente paso 1");
      ReaCXFWS ss = new ReaCXFWS(wsdlURL, SERVICE_NAME);
      System.out.println("cliente paso 11");
       WSREACXFService port = ss.getWSREACXFServiceImplPort();
      System.out.println("Cliente paso 2 antes de llamada");
  
      ConsultarCategoriasPorOrganismoWSResponseSalida resp1 = port.consultarCategoriasPorOrganismo("2");
  
    //  ConsultarCategoriasPorOrganismoWSResponseSalida resp = port.consultarCategoriasPorOrganismo("2");
      System.out.println("Server responded with: " + resp1);
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>When I executed the client I got the following error message:</p>
  
  <pre><code> Exception in thread "main" javax.xml.ws.WebServiceException: class      es.map.funcionario.ws.ConsultarCategoriasPorOrganismoResponse do not have a property of the name return
  at com.sun.xml.internal.ws.client.sei.ResponseBuilder$DocLit.&lt;init&gt;(ResponseBuilder.java:500)
  at com.sun.xml.internal.ws.client.sei.SEIMethodHandler.buildResponseBuilder(SEIMethodHandler.java:160)
  at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.&lt;init&gt;(SyncMethodHandler.java:74)
  at com.sun.xml.internal.ws.client.sei.SEIStub.&lt;init&gt;(SEIStub.java:71)
  at com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:628)
  at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:331)
  at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313)
  at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295)
  at javax.xml.ws.Service.getPort(Service.java:92)
  at es.map.funcionario.ws.ReaCXFWS.getWSREACXFServiceImplPort(ReaCXFWS.java:61)
  at clientes.Cliente2.main(Cliente2.java:40)
   Caused by: javax.xml.bind.JAXBException: return is not a valid property on class es.map.funcionario.ws.ConsultarCategoriasPorOrganismoResponse
  at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getElementPropertyAccessor(JAXBContextImpl.java:931)
  at com.sun.xml.internal.ws.client.sei.ResponseBuilder$DocLit.&lt;init&gt;(ResponseBuilder.java:489)
  ... 10 more
    Process exited with exit code 1.
  </code></pre>
  
  <p>Could somebody help me to fix this error?</p>
  
  <p>Thanks in advance</p>
  
  <p>Carlota Vina</p>