github.com/dbernstein1/tyk@v2.9.0-beta9-dl-apic+incompatible/apidef/importer/wsdl_test.go (about)

     1  package importer
     2  
     3  import (
     4  	"bytes"
     5  	"testing"
     6  )
     7  
     8  type testWSDLInput struct {
     9  	wsdlDefinition string
    10  	isInvalidInput bool
    11  	data           []testWSDLData
    12  }
    13  
    14  type testWSDLData struct {
    15  	servicePortNameMapping map[string]string
    16  	noOfEndpoints          int
    17  	endpoints              []endpointData
    18  	returnErr              bool
    19  }
    20  
    21  type endpointData struct {
    22  	method       string
    23  	path         string
    24  	matchPattern string
    25  	rewritePath  string
    26  }
    27  
    28  var testData = []testWSDLInput{
    29  	{
    30  		wsdlDefinition: holidayService,
    31  		data: []testWSDLData{
    32  			{
    33  				servicePortNameMapping: map[string]string{"HolidayService2": "HolidayService2Soap"},
    34  				noOfEndpoints:          6,
    35  				endpoints: []endpointData{
    36  					{
    37  						path:         "HolidayService2/GetHolidaysForDateRange",
    38  						method:       "POST",
    39  						matchPattern: "HolidayService2/GetHolidaysForDateRange",
    40  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx",
    41  					},
    42  					{
    43  						path:         "HolidayService2/GetCountriesAvailable",
    44  						method:       "POST",
    45  						matchPattern: "HolidayService2/GetCountriesAvailable",
    46  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx",
    47  					},
    48  					{
    49  						path:         "HolidayService2/GetHolidaysAvailable",
    50  						method:       "POST",
    51  						matchPattern: "HolidayService2/GetHolidaysAvailable",
    52  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx",
    53  					},
    54  					{
    55  						path:         "HolidayService2/GetHolidaysForMonth",
    56  						method:       "POST",
    57  						matchPattern: "HolidayService2/GetHolidaysForMonth",
    58  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx",
    59  					},
    60  					{
    61  						path:         "HolidayService2/GetHolidaysForYear",
    62  						method:       "POST",
    63  						matchPattern: "HolidayService2/GetHolidaysForYear",
    64  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx",
    65  					},
    66  					{
    67  						path:         "HolidayService2/GetHolidayDate",
    68  						method:       "POST",
    69  						matchPattern: "HolidayService2/GetHolidayDate",
    70  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx",
    71  					},
    72  				},
    73  			},
    74  			{
    75  				servicePortNameMapping: map[string]string{"HolidayService2": "HolidayService2HttpGet"},
    76  				noOfEndpoints:          6,
    77  				endpoints: []endpointData{
    78  					{
    79  						path:         "HolidayService2/GetHolidaysForDateRange",
    80  						method:       "GET",
    81  						matchPattern: "(/GetHolidaysForDateRange.*)",
    82  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx$1",
    83  					},
    84  					{
    85  						path:         "HolidayService2/GetCountriesAvailable",
    86  						method:       "GET",
    87  						matchPattern: "(/GetCountriesAvailable.*)",
    88  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx$1",
    89  					},
    90  					{
    91  						path:         "HolidayService2/GetHolidaysAvailable",
    92  						method:       "GET",
    93  						matchPattern: "(/GetHolidaysAvailable.*)",
    94  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx$1",
    95  					},
    96  					{
    97  						path:         "HolidayService2/GetHolidaysForMonth",
    98  						method:       "GET",
    99  						matchPattern: "(/GetHolidaysForMonth.*)",
   100  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx$1",
   101  					},
   102  					{
   103  						path:         "HolidayService2/GetHolidaysForYear",
   104  						method:       "GET",
   105  						matchPattern: "(/GetHolidaysForYear.*)",
   106  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx$1",
   107  					},
   108  					{
   109  						path:         "HolidayService2/GetHolidayDate",
   110  						method:       "GET",
   111  						matchPattern: "(/GetHolidayDate.*)",
   112  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx$1",
   113  					},
   114  				},
   115  			},
   116  			{
   117  				servicePortNameMapping: map[string]string{"HolidayService2": "HolidayService2HttpPost"},
   118  				noOfEndpoints:          6,
   119  				endpoints: []endpointData{
   120  					{
   121  						path:         "HolidayService2/GetHolidaysForDateRange",
   122  						method:       "POST",
   123  						matchPattern: "(/GetHolidaysForDateRange.*)",
   124  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx$1",
   125  					},
   126  					{
   127  						path:         "HolidayService2/GetCountriesAvailable",
   128  						method:       "POST",
   129  						matchPattern: "(/GetCountriesAvailable.*)",
   130  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx$1",
   131  					},
   132  					{
   133  						path:         "HolidayService2/GetHolidaysAvailable",
   134  						method:       "POST",
   135  						matchPattern: "(/GetHolidaysAvailable.*)",
   136  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx$1",
   137  					},
   138  					{
   139  						path:         "HolidayService2/GetHolidaysForMonth",
   140  						method:       "POST",
   141  						matchPattern: "(/GetHolidaysForMonth.*)",
   142  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx$1",
   143  					},
   144  					{
   145  						path:         "HolidayService2/GetHolidaysForYear",
   146  						method:       "POST",
   147  						matchPattern: "(/GetHolidaysForYear.*)",
   148  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx$1",
   149  					},
   150  					{
   151  						path:         "HolidayService2/GetHolidayDate",
   152  						method:       "POST",
   153  						matchPattern: "(/GetHolidayDate.*)",
   154  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx$1",
   155  					},
   156  				},
   157  			},
   158  			{
   159  				servicePortNameMapping: map[string]string{"HolidayService2": ""},
   160  				noOfEndpoints:          6,
   161  				endpoints: []endpointData{
   162  					{
   163  						path:         "HolidayService2/GetHolidaysForDateRange",
   164  						method:       "POST",
   165  						matchPattern: "HolidayService2/GetHolidaysForDateRange",
   166  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx",
   167  					},
   168  					{
   169  						path:         "HolidayService2/GetCountriesAvailable",
   170  						method:       "POST",
   171  						matchPattern: "HolidayService2/GetCountriesAvailable",
   172  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx",
   173  					},
   174  					{
   175  						path:         "HolidayService2/GetHolidaysAvailable",
   176  						method:       "POST",
   177  						matchPattern: "HolidayService2/GetHolidaysAvailable",
   178  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx",
   179  					},
   180  					{
   181  						path:         "HolidayService2/GetHolidaysForMonth",
   182  						method:       "POST",
   183  						matchPattern: "HolidayService2/GetHolidaysForMonth",
   184  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx",
   185  					},
   186  					{
   187  						path:         "HolidayService2/GetHolidaysForYear",
   188  						method:       "POST",
   189  						matchPattern: "HolidayService2/GetHolidaysForYear",
   190  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx",
   191  					},
   192  					{
   193  						path:         "HolidayService2/GetHolidayDate",
   194  						method:       "POST",
   195  						matchPattern: "HolidayService2/GetHolidayDate",
   196  						rewritePath:  "http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx",
   197  					},
   198  				},
   199  			},
   200  			{
   201  				//invalid portName is provided
   202  				//should throw an error
   203  				servicePortNameMapping: map[string]string{"HolidayService2": "something"},
   204  				returnErr:              true,
   205  			},
   206  		},
   207  	},
   208  	{
   209  		//smtp protocol is not supported
   210  		//should throw error
   211  		wsdlDefinition: smtpExample,
   212  		data: []testWSDLData{
   213  			{
   214  				servicePortNameMapping: map[string]string{"StockQuoteService": "StockQuotePort"},
   215  				returnErr:              true,
   216  			},
   217  		},
   218  	},
   219  	{
   220  		//Invalid input
   221  		wsdlDefinition: "<ghfsdfjadhfkadf>",
   222  		isInvalidInput: true,
   223  	},
   224  	{
   225  		//Invalid input
   226  		wsdlDefinition: wsdl_2_0_example,
   227  		isInvalidInput: true,
   228  	},
   229  }
   230  
   231  func TestToAPIDefinition_WSDL(t *testing.T) {
   232  	for _, input := range testData {
   233  		wsdl_imp := &WSDLDef{}
   234  		buff := bytes.NewBufferString(input.wsdlDefinition)
   235  
   236  		err := wsdl_imp.LoadFrom(buff)
   237  		if err != nil {
   238  			if input.isInvalidInput {
   239  				continue
   240  			} else {
   241  				t.Fatal(err)
   242  			}
   243  		}
   244  
   245  		for _, data := range input.data {
   246  			wsdl_imp.SetServicePortMapping(data.servicePortNameMapping)
   247  			def, err := wsdl_imp.ToAPIDefinition("testOrg", "http://test.com", false)
   248  
   249  			if err != nil {
   250  				if !data.returnErr {
   251  					t.Fatal(err)
   252  				} else {
   253  					continue
   254  				}
   255  			}
   256  
   257  			if def.VersionData.NotVersioned {
   258  				t.Fatal("WSDL import must always be versioned")
   259  			}
   260  
   261  			if len(def.VersionData.Versions) > 1 {
   262  				t.Fatal("There should only be one version")
   263  			}
   264  
   265  			v, ok := def.VersionData.Versions["1.0.0"]
   266  			if !ok {
   267  				t.Fatal("Version could not be found")
   268  			}
   269  
   270  			if len(v.ExtendedPaths.TrackEndpoints) != data.noOfEndpoints {
   271  				t.Fatalf("Expected %v endpoints, found %v\n", data.noOfEndpoints, len(v.ExtendedPaths.TrackEndpoints))
   272  			}
   273  
   274  			for _, endpoint := range data.endpoints {
   275  				for _, rewriteData := range v.ExtendedPaths.URLRewrite {
   276  
   277  					if rewriteData.Path == endpoint.path {
   278  						if rewriteData.Method != endpoint.method {
   279  							t.Fatalf("Invalid endpoint method. Expected %s found %s", endpoint.method, rewriteData.Method)
   280  						}
   281  
   282  						if rewriteData.MatchPattern != endpoint.matchPattern {
   283  							t.Fatalf("Invalid matchPattern. Expected %s found %s", endpoint.matchPattern, rewriteData.MatchPattern)
   284  						}
   285  
   286  						if rewriteData.RewriteTo != endpoint.rewritePath {
   287  							t.Fatalf("Invalid rewrite path. Expected %s found %s", endpoint.rewritePath, rewriteData.RewriteTo)
   288  						}
   289  					}
   290  
   291  				}
   292  			}
   293  		}
   294  	}
   295  }
   296  
   297  var holidayService string = `
   298  <?xml version="1.0" encoding="UTF-8"?>
   299  <wsdl:definitions xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.holidaywebservice.com/HolidayService_v2/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://www.holidaywebservice.com/HolidayService_v2/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   300    <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Web service that calculates holiday dates. (Version 2.0.1)</wsdl:documentation>
   301    <wsdl:types>
   302      <s:schema elementFormDefault="qualified" targetNamespace="http://www.holidaywebservice.com/HolidayService_v2/">
   303        <s:element name="GetCountriesAvailable">
   304          <s:complexType/>
   305        </s:element>
   306        <s:element name="GetCountriesAvailableResponse">
   307          <s:complexType>
   308            <s:sequence>
   309              <s:element minOccurs="0" maxOccurs="1" name="GetCountriesAvailableResult" type="tns:ArrayOfCountryCode"/>
   310            </s:sequence>
   311          </s:complexType>
   312        </s:element>
   313        <s:complexType name="ArrayOfCountryCode">
   314          <s:sequence>
   315            <s:element minOccurs="0" maxOccurs="unbounded" name="CountryCode" nillable="true" type="tns:CountryCode"/>
   316          </s:sequence>
   317        </s:complexType>
   318        <s:complexType name="CountryCode">
   319          <s:complexContent mixed="false">
   320            <s:extension base="tns:CodeDescriptionBase"/>
   321          </s:complexContent>
   322        </s:complexType>
   323        <s:complexType name="CodeDescriptionBase" abstract="true">
   324          <s:sequence>
   325            <s:element minOccurs="0" maxOccurs="1" name="Code" type="s:string"/>
   326            <s:element minOccurs="0" maxOccurs="1" name="Description" type="s:string"/>
   327          </s:sequence>
   328        </s:complexType>
   329        <s:element name="GetHolidaysAvailable">
   330          <s:complexType>
   331            <s:sequence>
   332              <s:element minOccurs="1" maxOccurs="1" name="countryCode" type="tns:Country"/>
   333            </s:sequence>
   334          </s:complexType>
   335        </s:element>
   336        <s:simpleType name="Country">
   337          <s:restriction base="s:string">
   338            <s:enumeration value="Canada"/>
   339            <s:enumeration value="GreatBritain"/>
   340            <s:enumeration value="IrelandNorthern"/>
   341            <s:enumeration value="IrelandRepublicOf"/>
   342            <s:enumeration value="Scotland"/>
   343            <s:enumeration value="UnitedStates"/>
   344          </s:restriction>
   345        </s:simpleType>
   346        <s:element name="GetHolidaysAvailableResponse">
   347          <s:complexType>
   348            <s:sequence>
   349              <s:element minOccurs="0" maxOccurs="1" name="GetHolidaysAvailableResult" type="tns:ArrayOfHolidayCode"/>
   350            </s:sequence>
   351          </s:complexType>
   352        </s:element>
   353        <s:complexType name="ArrayOfHolidayCode">
   354          <s:sequence>
   355            <s:element minOccurs="0" maxOccurs="unbounded" name="HolidayCode" nillable="true" type="tns:HolidayCode"/>
   356          </s:sequence>
   357        </s:complexType>
   358        <s:complexType name="HolidayCode">
   359          <s:complexContent mixed="false">
   360            <s:extension base="tns:CodeDescriptionBase"/>
   361          </s:complexContent>
   362        </s:complexType>
   363        <s:element name="GetHolidayDate">
   364          <s:complexType>
   365            <s:sequence>
   366              <s:element minOccurs="1" maxOccurs="1" name="countryCode" type="tns:Country"/>
   367              <s:element minOccurs="0" maxOccurs="1" name="holidayCode" type="s:string"/>
   368              <s:element minOccurs="1" maxOccurs="1" name="year" type="s:int"/>
   369            </s:sequence>
   370          </s:complexType>
   371        </s:element>
   372        <s:element name="GetHolidayDateResponse">
   373          <s:complexType>
   374            <s:sequence>
   375              <s:element minOccurs="1" maxOccurs="1" name="GetHolidayDateResult" type="s:dateTime"/>
   376            </s:sequence>
   377          </s:complexType>
   378        </s:element>
   379        <s:element name="GetHolidaysForDateRange">
   380          <s:complexType>
   381            <s:sequence>
   382              <s:element minOccurs="1" maxOccurs="1" name="countryCode" type="tns:Country"/>
   383              <s:element minOccurs="1" maxOccurs="1" name="startDate" type="s:dateTime"/>
   384              <s:element minOccurs="1" maxOccurs="1" name="endDate" type="s:dateTime"/>
   385            </s:sequence>
   386          </s:complexType>
   387        </s:element>
   388        <s:element name="GetHolidaysForDateRangeResponse">
   389          <s:complexType>
   390            <s:sequence>
   391              <s:element minOccurs="0" maxOccurs="1" name="GetHolidaysForDateRangeResult" type="tns:ArrayOfHoliday"/>
   392            </s:sequence>
   393          </s:complexType>
   394        </s:element>
   395        <s:complexType name="ArrayOfHoliday">
   396          <s:sequence>
   397            <s:element minOccurs="0" maxOccurs="unbounded" name="Holiday" nillable="true" type="tns:Holiday"/>
   398          </s:sequence>
   399        </s:complexType>
   400        <s:complexType name="Holiday">
   401          <s:sequence>
   402            <s:element minOccurs="1" maxOccurs="1" name="Country" type="tns:Country"/>
   403            <s:element minOccurs="0" maxOccurs="1" name="HolidayCode" type="s:string"/>
   404            <s:element minOccurs="0" maxOccurs="1" name="Descriptor" type="s:string"/>
   405            <s:element minOccurs="1" maxOccurs="1" name="HolidayType" type="tns:HolidayType"/>
   406            <s:element minOccurs="1" maxOccurs="1" name="DateType" type="tns:HolidayDateType"/>
   407            <s:element minOccurs="1" maxOccurs="1" name="BankHoliday" type="tns:BankHoliday"/>
   408            <s:element minOccurs="1" maxOccurs="1" name="Date" type="s:dateTime"/>
   409            <s:element minOccurs="0" maxOccurs="1" name="RelatedHolidayCode" type="s:string"/>
   410            <s:element minOccurs="0" maxOccurs="1" name="ApplicableRegions" type="tns:ArrayOfRegionCode"/>
   411          </s:sequence>
   412        </s:complexType>
   413        <s:simpleType name="HolidayType">
   414          <s:restriction base="s:string">
   415            <s:enumeration value="Notable"/>
   416            <s:enumeration value="Religious"/>
   417            <s:enumeration value="NotableReligious"/>
   418            <s:enumeration value="Other"/>
   419          </s:restriction>
   420        </s:simpleType>
   421        <s:simpleType name="HolidayDateType">
   422          <s:restriction base="s:string">
   423            <s:enumeration value="Observed"/>
   424            <s:enumeration value="Actual"/>
   425            <s:enumeration value="ObservedActual"/>
   426          </s:restriction>
   427        </s:simpleType>
   428        <s:simpleType name="BankHoliday">
   429          <s:restriction base="s:string">
   430            <s:enumeration value="Recognized"/>
   431            <s:enumeration value="NotRecognized"/>
   432          </s:restriction>
   433        </s:simpleType>
   434        <s:complexType name="ArrayOfRegionCode">
   435          <s:sequence>
   436            <s:element minOccurs="0" maxOccurs="unbounded" name="RegionCode" nillable="true" type="tns:RegionCode"/>
   437          </s:sequence>
   438        </s:complexType>
   439        <s:complexType name="RegionCode">
   440          <s:complexContent mixed="false">
   441            <s:extension base="tns:CodeDescriptionBase"/>
   442          </s:complexContent>
   443        </s:complexType>
   444        <s:element name="GetHolidaysForYear">
   445          <s:complexType>
   446            <s:sequence>
   447              <s:element minOccurs="1" maxOccurs="1" name="countryCode" type="tns:Country"/>
   448              <s:element minOccurs="1" maxOccurs="1" name="year" type="s:int"/>
   449            </s:sequence>
   450          </s:complexType>
   451        </s:element>
   452        <s:element name="GetHolidaysForYearResponse">
   453          <s:complexType>
   454            <s:sequence>
   455              <s:element minOccurs="0" maxOccurs="1" name="GetHolidaysForYearResult" type="tns:ArrayOfHoliday"/>
   456            </s:sequence>
   457          </s:complexType>
   458        </s:element>
   459        <s:element name="GetHolidaysForMonth">
   460          <s:complexType>
   461            <s:sequence>
   462              <s:element minOccurs="1" maxOccurs="1" name="countryCode" type="tns:Country"/>
   463              <s:element minOccurs="1" maxOccurs="1" name="year" type="s:int"/>
   464              <s:element minOccurs="1" maxOccurs="1" name="month" type="s:int"/>
   465            </s:sequence>
   466          </s:complexType>
   467        </s:element>
   468        <s:element name="GetHolidaysForMonthResponse">
   469          <s:complexType>
   470            <s:sequence>
   471              <s:element minOccurs="0" maxOccurs="1" name="GetHolidaysForMonthResult" type="tns:ArrayOfHoliday"/>
   472            </s:sequence>
   473          </s:complexType>
   474        </s:element>
   475        <s:element name="ArrayOfCountryCode" nillable="true" type="tns:ArrayOfCountryCode"/>
   476        <s:element name="ArrayOfHolidayCode" nillable="true" type="tns:ArrayOfHolidayCode"/>
   477        <s:element name="dateTime" type="s:dateTime"/>
   478        <s:element name="ArrayOfHoliday" nillable="true" type="tns:ArrayOfHoliday"/>
   479      </s:schema>
   480    </wsdl:types>
   481    <wsdl:message name="GetCountriesAvailableSoapIn">
   482      <wsdl:part name="parameters" element="tns:GetCountriesAvailable"/>
   483    </wsdl:message>
   484    <wsdl:message name="GetCountriesAvailableSoapOut">
   485      <wsdl:part name="parameters" element="tns:GetCountriesAvailableResponse"/>
   486    </wsdl:message>
   487    <wsdl:message name="GetHolidaysAvailableSoapIn">
   488      <wsdl:part name="parameters" element="tns:GetHolidaysAvailable"/>
   489    </wsdl:message>
   490    <wsdl:message name="GetHolidaysAvailableSoapOut">
   491      <wsdl:part name="parameters" element="tns:GetHolidaysAvailableResponse"/>
   492    </wsdl:message>
   493    <wsdl:message name="GetHolidayDateSoapIn">
   494      <wsdl:part name="parameters" element="tns:GetHolidayDate"/>
   495    </wsdl:message>
   496    <wsdl:message name="GetHolidayDateSoapOut">
   497      <wsdl:part name="parameters" element="tns:GetHolidayDateResponse"/>
   498    </wsdl:message>
   499    <wsdl:message name="GetHolidaysForDateRangeSoapIn">
   500      <wsdl:part name="parameters" element="tns:GetHolidaysForDateRange"/>
   501    </wsdl:message>
   502    <wsdl:message name="GetHolidaysForDateRangeSoapOut">
   503      <wsdl:part name="parameters" element="tns:GetHolidaysForDateRangeResponse"/>
   504    </wsdl:message>
   505    <wsdl:message name="GetHolidaysForYearSoapIn">
   506      <wsdl:part name="parameters" element="tns:GetHolidaysForYear"/>
   507    </wsdl:message>
   508    <wsdl:message name="GetHolidaysForYearSoapOut">
   509      <wsdl:part name="parameters" element="tns:GetHolidaysForYearResponse"/>
   510    </wsdl:message>
   511    <wsdl:message name="GetHolidaysForMonthSoapIn">
   512      <wsdl:part name="parameters" element="tns:GetHolidaysForMonth"/>
   513    </wsdl:message>
   514    <wsdl:message name="GetHolidaysForMonthSoapOut">
   515      <wsdl:part name="parameters" element="tns:GetHolidaysForMonthResponse"/>
   516    </wsdl:message>
   517    <wsdl:message name="GetCountriesAvailableHttpGetIn"/>
   518    <wsdl:message name="GetCountriesAvailableHttpGetOut">
   519      <wsdl:part name="Body" element="tns:ArrayOfCountryCode"/>
   520    </wsdl:message>
   521    <wsdl:message name="GetHolidaysAvailableHttpGetIn">
   522      <wsdl:part name="countryCode" type="s:string"/>
   523    </wsdl:message>
   524    <wsdl:message name="GetHolidaysAvailableHttpGetOut">
   525      <wsdl:part name="Body" element="tns:ArrayOfHolidayCode"/>
   526    </wsdl:message>
   527    <wsdl:message name="GetHolidayDateHttpGetIn">
   528      <wsdl:part name="countryCode" type="s:string"/>
   529      <wsdl:part name="holidayCode" type="s:string"/>
   530      <wsdl:part name="year" type="s:string"/>
   531    </wsdl:message>
   532    <wsdl:message name="GetHolidayDateHttpGetOut">
   533      <wsdl:part name="Body" element="tns:dateTime"/>
   534    </wsdl:message>
   535    <wsdl:message name="GetHolidaysForDateRangeHttpGetIn">
   536      <wsdl:part name="countryCode" type="s:string"/>
   537      <wsdl:part name="startDate" type="s:string"/>
   538      <wsdl:part name="endDate" type="s:string"/>
   539    </wsdl:message>
   540    <wsdl:message name="GetHolidaysForDateRangeHttpGetOut">
   541      <wsdl:part name="Body" element="tns:ArrayOfHoliday"/>
   542    </wsdl:message>
   543    <wsdl:message name="GetHolidaysForYearHttpGetIn">
   544      <wsdl:part name="countryCode" type="s:string"/>
   545      <wsdl:part name="year" type="s:string"/>
   546    </wsdl:message>
   547    <wsdl:message name="GetHolidaysForYearHttpGetOut">
   548      <wsdl:part name="Body" element="tns:ArrayOfHoliday"/>
   549    </wsdl:message>
   550    <wsdl:message name="GetHolidaysForMonthHttpGetIn">
   551      <wsdl:part name="countryCode" type="s:string"/>
   552      <wsdl:part name="year" type="s:string"/>
   553      <wsdl:part name="month" type="s:string"/>
   554    </wsdl:message>
   555    <wsdl:message name="GetHolidaysForMonthHttpGetOut">
   556      <wsdl:part name="Body" element="tns:ArrayOfHoliday"/>
   557    </wsdl:message>
   558    <wsdl:message name="GetCountriesAvailableHttpPostIn"/>
   559    <wsdl:message name="GetCountriesAvailableHttpPostOut">
   560      <wsdl:part name="Body" element="tns:ArrayOfCountryCode"/>
   561    </wsdl:message>
   562    <wsdl:message name="GetHolidaysAvailableHttpPostIn">
   563      <wsdl:part name="countryCode" type="s:string"/>
   564    </wsdl:message>
   565    <wsdl:message name="GetHolidaysAvailableHttpPostOut">
   566      <wsdl:part name="Body" element="tns:ArrayOfHolidayCode"/>
   567    </wsdl:message>
   568    <wsdl:message name="GetHolidayDateHttpPostIn">
   569      <wsdl:part name="countryCode" type="s:string"/>
   570      <wsdl:part name="holidayCode" type="s:string"/>
   571      <wsdl:part name="year" type="s:string"/>
   572    </wsdl:message>
   573    <wsdl:message name="GetHolidayDateHttpPostOut">
   574      <wsdl:part name="Body" element="tns:dateTime"/>
   575    </wsdl:message>
   576    <wsdl:message name="GetHolidaysForDateRangeHttpPostIn">
   577      <wsdl:part name="countryCode" type="s:string"/>
   578      <wsdl:part name="startDate" type="s:string"/>
   579      <wsdl:part name="endDate" type="s:string"/>
   580    </wsdl:message>
   581    <wsdl:message name="GetHolidaysForDateRangeHttpPostOut">
   582      <wsdl:part name="Body" element="tns:ArrayOfHoliday"/>
   583    </wsdl:message>
   584    <wsdl:message name="GetHolidaysForYearHttpPostIn">
   585      <wsdl:part name="countryCode" type="s:string"/>
   586      <wsdl:part name="year" type="s:string"/>
   587    </wsdl:message>
   588    <wsdl:message name="GetHolidaysForYearHttpPostOut">
   589      <wsdl:part name="Body" element="tns:ArrayOfHoliday"/>
   590    </wsdl:message>
   591    <wsdl:message name="GetHolidaysForMonthHttpPostIn">
   592      <wsdl:part name="countryCode" type="s:string"/>
   593      <wsdl:part name="year" type="s:string"/>
   594      <wsdl:part name="month" type="s:string"/>
   595    </wsdl:message>
   596    <wsdl:message name="GetHolidaysForMonthHttpPostOut">
   597      <wsdl:part name="Body" element="tns:ArrayOfHoliday"/>
   598    </wsdl:message>
   599    <wsdl:portType name="HolidayService2Soap">
   600      <wsdl:operation name="GetCountriesAvailable">
   601        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the available countries.</wsdl:documentation>
   602        <wsdl:input message="tns:GetCountriesAvailableSoapIn"/>
   603        <wsdl:output message="tns:GetCountriesAvailableSoapOut"/>
   604      </wsdl:operation>
   605      <wsdl:operation name="GetHolidaysAvailable">
   606        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the available holidays for a specified country.</wsdl:documentation>
   607        <wsdl:input message="tns:GetHolidaysAvailableSoapIn"/>
   608        <wsdl:output message="tns:GetHolidaysAvailableSoapOut"/>
   609      </wsdl:operation>
   610      <wsdl:operation name="GetHolidayDate">
   611        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the date of a specific holiday.</wsdl:documentation>
   612        <wsdl:input message="tns:GetHolidayDateSoapIn"/>
   613        <wsdl:output message="tns:GetHolidayDateSoapOut"/>
   614      </wsdl:operation>
   615      <wsdl:operation name="GetHolidaysForDateRange">
   616        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the holidays for a date range.</wsdl:documentation>
   617        <wsdl:input message="tns:GetHolidaysForDateRangeSoapIn"/>
   618        <wsdl:output message="tns:GetHolidaysForDateRangeSoapOut"/>
   619      </wsdl:operation>
   620      <wsdl:operation name="GetHolidaysForYear">
   621        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the holidays for an entire year.</wsdl:documentation>
   622        <wsdl:input message="tns:GetHolidaysForYearSoapIn"/>
   623        <wsdl:output message="tns:GetHolidaysForYearSoapOut"/>
   624      </wsdl:operation>
   625      <wsdl:operation name="GetHolidaysForMonth">
   626        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the holidays for a specific month.</wsdl:documentation>
   627        <wsdl:input message="tns:GetHolidaysForMonthSoapIn"/>
   628        <wsdl:output message="tns:GetHolidaysForMonthSoapOut"/>
   629      </wsdl:operation>
   630    </wsdl:portType>
   631    <wsdl:portType name="HolidayService2HttpGet">
   632      <wsdl:operation name="GetCountriesAvailable">
   633        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the available countries.</wsdl:documentation>
   634        <wsdl:input message="tns:GetCountriesAvailableHttpGetIn"/>
   635        <wsdl:output message="tns:GetCountriesAvailableHttpGetOut"/>
   636      </wsdl:operation>
   637      <wsdl:operation name="GetHolidaysAvailable">
   638        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the available holidays for a specified country.</wsdl:documentation>
   639        <wsdl:input message="tns:GetHolidaysAvailableHttpGetIn"/>
   640        <wsdl:output message="tns:GetHolidaysAvailableHttpGetOut"/>
   641      </wsdl:operation>
   642      <wsdl:operation name="GetHolidayDate">
   643        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the date of a specific holiday.</wsdl:documentation>
   644        <wsdl:input message="tns:GetHolidayDateHttpGetIn"/>
   645        <wsdl:output message="tns:GetHolidayDateHttpGetOut"/>
   646      </wsdl:operation>
   647      <wsdl:operation name="GetHolidaysForDateRange">
   648        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the holidays for a date range.</wsdl:documentation>
   649        <wsdl:input message="tns:GetHolidaysForDateRangeHttpGetIn"/>
   650        <wsdl:output message="tns:GetHolidaysForDateRangeHttpGetOut"/>
   651      </wsdl:operation>
   652      <wsdl:operation name="GetHolidaysForYear">
   653        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the holidays for an entire year.</wsdl:documentation>
   654        <wsdl:input message="tns:GetHolidaysForYearHttpGetIn"/>
   655        <wsdl:output message="tns:GetHolidaysForYearHttpGetOut"/>
   656      </wsdl:operation>
   657      <wsdl:operation name="GetHolidaysForMonth">
   658        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the holidays for a specific month.</wsdl:documentation>
   659        <wsdl:input message="tns:GetHolidaysForMonthHttpGetIn"/>
   660        <wsdl:output message="tns:GetHolidaysForMonthHttpGetOut"/>
   661      </wsdl:operation>
   662    </wsdl:portType>
   663    <wsdl:portType name="HolidayService2HttpPost">
   664      <wsdl:operation name="GetCountriesAvailable">
   665        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the available countries.</wsdl:documentation>
   666        <wsdl:input message="tns:GetCountriesAvailableHttpPostIn"/>
   667        <wsdl:output message="tns:GetCountriesAvailableHttpPostOut"/>
   668      </wsdl:operation>
   669      <wsdl:operation name="GetHolidaysAvailable">
   670        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the available holidays for a specified country.</wsdl:documentation>
   671        <wsdl:input message="tns:GetHolidaysAvailableHttpPostIn"/>
   672        <wsdl:output message="tns:GetHolidaysAvailableHttpPostOut"/>
   673      </wsdl:operation>
   674      <wsdl:operation name="GetHolidayDate">
   675        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the date of a specific holiday.</wsdl:documentation>
   676        <wsdl:input message="tns:GetHolidayDateHttpPostIn"/>
   677        <wsdl:output message="tns:GetHolidayDateHttpPostOut"/>
   678      </wsdl:operation>
   679      <wsdl:operation name="GetHolidaysForDateRange">
   680        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the holidays for a date range.</wsdl:documentation>
   681        <wsdl:input message="tns:GetHolidaysForDateRangeHttpPostIn"/>
   682        <wsdl:output message="tns:GetHolidaysForDateRangeHttpPostOut"/>
   683      </wsdl:operation>
   684      <wsdl:operation name="GetHolidaysForYear">
   685        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the holidays for an entire year.</wsdl:documentation>
   686        <wsdl:input message="tns:GetHolidaysForYearHttpPostIn"/>
   687        <wsdl:output message="tns:GetHolidaysForYearHttpPostOut"/>
   688      </wsdl:operation>
   689      <wsdl:operation name="GetHolidaysForMonth">
   690        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get the holidays for a specific month.</wsdl:documentation>
   691        <wsdl:input message="tns:GetHolidaysForMonthHttpPostIn"/>
   692        <wsdl:output message="tns:GetHolidaysForMonthHttpPostOut"/>
   693      </wsdl:operation>
   694    </wsdl:portType>
   695    <wsdl:binding name="HolidayService2Soap" type="tns:HolidayService2Soap">
   696      <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
   697      <wsdl:operation name="GetCountriesAvailable">
   698        <soap:operation soapAction="http://www.holidaywebservice.com/HolidayService_v2/GetCountriesAvailable" style="document"/>
   699        <wsdl:input>
   700          <soap:body use="literal"/>
   701        </wsdl:input>
   702        <wsdl:output>
   703          <soap:body use="literal"/>
   704        </wsdl:output>
   705      </wsdl:operation>
   706      <wsdl:operation name="GetHolidaysAvailable">
   707        <soap:operation soapAction="http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysAvailable" style="document"/>
   708        <wsdl:input>
   709          <soap:body use="literal"/>
   710        </wsdl:input>
   711        <wsdl:output>
   712          <soap:body use="literal"/>
   713        </wsdl:output>
   714      </wsdl:operation>
   715      <wsdl:operation name="GetHolidayDate">
   716        <soap:operation soapAction="http://www.holidaywebservice.com/HolidayService_v2/GetHolidayDate" style="document"/>
   717        <wsdl:input>
   718          <soap:body use="literal"/>
   719        </wsdl:input>
   720        <wsdl:output>
   721          <soap:body use="literal"/>
   722        </wsdl:output>
   723      </wsdl:operation>
   724      <wsdl:operation name="GetHolidaysForDateRange">
   725        <soap:operation soapAction="http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysForDateRange" style="document"/>
   726        <wsdl:input>
   727          <soap:body use="literal"/>
   728        </wsdl:input>
   729        <wsdl:output>
   730          <soap:body use="literal"/>
   731        </wsdl:output>
   732      </wsdl:operation>
   733      <wsdl:operation name="GetHolidaysForYear">
   734        <soap:operation soapAction="http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysForYear" style="document"/>
   735        <wsdl:input>
   736          <soap:body use="literal"/>
   737        </wsdl:input>
   738        <wsdl:output>
   739          <soap:body use="literal"/>
   740        </wsdl:output>
   741      </wsdl:operation>
   742      <wsdl:operation name="GetHolidaysForMonth">
   743        <soap:operation soapAction="http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysForMonth" style="document"/>
   744        <wsdl:input>
   745          <soap:body use="literal"/>
   746        </wsdl:input>
   747        <wsdl:output>
   748          <soap:body use="literal"/>
   749        </wsdl:output>
   750      </wsdl:operation>
   751    </wsdl:binding>
   752    <wsdl:binding name="HolidayService2Soap12" type="tns:HolidayService2Soap">
   753      <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
   754      <wsdl:operation name="GetCountriesAvailable">
   755        <soap12:operation soapAction="http://www.holidaywebservice.com/HolidayService_v2/GetCountriesAvailable" style="document"/>
   756        <wsdl:input>
   757          <soap12:body use="literal"/>
   758        </wsdl:input>
   759        <wsdl:output>
   760          <soap12:body use="literal"/>
   761        </wsdl:output>
   762      </wsdl:operation>
   763      <wsdl:operation name="GetHolidaysAvailable">
   764        <soap12:operation soapAction="http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysAvailable" style="document"/>
   765        <wsdl:input>
   766          <soap12:body use="literal"/>
   767        </wsdl:input>
   768        <wsdl:output>
   769          <soap12:body use="literal"/>
   770        </wsdl:output>
   771      </wsdl:operation>
   772      <wsdl:operation name="GetHolidayDate">
   773        <soap12:operation soapAction="http://www.holidaywebservice.com/HolidayService_v2/GetHolidayDate" style="document"/>
   774        <wsdl:input>
   775          <soap12:body use="literal"/>
   776        </wsdl:input>
   777        <wsdl:output>
   778          <soap12:body use="literal"/>
   779        </wsdl:output>
   780      </wsdl:operation>
   781      <wsdl:operation name="GetHolidaysForDateRange">
   782        <soap12:operation soapAction="http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysForDateRange" style="document"/>
   783        <wsdl:input>
   784          <soap12:body use="literal"/>
   785        </wsdl:input>
   786        <wsdl:output>
   787          <soap12:body use="literal"/>
   788        </wsdl:output>
   789      </wsdl:operation>
   790      <wsdl:operation name="GetHolidaysForYear">
   791        <soap12:operation soapAction="http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysForYear" style="document"/>
   792        <wsdl:input>
   793          <soap12:body use="literal"/>
   794        </wsdl:input>
   795        <wsdl:output>
   796          <soap12:body use="literal"/>
   797        </wsdl:output>
   798      </wsdl:operation>
   799      <wsdl:operation name="GetHolidaysForMonth">
   800        <soap12:operation soapAction="http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysForMonth" style="document"/>
   801        <wsdl:input>
   802          <soap12:body use="literal"/>
   803        </wsdl:input>
   804        <wsdl:output>
   805          <soap12:body use="literal"/>
   806        </wsdl:output>
   807      </wsdl:operation>
   808    </wsdl:binding>
   809    <wsdl:binding name="HolidayService2HttpGet" type="tns:HolidayService2HttpGet">
   810      <http:binding verb="GET"/>
   811      <wsdl:operation name="GetCountriesAvailable">
   812        <http:operation location="/GetCountriesAvailable"/>
   813        <wsdl:input>
   814          <http:urlEncoded/>
   815        </wsdl:input>
   816        <wsdl:output>
   817          <mime:mimeXml part="Body"/>
   818        </wsdl:output>
   819      </wsdl:operation>
   820      <wsdl:operation name="GetHolidaysAvailable">
   821        <http:operation location="/GetHolidaysAvailable"/>
   822        <wsdl:input>
   823          <http:urlEncoded/>
   824        </wsdl:input>
   825        <wsdl:output>
   826          <mime:mimeXml part="Body"/>
   827        </wsdl:output>
   828      </wsdl:operation>
   829      <wsdl:operation name="GetHolidayDate">
   830        <http:operation location="/GetHolidayDate"/>
   831        <wsdl:input>
   832          <http:urlEncoded/>
   833        </wsdl:input>
   834        <wsdl:output>
   835          <mime:mimeXml part="Body"/>
   836        </wsdl:output>
   837      </wsdl:operation>
   838      <wsdl:operation name="GetHolidaysForDateRange">
   839        <http:operation location="/GetHolidaysForDateRange"/>
   840        <wsdl:input>
   841          <http:urlEncoded/>
   842        </wsdl:input>
   843        <wsdl:output>
   844          <mime:mimeXml part="Body"/>
   845        </wsdl:output>
   846      </wsdl:operation>
   847      <wsdl:operation name="GetHolidaysForYear">
   848        <http:operation location="/GetHolidaysForYear"/>
   849        <wsdl:input>
   850          <http:urlEncoded/>
   851        </wsdl:input>
   852        <wsdl:output>
   853          <mime:mimeXml part="Body"/>
   854        </wsdl:output>
   855      </wsdl:operation>
   856      <wsdl:operation name="GetHolidaysForMonth">
   857        <http:operation location="/GetHolidaysForMonth"/>
   858        <wsdl:input>
   859          <http:urlEncoded/>
   860        </wsdl:input>
   861        <wsdl:output>
   862          <mime:mimeXml part="Body"/>
   863        </wsdl:output>
   864      </wsdl:operation>
   865    </wsdl:binding>
   866    <wsdl:binding name="HolidayService2HttpPost" type="tns:HolidayService2HttpPost">
   867      <http:binding verb="POST"/>
   868      <wsdl:operation name="GetCountriesAvailable">
   869        <http:operation location="/GetCountriesAvailable"/>
   870        <wsdl:input>
   871          <mime:content type="application/x-www-form-urlencoded"/>
   872        </wsdl:input>
   873        <wsdl:output>
   874          <mime:mimeXml part="Body"/>
   875        </wsdl:output>
   876      </wsdl:operation>
   877      <wsdl:operation name="GetHolidaysAvailable">
   878        <http:operation location="/GetHolidaysAvailable"/>
   879        <wsdl:input>
   880          <mime:content type="application/x-www-form-urlencoded"/>
   881        </wsdl:input>
   882        <wsdl:output>
   883          <mime:mimeXml part="Body"/>
   884        </wsdl:output>
   885      </wsdl:operation>
   886      <wsdl:operation name="GetHolidayDate">
   887        <http:operation location="/GetHolidayDate"/>
   888        <wsdl:input>
   889          <mime:content type="application/x-www-form-urlencoded"/>
   890        </wsdl:input>
   891        <wsdl:output>
   892          <mime:mimeXml part="Body"/>
   893        </wsdl:output>
   894      </wsdl:operation>
   895      <wsdl:operation name="GetHolidaysForDateRange">
   896        <http:operation location="/GetHolidaysForDateRange"/>
   897        <wsdl:input>
   898          <mime:content type="application/x-www-form-urlencoded"/>
   899        </wsdl:input>
   900        <wsdl:output>
   901          <mime:mimeXml part="Body"/>
   902        </wsdl:output>
   903      </wsdl:operation>
   904      <wsdl:operation name="GetHolidaysForYear">
   905        <http:operation location="/GetHolidaysForYear"/>
   906        <wsdl:input>
   907          <mime:content type="application/x-www-form-urlencoded"/>
   908        </wsdl:input>
   909        <wsdl:output>
   910          <mime:mimeXml part="Body"/>
   911        </wsdl:output>
   912      </wsdl:operation>
   913      <wsdl:operation name="GetHolidaysForMonth">
   914        <http:operation location="/GetHolidaysForMonth"/>
   915        <wsdl:input>
   916          <mime:content type="application/x-www-form-urlencoded"/>
   917        </wsdl:input>
   918        <wsdl:output>
   919          <mime:mimeXml part="Body"/>
   920        </wsdl:output>
   921      </wsdl:operation>
   922    </wsdl:binding>
   923    <wsdl:service name="HolidayService2">
   924      <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Web service that calculates holiday dates. (Version 2.0.1)</wsdl:documentation>
   925      <wsdl:port name="HolidayService2Soap" binding="tns:HolidayService2Soap">
   926        <soap:address location="http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx"/>
   927      </wsdl:port>
   928      <wsdl:port name="HolidayService2Soap12" binding="tns:HolidayService2Soap12">
   929        <soap12:address location="http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx"/>
   930      </wsdl:port>
   931      <wsdl:port name="HolidayService2HttpGet" binding="tns:HolidayService2HttpGet">
   932        <http:address location="http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx"/>
   933      </wsdl:port>
   934      <wsdl:port name="HolidayService2HttpPost" binding="tns:HolidayService2HttpPost">
   935        <http:address location="http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx"/>
   936      </wsdl:port>
   937    </wsdl:service>
   938  </wsdl:definitions>
   939  `
   940  
   941  var smtpExample string = `<?xml version="1.0"?>
   942  <definitions name="StockQuote"
   943            targetNamespace="http://example.com/stockquote.wsdl"
   944            xmlns:tns="http://example.com/stockquote.wsdl"
   945            xmlns:xsd1="http://example.com/stockquote.xsd"
   946            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
   947            xmlns="http://schemas.xmlsoap.org/wsdl/">
   948  
   949      <message name="SubscribeToQuotes">
   950          <part name="body" element="xsd1:SubscribeToQuotes"/>
   951          <part name="subscribeheader" element="xsd1:SubscriptionHeader"/>
   952      </message>
   953  
   954      <portType name="StockQuotePortType">
   955          <operation name="SubscribeToQuotes">
   956             <input message="tns:SubscribeToQuotes"/>
   957          </operation>
   958      </portType>
   959  
   960      <binding name="StockQuoteSoap" type="tns:StockQuotePortType">
   961          <soap:binding style="document" transport="http://example.com/smtp"/>
   962          <operation name="SubscribeToQuotes">
   963             <input message="tns:SubscribeToQuotes">
   964                 <soap:body parts="body" use="literal"/>
   965                 <soap:header message="tns:SubscribeToQuotes" part="subscribeheader" use="literal"/>
   966             </input>
   967          </operation>
   968      </binding>
   969  
   970      <service name="StockQuoteService">
   971          <port name="StockQuotePort" binding="tns:StockQuoteSoap">
   972             <soap:address location="mailto:subscribe@example.com"/>
   973          </port>
   974      </service>
   975  
   976      <types>
   977          <schema targetNamespace="http://example.com/stockquote.xsd"
   978                 xmlns="http://www.w3.org/2000/10/XMLSchema">
   979             <element name="SubscribeToQuotes">
   980                 <complexType>
   981                     <all>
   982                         <element name="tickerSymbol" type="string"/>
   983                     </all>
   984                 </complexType>
   985             </element>
   986             <element name="SubscriptionHeader" type="uriReference"/>
   987          </schema>
   988      </types>
   989  </definitions>
   990  
   991  `
   992  
   993  var wsdl_2_0_example = `
   994  <?xml version = "1.0" encoding = "utf-8" ?>
   995  <description
   996      xmlns = "http://www.w3.org/ns/wsdl"
   997      targetNamespace = "http://yoursite.com/MyService"
   998      xmlns:tns = "http://yoursite.com/MyService"
   999      xmlns:stns = "http://yoursite.com/MyService/schema"
  1000      xmlns:wsoap = "http://www.w3.org/ns/wsdl/soap"
  1001      xmlns:soap = "http://www.w3.org/2003/05/soap-envelope"
  1002      xmlns:wsdlx = "http://www.w3.org/ns/wsdl-extensions">
  1003   
  1004      <documentation>
  1005          This document describes my Service. You can find additional information in
  1006          the following web page: http://yoursite.com/MyService/help.html
  1007      </documentation>
  1008   
  1009      <types>
  1010          <xs:schema
  1011          xmlns:xs = "http://www.w3.org/2001/XMLSchema"
  1012          targetNamespace = "http://yoursite.com/MyService/schema"
  1013          xmlns = "http://yoursite.com/MyService/schema" >
  1014              <xs:element name = "checkServiceStatus" type="tCheckServiceStatus" />
  1015              <xs:complexType name = "tCheckServiceStatus" >
  1016                  <xs:sequence>
  1017                      <xs:element name = "checkDate" type = "xs:date" />
  1018                      <xs:element name = "serviceName" type = "xs:string" />
  1019                  </xs:sequence>
  1020              </xs:complexType>
  1021              <xs:element name = " checkServiceStatusResponse" type = "xs:double" />
  1022              <xs:element name = "dataError" type = "xs:string" />
  1023          </xs:schema>
  1024      </types>
  1025   
  1026      <interface name = "myServiceInterface">
  1027          <fault name = "dataFault" element = "stns:dataError" />
  1028          <operation name = "checkServiceStatusOp"
  1029              pattern = "http://www.w3.org/ns/wsdl/in-out"
  1030              style= " http://www.w3.org/ns/wsdl/style/iri"
  1031              wsdlx:safe = "true">
  1032              <input messageLabel = "In" element = "stns:checkServiceStatus" />
  1033              <output messageLabel = "Out" element = "stns:checkServiceStatusResponse"/>
  1034              <outfault messageLabel = "Out" ref = "tns:dataFault" />
  1035          </operation>
  1036      </interface>
  1037   
  1038      <binding name = "myServiceInterfaceSOAPBinding" 
  1039            interface = "tns:myServiceInterface"
  1040            type = "http://www.w3.org/ns/wsdl/soap"
  1041            wsoap:protocol = "http://www.w3.org/2003/05/soap/bindings/HTTP/">
  1042          <operation ref = "tns:checkServiceStatusOp" 
  1043        wsoap:mep = "http://www.w3.org/2003/05/soap/mep/soap-response"/>
  1044          <fault ref = "tns:dataFault" 
  1045        wsoap:code = "soap:Sender"/>
  1046      </binding>
  1047   
  1048      <service name = "myService" 
  1049         interface = "tns:myServiceInterface">
  1050          <endpoint name = "myServiceEndpoint" 
  1051                 binding = "tns:myServiceInterfaceSOAPBinding"
  1052                 address = "http://yoursite.com/MyService"/>
  1053      </service>
  1054  </description>
  1055  `