用Eclipse里的axis工具依次添加Service.PortType,Binding3个......其他省...
最终形成以下内容
写一个wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="RegisterTest"
targetNamespace="http://www.Register.org/RegisterTest/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://www.Register.org/RegisterTest/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" >
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.Register.org/RegisterTest/">
<xsd:element name="RegisterTest">
<xsd:annotation>
<xsd:documentation>
Device is a root element
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="tns:DeviceInfoResponse"></xsd:element>
<xsd:element ref="tns:DeviceInfo"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DeviceInfo">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="in1" type="xsd:string"></xsd:element>
<xsd:element name="in2" type="xsd:string"></xsd:element>
<xsd:element name="in3" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DeviceInfoResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="out" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="DeviceInfoRequest">
<wsdl:part name="parameters" element="tns:DeviceInfo"></wsdl:part>
</wsdl:message>
<wsdl:message name="DeviceInfoResponse">
<wsdl:part name="parameters" element="tns:DeviceInfoResponse"></wsdl:part>
</wsdl:message>
<wsdl:portType name="RegisterTest">
<wsdl:operation name="DeviceRegisterTest">
<wsdl:input message="tns:DeviceInfoRequest"></wsdl:input>
<wsdl:output message="tns:DeviceInfoResponse"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="RegisterTest" type="tns:RegisterTest">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="DeviceRegisterTest">
<soap:operation
soapAction="http://www.RegisterTest.org/RegisterTest/DeviceRegisterTest" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="RegisterTest">
<wsdl:port name="RegisterTest" binding="tns:RegisterTest">
<soap:address location="http://www.RegisterTest.org/RegisterTest"></soap:address>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
再按次格式自动生成对象..
如果谁有兴趣可以连续我,我有具体的详细录像...