Professional Documents
Culture Documents
Objectives
Slide 2
Webservices
JAVA WEBSERVICE
Slide 3
Prerequisites
eclipse
Jboss 4.2.3
Slide 5
Slide 6
Slide 7
Slide 8
Slide 9
Slide 10
Slide 11
Slide 12
Slide 13
SOAPUI Demo
Slide 15
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cal="http://Calculate">
<soapenv:Header/>
<soapenv:Body>
<cal:Add>
<cal:a>10</cal:a>
<cal:b>20</cal:b>
</cal:Add>
</soapenv:Body>
</soapenv:Envelope>
Slide 16
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:AddResponse xmlns:ns="http://Calculate">
<ns:return>30</ns:return>
</ns:AddResponse>
</soapenv:Body>
</soapenv:Envelope>
Slide 17
SOAP fault
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>For input string: "1o"</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Slide 18
HTTP Request
POST http://localhost:8080/Caculation/services/FirstService.FirstServiceHttpSoap11
Endpoint/ HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "urn:Add"
User-Agent: Jakarta Commons-HttpClient/3.1
Host: localhost:8080
Content-Length: 322
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cal="http://Calculate">
<soapenv:Header/>
<soapenv:Body>
<cal:Add>
<cal:a>10</cal:a>
<cal:b>20</cal:b>
</cal:Add>
</soapenv:Body>
</soapenv:Envelope>
Slide 19
HTTP Response
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA
date=200807181417)/JBossWeb-2.0
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 21 Apr 2011 06:09:34 GMT
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:AddResponse xmlns:ns="http://Calculate">
<ns:return>30</ns:return>
</ns:AddResponse>
</soapenv:Body>
</soapenv:Envelope>
Slide 20
SOAP Action
POST http://localhost:8080/Caculation/services/FirstService.FirstServiceHttpSoap11
Endpoint/ HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "urn:Add"
User-Agent: Jakarta Commons-HttpClient/3.1
Host: localhost:8080
Content-Length: 322
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cal="http://Calculate">
<soapenv:Header/>
<soapenv:Body>
<cal:Add>
<cal:a>10</cal:a>
<cal:b>20</cal:b>
</cal:Add>
</soapenv:Body>
</soapenv:Envelope>
Slide 21
Slide 22
Summary
Slide 24