By Ethan Cerami
Price: $29.95 USD
£20.95 GBP
Cover | Table of Contents | Colophon
<?xml version="1.0" encoding="ISO-8859-1"?>
<methodCall>
<methodName>weather.getWeather</methodName>
<params>
<param><value>10016</value></param>
</params>
</methodCall>
methodCall element that specifies the
method name and any method parameters.
<?xml version="1.0" encoding="ISO-8859-1"?>
<methodResponse>
<params>
<param>
<value><int>65</int></value>
</param>
</params>
</methodResponse>
message elements specify the individual XML
messages that are transferred between computers. In this case, we
have a getWeatherRequest and a
getWeatherResponse. Second, the
service element specifies that the service is
available via SOAP at http://localhost:8080/soap/servlet/rpcrouter.
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="WeatherService"
targetNamespace="http://www.ecerami.com/wsdl/WeatherService.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.ecerami.com/wsdl/WeatherService.wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<message name="getWeatherRequest">
<part name="zipcode" type="xsd:string"/>
</message>
<message name="getWeatherResponse">
<part name="temperature" type="xsd:int"/>
</message>
<portType name="Weather_PortType">
<operation name="getWeather">
<input message="tns:getWeatherRequest"/>
<output message="tns:getWeatherResponse"/>
</operation>
</portType>
<binding name="Weather_Binding" type="tns:Weather_PortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getWeather">
<soap:operation soapAction=""/>
<input>
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:examples:weatherservice"
use="encoded"/>
</input>
<output>
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:examples:weatherservice"
use="encoded"/>
</output>
</operation>
</binding>
<service name="Weather_Service">
<documentation>WSDL File for Weather Service</documentation>
<port binding="tns:Weather_Binding" name="Weather_Port">
<soap:address
location="http://localhost:8080/soap/servlet/rpcrouter"/>
</port>
</service>
</definitions>http://internet.conveyor.com/RESTwiki/moin.cgi.
http://www.w3.org/Encryption/.
http://www.w3.org/2002/ws/.
http://www.xmlrpc.com/spec, and a list of
implementations (55 at this writing, in a wide variety of languages)
is available at http://www.xmlrpc.com/directory/1568/http://www.xmlrpc.com/spec, and a list of
implementations (55 at this writing, in a wide variety of languages)
is available at http://www.xmlrpc.com/directory/1568/.
string whose value is "Hello
World!", you'd write:
<string>Hello World!</string>
http://xml.apache.org/xmlrpc/. The Apache
package includes a few key pieces that make integrating XML-RPC with
Java easier:
getTemp, requires a zip code string and returns a
single float value.
Envelope element, an optional
Header element, and a mandatory
Body element. (See Figure 3-2.)
Each of these elements has an associated set of rules, and
understanding the rules will help you debug your own SOAP
applications.
Envelope element. In
contrast to other specifications, such as HTTP and XML, SOAP does not
define a traditional versioning model based on major and minor
release numbers (e.g., HTTP 1.0 versus HTTP 1.1). Rather, SOAP uses
XML namespaces to differentiate versions. The version must be
referenced within the Envelope element. For
example:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
Envelope is in any
other namespace, it is considered a versioning error.
Header
element offers a flexible framework for specifying additional
application-level requirements. For example, the
Header element can be used to specify a digital
signature for password-protected services; likewise, it can be used
to specify an account number for pay-per-use SOAP services. Many
current SOAP services do not utilize the text/xml.
SOAPAction header. The
SOAPAction header is a server-specific URI used to
indicate the intent of the request. This makes it possible to quickly
determine the nature of the SOAP request, without actually examining
the SOAP message payload. In practice, the header is frequently used
by firewalls as a mechanism for blocking out SOAP requests or for
quickly dispatching SOAP messages to specific SOAP
servers.
SOAPAction header, but the actual value of the
SOAPAction header is dependent on the SOAP server
implementation. For example, to access the AltaVista BabelFish
Translation service, hosted by XMethods, you must specify the
urn:xmethodsBabelFish#BabelFish as the
SOAPAction header. Even if the server does not
require a full SOAPAction header, the client must
specify an empty string (""), or a null value. For
example:
SOAPAction: "" SOAPAction:
POST /perl/soaplite.cgi HTTP/1.0
Host: services.xmethods.com
Content-Type: text/xml; charset=utf-8
Content-Length: 538
SOAPAction: "urn:xmethodsBabelFish#BabelFish"
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:BabelFish
xmlns:ns1="urn:xmethodsBabelFish"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<translationmode xsi:type="xsd:string">en_fr</translationmode>
<sourcedata xsi:type="xsd:string">Hello, world!</sourcedata>
</ns1:BabelFish>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>http://xml.apache.org/soap/)http://msdn.microsoft.com/soap/default.asp)http://www.soaplite.com/)http://www.themindelectric.com)http://www.soapware.org/directory/4/implementations.
ServiceManagerClient tool
TcpTunnelGui tool
rpcrouter, is really
just a Java servlet that has been configured to receive SOAP
requests.
rpcrouter, is really
just a Java servlet that has been configured to receive SOAP
requests.
http://jakarta.apache.org/tomcat/
http://xml.apache.org/soap/
http://xml.apache.org/xerces-j/index.html
http://java.sun.com/products/javamail/
http://java.sun.com/products/javabeans/glasgow/jaf.html