{"id":1435,"date":"2010-02-23T17:03:36","date_gmt":"2010-02-23T22:03:36","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=1435"},"modified":"2010-02-23T22:24:38","modified_gmt":"2010-02-24T03:24:38","slug":"wsdl-11","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=1435","title":{"rendered":"WSDL 1.1"},"content":{"rendered":"<span id=\"WSDL_Overview\"><h2>WSDL Overview<\/h2><\/span>\n<p>Defines an XML grammar for describing network services as collections of communication endpoints capable of exchanging messages.<\/p>\n<span id=\"Structures\"><h2>Structures<\/h2><\/span>\n<span id=\"Types\"><h3>Types<\/h3><\/span>\n<p>* A container for data type definitions using some type system (such as XSD).<\/p>\n<pre lang=\"xml\">\r\n<wsdl:types>\r\n  <xsd:schema \r\n    targetNamespace=\"http:\/\/my.com\/EchoServcie\" \r\n    xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\">\r\n\r\n    <!-- Defines request element and complex type -->\r\n    <xsd:complexType name=\"Echo\">\r\n      <xsd:sequence>\r\n        <xsd:element name=\"message\" type=\"xsd:string\" \r\n          minOccurs=\"0\" maxOccurs=\"1\">\r\n        <\/xsd:element>\r\n      <\/xsd:sequence>\r\n    <\/xsd:complexType>\r\n    <xsd:element name=\"Echo\" type=\"tns:Echo\"\/>\r\n\r\n    <!-- Defines response element and complex type -->\r\n    <xsd:complexType name=\"EchoResponse\">\r\n      <xsd:sequence>\r\n        <xsd:element name=\"return\" type=\"xsd:string\" \r\n          minOccurs=\"0\" maxOccurs=\"1\"\/>\r\n      <\/xsd:sequence>\r\n    <\/xsd:complexType>\r\n    <xsd:element name=\"EchoResonse\" type=\"tns:EchoResponse\"\/>\r\n\r\n  <\/xsd:schema>\r\n<\/wsdl:types>\r\n<\/pre>\n<span id=\"Message\"><h3>Message<\/h3><\/span>\n<p>* An abstract, typed definition of the data being communicated<\/p>\n<pre lang=\"xml\">\r\n<!-- Defines request message -->\r\n<wsdl:message name=\"EchoRequest\">\r\n  <wsdl:part name=\"Echo\" element=\"tns:Echo\"\/>\r\n<\/wsdl:message>\r\n\r\n<!-- Defines response message -->\r\n<wsdl:message name=\"EchoResponse\">\r\n  <wsdl:part name=\"EchoResponse\" element=\"tns:EchoResonse\"\/>\r\n<\/wsdl:message>\r\n<\/pre>\n<span id=\"Port_Type\"><h3>Port Type<\/h3><\/span>\n<p>* An abstract *set* of operations supported by one or more endpoints.<br \/>\n* An operation is an abstract description of an action supported by the service.<\/p>\n<pre lang=\"xml\">\r\n<wsdl:portType name=\"EchoServicePortType\">\r\n  <wsdl:operation name=\"Echo\">\r\n    <wsdl:input message=\"tns:EchoRequest\"\/>\r\n    <wsdl:output message=\"tns:EchoResponse\"\/>\r\n  <\/wsdl:operation>\r\n<\/wsdl:portType>\r\n<\/pre>\n<span id=\"Binding\"><h3>Binding<\/h3><\/span>\n<p>* a concrete protocol and data format specification for a particular port type.<\/p>\n<pre lang=\"xml\">\r\n<!-- Binds EchoServicePortType -->\r\n<wsdl:binding name=\"EchoServiceSOAPBinding\"\r\n  type=\"tns:EchoServicePortType\">\r\n  <!-- Uses document style -->\r\n  <!-- Uses SOAP over HTTP transport -->\r\n  <soap:binding style=\"document\"\r\n    transport=\"http:\/\/schemas.xmlsoap.org\/soap\/http\" \/>\r\n\r\n  <!-- SOAP binding details -->\r\n  <wsdl:operation name=\"Echo\">\r\n    <soap:operation soapAction=\"http:\/\/my.com\/EchoServcie\/Echo\" \/>\r\n    <!-- Input Style -->\r\n    <wsdl:input>\r\n      <!-- SOAP body style -->\r\n      <soap:body use=\"literal\" \/>\r\n    <\/wsdl:input>\r\n\r\n    <!-- Output Style -->\r\n    <wsdl:output>\r\n      <!-- SOAP body style -->\r\n      <soap:body use=\"literal\" \/>\r\n    <\/wsdl:output>\r\n  <\/wsdl:operation>\r\n\r\n<\/wsdl:binding>\r\n<\/pre>\n<span id=\"Service\"><h3>Service<\/h3><\/span>\n<p>* a collection of related endpoints aka ports.<br \/>\n* a single endpoint\/port is defined as a combination of a binding and a network address.<\/p>\n<pre lang=\"xml\">\r\n<!-- A service is a collection of endpoints -->\r\n<wsdl:service name=\"EchoService\">\r\n  <!-- A single endpoint\/port -->\r\n   <!-- Uses binding definition -->\r\n  <wsdl:port name=\"EchoServiceSOAPPort\"\r\n    binding=\"tns:EchoServiceSOAPBinding\">\r\n    <!-- And binds to address -->\r\n    <soap:address location=\"http:\/\/my.com:8080\/\"\/>\r\n  <\/wsdl:port>\r\n<\/wsdl:service>\r\n<\/pre>\n<p>Here is a complete <a href='https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2010\/02\/simpleechoservice.wsdl'>Simple Echo Service WSDL<\/a><\/p>\n<span id=\"Factor_SimpleEchoService.wsdl_into_Three_XML_Documents\"><h2>Factor SimpleEchoService.wsdl into Three XML Documents<\/h2><\/span>\n<p>Each XML document can have its own namespace.<\/p>\n<span id=\"Schema_Doc\"><h3>Schema Doc<\/h3><\/span>\n<pre lang=\"xml\">\r\n<?xml version=\"1.0\"?>\r\n<!-- \r\n  Define our schema with a namespace of \r\n  http:\/\/my.com\/EchoService\/Schema\r\n-->\r\n<xsd:schema \r\n  targetNamespace=\"http:\/\/my.com\/EchoService\/Schema\"\r\n  xmlns:tns=\"http:\/\/my.com\/EchoService\/Schema\"\r\n  xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\">\r\n  <xsd:complexType name=\"Echo\">\r\n    <xsd:sequence>\r\n      <xsd:element name=\"message\" type=\"xsd:string\" \r\n        minOccurs=\"0\"\r\n        maxOccurs=\"1\"\/>\r\n    <\/xsd:sequence>\r\n  <\/xsd:complexType>\r\n\r\n  <xsd:complexType name=\"EchoResponse\">\r\n    <xsd:sequence>\r\n      <xsd:element name=\"return\" type=\"xsd:string\" \r\n        minOccurs=\"0\"\r\n        maxOccurs=\"1\"\/>\r\n    <\/xsd:sequence>\r\n  <\/xsd:complexType>\r\n\r\n  <xsd:element name=\"Echo\" type=\"tns:Echo\"\/>\r\n  <xsd:element name=\"EchoResonse\" type=\"tns:EchoResponse\"\/>\r\n<\/xsd:schema>\r\n<\/pre>\n<span id=\"Message_and_Port_Type_Doc\"><h3>Message and Port Type Doc<\/h3><\/span>\n<pre lang=\"xml\">\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!-- \r\n  Define message parts and port type in this document.\r\n -->\r\n<wsdl:definitions name=\"EchoService\" \r\n  targetNamespace=\"http:\/\/my.com\/EchoService\/Definitions\" \r\n  xmlns:tns=\"http:\/\/my.com\/EchoService\/Definitions\"\r\n  xmlns:ess=\"http:\/\/my.com\/EchoService\/Schema\"  \r\n  xmlns:wsdl=\"http:\/\/schemas.xmlsoap.org\/wsdl\/\">\r\n  <!-- Import our schema -->\r\n  <wsdl:import location=\"SimpleEcho.xsd\" \r\n    namespace=\"http:\/\/my.com\/EchoService\/Schema\"\/>\r\n  \r\n  <wsdl:message name=\"EchoRequest\">\r\n    <wsdl:part name=\"Echo\" element=\"ess:Echo\"\/>\r\n  <\/wsdl:message>\r\n  <wsdl:message name=\"EchoResponse\">\r\n    <wsdl:part name=\"EchoResponse\" element=\"ess:EchoResonse\"\/>\r\n  <\/wsdl:message>\r\n  \r\n  <wsdl:portType name=\"EchoServicePortType\">\r\n        <wsdl:operation name=\"Echo\">\r\n          <wsdl:input message=\"tns:EchoRequest\"\/>\r\n          <wsdl:output message=\"tns:EchoResponse\"\/>\r\n        <\/wsdl:operation>\r\n  <\/wsdl:portType>\r\n<\/wsdl:definitions>\r\n<\/pre>\n<span id=\"Service_Doc\"><h3>Service Doc<\/h3><\/span>\n<pre lang=\"xml\">\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!-- \r\n  Define our service in this document with a namespace of\r\n  http:\/\/my.com\/EchoService\r\n -->\r\n<wsdl:definitions name=\"EchoService\" \r\n  targetNamespace=\"http:\/\/my.com\/EchoService\"\r\n  xmlns:tns=\"http:\/\/my.com\/EchoService\"\r\n  xmlns:ess=\"http:\/\/my.com\/EchoService\/Schema\"\r\n  xmlns:esdef=\"http:\/\/my.com\/EchoService\/Definitions\" \r\n  xmlns:wsdl=\"http:\/\/schemas.xmlsoap.org\/wsdl\/\" \r\n  xmlns:soap=\"http:\/\/schemas.xmlsoap.org\/wsdl\/soap\/\">\r\n\r\n  <!-- Import the definitions --> \r\n  <wsdl:import location=\"SimpleEcho.wsdl\"\r\n    namespace=\"http:\/\/my.com\/EchoService\/Definitions\"><\/wsdl:import>\r\n  \r\n  <!-- Define binding for port type here -->\r\n  <wsdl:binding name=\"EchoServiceSOAPBinding\" \r\n    type=\"esdef:EchoServicePortType\">\r\n    <soap:binding style=\"document\"\r\n      transport=\"http:\/\/schemas.xmlsoap.org\/soap\/http\" \/>\r\n    <wsdl:operation name=\"Echo\">\r\n      <soap:operation soapAction=\"http:\/\/my.com\/EchoService\/Echo\" \/>\r\n      <wsdl:input>\r\n        <soap:body use=\"literal\" \/>\r\n      <\/wsdl:input>\r\n      <wsdl:output>\r\n        <soap:body use=\"literal\" \/>\r\n      <\/wsdl:output>\r\n    <\/wsdl:operation>\r\n  <\/wsdl:binding>\r\n\r\n  <!-- Define service for the binding here -->\r\n  <wsdl:service name=\"EchoService\">\r\n    <wsdl:port binding=\"tns:EchoServiceSOAPBinding\" \r\n      name=\"EchoServiceSOAPPort\">\r\n      <soap:address location=\"http:\/\/my.com:8080\/\" \/>\r\n    <\/wsdl:port>\r\n  <\/wsdl:service>\r\n<\/wsdl:definitions>\r\n<\/pre>\n<span id=\"wsimport_Ant_Task\"><h3>wsimport Ant Task<\/h3><\/span>\n<p>Make sure to include the schema XML document in the wsimport binding.<\/p>\n<pre lang=\"xml\">\r\n<wsimport\r\n  debug=\"true\"\r\n  verbose=\"${verbose}\"\r\n  keep=\"true\"\r\n  destdir=\"${build.classes.home}\"\r\n  package=\"com.my.echo.server\"\r\n  wsdl=\"${wsdl.file}\">\r\n  <binding dir=\"${basedir}\/etc\" \r\n  includes=\"SimpleEcho.xsd\"\/>\r\n<\/wsimport>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>WSDL Overview Defines an XML grammar for describing network services as collections of communication endpoints capable of exchanging messages. Structures Types * A container for data type definitions using some type system (such as XSD). Message * An abstract, typed &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=1435\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[43],"tags":[],"class_list":["post-1435","post","type-post","status-publish","format-standard","hentry","category-ws-stds"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-n9","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1435"}],"version-history":[{"count":4,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1435\/revisions"}],"predecessor-version":[{"id":1446,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1435\/revisions\/1446"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}