Understanding quality of service for Web services Improving
the performance of your Web services |
|
xmlns=”http://schemas.xmlsoap.org/wsdl/”
xmlns:soap=”http://schemas.xmlsoap.org/wsdl/soap/”
xmlns:tns=”http://www.echoserviceservice.com/EchoService”
xmlns:xsd=”http://www.w3.org/1999/XMLSchema”>
<message name=”InechoRequest”>
<part name=”meth1_inType1" type=”xsd:string”/>
</message>
<message name=”OutechoResponse”>
<part name=”meth1_outType” type=”xsd:string”/>
</message>
<portType name=”EchoService”>
<operation name=”echo”>
<input message=”InechoRequest”/>
<output message=”OutechoResponse”/>
</operation>
</portType>
<binding name=”EchoServiceBinding” type=”EchoService”>
<soap:binding style=”rpc” transport=”http://schemas.xmlsoap.org/soap/http”/>
<operation name=”echo”>
<soap:operation soapAction=”urn:echoservice-service”/>
<input>
<soap:body
encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”
namespace=”urn:echoservice-service”
use=”encoded”/>
</input>
<output>
<soap:body
encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”
namespace=”urn:echoservice-service” use=”encoded”/>
</output>
</operation>
</binding>
<service
name=”EchoService”>
<documentation>IBM WSTK 2.0 generated service definition file</documentation>
<port binding=”EchoServiceBinding” name=”EchoServicePort”>
<soap:address location=”http://localhost:8080/soap/servlet/rpcrouter”/>
</port>
</service>
</definitions>
Step 2: Modify the generated service proxy
Even though the machine-generated Service Proxy code is not to be edited, let us slightly bend this
rule by adding a few lines of code. These added lines instantiates a Timer object to measure the
time it takes to bind to the server and invoke a method. This is illustrated in the sample code given in listing2.
import java.net.*;
import java.util.*;
import org.apache.soap.*; |
|
June 2008 | Java Jazz Up | 45 |
|
|
|
Pages:
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
Download PDF |
|
|
|