[edit] Testing the Web Service
After deploying the Web service into a web container, we can see the web service wdsl. For example, if the web service url is "http://212.166.192.140/Xmpp/Xmpp?wsdl" we can get something like this:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://xmpp.vodafone.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://xmpp.vodafone.org/" name="XmppService">
<types>
<xsd:schema>
<xsd:import namespace="http://xmpp.vodafone.org/" schemaLocation="http://212.166.192.140:80/Xmpp/Xmpp?xsd=1"/>
</xsd:schema>
</types>
<message name="sendRequest">
<part name="parameters" element="tns:sendRequest"/>
</message>
<message name="sendRequestResponse">
<part name="parameters" element="tns:sendRequestResponse"/>
</message>
<portType name="Xmpp">
<operation name="sendRequest">
<input message="tns:sendRequest"/>
<output message="tns:sendRequestResponse"/>
</operation>
</portType>
<binding name="XmppPortBinding" type="tns:Xmpp">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="sendRequest">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="XmppService">
<port name="XmppPort" binding="tns:XmppPortBinding">
<soap:address location="http://212.166.192.140:80/Xmpp/Xmpp"/>
</port>
</service>
</definitions>
where http://212.166.192.140:80/Xmpp/Xmpp?xsd=1 is something like that:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:tns="http://xmpp.vodafone.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://xmpp.vodafone.org/">
<xs:element name="sendRequest" type="tns:sendRequest"/>
<xs:element name="sendRequestResponse" type="tns:sendRequestResponse"/>
<xs:complexType name="sendRequest">
<xs:sequence>
<xs:element name="to" type="xs:string" minOccurs="0"/>
<xs:element name="request" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="sendRequestResponse">
<xs:sequence>
<xs:element name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Kewl you sohuld come up with that. Excellent!
|