XML Web Services - Villanova University

fishnibblersspongySoftware and s/w Development

Dec 14, 2013 (3 years and 6 months ago)

64 views

CSC8530 Distributed Systems


XML Web Services



David Vaglia

XML Web Service


Expose useful functionality to Web users through a
standard Web protocol.


Describe their interfaces in enough detail to allow user to
build a client application. Usually provided in a Web
Services Description Language (WSDL) document.


Registered so that users can find them. Universal
Discovery Description and Integration (UDDI)


Standard Data Format

SOAP


Simple Object Access Protocol


Specification that defines XML format for messages


Optional


Represent Program Data, do RPC


HTTP message


Many Implementations


Implemented on many hardware and software platforms


Security?


http://www.w3.org/TR/soap/

WSDL


XML


Web Services Description Language


Describes a set of SOAP messages and how they are
exchanged


Describes location of Service and Communication protocol


Specification is at http://www.w3.org/TR/wsdl

UDDI


Universal Discovery Description and Integration


UDDI directory entry is a XML files that describes a
business and services it offers


White pages, Yellow Pages, Green Pages


Type Model or tModel contains WSDL file that describes
a SOAP interface to a XML Web Service


Searchable


http://www.uddi.org.about.html

Calculator App



XML Request


<m:CalculateMortgage
xmlns:m="http://example.org/mortgage">

<amount>100000</amount>

<years>30</years>

<interest>8.0</interest>

<annualTax>1000</annualTax>


<annualInsurance>300</annualInsurance>
</m:CalculateMortgage>

XML Response


<m:CalculateMortgageResponse
xmlns:m="http://example.org/mortgage">

<MortgagePayments>

<MonthlyPI>733.76</MonthlyPI>

<MonthlyTax>83.33</MonthlyTax>
<MonthlyInsurance>25</MonthlyInsurance>

<MonthlyTotal>842.09</MonthlyTotal>

</MortgagePayments>
</m:CalculateMortgageResponse>


SOAP Message Format

<soap:Envelope


xmlns:soap="...">


<soap:Header>


<!
--

extensible headers
--
>


</soap:Header>


<soap:Body>


<!
--

payload
--
>


</soap:Body>

</soap:Envelope>

SOAP Request

POST /mortgagecalc/mc.asmx HTTP/1.1

Host: example.org

Content
-
Type: text/xml; charset=utf
-
8

Content
-
Length: 323

SOAPAction: "http://example.org/mortgage/CalculateMortgage"


<soap:Envelope


xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">


<soap:Header>


<x:Credentials xmlns:x="http://example.org/security">


<username>billy</username>


<password>yllib</password>


</x:Credentials>


</soap:Header>


<soap:Body>


<m:CalculateMortgage


xmlns:m="http://example.org/mortgage">


<amount>100000</amount>


<years>30</years>


<interest>8.0</interest>


<annualTax>1000</annualTax>


<annualInsurance>300</annualInsurance>


</m:CalculateMortgage>


</soap:Body>

</soap:Envelope>

Web Services Platform

Dist Application Missing Features


Security


Routing


Transactions


Reliable Messaging


Add
-
Ons Available


OPC XML DA

DCOM Replacement

OPC XML DA Subscription

OPC XML Performance Evaluation


Much slower on Internet than Intranet


Data must pass through Firewall and Web Server


Security again is a concern


Progression to web services is not straight forward


OPC Technology is now available on Internet