title: WSDL Client Generation not complete?
body: <p>Just tried to generate java client generation from a WSDL file ( using XFire using XMLBeans binding )</p>
  
  <p>I am able to generate the client + Fault Message ( no error ) , however input message and output message was not generated, it's also not generating the operation in the client. Is there anything wrong with my WSDL file, or is there anything I miss ? </p>
  
  <p>Update : </p>
  
  <ol>
  <li><p>I updated my test XFire project <a href="https://www.dropbox.com/sh/chiq6oi5uk91i66/X-OQtVnL91">here</a>.</p></li>
  <li><p>I begin to suspect that the problem can be isoldated to the WSDL (because I can generate other WSDL successfully). I found these warnings, which I feel related : </p>
  
  <blockquote>
    <p>WS-I: (BP2402) The wsdl:binding element does not use a
    soapbind:binding element as defined in section "3 SOAP Binding." of
    the WSDL 1.1 specification.</p>
    
    <p>WS-I: (BP2032) Defective soapbind:fault element: the "name" attribute value does not match the value of the "name" attribute on
    the parent element wsdl:fault.</p>
    
    <p>WS-I: (AP2901) A description uses neither the WSDL MIME Binding as described in WSDL 1.1 Section 5 nor WSDL SOAP binding as described in
    WSDL 1.1 Section 3 on each of the wsdl:input or wsdl:output elements
    of a wsdl:binding.</p>
  </blockquote></li>
  <li><p>Just found that soap12 might caused the issue. If I changed the xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/" to xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" and removing soapActionRequired in soap:operation it can generated the client successfully. But the webservice is currently only in soap1.2 only. So changing the wsdl to use soap1.1 is not the case here. </p></li>
  </ol>
  
  <p>Here is my WSDL file : </p>
  
  <pre><code>&lt;!--Created by TIBCO WSDL--&gt;
  &lt;wsdl:definitions xmlns:tns="http://schemas.ocbc.com/soa/WSDL/service/CBS-CustAccountInfo-I" xmlns:soap1="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:jndi="http://www.tibco.com/namespaces/ws/2004/soap/apis/jndi" xmlns:ns="http://schemas.ocbc.com/soa/emf/common/envelope/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:jms="http://www.tibco.com/namespaces/ws/2004/soap/binding/JMS" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="Untitled" targetNamespace="http://schemas.ocbc.com/soa/WSDL/service/CBS-CustAccountInfo-I"&gt;
  
  &lt;wsdl:types&gt;
      &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.ocbc.com/soa/emf/common/envelope/" elementFormDefault="qualified" attributeFormDefault="unqualified"&gt;
          &lt;xs:include schemaLocation="../Schemas/XML/CBS-CustAccountInfo-I-ServiceEnvelope.xsd"/&gt;
      &lt;/xs:schema&gt;
  &lt;/wsdl:types&gt;
  &lt;wsdl:service name="CBS-CustAccountInfo-I"&gt;
      &lt;wsdl:port name="CBS-CustAccountInfo-I_HTTP" binding="tns:CBS-CustAccountInfo-I_HTTPBinding"&gt;
          &lt;soap:address location="https://localhost:15038/Services/CBS-CustAccountInfo-I/Processes/MainRequestResponse_HTTP"/&gt;
      &lt;/wsdl:port&gt;
  &lt;/wsdl:service&gt;
  &lt;wsdl:portType name="PortType"&gt;
      &lt;wsdl:operation name="CBS-CustAccountInfo-I"&gt;
          &lt;wsdl:input message="tns:InputMessage"/&gt;
          &lt;wsdl:output message="tns:OutputMessage"/&gt;
          &lt;wsdl:fault name="fault1" message="tns:FaultMessage"/&gt;
      &lt;/wsdl:operation&gt;
  &lt;/wsdl:portType&gt;
  &lt;wsdl:binding name="CBS-CustAccountInfo-I_HTTPBinding" type="tns:PortType"&gt;
      &lt;soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
      &lt;wsdl:operation name="CBS-CustAccountInfo-I"&gt;
          &lt;soap:operation style="document" soapAction="/Services/CBS-CustAccountInfo-I/Processes/MainRequestResponse_HTTP" soapActionRequired="true"/&gt;
          &lt;wsdl:input&gt;
              &lt;soap:body use="literal" parts="InputMessage"/&gt;
          &lt;/wsdl:input&gt;
          &lt;wsdl:output&gt;
              &lt;soap:body use="literal" parts="OutputMessage"/&gt;
          &lt;/wsdl:output&gt;
          &lt;wsdl:fault name="fault1"&gt;
              &lt;soap:fault use="literal" name="fault1"/&gt;
          &lt;/wsdl:fault&gt;
      &lt;/wsdl:operation&gt;
  &lt;/wsdl:binding&gt;
  &lt;wsdl:message name="InputMessage"&gt;
      &lt;wsdl:part name="InputMessage" element="ns:ServiceEnvelope"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="OutputMessage"&gt;
      &lt;wsdl:part name="OutputMessage" element="ns:ServiceEnvelope"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="FaultMessage"&gt;
      &lt;wsdl:part name="FaultMessage" element="ns:ServiceEnvelope"/&gt;
  &lt;/wsdl:message&gt;
  &lt;/wsdl:definitions&gt;
  </code></pre>
  
  <p>And here is my ant task to generate :</p>
  
  <pre><code>&lt;!-- Generating XML Beans --&gt;   
  &lt;target name="gen-xmlbeans"&gt;
  &lt;java classname="org.apache.xmlbeans.impl.tool.SchemaCompiler"
            classpathref="build.classpath"
            fork="true"&gt;
        &lt;arg value="-out"/&gt;
        &lt;arg value="${basedir}/lib/ocbc.jar"/&gt;
        &lt;arg value="${schema.path}"/&gt;
  &lt;/java&gt;
  &lt;/target&gt;
  
  &lt;!-- Generating Client --&gt;
  &lt;target name="ws-generate"&gt;
          &lt;taskdef name="wsgen" classname="org.codehaus.xfire.gen.WsGenTask"&gt;
              &lt;classpath&gt;
                  &lt;fileset dir="${lib.dir}" includes="*.jar" /&gt;
              &lt;/classpath&gt;    
          &lt;/taskdef&gt;    
          &lt;wsgen outputDirectory="${basedir}/src/" wsdl="${wsdl.path}" package="test.client" overwrite="true" binding="xmlbeans"/&gt;                
  &lt;/target&gt;
  </code></pre>
  
  <p>Generated Client :</p>
  
  <pre><code>public class CBS_CustAccountInfo_IClient {
  
  private static XFireProxyFactory proxyFactory = new XFireProxyFactory();
  private HashMap endpoints = new HashMap();
  
  public CBS_CustAccountInfo_IClient() {
  }
  
  public Object getEndpoint(Endpoint endpoint) {
      try {
          return proxyFactory.create((endpoint).getBinding(), (endpoint).getUrl());
      } catch (MalformedURLException e) {
          throw new XFireRuntimeException("Invalid URL", e);
      }
  }
  
  public Object getEndpoint(QName name) {
      Endpoint endpoint = ((Endpoint) endpoints.get((name)));
      if ((endpoint) == null) {
          throw new IllegalStateException("No such endpoint!");
      }
      return getEndpoint((endpoint));
  }
  
  public Collection getEndpoints() {
      return endpoints.values();
  }
  
  }
  </code></pre>