New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here


by: Casimer Shanahan


Casimer Shanahan
GPA 3.75


Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Class Notes
25 ?




Popular in Course

Popular in ComputerScienence

This 38 page Class Notes was uploaded by Casimer Shanahan on Tuesday October 20, 2015. The Class Notes belongs to CS696 at San Diego State University taught by Staff in Fall. Since its upload, it has received 15 views. For similar materials see /class/225307/cs696-san-diego-state-university in ComputerScienence at San Diego State University.




Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/20/15
CS 696 Introduction to Grid Computing Lecture 10 Mary Thomas San Diego State Tuesday 20Feb07 Announcements Today a Namespaces a WSDL httpwwww3orgTR2006CRwsdIZOprimer 20060327 a WSDL2py using python to access a WebService using the WSDL httppvwebsvcssourceforqenetquidehtml Feb720707 More on Namespaces XML amp SOAP Examples adapted from Essential XML Quick Reference A Skonnard amp M Gudgin ISBN 0201740958 XML N amespaces syntax open Namespaces appear in element startopen tag associates elements Have scope set of elements declared and children can override with new declaration in children Can declare multiple namespaces Feb2007 from Skonnard amp Gudgin Namespaces quali ed vs unquali ed No namespace mapping These are mapped to the namespace urnzexample orgPeope qualified With default unqualified Feb2007 from Skonnard amp Gudgin Namespace including attributes Feb2007 from Skonnard amp Gudgin XSLT Extensible Stylesheet Language XSL Translations Used to translate one XML doc to another XML doc or to HTML Three programming models exemplarbased procedural declarative Feb2007 from Skonnard amp Gudgin I XSLT Exemplar based Model Exemplarbased is simplest model Allows you to take and XML doc and insert it with XSLT instructions Feb2007 from Skonnard amp Gudgin XSLT Procedural Model Procedural model allows you to define functions and call them from within the XML template document ltxstransform xmlnsv1 urnemployeev1 xmlnsv2 urnempoyeev2 xmlnsxs httpwwww3org1999XSLTransform xslversion 10 gt ltxstemplate name outputName gt ltnamegtltxsvaueof select concatv1empfname v1emplnamequotgtltnamegt ltxstempategt ltxstemplate name outputTitlequotgt lttitegtltxs1vaueof select v1empposition gtlttitlegt ltXstempategt ltxstemplate match gt ltv2empoyeegt ltxscaIItemplate name outputName gt ltxscaIItemplate name outputTite gt ltv2empoyeegt ltxstempategt ltxstransformgt Root template Main entry point Feb2007 from Skonnard amp Gudgin I XSLT Declarative Model NEED TO MODIFY THIS SEE PAGE 88 ltxstransform xmlnsv1 urnemployeev1 xmlnsv2 urnemployeev2 xmlnsxsl httpwwww3org1999XSLTransform xslversion 10 gt ltxstemplate name outputName gt ltnamegtltxsvaue of select concatv1empfname v1emplnamequotgtltnamegt ltxstempategt ltxstemplate name outputTitlequotgt lttitegtltxs1vaue of select v1empposition gtlttitlegt ltXstempategt ltxstemplate match gt ltv2empoyeegt ltxscaIItemplate name outputName gt ltxscaIItemplate name outputTite gt ltv2empoyeegt ltxstempategt ltxstransformgt Feb2007 from Skonnard amp Gudgin Skeleton SOAP Message ltxml versionquotl0quotgt ltsoapEnvelope xmlnssoaphttpwwww3org200llZsoap envelope soapencodingstylequothttpwwww3orgZOOllZsoap encoding gt ltsoapHeadergt ltsoapHeadergt ltsoapBodygt ltsoapFaultgt ltsoapFaultgt ltsoapBodygt ltsoapEnvelopegt SOAPENVinvelope SOAPENV39QIW rrgSlyte SOAPENV leader r HeaderEntry 31 a SOAPltE N V enoodmgSIyle l l SOAP51W actor If SOAPEN Vrnus Undesfand l i l I JJ SOAPENVBody TESJyEFGJ quotquotquotquotquotquotquotquotquotquotquotquotquot quot quot3111 LSL OA P ENVencodingSlyie J I W J l I SOAPENV1Fault L52 Equotquot 39 39I P I T RE za tii BetallEmry 311 I SOAPENVJQIwodmgSryre J 1 4439 LE r I SOAPENV auncode r 4 l Feb720707 Source all XML examples taken from W30 schools website httpwwww3schoolscom SOAP Envelope Root element of a SOAP message Defines the XML document as a SOAP message I The xmlnszsoap Namespace El message must have Envelope element associated with W3C namespace httpwwww3org200112 soapenvelope ltsoasznvelope xmlnssoapquothttpWWWW3or g200112soap envelopequot soapencodingStylequothttpW www3org200112soap encodingquotgt ltsoaszeadergt Feb720707 SOAP Header Elements in SOAP Header define how a recipient should process the SOAP message Header elements must have attributes u 3 attributes in namespace quothttpwwww3org200112 soapenvelopequot actor used to address Header element to endpoint mustUndersz and true receiver processing Header must recognize element encodingSz ye ltxml versionquot10quotgt ltsoapEnvelope xmlnssoapquothttpwwww3or g200112soapenvelopequot soapencodingSty1equothttpw www3org200112soap encodingquotgt ltsoapHeadergt ltmTrans xmlnsmquothttpwwww3school scomtransactionquot soapactorquothttpwwww3sch oolscomappm1quotgt 234 ltmTransgt ltsoapHeadergt Feb720707 Client Request without namespace Outgoing SOAP msg from CLIENT to SERVtk POST HTTP10 Host ocahost9905 Useragent SOAPpy 0120 httppywebsvcssfnet Contenttype textxml charsetquotUTF8quot Contentlength 540 SOAPAction quotaddDblquot ltXm versionquot10quot encodingquotUTF 8quotgt ltSOAPENVEnvelope SOAPENVencodingStylequothttpschemasxmIsoaporgsoapencodingf39 xmlnsSOAPENCquothttpschemasxmlsoaporgsoapencodinglquot xmlnsxsiquothttpwwww3org1999XM LSChemainstance xmlnsSOAPENVquothttpschemasxmlsoaporgsoapenvelopelquot xmlnsxsdquothttpwwww3org1999XMLSchemaquot gt ltSOAPENVBodygt ltaddDbl SOAPENCrootquot1quotgt ltv1 xsitypequotxsddoublequotgt125123456789ltlv1gt ltv2 xsitypequotxsddoublequotgt42798765432099998ltlv2gt ltaddDblgt ltSOAPENV Bodygt ltSOAPENVEnvelopegt Feb720707 Server Response Without namespace Incoming to from kkkkk HTTP1 200 OK Server lta hrefquothttppywebsvcssfnetquotgtSOAPpy 0120ltagt Python 235 Date Tue 20 Feb 2007 232317 GMT Contenttype textxml charsetquotUTF8quot Contentlength 519 ltXmversionquot10quot encodingquotUTF8quotgt ltSOAPENVEnvelope SOAPENVencodingSterquothttpschemasxmsoaporgsoapencodinglquot xmlnsSOAPENCquothttpschemasxmlsoap0rgsoapencodingquot xmlnszxsiquothttpwwww3org1999XMLSchemainstancequot xmlnsSOAPENVquothttpschemasxmsoap0rgsoapenvelopequot xmlnszxsdquothttpwwww3org1999XMLSchemaquot gt ltSOAPENVBodygt ltaddDbResponse SOAPENCrootquot1quotgt ltResultxsitypequotxsddoublequotgt55311111111000002ltResutgt ltaddDbResponsegt ltSOAPENVBodygt ltSOAPENVEnveopegt In kiidk Adding 125123457 427987654 553111111 Feb720707 15 SOAPpy Server Declaring namespaces Namespace is bound to the function aw f z Em5 39 a 3mm mg mm Feb720707 SOAPpy Client Declaring namespaces force it at the sewer level sener SOAPProxyquothttpsenicesxmethodscom9090soapquot namespace 39urnXmethodsdelayedquotes39 httpproxyproxy print quotBMgtgtquot senergetQuotesymbol 39IBM39 Do it inline ala SOAPLITE also specify the actual ns sener SOAPProxyquothttpsenicesxmethodscom9090soapquot httpproxyproxy print quotBMgtgtquot senerns39ns l39 39urnxmethods delayedquotes39getQuotesymbol 39IBM39 Create a namespaced version of your sewer dq senerns39urnxmethods delayedquotes39 print quotBMgtgtquot dqgetQuotesymbol39IBM39 print quotORCLgtgtquot dqgetQuotesymbol39ORCL39 print quotNTCgtgtquot dqgetQuotesymbol39INTC39 namespace quothttpacelsdsueduwsmathquot Default use standard http sener SOAPProxyquothttplocalhost9905quot namespace Febizoim source SOAPpy testsquoteTestpy Client Request with namespace Feb720707 Outgoing HTTP headers POST HTTP10 Host ocahost9905 Useragent SOAPpy 0120 httppywebsvcssfnet Contenttype textxml charsetquotUTF8quot Contentlength 589 SOAPAction quotaddDblquot Outgoing SOAP ltXm versionquot10quot encodingquotUTF8quotgt ltSOAPENVEnvelope SOAPENVencodingSterquothttpschemasxmsoaporgsoapencodinglquot xmlnsSOAPENCquothttpschemasxmlsoaporgsoapencodinglquot xmlnsxsiquothttpwwww3org1999XMLSchemainstancequot xmlnsSOAPENVquothttpschemasxmlsoaporgsoapenvelopelquot xmlnsxsdquothttpwwww3org1999XMLSchemaquot gt ltSOAPENVBodygt ltns1addDb xmlnsn51quothttpacesdsueduwslmathquot SOAPENCrootquot1quotgt ltv1 xsitypequotxsddoublequotgt125123456789ltlv1gt ltv2 xsitypequotxsddoublequotgt42798765432099998ltlv2gt ltns1addDblgt ltSOAPENVBodygt ltSOAPENVEnvelopegt Server Response with namespaces Feb720707 Incoming HTTP headers from SERVER HTTP1 200 OK Sener lta hrefquothttppywebsvcssfnetquotgtSOAPpy O120ltagt Python 235 Date Tue 20 Feb 2007 233229 GMT Contenttype textxml charsetquotUTF8quot Contentlength 519 Incoming SOAP ltXm versionquot10quot encodingquotUTF8quotgt ltSOAPENVEnvelope SOAPENVencodingStyequothttpschemasxmlsoaporgsoapencodinglquot xmlnsSOAPENCquothttpschemasxmIsoaporgsoapencodingf39 xmlnsxsiquothttpwwww3org1999XMLSchemainstancequot xmlnsSOAPENVquothttpschemasxmIsoaporgsoapenvelopelquot xmlnsxsdquothttpwwww3org1999XMLSchemaquot gt ltSOAPENVBodygt ltaddDblResponse SOAPENCrootquot1quotgt ltResult xsitypequotxsddoublequotgt55311111111000002ltResultgt ltaddDbResponsegt ltSOAPENVBodygt ltSOAPENVEnvelopegt Adding 125123457 427987654 553111111 Server Response bad namespace from Client Feb720707 HTTP1 500 Internal error Server lta hrefquothttppywebsvcssfnetquotgtSOAPpy 0120ltagt Python 235 Date Wed 21 Feb 2007 001207 GMT Contenttype texthml charsetquotUTF8quot Contentlength 709 ltxml versionquot l 0quot encodingquotUTF8quotgt ltSOAPENVEnvelope SOAPENV39 quot mip39ll rhema xml nap I xmlnsSOAPENCquothttpschemasxmlsoaporgso pencodingl xmlnsxsiquothttpwwwvs6org1999XMLSchemainstance xmlnsSOAPENVquothttpschemasxmlsoaporgsoapenvelopel xmlnsxsdquothttpwwwm6org1999XMLSchema gt ltSOAPENVBodygt ltSOAPENVFauIt SOAPENCrootquot1quotgt ltfaultcodegtSOAPENVClientltfaultcodegt ltfaultstringgtMethod Not Foundltfaultstringgt ltdetail xsitypequotxsdstringquotgthttpjunksoapinteroporgquit exceptionsKeyError u39httpjunksoapinteroporg39 amplttraceback object at 0x10272d8ampgtltdetailgt ltSOAPENVFauItgt ltSOAPENVBodygt ltSOAPENVEnvelopegt ltFault SOAPENVClient Method Not Found httpjunksoapinteroporgquit exceptionsKeyError u39httpjunksoapinteroporg39 lttraceback object at 0x10272d8gtgt Traceback most recent call last File quotcardClientpyquot line 41 in servquit0 File quotswlibpython23sitepackagesSOAPpyClientpyquot line 470 in call return selfrcallargs kw File quotswlibpython23sitepackagesSOAPpyClientpyquot line 492 in rcall selfhd self File quotswlibpython23sitepackagesSOAPpyClientpyquot line 406 in call raise p SOAPpyTypesfaultType ltFault SOAPENVClient Method Not Found httpjunksoapinteroporgquit exceptionsKeyError u39httpjunksoapinteroporg39 lttraceback object at 0x10272d8gtgt gidget05696soappycard mthomas SOAP Faults SOAP fault sent instead of normal response if something goes wrong ltBody xmlnshttpwwww3org200112soap envelopegt ltFaultgt ltfaultcodegtClientltfaultcodegt ltfaultstringgtSomething went wrongltfaultstringgt ltdetailgtApplication specific error informationltdetailgt ltFaultgt ltBodygt 1 Fault Code Client Message incorrectly formed by client Server Problem on server so message could not proceed VersionMismatch Invalid namespace for SOAP envelope MustUnderstand Header element not understood Feb720707 WSDL Web Service Protocols I Web Services based on XML Protocols u Messaging SOAP XMLRPC Senice Registry Publish a Service Description UDDI I WSDL Describe a SerVIce Discovery WSDL I UDDI Senice Bind Provider u Many Others SOAP BPEL WSRF WS Addressing SOAP WSDL and UDDI are defacto standards Feb720707 23 WSDL Web Service Definition Language WSDL WSDL documents describe a What the service can do a Where the service resides and a How to invoke the service Generally available as web pages a eg httpbouscatcscfacuksomeServiceWSDL a Location of WSDL relative to Web Service not specified Like CORBA Interface Definition Language lDL but more flexible Feb720707 24 I WSDL Documents 1 Port Types Feb720707 Types a What data types will be transmitted Messages a What messages will be transmitted Port Types a What operations functions will be supponed Bindings a How will the messages be transmitted on the wire a What message protocol eg SOAP specific details are there Service a Where is the service located I WSDL Documents 2 Service has multiple ports a A port is an endpoint to which m essages are sent Pin eg httpcscfacukaxisservice httphostaxis P quot Each port is bound to eiZinggwgp Binding 1 A message protocol eg SOAP u Aport type Port types specify 1 Operation name Types defined using XML Schemas Port Type Feb720707 26 Web Services Description Language WSDL You now know how to make an XML doc I You now know how messages are exchanged with XML between a client and a server a Client Request select a method submit data a Server Response return XML data WSDL is an XML document that describes a Web service a It specifies the location of the service and the operations or methods the service exposes Feb720707 27 I WSDL Structure ELEMENT DEFINITION ltportTypegt The operations performed by the web service ltmessagegt The messages used by the web service lttypesgt The data types used by the web service ltbindinggt The communication protocols used by the web service Febgt20707 28 WDSL ltportTypegt Most important WSDL element a Most used Defines a the web service a the operations that can be performed a the messages methods used Similar to a function library or a module or a class in a traditional programming language Feb720707 29 WSDL ltmessagcgt The ltmessagegt element defines the data elements of an operation Each messages can consist of one or more parts 1 Like ltparamgt in XMLRPC 1 Similar to the arguments or parameters of a function call in a traditional programming language Feb720707 30 WSDL lttypesgt and ltbindinggt WSDL Types 1 lttypesgt element defines the data type used by the web service a WSDL uses XML Schema syntax to define data types I More portable WSDL Bindings a ltbindinggt element defines the message format and protocol details for each port Feb720707 31 WSDL ltportTypegt operation types The requestresponse type is the most common operation type but WSDL defines four types TYPE DEFINTION OneWay The operation can receive a message but will not return a response Requestresponse The operation can receive a request and will return a response Solicitresponse The operation can send a request and will wait for a response Notification The operation can send a message but will not wait for a response Feb720707 WSDL one way operation ltmessage namequotnewTermValuesquotgt ltpart namequottermquot typequotxsstring gt ltpart namequotvaluequot typequotxsstring gt ltmessagegt ltportType namequotgossaryTermsquotgt ltoperation namequotsetTermquotgt ltinput namequotnewTermquot messagequotnewTermVauesquotgt ltoperationgt ltportType gt Feb720707 33 WSDL Binding SOAP The binding element has two attributes name and type a Name you can use any name you want defines name of binding a Type attribute points to port for the binding The soapbinding element has two attributes style and transport a Style can be quotrpcquot or quotdocumentquot a Transport defines the SOAP protocol to use eg HTTP The operation element defines each operation that the port exposes a For each op the corresponding SOAP action has to be defined a Must specify how the input and output are encoded Feb720707 34 SOAPpy WSDL Proxy SOAPProxy wrapper o parses method names namespaces soap actions from the web service description language WSDL file passed into the constructor The WSDL reference can be passed in as o a stream a url a file name or a string Loads info into selfmethods a a dictionary with methodname keys and values of WSDLTooIsSOAPCainfo Feb720707 35 WSDL Client Babel sh WSDL Feb720707 Check for a web proxy definition in environment try proxyurosenviron39httpproxy39 phost pport research39httpquot0939 proxyurgroup12 proxy quotssquot phost pport except proxy None sener WSDLProxy39httpwwwxmethodsnetsd2001BabeFishServicewsd39 httpproxyproxy print ensenermethods print servermethodskeys english quotHi Friendquot print quotBabelfish Translationsquot printquot quot print quotEnglish 39squot39 english print quotFrench 39squot39 senerBabeIFish39enfr39english print quotSpanish 39squot39 senerBabeFish39enes39english print quotItalian 39squot39 senerBabeIFish39enit39english print quotGerman 39squot39 senerBabeIFish39ende39english source SOAPpy babelfishWSDLTestpy script Babel sh WSDL http wwwxmethodsnet sdZOOl BabelFishServicewsdl ltxm ver5i0nquot10quotgt ltdefiniti0n5 nam BabelFishServicequot xmn5tn5quothttpwwwxmeth0d5net5dBabelFi5hServicew5dquot equothttpwwwxmeth0d5net5dBabelFishServicew5dquot xmn5x5dquotht pwwww30rg2001XMLSchemaquot ema5xm50ap0rgw5d50apquot xmln5quothttp5chema5xm50ap0rgw5d quotgt xmn550aphttp5ch 39BabelFishRequestquotgt 5age namei39 ltp a rt name ran5ati0nm0dequot typequotx5d5tringquotgt ltp a rt namequot50urcedataquot typequotx5d5tringquotgt ltm e 55agegt ltm e 55age namequotBabeFi5hRe5p0n5equotgt ltp a rt namequotreturnquot typequotx5d5tringquotgt ltm e 55agegt ltp 0 rtType namequotBabeFi5hP0rtTypequotgt lt0 p e r ati0n namequotBabeFi5hquotgt lti p ut me55agequottn5BabelFishRequestquot gt lt0 utput me55agequottn5BabelFishRe5p0n5equot gt lt0 p e r ati0ngt ltp 0 r tType gt ltb i n ding namequotBabeFi5hBindingquot typequottn5BabelFishPortTypequotgt lt5 0 a p binding stylequotr cquot tran5p0rtquothttp5chema5xm50ap0rg50aphttpquotgt lt0 p e r ati0n name39BabeFi5hquotgt lt5 0 a p 0perati0n 50apActi0nquoturnxmethodsBabelFi5hBabeFi5hquotgt body u5equotenc0dedquot name5pacequoturnxmethodsBabelFishquot enc0dingSterquothttp5chema5xml50ap0rg50apenc0dingquotgt gt lti n p gt lt5 0 a p lti n p ut lt0 utputgt lt5 0 a p b0dyu5equotenc0dedquotname5pacequoturnxmethodsBabelFishquotenc0dingSterquothttp5chema5xml50ap0rg50apenc0dingquotgt ltb i n din g gt lt5 e rv ice namequotBabeFi5hServicequotgt ltd 0 c umentati0ngtTran5ate5 text of up to 5k in length between a variety of languagesltd0cumentati0ngt lt13 0 rtnamequotBabeFi5hP0rtquot bindingquottn5BabeFi5hBindingquotgt lt5 0 a p address 0cati0nquothttp5ervice5xmeth0d5net80per50apitecgquotgt ltp 0 r t gt lt5ervicegt ltdefiniti0n5gt Feb720707 Babel sh Client Output HTTP1 200 OK Date Wed 21 Feb 2007 021519 GMT Server Apache1326 Unix EnhydraDirector3 PHP406 DAV103 AuthNuSphere100 SOAPServer SOAPLitePerI052 ContentLength 546 Connection close ContentType textxml charsetutf 8 XPad avoid browser bug ltXmversionquot10quot encodingquotUTF8quotgt ltSOAPENVEnvelope xmlnsSOAPENCquothttpschemasxmsoaporgsoapencodingquot SOAPENVencodingStylequothttpschemasxmsoaporgsoapencodingquot xmlnsSOAPENVquothttpschemasxmsoaporgsoapenvelopequot xmnsXsihttQwwww3org1999XMLSchemainstance xmlnsxsdhttQwwww3org1999XMLSchema gt ltSOAPENVBodygt ltnamesp1BabelFishResponse xmlnsnamesp1quoturnXmethodsBabelFishquotgt ltreturn xsitypequotxsdstringquotgtSalutations Classe ltreturngt ltnamesp1BabelFishResponsegt ltSOAPENVBodygtltSOAPENVEnvelopegt French 39Salutations Classe 39 Babelfish Translations English 39Greetings Classl39 French 39Salutations Classe l 39 Spanish 39Saludos Clasel 39 Italian 39Saluti Codice categorial 39 Feb720707


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Allison Fischer University of Alabama

"I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over $600 per month. I LOVE StudySoup!"

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.