SoA Web s 教育部-BM专业综合改革项目 SOAP Fault Example: Result <env:eNvelopexmins:env=http://ww.w3.org/2001/06/soap-envelope xminsf=http://www.w3.org/2001106/soap-fauits> <eny: Header <f: Misunderstood gname=abc: Extension xmins:abc=http:llexample.org/2001/06ext> <f: Misunderstood qname=def: Extension2 xmins:defahttp:/lexample.com/stuffs </env: Header ≤env:Body> <eny: Fault> <faultcode> MustUnderstand</faultcode> <faultstring One or more mandatory headers not understood </faultstring> </env: Fault> </env: Body? <lenv: Envelope> Lan Zhou University
SOA & Web Service Lan Zhou University 教育部-IBM专业综合改革项目 SOAP Fault Example: Result <env:Envelope xmlns:env='http://www.w3.org/2001/06/soap-envelope' xmlns:f='http://www.w3.org/2001/06/soap-faults' > <env:Header> <f:Misunderstood qname='abc:Extension1' xmlns:abc='http://example.org/2001/06/ext'/> <f:Misunderstood qname='def:Extension2' xmlns:def='http://example.com/stuff'/> </env:Header> <env:Body> <env:Fault> <faultcode>MustUnderstand</faultcode> <faultstring> One or more mandatory headers not understood </faultstring> </env:Fault> </env:Body> </env:Envelope>
Ce SOA& Web s 教育部-BM专业综合改革项目 Header Block or Body Block? Decisions made at the time of application design Header blocks may be targeted at various nodes that might be encountered along a message's path from a sender to the ultimate recipient Intermediate SoAP nodes may provide value-added services based on data in such headers Lan Zhou University
SOA & Web Service Lan Zhou University 教育部-IBM专业综合改革项目 Header Block or Body Block? ▪ Decisions made at the time of application design ▪ Header blocks may be targeted at various nodes that might be encountered along a message's path from a sender to the ultimate recipient – Intermediate SOAP nodes may provide value-added services based on data in such headers
Ce SOA& Web s 教育部-BM专业综合改革项目 SOAP Message Example: Travel Reservation SOAP Envelope SOAP Header Header Block. reservation Header Block. passenger SOAP Body Body sub-element itiner ary Body sub-element lodging Lan Zhou University
SOA & Web Service Lan Zhou University 教育部-IBM专业综合改革项目 SOAP Message Example: Travel Reservation
SOA& Web Service 教育部-BM专业综合改革项目 Example1: SOAP Message Travel Reservation(1/3) <?xml version1.0?> <env:Envelopexmins:env=http://www.w3.org/2003/05/soap-envelope> <eny: Header <m:reservationxmins:m="http://travelcompany.exampleorg/reservation env:role=http://www.w3.org/2003/05/soap-envelope/role/next eny: mustUnderstand=true"> <m: reference>uuid: 093a2da1-q345-739r-ba5d-pqff98fe8j7d</m: reference> <m: dateAnd Time>2001-11-29T13: 20: 00.000-05: 00</m dateAndTime> </m: reservation> <n:passengerxmins:n="http:/iMycompany.examplecom/employees env:role="http:/www.w3.org/2003/05/soap-envelope/role/next env mustUnderstand= true> <n: name> Ake Jogvan Oyvind</n: name> </n: passenger </env: Header Lan Zhou University
SOA & Web Service Lan Zhou University 教育部-IBM专业综合改革项目 Example1: SOAP Message Travel Reservation (1/3) <?xml version='1.0' ?> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> <env:Header> <m:reservation xmlns:m="http://travelcompany.example.org/reservation" env:role="http://www.w3.org/2003/05/soap-envelope/role/next" env:mustUnderstand="true"> <m:reference>uuid:093a2da1-q345-739r-ba5d-pqff98fe8j7d</m:reference> <m:dateAndTime>2001-11-29T13:20:00.000-05:00</m:dateAndTime> </m:reservation> <n:passenger xmlns:n="http://mycompany.example.com/employees" env:role="http://www.w3.org/2003/05/soap-envelope/role/next" env:mustUnderstand="true"> <n:name>Åke Jógvan Øyvind</n:name> </n:passenger> </env:Header>
Ce SOA& Web s 教育部-BM专业综合改革项目 Example1: SOAP Message Travel Reservation (2/3) ≤env:Body> ≤p: itinerary xmins:p=http://travelcompany.exampleorg/reservation/travel"> <p: departure> p: departing New York</p: departing> <p: arriving Los Angeles</p: arriving p: departure Date>2010-12-14</p: departureDate> <p: departure Time> late afternoon</p: departureTime> <p: seatPreference>aisle</p: seatPreference> <lp: departure> Lan Zhou University
SOA & Web Service Lan Zhou University 教育部-IBM专业综合改革项目 Example1: SOAP Message Travel Reservation (2/3) <env:Body> <p:itinerary xmlns:p="http://travelcompany.example.org/reservation/travel"> <p:departure> <p:departing>New York</p:departing> <p:arriving>Los Angeles</p:arriving> <p:departureDate>2010-12-14</p:departureDate> <p:departureTime>late afternoon</p:departureTime> <p:seatPreference>aisle</p:seatPreference> </p:departure>