Guest User

RestAsWS.wsdl

a guest
Jul 12th, 2011
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.26 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Licensed to the Apache Software Foundation (ASF) under one
  4. ~ or more contributor license agreements.  See the NOTICE file
  5. ~ distributed with this work for additional information
  6. ~ regarding copyright ownership.  The ASF licenses this file
  7. ~ to you under the Apache License, Version 2.0 (the
  8. ~ "License"); you may not use this file except in compliance
  9. ~ with the License.  You may obtain a copy of the License at
  10. ~
  11. ~    http://www.apache.org/licenses/LICENSE-2.0
  12. ~
  13. ~ Unless required by applicable law or agreed to in writing,
  14. ~ software distributed under the License is distributed on an
  15. ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  16. ~ KIND, either express or implied.  See the License for the
  17. ~ specific language governing permissions and limitations
  18. ~ under the License.
  19. -->
  20. <wsdl:definitions
  21.     xmlns="http://schemas.xmlsoap.org/wsdl/"
  22.     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  23.     xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
  24.     xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
  25.     xmlns:tns="http://ode/bpel/test/blog"
  26.     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  27.     xmlns:odex="http://www.apache.org/ode/type/extension/http"
  28.     targetNamespace="http://ode/bpel/test/blog">
  29.  
  30.  
  31.     <!-- ## USE CASE ## -->
  32.     <!--
  33.     Describe a REST service to access a blog article.
  34.     The article is a resource available at http://ex.org/blog/article/42 (for instance)
  35.  
  36.     For demonstration purpose, some requests/responses will have a custom header: TimestampHeader.
  37.     This header will be mapped to a part of the message.
  38.  
  39.     Also for demonstration, the User-agent header will be set in some requests.
  40.     -->
  41.     <wsdl:types>
  42.         <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ode/bpel/test/blog">
  43.             <xsd:element name="CUSTOMER" type="tns:CustomerType"/>
  44.             <xsd:complexType name="CustomerType">
  45.                 <xsd:sequence>
  46.                     <xsd:element name="ID" type="xsd:string"/>
  47.                     <xsd:element name="FIRSTNAME" type="xsd:string"/>
  48.                     <xsd:element name="LASTNAME" type="xsd:string"/>
  49.                     <xsd:element name="STREET" type="xsd:string"/>
  50.                     <xsd:element name="CITY" type="xsd:string"/>
  51.                 </xsd:sequence>
  52.             </xsd:complexType>
  53.         </xsd:schema>
  54.     </wsdl:types>
  55.  
  56.     <wsdl:message name="IdMessage">
  57.         <wsdl:part name="customerId" type="xsd:string"/>
  58.     </wsdl:message>
  59.     <wsdl:message name="ArticleMessage">
  60.         <wsdl:part name="CUSTOMER" element="tns:CUSTOMER"/>
  61.     </wsdl:message>
  62.     <wsdl:message name="NoPartMessage"/>
  63.  
  64.     <wsdl:portType name="BlogPortType">
  65.         <wsdl:operation name="doGET">
  66.             <wsdl:input message="tns:IdMessage"/>
  67.             <wsdl:output message="tns:ArticleMessage"/>
  68.         </wsdl:operation>
  69.     </wsdl:portType>
  70.  
  71.     <wsdl:binding name="binding" type="tns:BlogPortType">
  72.         <http:binding verb="GET" />
  73.         <wsdl:operation name="doGET">
  74.             <http:operation location="/sqlrest/CUSTOMER/{customerId}" />
  75.             <odex:binding verb="GET" />
  76.             <wsdl:input>
  77.                 <http:urlReplacement />
  78.             </wsdl:input>
  79.             <wsdl:output>
  80.                 <mime:content type="text/xml" part="article" />
  81.             </wsdl:output>
  82.         </wsdl:operation>
  83.     </wsdl:binding>
  84.  
  85.     <wsdl:service name="BlogService">
  86.         <wsdl:port name="BlogPort" binding="tns:binding">
  87.             <http:address location="http://www.thomas-bayer.com"/>
  88.         </wsdl:port>
  89.     </wsdl:service>
  90. </wsdl:definitions>
Advertisement
Add Comment
Please, Sign In to add comment