savon 0.6.7 → 0.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. data/CHANGELOG +17 -4
  2. data/README.textile +14 -25
  3. data/Rakefile +7 -30
  4. data/lib/savon.rb +2 -1
  5. data/lib/savon/client.rb +13 -15
  6. data/lib/savon/core_ext.rb +1 -1
  7. data/lib/savon/core_ext/hash.rb +3 -6
  8. data/lib/savon/request.rb +26 -20
  9. data/lib/savon/soap.rb +33 -17
  10. data/lib/savon/wsdl.rb +19 -8
  11. data/spec/endpoint_helper.rb +14 -53
  12. data/spec/fixtures/response/response_fixture.rb +32 -0
  13. data/spec/fixtures/response/xml/authentication.xml +14 -0
  14. data/spec/fixtures/{soap_fault.xml → response/xml/soap_fault.xml} +0 -0
  15. data/spec/fixtures/{soap_fault12.xml → response/xml/soap_fault12.xml} +0 -0
  16. data/spec/fixtures/wsdl/wsdl_fixture.rb +37 -0
  17. data/spec/fixtures/wsdl/xml/authentication.xml +63 -0
  18. data/spec/fixtures/wsdl/xml/namespaced_actions.xml +307 -0
  19. data/spec/fixtures/wsdl/xml/no_namespace.xml +115 -0
  20. data/spec/http_stubs.rb +11 -11
  21. data/spec/savon/client_spec.rb +46 -41
  22. data/spec/savon/core_ext/datetime_spec.rb +2 -2
  23. data/spec/savon/core_ext/hash_spec.rb +10 -10
  24. data/spec/savon/core_ext/object_spec.rb +2 -2
  25. data/spec/savon/core_ext/string_spec.rb +2 -2
  26. data/spec/savon/core_ext/symbol_spec.rb +1 -1
  27. data/spec/savon/core_ext/uri_spec.rb +1 -1
  28. data/spec/savon/request_spec.rb +5 -3
  29. data/spec/savon/response_spec.rb +7 -7
  30. data/spec/savon/savon_spec.rb +3 -4
  31. data/spec/savon/soap_spec.rb +13 -5
  32. data/spec/savon/wsdl_spec.rb +63 -20
  33. data/spec/spec_helper.rb +3 -2
  34. metadata +16 -14
  35. data/VERSION +0 -1
  36. data/spec/fixtures/multiple_user_response.xml +0 -22
  37. data/spec/fixtures/user_fixture.rb +0 -62
  38. data/spec/fixtures/user_response.xml +0 -15
  39. data/spec/fixtures/user_wsdl.xml +0 -124
data/lib/savon/wsdl.rb CHANGED
@@ -26,6 +26,11 @@ module Savon
26
26
  @operations ||= stream.operations
27
27
  end
28
28
 
29
+ # Returns the SOAP endpoint.
30
+ def soap_endpoint
31
+ @soap_endpoint ||= stream.soap_endpoint
32
+ end
33
+
29
34
  # Returns +true+ for available methods and SOAP actions.
30
35
  def respond_to?(method)
31
36
  return true if soap_actions.include? method
@@ -55,19 +60,22 @@ module Savon
55
60
  # Stream listener for parsing the WSDL document.
56
61
  class WSDLStream
57
62
 
58
- # Defines the main sections of a WSDL document.
63
+ # The main sections of a WSDL document.
59
64
  Sections = %w(definitions types message portType binding service)
60
65
 
61
66
  def initialize
62
67
  @depth, @operations = 0, {}
63
68
  end
64
69
 
65
- # Returns the namespace URI from the WSDL document.
70
+ # Returns the namespace URI.
66
71
  attr_reader :namespace_uri
67
72
 
68
- # Returns the SOAP operations found in the WSDL document.
73
+ # Returns the SOAP operations.
69
74
  attr_reader :operations
70
-
75
+
76
+ # Returns the SOAP endpoint.
77
+ attr_reader :soap_endpoint
78
+
71
79
  # Hook method called when the stream parser encounters a starting tag.
72
80
  def tag_start(tag, attrs)
73
81
  @depth += 1
@@ -75,6 +83,7 @@ module Savon
75
83
 
76
84
  @section = tag.to_sym if @depth <= 2 && Sections.include?(tag)
77
85
  @namespace_uri ||= attrs["targetNamespace"] if @section == :definitions
86
+ @soap_endpoint ||= URI(attrs["location"]) if @section == :service && tag == "address"
78
87
 
79
88
  operation_from tag, attrs if @section == :binding && tag == "operation"
80
89
  end
@@ -86,12 +95,14 @@ module Savon
86
95
 
87
96
  # Stores available operations from a given tag +name+ and +attrs+.
88
97
  def operation_from(tag, attrs)
89
- @action = attrs["name"] if attrs["name"]
98
+ @input = attrs["name"] if attrs["name"]
90
99
 
91
100
  if attrs["soapAction"]
92
- @action = attrs["soapAction"] unless attrs["soapAction"].blank?
93
- input = @action.split("/").last
94
- @operations[input.snakecase.to_sym] = { :action => @action, :input => input }
101
+ @action = !attrs["soapAction"].blank? ? attrs["soapAction"] : @input
102
+ @input = @action.split("/").last if !@input || @input.empty?
103
+
104
+ @operations[@input.snakecase.to_sym] = { :action => @action, :input => @input }
105
+ @input, @action = nil, nil
95
106
  end
96
107
  end
97
108
 
@@ -1,61 +1,22 @@
1
1
  class EndpointHelper
2
- class << self
3
2
 
4
- def wsdl_endpoint(type = nil)
5
- soap_endpoint(type) << "?wsdl"
3
+ # Returns the WSDL endpoint for a given +type+ of request.
4
+ def self.wsdl_endpoint(type = nil)
5
+ case type
6
+ when :no_namespace then "http://nons.example.com/Service?wsdl"
7
+ when :namespaced_actions then "http://nsactions.example.com/Service?wsdl"
8
+ else soap_endpoint(type) + "?wsdl"
6
9
  end
7
-
8
- def soap_endpoint(type = nil)
9
- case type
10
- when :multiple then "http://multiple.example.com/UserService"
11
- when :soap_fault then "http://soapfault.example.com/UserService"
12
- when :http_error then "http://httperror.example.com/UserService"
13
- when :invalid then "http://invalid.example.com/UserService"
14
- else "http://services.example.com/UserService"
15
- end
16
- end
17
-
18
10
  end
19
- end
20
- =begin
21
- @soap_call_endpoint = "http://services.example.com/UserService"
22
- @some_endpoint = @soap_call_endpoint + "?wsdl"
23
- @some_endpoint_uri = URI @some_endpoint
24
-
25
- @soap_multiple_endpoint = "http://multiple.example.com/UserService"
26
- @multiple_endpoint = @soap_multiple_endpoint + "?wsdl"
27
-
28
- @soap_soapfault_endpoint = "http://soapfault.example.com/UserService"
29
- @soapfault_endpoint = @soap_soapfault_endpoint + "?wsdl"
30
-
31
- @soap_httperror_endpoint = "http://httperror.example.com/UserService"
32
- @httperror_endpoint = @soap_httperror_endpoint + "?wsdl"
33
-
34
- @soap_invalid_endpoint = "http://invalid.example.com/UserService"
35
- @invalid_endpoint = @soap_invalid_endpoint + "?wsdl"
36
-
37
- class << self
38
-
39
- attr_accessor :soap_call_endpoint, :some_endpoint, :some_endpoint_uri,
40
- :soap_multiple_endpoint , :multiple_endpoint,
41
- :soap_soapfault_endpoint, :soapfault_endpoint,
42
- :soap_httperror_endpoint, :httperror_endpoint,
43
- :soap_invalid_endpoint, :invalid_endpoint,
44
- :wsse_security_nodes
45
11
 
12
+ # Returns the SOAP endpoint for a given +type+ of request.
13
+ def self.soap_endpoint(type = nil)
14
+ case type
15
+ when :soap_fault then "http://soapfault.example.com/Service"
16
+ when :http_error then "http://httperror.example.com/Service"
17
+ when :invalid then "http://invalid.example.com/Service"
18
+ else "http://example.com/validation/1.0/AuthenticationService"
19
+ end
46
20
  end
47
21
 
48
- =end
49
-
50
- class SpecHelper
51
- =begin
52
- @wsse_security_nodes = ["wsse:Security", "wsse:UsernameToken",
53
- "wsse:Username", "wsse:Password", "wsse:Nonce", "wsu:Created"]
54
-
55
- class << self
56
-
57
- attr_accessor :wsse_security_nodes
58
-
59
- end
60
- =end
61
22
  end
@@ -0,0 +1,32 @@
1
+ class ResponseFixture
2
+
3
+ def self.authentication(value = nil)
4
+ case value
5
+ when :to_hash
6
+ { :success => true,
7
+ :authentication_value => {
8
+ :token => "a68d1d6379b62ff339a0e0c69ed4d9cf",
9
+ :token_hash => "AAAJxA;cIedoT;mY10ExZwG6JuKgp2OYKxow==",
10
+ :client => "radclient"
11
+ }
12
+ }
13
+ else
14
+ @@authentication ||= load_fixture :authentication
15
+ end
16
+ end
17
+
18
+ def self.soap_fault
19
+ @@soap_fault ||= load_fixture :soap_fault
20
+ end
21
+
22
+ def self.soap_fault12
23
+ @@soap_fault12 ||= load_fixture :soap_fault12
24
+ end
25
+
26
+ private
27
+
28
+ def self.load_fixture(fixture)
29
+ File.read(File.dirname(__FILE__) + "/xml/#{fixture}.xml")
30
+ end
31
+
32
+ end
@@ -0,0 +1,14 @@
1
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
2
+ <soap:Body>
3
+ <ns2:authenticateResponse xmlns:ns2="http://v1_0.ws.user.example.com">
4
+ <return>
5
+ <authenticationValue>
6
+ <token>a68d1d6379b62ff339a0e0c69ed4d9cf</token>
7
+ <tokenHash>AAAJxA;cIedoT;mY10ExZwG6JuKgp2OYKxow==</tokenHash>
8
+ <client>radclient</client>
9
+ </authenticationValue>
10
+ <success>true</success>
11
+ </return>
12
+ </ns2:authenticateResponse>
13
+ </soap:Body>
14
+ </soap:Envelope>
@@ -0,0 +1,37 @@
1
+ require "yaml"
2
+ require "erb"
3
+
4
+ class WSDLFixture
5
+
6
+ # Returns a WSDL document matching a given +method+ name when called without
7
+ # arguments. Otherwise returns the expected value for a given +method+ name
8
+ # matching a fixture.
9
+ def self.method_missing(method, *args)
10
+ return wsdl(method) unless args.first
11
+ expectations[method][args.first]
12
+ end
13
+
14
+ private
15
+
16
+ @@expectations = nil
17
+
18
+ # Returns a Hash of expected namespace URI's and SOAP operations loaded
19
+ # from wsdl_fixture.yml.
20
+ def self.expectations
21
+ return @@expectations if @@expectations
22
+
23
+ file = File.read(File.dirname(__FILE__) + "/wsdl_fixture.yml")
24
+ @@expectations = YAML.load ERB.new(file).result
25
+ end
26
+
27
+ @@wsdl = {}
28
+
29
+ # Returns the WSDL document by a given file name.
30
+ def self.wsdl(wsdl)
31
+ return @@wsdl[wsdl] if @@wsdl[wsdl]
32
+
33
+ file = File.read(File.dirname(__FILE__) + "/xml/#{wsdl}.xml")
34
+ @@wsdl[wsdl] = file
35
+ end
36
+
37
+ end
@@ -0,0 +1,63 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><wsdl:definitions name="AuthenticationWebServiceImplService" targetNamespace="http://v1_0.ws.auth.order.example.com/" xmlns:ns1="http://cxf.apache.org/bindings/xformat" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://v1_0.ws.auth.order.example.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
2
+ <wsdl:types>
3
+ <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://v1_0.ws.auth.order.example.com/" xmlns:tns="http://v1_0.ws.auth.order.example.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
4
+ <xs:element name="authenticate" type="tns:authenticate" />
5
+ <xs:element name="authenticateResponse" type="tns:authenticateResponse" />
6
+ <xs:element name="authenticationResult" type="tns:authenticationResult" />
7
+ <xs:element name="authenticationValue" type="tns:authenticationValue" />
8
+ <xs:complexType name="authenticate">
9
+ <xs:sequence>
10
+ <xs:element minOccurs="0" name="user" type="xs:string" />
11
+ <xs:element minOccurs="0" name="password" type="xs:string" />
12
+ </xs:sequence>
13
+ </xs:complexType>
14
+ <xs:complexType name="authenticateResponse">
15
+ <xs:sequence>
16
+ <xs:element minOccurs="0" name="return" type="tns:authenticationResult" />
17
+ </xs:sequence>
18
+ </xs:complexType>
19
+ <xs:complexType name="authenticationResult">
20
+ <xs:sequence>
21
+ <xs:element minOccurs="0" name="authenticationValue" nillable="true" type="tns:authenticationValue" />
22
+ <xs:element name="success" type="xs:boolean" />
23
+ </xs:sequence>
24
+ </xs:complexType>
25
+ <xs:complexType name="authenticationValue">
26
+ <xs:sequence>
27
+ <xs:element name="token" type="xs:string" />
28
+ <xs:element name="tokenHash" type="xs:string" />
29
+ <xs:element name="client" type="xs:string" />
30
+ </xs:sequence>
31
+ </xs:complexType>
32
+ </xs:schema>
33
+ </wsdl:types>
34
+ <wsdl:message name="authenticate">
35
+ <wsdl:part element="tns:authenticate" name="parameters" />
36
+ </wsdl:message>
37
+ <wsdl:message name="authenticateResponse">
38
+ <wsdl:part element="tns:authenticateResponse" name="parameters" />
39
+ </wsdl:message>
40
+ <wsdl:portType name="AuthenticationWebService">
41
+ <wsdl:operation name="authenticate">
42
+ <wsdl:input message="tns:authenticate" name="authenticate" />
43
+ <wsdl:output message="tns:authenticateResponse" name="authenticateResponse" />
44
+ </wsdl:operation>
45
+ </wsdl:portType>
46
+ <wsdl:binding name="AuthenticationWebServiceImplServiceSoapBinding" type="tns:AuthenticationWebService">
47
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
48
+ <wsdl:operation name="authenticate">
49
+ <soap:operation soapAction="" style="document" />
50
+ <wsdl:input name="authenticate">
51
+ <soap:body use="literal" />
52
+ </wsdl:input>
53
+ <wsdl:output name="authenticateResponse">
54
+ <soap:body use="literal" />
55
+ </wsdl:output>
56
+ </wsdl:operation>
57
+ </wsdl:binding>
58
+ <wsdl:service name="AuthenticationWebServiceImplService">
59
+ <wsdl:port binding="tns:AuthenticationWebServiceImplServiceSoapBinding" name="AuthenticationWebServiceImplPort">
60
+ <soap:address location="http://example.com/validation/1.0/AuthenticationService" />
61
+ </wsdl:port>
62
+ </wsdl:service>
63
+ </wsdl:definitions>
@@ -0,0 +1,307 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 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://api.example.com/api/" 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://api.example.com/api/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
3
+ <wsdl:types>
4
+ <s:schema elementFormDefault="qualified" targetNamespace="http://api.example.com/api/">
5
+ <s:element name="User.GetApiKey">
6
+ <s:complexType>
7
+ <s:sequence>
8
+ <s:element minOccurs="0" maxOccurs="1" name="SiteUrl" type="s:string"/>
9
+ <s:element minOccurs="0" maxOccurs="1" name="Username" type="s:string"/>
10
+ <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/>
11
+ </s:sequence>
12
+ </s:complexType>
13
+ </s:element>
14
+ <s:element name="User.GetApiKeyResponse">
15
+ <s:complexType>
16
+ <s:sequence>
17
+ <s:element minOccurs="0" maxOccurs="1" name="User.GetApiKeyResult"/>
18
+ </s:sequence>
19
+ </s:complexType>
20
+ </s:element>
21
+ <s:complexType name="Result">
22
+ <s:sequence>
23
+ <s:element minOccurs="1" maxOccurs="1" name="Code" type="s:int"/>
24
+ <s:element minOccurs="0" maxOccurs="1" name="Message" type="s:string"/>
25
+ </s:sequence>
26
+ </s:complexType>
27
+ <s:complexType name="Client">
28
+ <s:sequence>
29
+ <s:element minOccurs="0" maxOccurs="1" name="ClientID" type="s:string"/>
30
+ <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string"/>
31
+ </s:sequence>
32
+ </s:complexType>
33
+ <s:complexType name="ArrayOfClient">
34
+ <s:sequence>
35
+ <s:element minOccurs="0" maxOccurs="unbounded" name="Client" nillable="true" type="tns:Client"/>
36
+ </s:sequence>
37
+ </s:complexType>
38
+ <s:element name="Client.Delete">
39
+ <s:complexType>
40
+ <s:sequence>
41
+ <s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
42
+ <s:element minOccurs="0" maxOccurs="1" name="ClientID" type="s:string"/>
43
+ </s:sequence>
44
+ </s:complexType>
45
+ </s:element>
46
+ <s:element name="Client.DeleteResponse">
47
+ <s:complexType>
48
+ <s:sequence>
49
+ <s:element minOccurs="0" maxOccurs="1" name="Client.DeleteResult" type="tns:Result"/>
50
+ </s:sequence>
51
+ </s:complexType>
52
+ </s:element>
53
+ <s:element name="User.GetClients">
54
+ <s:complexType>
55
+ <s:sequence>
56
+ <s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
57
+ </s:sequence>
58
+ </s:complexType>
59
+ </s:element>
60
+ <s:element name="User.GetClientsResponse">
61
+ <s:complexType>
62
+ <s:sequence>
63
+ <s:element minOccurs="0" maxOccurs="1" name="User.GetClientsResult"/>
64
+ </s:sequence>
65
+ </s:complexType>
66
+ </s:element>
67
+ <s:element name="anyType" nillable="true"/>
68
+ <s:element name="Result" nillable="true" type="tns:Result"/>
69
+ </s:schema>
70
+ </wsdl:types>
71
+ <wsdl:message name="User.GetApiKeySoapIn">
72
+ <wsdl:part name="parameters" element="tns:User.GetApiKey"/>
73
+ </wsdl:message>
74
+ <wsdl:message name="User.GetApiKeySoapOut">
75
+ <wsdl:part name="parameters" element="tns:User.GetApiKeyResponse"/>
76
+ </wsdl:message>
77
+ <wsdl:message name="Client.DeleteSoapIn">
78
+ <wsdl:part name="parameters" element="tns:Client.Delete"/>
79
+ </wsdl:message>
80
+ <wsdl:message name="Client.DeleteSoapOut">
81
+ <wsdl:part name="parameters" element="tns:Client.DeleteResponse"/>
82
+ </wsdl:message>
83
+ <wsdl:message name="User.GetClientsSoapIn">
84
+ <wsdl:part name="parameters" element="tns:User.GetClients"/>
85
+ </wsdl:message>
86
+ <wsdl:message name="User.GetClientsSoapOut">
87
+ <wsdl:part name="parameters" element="tns:User.GetClientsResponse"/>
88
+ </wsdl:message>
89
+ <wsdl:message name="User.GetApiKeyHttpGetIn">
90
+ <wsdl:part name="SiteUrl" type="s:string"/>
91
+ <wsdl:part name="Username" type="s:string"/>
92
+ <wsdl:part name="Password" type="s:string"/>
93
+ </wsdl:message>
94
+ <wsdl:message name="User.GetApiKeyHttpGetOut">
95
+ <wsdl:part name="Body" element="tns:anyType"/>
96
+ </wsdl:message>
97
+ <wsdl:message name="Client.DeleteHttpGetIn">
98
+ <wsdl:part name="ApiKey" type="s:string"/>
99
+ <wsdl:part name="ClientID" type="s:string"/>
100
+ </wsdl:message>
101
+ <wsdl:message name="Client.DeleteHttpGetOut">
102
+ <wsdl:part name="Body" element="tns:Result"/>
103
+ </wsdl:message>
104
+ <wsdl:message name="User.GetClientsHttpGetIn">
105
+ <wsdl:part name="ApiKey" type="s:string"/>
106
+ </wsdl:message>
107
+ <wsdl:message name="User.GetClientsHttpGetOut">
108
+ <wsdl:part name="Body" element="tns:anyType"/>
109
+ </wsdl:message>
110
+ <wsdl:message name="User.GetApiKeyHttpPostIn">
111
+ <wsdl:part name="SiteUrl" type="s:string"/>
112
+ <wsdl:part name="Username" type="s:string"/>
113
+ <wsdl:part name="Password" type="s:string"/>
114
+ </wsdl:message>
115
+ <wsdl:message name="User.GetApiKeyHttpPostOut">
116
+ <wsdl:part name="Body" element="tns:anyType"/>
117
+ </wsdl:message>
118
+ <wsdl:message name="Client.DeleteHttpPostIn">
119
+ <wsdl:part name="ApiKey" type="s:string"/>
120
+ <wsdl:part name="ClientID" type="s:string"/>
121
+ </wsdl:message>
122
+ <wsdl:message name="Client.DeleteHttpPostOut">
123
+ <wsdl:part name="Body" element="tns:Result"/>
124
+ </wsdl:message>
125
+ <wsdl:message name="User.GetClientsHttpPostIn">
126
+ <wsdl:part name="ApiKey" type="s:string"/>
127
+ </wsdl:message>
128
+ <wsdl:message name="User.GetClientsHttpPostOut">
129
+ <wsdl:part name="Body" element="tns:anyType"/>
130
+ </wsdl:message>
131
+ <wsdl:portType name="apiSoap">
132
+ <wsdl:operation name="GetApiKey">
133
+ <wsdl:input name="User.GetApiKey" message="tns:User.GetApiKeySoapIn"/>
134
+ <wsdl:output name="User.GetApiKey" message="tns:User.GetApiKeySoapOut"/>
135
+ </wsdl:operation>
136
+ <wsdl:operation name="DeleteClient">
137
+ <wsdl:input name="Client.Delete" message="tns:Client.DeleteSoapIn"/>
138
+ <wsdl:output name="Client.Delete" message="tns:Client.DeleteSoapOut"/>
139
+ </wsdl:operation>
140
+ <wsdl:operation name="GetClients">
141
+ <wsdl:input name="User.GetClients" message="tns:User.GetClientsSoapIn"/>
142
+ <wsdl:output name="User.GetClients" message="tns:User.GetClientsSoapOut"/>
143
+ </wsdl:operation>
144
+ </wsdl:portType>
145
+ <wsdl:portType name="apiHttpGet">
146
+ <wsdl:operation name="GetApiKey">
147
+ <wsdl:input name="User.GetApiKey" message="tns:User.GetApiKeyHttpGetIn"/>
148
+ <wsdl:output name="User.GetApiKey" message="tns:User.GetApiKeyHttpGetOut"/>
149
+ </wsdl:operation>
150
+ <wsdl:operation name="DeleteClient">
151
+ <wsdl:input name="Client.Delete" message="tns:Client.DeleteHttpGetIn"/>
152
+ <wsdl:output name="Client.Delete" message="tns:Client.DeleteHttpGetOut"/>
153
+ </wsdl:operation>
154
+ <wsdl:operation name="GetClients">
155
+ <wsdl:input name="User.GetClients" message="tns:User.GetClientsHttpGetIn"/>
156
+ <wsdl:output name="User.GetClients" message="tns:User.GetClientsHttpGetOut"/>
157
+ </wsdl:operation>
158
+ </wsdl:portType>
159
+ <wsdl:portType name="apiHttpPost">
160
+ <wsdl:operation name="GetApiKey">
161
+ <wsdl:input name="User.GetApiKey" message="tns:User.GetApiKeyHttpPostIn"/>
162
+ <wsdl:output name="User.GetApiKey" message="tns:User.GetApiKeyHttpPostOut"/>
163
+ </wsdl:operation>
164
+ <wsdl:operation name="DeleteClient">
165
+ <wsdl:input name="Client.Delete" message="tns:Client.DeleteHttpPostIn"/>
166
+ <wsdl:output name="Client.Delete" message="tns:Client.DeleteHttpPostOut"/>
167
+ </wsdl:operation>
168
+ <wsdl:operation name="GetClients">
169
+ <wsdl:input name="User.GetClients" message="tns:User.GetClientsHttpPostIn"/>
170
+ <wsdl:output name="User.GetClients" message="tns:User.GetClientsHttpPostOut"/>
171
+ </wsdl:operation>
172
+ </wsdl:portType>
173
+ <wsdl:binding name="apiSoap" type="tns:apiSoap">
174
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
175
+ <wsdl:operation name="GetApiKey">
176
+ <soap:operation soapAction="http://api.example.com/api/User.GetApiKey" style="document"/>
177
+ <wsdl:input name="User.GetApiKey">
178
+ <soap:body use="literal"/>
179
+ </wsdl:input>
180
+ <wsdl:output name="User.GetApiKey">
181
+ <soap:body use="literal"/>
182
+ </wsdl:output>
183
+ </wsdl:operation>
184
+ <wsdl:operation name="DeleteClient">
185
+ <soap:operation soapAction="http://api.example.com/api/Client.Delete" style="document"/>
186
+ <wsdl:input name="Client.Delete">
187
+ <soap:body use="literal"/>
188
+ </wsdl:input>
189
+ <wsdl:output name="Client.Delete">
190
+ <soap:body use="literal"/>
191
+ </wsdl:output>
192
+ </wsdl:operation>
193
+ <wsdl:operation name="GetClients">
194
+ <soap:operation soapAction="http://api.example.com/api/User.GetClients" style="document"/>
195
+ <wsdl:input name="User.GetClients">
196
+ <soap:body use="literal"/>
197
+ </wsdl:input>
198
+ <wsdl:output name="User.GetClients">
199
+ <soap:body use="literal"/>
200
+ </wsdl:output>
201
+ </wsdl:operation>
202
+ </wsdl:binding>
203
+ <wsdl:binding name="apiSoap12" type="tns:apiSoap">
204
+ <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
205
+ <wsdl:operation name="GetApiKey">
206
+ <soap12:operation soapAction="http://api.example.com/api/User.GetApiKey" style="document"/>
207
+ <wsdl:input name="User.GetApiKey">
208
+ <soap12:body use="literal"/>
209
+ </wsdl:input>
210
+ <wsdl:output name="User.GetApiKey">
211
+ <soap12:body use="literal"/>
212
+ </wsdl:output>
213
+ </wsdl:operation>
214
+ <wsdl:operation name="DeleteClient">
215
+ <soap12:operation soapAction="http://api.example.com/api/Client.Delete" style="document"/>
216
+ <wsdl:input name="Client.Delete">
217
+ <soap12:body use="literal"/>
218
+ </wsdl:input>
219
+ <wsdl:output name="Client.Delete">
220
+ <soap12:body use="literal"/>
221
+ </wsdl:output>
222
+ </wsdl:operation>
223
+ <wsdl:operation name="GetClients">
224
+ <soap12:operation soapAction="http://api.example.com/api/User.GetClients" style="document"/>
225
+ <wsdl:input name="User.GetClients">
226
+ <soap12:body use="literal"/>
227
+ </wsdl:input>
228
+ <wsdl:output name="User.GetClients">
229
+ <soap12:body use="literal"/>
230
+ </wsdl:output>
231
+ </wsdl:operation>
232
+ </wsdl:binding>
233
+ <wsdl:binding name="apiHttpGet" type="tns:apiHttpGet">
234
+ <http:binding verb="GET"/>
235
+ <wsdl:operation name="GetApiKey">
236
+ <http:operation location="/User.GetApiKey"/>
237
+ <wsdl:input name="User.GetApiKey">
238
+ <http:urlEncoded/>
239
+ </wsdl:input>
240
+ <wsdl:output name="User.GetApiKey">
241
+ <mime:mimeXml part="Body"/>
242
+ </wsdl:output>
243
+ </wsdl:operation>
244
+ <wsdl:operation name="DeleteClient">
245
+ <http:operation location="/Client.Delete"/>
246
+ <wsdl:input name="Client.Delete">
247
+ <http:urlEncoded/>
248
+ </wsdl:input>
249
+ <wsdl:output name="Client.Delete">
250
+ <mime:mimeXml part="Body"/>
251
+ </wsdl:output>
252
+ </wsdl:operation>
253
+ <wsdl:operation name="GetClients">
254
+ <http:operation location="/User.GetClients"/>
255
+ <wsdl:input name="User.GetClients">
256
+ <http:urlEncoded/>
257
+ </wsdl:input>
258
+ <wsdl:output name="User.GetClients">
259
+ <mime:mimeXml part="Body"/>
260
+ </wsdl:output>
261
+ </wsdl:operation>
262
+ </wsdl:binding>
263
+ <wsdl:binding name="apiHttpPost" type="tns:apiHttpPost">
264
+ <http:binding verb="POST"/>
265
+ <wsdl:operation name="GetApiKey">
266
+ <http:operation location="/User.GetApiKey"/>
267
+ <wsdl:input name="User.GetApiKey">
268
+ <mime:content type="application/x-www-form-urlencoded"/>
269
+ </wsdl:input>
270
+ <wsdl:output name="User.GetApiKey">
271
+ <mime:mimeXml part="Body"/>
272
+ </wsdl:output>
273
+ </wsdl:operation>
274
+ <wsdl:operation name="DeleteClient">
275
+ <http:operation location="/Client.Delete"/>
276
+ <wsdl:input name="Client.Delete">
277
+ <mime:content type="application/x-www-form-urlencoded"/>
278
+ </wsdl:input>
279
+ <wsdl:output name="Client.Delete">
280
+ <mime:mimeXml part="Body"/>
281
+ </wsdl:output>
282
+ </wsdl:operation>
283
+ <wsdl:operation name="GetClients">
284
+ <http:operation location="/User.GetClients"/>
285
+ <wsdl:input name="User.GetClients">
286
+ <mime:content type="application/x-www-form-urlencoded"/>
287
+ </wsdl:input>
288
+ <wsdl:output name="User.GetClients">
289
+ <mime:mimeXml part="Body"/>
290
+ </wsdl:output>
291
+ </wsdl:operation>
292
+ </wsdl:binding>
293
+ <wsdl:service name="api">
294
+ <wsdl:port name="apiSoap" binding="tns:apiSoap">
295
+ <soap:address location="https://api.example.com/api/api.asmx"/>
296
+ </wsdl:port>
297
+ <wsdl:port name="apiSoap12" binding="tns:apiSoap12">
298
+ <soap12:address location="https://api.example.com/api/api.asmx"/>
299
+ </wsdl:port>
300
+ <wsdl:port name="apiHttpGet" binding="tns:apiHttpGet">
301
+ <http:address location="https://api.example.com/api/api.asmx"/>
302
+ </wsdl:port>
303
+ <wsdl:port name="apiHttpPost" binding="tns:apiHttpPost">
304
+ <http:address location="https://api.example.com/api/api.asmx"/>
305
+ </wsdl:port>
306
+ </wsdl:service>
307
+ </wsdl:definitions>