title: "Attribute group must have ref name set" when generate an OTA CXF Web Service Client
body: <p>I am generating a web service client from published WSDL using Apache CXF runtimes</p>
  
  <p>This WSDL has been generated across XDS provided by Open Travel Org (OTA) I am sure that it's correct but I put here likewise.</p>
  
  <p>My problem is that I get this error message by CXF console when use the "Create Web Service" tool of Eclipse Kepler (using CXF runtimes 2.7.10 and java 7u71): Attribute group must have ref name set</p>
  
  <pre><code>    WSDLToJava Error: java.lang.RuntimeException: org.apache.ws.commons.schema.XmlSchemaSerializer$XmlSchemaSerializerException: Attribute group must have ref name set
  
      org.apache.cxf.tools.common.ToolException: java.lang.RuntimeException: 
      org.apache.ws.commons.schema.XmlSchemaSerializer$XmlSchemaSerializerException:
      Attribute group must have ref name set
          at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:420)
          at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
          at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
          at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
          at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
      Caused by: java.lang.RuntimeException: 
      org.apache.ws.commons.schema.XmlSchemaSerializer$XmlSchemaSerializerException: 
      Attribute group must have ref name set
          at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.addSchemas(JAXBDataBinding.java:642)
          at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:443)
          at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:714)
          at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:270)
          at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
          at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:412)
  ... 4 more
      Caused by: 
      org.apache.ws.commons.schema.XmlSchemaSerializer$XmlSchemaSerializerException: Attribute group must have ref name set
          at org.apache.ws.commons.schema.XmlSchemaSerializer.serializeAttributeGroupRef(XmlSchemaSerializer.java:562)
          at org.apache.ws.commons.schema.XmlSchemaSerializer.serializeAttributeGroup(XmlSchemaSerializer.java:523)
          at org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSchemaChild(XmlSchemaSerializer.java:2406)
          at org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSchemaElement(XmlSchemaSerializer.java:1659)
          at org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSchema(XmlSchemaSerializer.java:132)
          at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.addSchemas(JAXBDataBinding.java:640)
  ... 9 more
  </code></pre>
  
  <p>By the Tomcat Console appair a very long stachtraces with "Connection reset by peer: socket write error" errors</p>
  
  <p>Whe WSDL to deploy is the follow:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;wsdl:definitions 
              name="OTA_VehAvailRateService" 
              xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" 
              xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
              xmlns:xs="http://www.w3.org/2001/XMLSchema"      
  
              targetNamespace="http://www.opentravel.org/OTA/2003/05"
              xmlns:ota="http://www.opentravel.org/OTA/2003/05"&gt;
  
          &lt;wsdl:types&gt;
              &lt;xs:schema&gt;
                  &lt;xs:import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="OTA_VehAvailRateRQ.xsd" /&gt;
              &lt;/xs:schema&gt;
              &lt;xs:schema&gt;
                  &lt;xs:import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="OTA_VehAvailRateRS.xsd" /&gt;
              &lt;/xs:schema&gt;        
          &lt;/wsdl:types&gt;
  
        &lt;wsdl:message name="OTA_VehAvailRateRequest"&gt; 
          &lt;wsdl:part element="ota:OTA_VehAvailRateRQ" name="parameters"/&gt;
        &lt;/wsdl:message&gt;
        &lt;wsdl:message name="OTA_VehAvailRateResponse"&gt;
          &lt;wsdl:part element="ota:OTA_VehAvailRateRS" name="parameters"/&gt;
        &lt;/wsdl:message&gt;
  
        &lt;wsdl:portType name="OTA_VehAvailRatePortType"&gt;
          &lt;wsdl:operation name="OTA_VehAvailRateAction"&gt;
            &lt;wsdl:input message="ota:OTA_VehAvailRateRequest"/&gt;
            &lt;wsdl:output message="ota:OTA_VehAvailRateResponse"/&gt;
          &lt;/wsdl:operation&gt;
        &lt;/wsdl:portType&gt;  
  
        &lt;wsdl:binding name="OTA_VehAvailRateSOAPBinding" type="ota:OTA_VehAvailRatePortType"&gt;
          &lt;soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
  
          &lt;wsdl:operation name="OTA_VehAvailRateAction"&gt;
            &lt;soap12:operation soapAction="OTA_VehAvailRateSoapAction" style="document"/&gt;
  
            &lt;wsdl:input&gt;
              &lt;soap12:body use="literal"/&gt;
            &lt;/wsdl:input&gt;
  
            &lt;wsdl:output&gt;
              &lt;soap12:body use="literal"/&gt;
            &lt;/wsdl:output&gt;
  
          &lt;/wsdl:operation&gt;
        &lt;/wsdl:binding&gt; 
  
  
        &lt;wsdl:service name="OTA_VehAvailRateService"&gt;
          &lt;wsdl:port name="OTA_VehAvailRatePort" binding="ota:OTA_VehAvailRateSOAPBinding"&gt;
            &lt;soap12:address location="http://172.26.0.40:85/WebServiceAmadeus/services/OTA_VehAvailRatePort"/&gt;
          &lt;/wsdl:port&gt;
        &lt;/wsdl:service&gt;   
  
      &lt;/wsdl:definitions&gt;
  </code></pre>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I don't think that cause be the schema definition because:</p>
  
  <ul>
  <li>The schema is provided by OTA (International standard of Web Services for Traveling brokers)</li>
  <li>If I use a local address of the same workspace to deploy the web service client, then works well. I.e: </li>
  </ul>
  
  <p>Instead to use:</p>
  
  <pre><code>    http://172.26.0.40:85/WebServiceAmadeus/services/OTA_VehAvailRatePort?wsdl
  </code></pre>
  
  <p>I use:</p>
  
  <pre><code>    /WebServiceAmadeus/WebContent/wsdl/KarveOta.wsdl
  </code></pre>
  
  <p>Where WebServiceAmadeus is an project folder of the same workspace. </p>
  
  <p>Of course this is not the solution because only can work in locale host.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I have try with other CXF versions (2.4.2, 3.0.2, etc) with the same problem.
  I have try with SOAP version 1.1 with the same problem.
  From SOAP UI 5.0.0, I can deploy get the request, but response say Unmarshalling Error: ?</p>