| <?xml version="1.0" encoding="UTF-8"?> |
| <wsdl:definitions |
| xmlns="http://schemas.xmlsoap.org/wsdl/" |
| xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" |
| xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" |
| xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" |
| xmlns:tns="http://ode/bpel/test/blog" |
| xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
| xmlns:odex="http://www.apache.org/ode/type/extension/http" |
| targetNamespace="http://ode/bpel/test/blog"> |
| |
| |
| <!-- ## USE CASE ## --> |
| <!-- |
| Describe a REST service to access a blog article. |
| The article is a resource available at http://ex.org/blog/article/42 (for instance) |
| |
| For demonstration purpose, some requests/responses will have a custom header: TimestampHeader. |
| This header will be mapped to a part of the message. |
| |
| Also for demonstration, the User-agent header will be set in some requests. |
| --> |
| <wsdl:types> |
| <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ode/bpel/test/blog"> |
| <xsd:element name="article" type="tns:ArticleType"/> |
| <xsd:element name="comment" type="tns:CommentType"/> |
| <xsd:element name="fault" type="tns:FaultType"/> |
| <xsd:element name="from" type="xsd:string"/> |
| <xsd:complexType name="ArticleType"> |
| <xsd:sequence> |
| <xsd:element name="id" type="xsd:string"/> |
| <xsd:element name="title" type="xsd:string"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| <xsd:complexType name="CommentType"> |
| <xsd:sequence> |
| <xsd:element name="author" type="xsd:string"/> |
| <xsd:element name="content" type="xsd:string"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| <xsd:complexType name="FaultType"> |
| <xsd:sequence> |
| <xsd:element name="timestamp" type="xsd:string"/> |
| <xsd:element name="details" type="xsd:string"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| </xsd:schema> |
| </wsdl:types> |
| |
| <wsdl:message name="IdMessage"> |
| <wsdl:part name="timestamp" type="xsd:string"/> |
| <wsdl:part name="from" element="tns:from"/> |
| <wsdl:part name="articleId" type="xsd:string"/> |
| </wsdl:message> |
| <wsdl:message name="ArticleMessage"> |
| <wsdl:part name="timestamp" type="xsd:string"/> |
| <wsdl:part name="article" element="tns:article"/> |
| </wsdl:message> |
| <wsdl:message name="PUTRequest"> |
| <wsdl:part name="articleId" type="xsd:string"/> |
| <wsdl:part name="article" element="tns:article"/> |
| </wsdl:message> |
| <wsdl:message name="CommentRequest"> |
| <wsdl:part name="articleId" type="xsd:string"/> |
| <wsdl:part name="comment" element="tns:comment"/> |
| </wsdl:message> |
| <wsdl:message name="UpdateFault"> |
| <wsdl:part name="faultDetails" element="tns:fault"/> |
| </wsdl:message> |
| <wsdl:message name="NoPartMessage"/> |
| |
| |
| <wsdl:portType name="BlogPortType"> |
| <wsdl:operation name="doGET"> |
| <wsdl:input message="tns:IdMessage"/> |
| <wsdl:output message="tns:ArticleMessage"/> |
| </wsdl:operation> |
| <wsdl:operation name="doDELETE"> |
| <wsdl:input message="tns:IdMessage"/> |
| <wsdl:output message="tns:NoPartMessage"/> |
| </wsdl:operation> |
| <wsdl:operation name="doPUT"> |
| <wsdl:input message="tns:PUTRequest"/> |
| <wsdl:output message="tns:NoPartMessage"/> |
| <wsdl:fault name="UpdateException" message="tns:UpdateFault"/> |
| </wsdl:operation> |
| <wsdl:operation name="doPOST"> |
| <wsdl:input message="tns:CommentRequest"/> |
| <wsdl:output message="tns:NoPartMessage"/> |
| </wsdl:operation> |
| </wsdl:portType> |
| |
| <wsdl:binding name="binding" type="tns:BlogPortType"> |
| <wsdl:operation name="doGET"> |
| <http:operation location=""/> |
| <odex:binding verb="GET"/> |
| <wsdl:input> |
| <http:urlReplacement/> |
| <!-- a part mapped to a non-standard header --> |
| <odex:header name="TimestampHeader" part="timestamp"/> |
| <odex:header name="From" part="from"/> |
| </wsdl:input> |
| <wsdl:output> |
| <mime:content type="text/xml" part="article"/> |
| <!-- a part mapped to a non-standard header --> |
| <odex:header name="TimestampHeader" part="timestamp"/> |
| </wsdl:output> |
| </wsdl:operation> |
| <wsdl:operation name="doDELETE"> |
| <http:operation location=""/> |
| <odex:binding verb="DELETE"/> |
| <wsdl:input> |
| <http:urlReplacement/> |
| <odex:header name="TimestampHeader" part="timestamp"/> |
| <!-- a static value mapped to a standard header --> |
| <odex:header name="User-Agent" value="MyKillerApp"/> |
| </wsdl:input> |
| <wsdl:output/> |
| </wsdl:operation> |
| <wsdl:operation name="doPUT"> |
| <http:operation location=""/> |
| <odex:binding verb="PUT"/> |
| <wsdl:input> |
| <http:urlReplacement/> |
| <mime:content type="text/xml" part="article"/> |
| </wsdl:input> |
| <wsdl:output/> |
| <!-- fault binding --> |
| <wsdl:fault name="UpdateException"> |
| <!-- name attribute is optional --> |
| <!--<odex:fault name="UpdateException"/>--> |
| <odex:fault/> |
| </wsdl:fault> |
| </wsdl:operation> |
| <wsdl:operation name="doPOST"> |
| <http:operation location=""/> |
| <odex:binding verb="POST"/> |
| <wsdl:input> |
| <http:urlReplacement/> |
| <mime:content type="text/xml" part="comment"/> |
| </wsdl:input> |
| <wsdl:output/> |
| </wsdl:operation> |
| </wsdl:binding> |
| |
| <wsdl:service name="BlogService"> |
| <wsdl:port name="BlogPort" binding="tns:binding"> |
| <http:address location="http://localhost:7070/HttpBindingTest/BlogService/article/{articleId}"/> |
| </wsdl:port> |
| </wsdl:service> |
| </wsdl:definitions> |