WSDL2Java: Building stubs, skeletons, and data types from WSDL
Client-side bindings
You'll find the AXIS WSDL -> Java tool in "org.apache.axis.wsdl.WSDL2Java". The basic invocation form looks like this:% java org.apache.axis.wsdl.WSDL2Java (WSDL-file-URL)This will generate only those bindings necessary for the client.  AXIS follows the JAX-RPC specification when generating Java client bindings from WSDL.  For this discussion, assume we executed the following:% cd samples/addr
% java org.apache.axis.wsdl.WSDL2Java AddressBook.wsdlThe generated files will reside in the directory "AddressFetcher2".  They are put here because that is the target namespace from the WSDL and namespaces map to Java packages.  Namespaces will be discussed in detail later.WSDL clause Java class(es) generated 
For each entry in the type section A java class 
 A holder if this type is used as an inout/out parameter 
For each portType A java interface 
For each binding A stub class 
For each service A service interface 
 A service implementation (the locator) 

解决方案 »

  1.   

    The Java class generated from a WSDL type will be named from the WSDL type.  This class will typically, though not always, be a bean.  For example, given the WSDL (the WSDL used throughout the WSDL2Java discussion is from the Address Book sample):<xsd:complexType name="phone">
      <xsd:all>
        <xsd:element name="areaCode" type="xsd:int"/>
        <xsd:element name="exchange" type="xsd:string"/>
        <xsd:element name="number" type="xsd:string"/>
      </xsd:all>
    </xsd:complexType>WSDL2Java will generate: public class Phone implements java.io.Serializable {
        public Phone() {...}
        public int getAreaCode() {...}
        public void setAreaCode(int areaCode) {...}
        public java.lang.String getExchange() {...}
        public void setExchange(java.lang.String exchange) {...}
        public java.lang.String getNumber() {...}
        public void setNumber(java.lang.String number) {...}
        public boolean equals(Object obj) {...}
        public int hashCode() {...}
    }
      

  2.   

    first,thank vcvj,I have known it from the AXIS's User Guide,I still don't know if I have get the WSDL file,ant next what should I do?what's the distinguish?should i write the skeleton?