70 likes | 206 Views
WS-RP: HTTP as Transfer. David Orchard dorchard@bea.com. Proposal. Add optional binding to fully use HTTP use HTTP as a designed: state transfer protocol Requires Support WSDL 2.0 web method construct bind Get*/Query to GET, delete to DELETE… Support HTTP binding message headers
E N D
WS-RP: HTTP as Transfer David Orchard dorchard@bea.com
Proposal • Add optional binding to fully use HTTP • use HTTP as a designed: state transfer protocol • Requires • Support WSDL 2.0 web method construct • bind Get*/Query to GET, delete to DELETE… • Support HTTP binding message headers • EPR Address only or binding ref props to URI • WSA Header blocks • Support binding queries (prop qnames) to URI
WSDL 2.0 WebMethod • Recently accepted by WSDL 2.0 • Interface operation can specify web method • Binding operation can specify web method • TBD how these 2 relate <interface name="StockQuotes"> <operation name="getStockQuote" webMethod="GET"> <input element="schema1"/> <output element="schema2"/> </operation> … <binding name="myns:HTTPOneURI"> <http:binding> <operation name="myns:getStockQuote"> <http:operation method="GET" /> </operation>
2 Bindings to HTTP • POST /diskdrive HTTP/1.1 Host: www.example.com/Content-type: text/xml; charset="utf-8" Content-Length: xxxx <?xml version="1.0" encoding="utf-8" ?><s11:envelope> <s11:header> <!-- headers, such as WSA elided for clarity --> <ex:resourceid>5</ex:resourceID> </s11:header><s11:body> <wsrp:GetResourceProperty xmlns:tns="http://example.com/diskdrivens"> <wsrp:ResourceProperty>tns:NumberOfBlocks</wsrp:ResourceProperty> </wsrp:GetResourceProperty></s11:body> • GET /diskdrive/resourceid/5/http://example.com/diskdrivens/NumberOfBlocks HTTP/1.1 Host: www.example.com
URI construction • Webish view: • Embed the resource ID in the URI • Each resource’s property has a “secondary resource” identifier • Then interact with properties by dereferencing URI including secondary resource id • Can’t use fragment ids - doesn’t go to server in http • Some options for identifying properties: • bind Qname to URI • http://foo.com/resource/5/blockns/blocksize • Use query params for multiple requests • http://foo.com/resource/5?ns=…&p1=blocksize&p2=manufacturer • Could simply add frag-id to URI after semi-colon • http://foo.com/resource/5;blocksize • problem of name collisions
Extensions in WSDL docs • Resource identification: • Support EPRs without ref properties • Indication of binding of Ref properties to URI • Needed if EPR has ref properties • Property identification: • Indication of binding of Qname(s) or query to URI • Part of HTTP binding • <http:binding wsrp:UseWSRPFaveQNameURI=“true”> • WSDL 2.0 does have improved URI construction that also might be usable/extendable • Binding between HTTP and message headers • deriving “getResourceProperty” from GET • Binding Queries to URI • Simple for XPath :-), might be harder for custom algorithm