savon 0.6.0 → 0.7.0

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 (51) hide show
  1. data/CHANGELOG +112 -0
  2. data/README.textile +42 -35
  3. data/Rakefile +28 -33
  4. data/lib/savon/client.rb +42 -19
  5. data/lib/savon/core_ext/hash.rb +35 -22
  6. data/lib/savon/core_ext/net_http.rb +20 -0
  7. data/lib/savon/core_ext/object.rb +7 -0
  8. data/lib/savon/core_ext/string.rb +1 -1
  9. data/lib/savon/core_ext.rb +2 -2
  10. data/lib/savon/request.rb +73 -33
  11. data/lib/savon/response.rb +23 -36
  12. data/lib/savon/soap.rb +63 -30
  13. data/lib/savon/wsdl.rb +82 -35
  14. data/lib/savon/wsse.rb +41 -35
  15. data/lib/savon.rb +3 -2
  16. data/spec/basic_spec_helper.rb +12 -0
  17. data/spec/endpoint_helper.rb +22 -0
  18. data/spec/fixtures/response/response_fixture.rb +36 -0
  19. data/spec/fixtures/response/xml/authentication.xml +14 -0
  20. data/spec/fixtures/response/xml/multi_ref.xml +39 -0
  21. data/spec/fixtures/response/xml/soap_fault12.xml +18 -0
  22. data/spec/fixtures/wsdl/wsdl_fixture.rb +37 -0
  23. data/spec/fixtures/wsdl/xml/authentication.xml +63 -0
  24. data/spec/fixtures/wsdl/xml/namespaced_actions.xml +307 -0
  25. data/spec/fixtures/wsdl/xml/no_namespace.xml +115 -0
  26. data/spec/http_stubs.rb +17 -19
  27. data/spec/integration/http_basic_auth_spec.rb +12 -0
  28. data/spec/integration/server.rb +51 -0
  29. data/spec/savon/client_spec.rb +52 -44
  30. data/spec/savon/core_ext/datetime_spec.rb +2 -2
  31. data/spec/savon/core_ext/hash_spec.rb +34 -31
  32. data/spec/savon/core_ext/net_http_spec.rb +38 -0
  33. data/spec/savon/core_ext/object_spec.rb +16 -2
  34. data/spec/savon/core_ext/string_spec.rb +4 -4
  35. data/spec/savon/core_ext/symbol_spec.rb +1 -1
  36. data/spec/savon/core_ext/uri_spec.rb +1 -1
  37. data/spec/savon/request_spec.rb +49 -63
  38. data/spec/savon/response_spec.rb +48 -51
  39. data/spec/savon/savon_spec.rb +12 -19
  40. data/spec/savon/soap_spec.rb +81 -90
  41. data/spec/savon/wsdl_spec.rb +62 -30
  42. data/spec/savon/wsse_spec.rb +58 -84
  43. data/spec/spec_helper.rb +3 -13
  44. metadata +29 -15
  45. data/VERSION +0 -1
  46. data/spec/fixtures/multiple_user_response.xml +0 -22
  47. data/spec/fixtures/user_fixture.rb +0 -54
  48. data/spec/fixtures/user_response.xml +0 -15
  49. data/spec/fixtures/user_wsdl.xml +0 -124
  50. data/spec/spec_helper_methods.rb +0 -33
  51. /data/spec/fixtures/{soap_fault.xml → response/xml/soap_fault.xml} +0 -0
@@ -1,52 +1,84 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe Savon::WSDL do
4
- before { @wsdl = some_wsdl_instance }
4
+ describe "a common WSDL document" do
5
+ before { @wsdl = new_wsdl }
5
6
 
6
- def some_wsdl_instance
7
- Savon::WSDL.new Savon::Request.new SpecHelper.some_endpoint
8
- end
9
-
10
- describe "initialize" do
11
- it "expects a Savon::Request object" do
12
- some_wsdl_instance
7
+ it "is initialized with a Savon::Request object" do
8
+ Savon::WSDL.new Savon::Request.new(EndpointHelper.wsdl_endpoint)
13
9
  end
14
- end
15
10
 
16
- describe "namespace_uri" do
17
- it "returns the namespace URI from the WSDL" do
18
- @wsdl.namespace_uri.should == UserFixture.namespace_uri
11
+ it "is enabled by default" do
12
+ @wsdl.enabled?.should be_true
19
13
  end
20
- end
21
14
 
22
- describe "soap_actions" do
23
- it "returns a Hash containing all available SOAP actions, as well as" <<
24
- "their original names and inputs" do
25
- @wsdl.soap_actions.should == UserFixture.soap_actions
15
+ it "has a getter for the namespace URI" do
16
+ @wsdl.namespace_uri.should == WSDLFixture.authentication(:namespace_uri)
26
17
  end
27
18
 
28
- it "raises an ArgumentError in case the WSDL seems to be invalid" do
29
- wsdl = Savon::WSDL.new Savon::Request.new SpecHelper.invalid_endpoint
30
- lambda { wsdl.soap_actions }.should raise_error ArgumentError
19
+ it "has a getter for returning an Array of available SOAP actions" do
20
+ WSDLFixture.authentication(:operations).keys.each do |soap_action|
21
+ @wsdl.soap_actions.should include(soap_action)
22
+ end
31
23
  end
32
- end
33
24
 
34
- describe "respond_to?" do
35
- it "returns true for available SOAP actions" do
36
- @wsdl.respond_to?(UserFixture.soap_actions.keys.first).
37
- should be_true
25
+ it "has a getter for returning a Hash of available SOAP operations" do
26
+ @wsdl.operations.should == WSDLFixture.authentication(:operations)
38
27
  end
39
28
 
40
- it "still behaves like usual otherwise" do
29
+ it "responds to SOAP actions while still behaving as usual otherwise" do
30
+ WSDLFixture.authentication(:operations).keys.each do |soap_action|
31
+ @wsdl.respond_to?(soap_action).should be_true
32
+ end
33
+
41
34
  @wsdl.respond_to?(:object_id).should be_true
42
35
  @wsdl.respond_to?(:some_undefined_method).should be_false
43
36
  end
37
+
38
+ it "returns the raw WSDL document for to_s" do
39
+ @wsdl.to_s.should == WSDLFixture.authentication
40
+ end
44
41
  end
45
42
 
46
- describe "to_s" do
47
- it "returns the WSDL document" do
48
- @wsdl.to_s.should == UserFixture.user_wsdl
43
+ describe "a WSDL document having core sections without a namespace" do
44
+ before { @wsdl = new_wsdl :no_namespace }
45
+
46
+ it "returns the namespace URI" do
47
+ @wsdl.namespace_uri.should == WSDLFixture.no_namespace(:namespace_uri)
49
48
  end
49
+
50
+ it "returns an Array of available SOAP actions" do
51
+ WSDLFixture.no_namespace(:operations).keys.each do |soap_action|
52
+ @wsdl.soap_actions.should include(soap_action)
53
+ end
54
+ end
55
+
56
+ it "returns a Hash of SOAP operations" do
57
+ @wsdl.operations.should == WSDLFixture.no_namespace(:operations)
58
+ end
59
+ end
60
+
61
+ describe "a WSDL document with namespaced SOAP actions" do
62
+ before { @wsdl = new_wsdl :namespaced_actions }
63
+
64
+ it "returns the namespace URI" do
65
+ @wsdl.namespace_uri.should == WSDLFixture.namespaced_actions(:namespace_uri)
66
+ end
67
+
68
+ it "returns an Array of available SOAP actions" do
69
+ WSDLFixture.namespaced_actions(:operations).keys.each do |soap_action|
70
+ @wsdl.soap_actions.should include(soap_action)
71
+ end
72
+ end
73
+
74
+ it "returns a Hash of SOAP operations" do
75
+ @wsdl.operations.should == WSDLFixture.namespaced_actions(:operations)
76
+ end
77
+ end
78
+
79
+ def new_wsdl(fixture = nil)
80
+ endpoint = fixture ? EndpointHelper.wsdl_endpoint(fixture) : EndpointHelper.wsdl_endpoint
81
+ Savon::WSDL.new Savon::Request.new(endpoint)
50
82
  end
51
83
 
52
- end
84
+ end
@@ -2,99 +2,76 @@ require "spec_helper"
2
2
 
3
3
  describe Savon::WSSE do
4
4
  before do
5
+ Savon::WSSE.username = nil
6
+ Savon::WSSE.password = nil
7
+ Savon::WSSE.digest = false
8
+
5
9
  @wsse = Savon::WSSE.new
6
- @username = "gorilla"
7
- @password = "secret"
10
+ @username, @password = "gorilla", "secret"
8
11
  end
9
12
 
10
- describe "WSENamespace" do
11
- it "contains namespace for WS Security Secext" do
12
- Savon::WSSE::WSENamespace.should be_a String
13
- Savon::WSSE::WSENamespace.should_not be_empty
14
- end
13
+ it "contains the namespace for WS Security Secext" do
14
+ Savon::WSSE::WSENamespace.should be_a(String)
15
+ Savon::WSSE::WSENamespace.should_not be_empty
15
16
  end
16
17
 
17
- describe "WSUNamespace" do
18
- it "contains namespace for WS Security Utility" do
19
- Savon::WSSE::WSUNamespace.should be_a String
20
- Savon::WSSE::WSUNamespace.should_not be_empty
21
- end
18
+ it "contains the namespace for WS Security Utility" do
19
+ Savon::WSSE::WSUNamespace.should be_a(String)
20
+ Savon::WSSE::WSUNamespace.should_not be_empty
22
21
  end
23
22
 
24
- describe "@username" do
25
- it "defaults to an empty String" do
26
- Savon::WSSE.username.should be_a String
27
- Savon::WSSE.username.should be_empty
28
- end
23
+ it "defaults to nil for the WSSE username (global setting)" do
24
+ Savon::WSSE.username.should be_nil
25
+ end
29
26
 
30
- it "has accessor methods" do
31
- Savon::WSSE.username = "gorilla"
32
- Savon::WSSE.username.should == "gorilla"
33
- Savon::WSSE.username = ""
34
- end
27
+ it "has both getter and setter for the WSSE username (global setting)" do
28
+ Savon::WSSE.username = "gorilla"
29
+ Savon::WSSE.username.should == "gorilla"
35
30
  end
36
31
 
37
- describe "@password" do
38
- it "defaults to an empty String" do
39
- Savon::WSSE.password.should be_a String
40
- Savon::WSSE.password.should be_empty
41
- end
32
+ it "defaults to nil for the WSSE password (global setting)" do
33
+ Savon::WSSE.password.should be_nil
34
+ end
42
35
 
43
- it "has accessor methods" do
44
- Savon::WSSE.password = "secret"
45
- Savon::WSSE.password.should == "secret"
46
- Savon::WSSE.password = ""
47
- end
36
+ it "has both getter and setter for the WSSE password (global setting)" do
37
+ Savon::WSSE.password = "secret"
38
+ Savon::WSSE.password.should == "secret"
48
39
  end
49
40
 
50
- describe "@digest" do
51
- it "defaults to false" do
52
- Savon::WSSE.digest?.should be_false
53
- end
41
+ it "defaults to nil for whether to use WSSE digest (global setting)" do
42
+ Savon::WSSE.digest?.should be_false
43
+ end
54
44
 
55
- it "has accessor methods" do
56
- Savon::WSSE.digest = true
57
- Savon::WSSE.digest?.should == true
58
- Savon::WSSE.digest = false
59
- end
45
+ it "has both getter and setter for whether to use WSSE digest (global setting)" do
46
+ Savon::WSSE.digest = true
47
+ Savon::WSSE.digest?.should == true
60
48
  end
61
49
 
62
- describe "username" do
63
- it "defaults to an empty String" do
64
- @wsse.username.should be_a String
65
- @wsse.username.should be_empty
66
- end
50
+ it "defaults to nil for the WSSE username" do
51
+ @wsse.username.should be_nil
52
+ end
67
53
 
68
- it "has accessor methods" do
69
- @wsse.username = "gorilla"
70
- @wsse.username.should == "gorilla"
71
- @wsse.username = nil
72
- end
54
+ it "has both getter and setter for the WSSE username" do
55
+ @wsse.username = "gorilla"
56
+ @wsse.username.should == "gorilla"
73
57
  end
74
58
 
75
- describe "password" do
76
- it "defaults to an empty String" do
77
- @wsse.password.should be_a String
78
- @wsse.password.should be_empty
79
- end
59
+ it "defaults to nil for the WSSE password" do
60
+ @wsse.password.should be_nil
61
+ end
80
62
 
81
- it "has accessor methods" do
82
- @wsse.password = "secret"
83
- @wsse.password.should == "secret"
84
- @wsse.password = nil
85
- end
63
+ it "has both getter and setter for the WSSE password" do
64
+ @wsse.password = "secret"
65
+ @wsse.password.should == "secret"
86
66
  end
87
67
 
88
- describe "digest" do
89
- it "defaults to false" do
90
- @wsse.digest?.should be_false
91
- end
68
+ it "defaults to nil for whether to use WSSE digest" do
69
+ @wsse.digest?.should be_false
70
+ end
92
71
 
93
- it "has accessor methods" do
94
- @wsse.digest = true
95
- @wsse.digest?.should == true
96
- @wsse.digest = false
97
- end
72
+ it "has both getter and setter for whether to use WSSE digest" do
73
+ @wsse.digest = true
74
+ @wsse.digest?.should == true
98
75
  end
99
76
 
100
77
  describe "header" do
@@ -105,8 +82,8 @@ describe Savon::WSSE do
105
82
  header = @wsse.header
106
83
 
107
84
  header.should include_security_namespaces
108
- header.should include @username
109
- header.should include @password
85
+ header.should include(@username)
86
+ header.should include(@password)
110
87
  end
111
88
 
112
89
  it "with WSSE credentials specified via defaults" do
@@ -115,11 +92,8 @@ describe Savon::WSSE do
115
92
  header = @wsse.header
116
93
 
117
94
  header.should include_security_namespaces
118
- header.should include @username
119
- header.should include @password
120
-
121
- Savon::WSSE.username = ""
122
- Savon::WSSE.password = ""
95
+ header.should include(@username)
96
+ header.should include(@password)
123
97
  end
124
98
  end
125
99
 
@@ -131,8 +105,8 @@ describe Savon::WSSE do
131
105
  header = @wsse.header
132
106
 
133
107
  header.should include_security_namespaces
134
- header.should include @username
135
- header.should_not include @password
108
+ header.should include(@username)
109
+ header.should_not include(@password)
136
110
  end
137
111
 
138
112
  it "via defaults" do
@@ -142,17 +116,17 @@ describe Savon::WSSE do
142
116
  header = @wsse.header
143
117
 
144
118
  header.should include_security_namespaces
145
- header.should include @username
146
- header.should_not include @password
119
+ header.should include(@username)
120
+ header.should_not include(@password)
147
121
  end
148
122
  end
149
123
 
150
124
  def include_security_namespaces
151
125
  simple_matcher("include security namespaces") do |given|
152
- given.should include Savon::WSSE::WSENamespace
153
- given.should include Savon::WSSE::WSUNamespace
126
+ given.should include(Savon::WSSE::WSENamespace)
127
+ given.should include(Savon::WSSE::WSUNamespace)
154
128
  end
155
129
  end
156
130
  end
157
131
 
158
- end
132
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,15 +1,5 @@
1
- require "rubygems"
2
- gem "rspec", ">= 1.2.8"
3
- require "spec"
4
- require "mocha"
1
+ require "basic_spec_helper"
5
2
 
6
- Spec::Runner.configure do |config|
7
- config.mock_with :mocha
8
- end
9
-
10
- require "savon"
11
- Savon::Request.log = false
12
-
13
- require "fixtures/user_fixture"
14
- require "spec_helper_methods"
3
+ FileList["spec/fixtures/**/*.rb"].each { |fixture| require fixture }
4
+ require "endpoint_helper"
15
5
  require "http_stubs"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: savon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Harrington
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-06 00:00:00 +01:00
12
+ date: 2010-01-09 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -62,7 +62,7 @@ dependencies:
62
62
  - !ruby/object:Gem::Version
63
63
  version: 1.2.7
64
64
  version:
65
- description: Heavy metal Ruby SOAP client library
65
+ description:
66
66
  email: me@rubiii.com
67
67
  executables: []
68
68
 
@@ -71,32 +71,35 @@ extensions: []
71
71
  extra_rdoc_files:
72
72
  - README.textile
73
73
  files:
74
- - README.textile
74
+ - CHANGELOG
75
75
  - Rakefile
76
- - VERSION
77
- - lib/savon.rb
76
+ - README.textile
78
77
  - lib/savon/client.rb
79
- - lib/savon/core_ext.rb
80
78
  - lib/savon/core_ext/datetime.rb
81
79
  - lib/savon/core_ext/hash.rb
80
+ - lib/savon/core_ext/net_http.rb
82
81
  - lib/savon/core_ext/object.rb
83
82
  - lib/savon/core_ext/string.rb
84
83
  - lib/savon/core_ext/symbol.rb
85
84
  - lib/savon/core_ext/uri.rb
85
+ - lib/savon/core_ext.rb
86
86
  - lib/savon/request.rb
87
87
  - lib/savon/response.rb
88
88
  - lib/savon/soap.rb
89
89
  - lib/savon/wsdl.rb
90
90
  - lib/savon/wsse.rb
91
- - spec/fixtures/multiple_user_response.xml
92
- - spec/fixtures/soap_fault.xml
93
- - spec/fixtures/user_fixture.rb
94
- - spec/fixtures/user_response.xml
95
- - spec/fixtures/user_wsdl.xml
91
+ - lib/savon.rb
92
+ - spec/basic_spec_helper.rb
93
+ - spec/endpoint_helper.rb
94
+ - spec/fixtures/response/response_fixture.rb
95
+ - spec/fixtures/wsdl/wsdl_fixture.rb
96
96
  - spec/http_stubs.rb
97
+ - spec/integration/http_basic_auth_spec.rb
98
+ - spec/integration/server.rb
97
99
  - spec/savon/client_spec.rb
98
100
  - spec/savon/core_ext/datetime_spec.rb
99
101
  - spec/savon/core_ext/hash_spec.rb
102
+ - spec/savon/core_ext/net_http_spec.rb
100
103
  - spec/savon/core_ext/object_spec.rb
101
104
  - spec/savon/core_ext/string_spec.rb
102
105
  - spec/savon/core_ext/symbol_spec.rb
@@ -108,7 +111,13 @@ files:
108
111
  - spec/savon/wsdl_spec.rb
109
112
  - spec/savon/wsse_spec.rb
110
113
  - spec/spec_helper.rb
111
- - spec/spec_helper_methods.rb
114
+ - spec/fixtures/response/xml/authentication.xml
115
+ - spec/fixtures/response/xml/multi_ref.xml
116
+ - spec/fixtures/response/xml/soap_fault.xml
117
+ - spec/fixtures/response/xml/soap_fault12.xml
118
+ - spec/fixtures/wsdl/xml/authentication.xml
119
+ - spec/fixtures/wsdl/xml/namespaced_actions.xml
120
+ - spec/fixtures/wsdl/xml/no_namespace.xml
112
121
  has_rdoc: true
113
122
  homepage: http://github.com/rubiii/savon
114
123
  licenses: []
@@ -142,11 +151,17 @@ signing_key:
142
151
  specification_version: 3
143
152
  summary: Heavy metal Ruby SOAP client library
144
153
  test_files:
145
- - spec/fixtures/user_fixture.rb
154
+ - spec/basic_spec_helper.rb
155
+ - spec/endpoint_helper.rb
156
+ - spec/fixtures/response/response_fixture.rb
157
+ - spec/fixtures/wsdl/wsdl_fixture.rb
146
158
  - spec/http_stubs.rb
159
+ - spec/integration/http_basic_auth_spec.rb
160
+ - spec/integration/server.rb
147
161
  - spec/savon/client_spec.rb
148
162
  - spec/savon/core_ext/datetime_spec.rb
149
163
  - spec/savon/core_ext/hash_spec.rb
164
+ - spec/savon/core_ext/net_http_spec.rb
150
165
  - spec/savon/core_ext/object_spec.rb
151
166
  - spec/savon/core_ext/string_spec.rb
152
167
  - spec/savon/core_ext/symbol_spec.rb
@@ -158,4 +173,3 @@ test_files:
158
173
  - spec/savon/wsdl_spec.rb
159
174
  - spec/savon/wsse_spec.rb
160
175
  - spec/spec_helper.rb
161
- - spec/spec_helper_methods.rb
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.6.0
@@ -1,22 +0,0 @@
1
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
2
- <soap:Body>
3
- <ns2:findUserResponse xmlns:ns2="http://v1_0.ws.user.example.com">
4
- <return>
5
- <id>666</id>
6
- <email>thedude@example.com</email>
7
- <username>thedude</username>
8
- <firstname>The</firstname>
9
- <lastname>Dude</lastname>
10
- <registered>2000-01-22T22:11:21</registered>
11
- </return>
12
- <return>
13
- <id>999</id>
14
- <email>anotherdude@example.com</email>
15
- <username>anotherdude</username>
16
- <firstname>Another</firstname>
17
- <lastname>Dude</lastname>
18
- <registered>1984-05-26T11:22:12</registered>
19
- </return>
20
- </ns2:findUserResponse>
21
- </soap:Body>
22
- </soap:Envelope>
@@ -1,54 +0,0 @@
1
- class UserFixture
2
-
3
- @namespace_uri = "http://v1_0.ws.user.example.com"
4
- @soap_actions = {
5
- :user_find_by_id => { :name => "User.FindById", :input => "User.FindById" },
6
- :find_user => { :name => "findUser", :input => "findUser" }
7
- }
8
-
9
- @datetime_string = "2010-11-22T11:22:33"
10
- @datetime_object = DateTime.parse @datetime_string
11
-
12
- @response_hash = {
13
- :ns2 => "http://v1_0.ws.user.example.com",
14
- :return => {
15
- :active => true,
16
- :firstname => "The",
17
- :lastname => "Dude",
18
- :email => "thedude@example.com",
19
- :id => "666",
20
- :registered => @datetime_object,
21
- :username => "thedude"
22
- }
23
- }
24
-
25
- class << self
26
-
27
- attr_accessor :namespace_uri, :soap_actions,
28
- :datetime_string, :datetime_object, :response_hash
29
-
30
- def user_wsdl
31
- load_fixture :user_wsdl
32
- end
33
-
34
- def user_response
35
- load_fixture :user_response
36
- end
37
-
38
- def multiple_user_response
39
- load_fixture :multiple_user_response
40
- end
41
-
42
- def soap_fault
43
- load_fixture :soap_fault
44
- end
45
-
46
- private
47
-
48
- def load_fixture(file)
49
- file_path = File.join File.dirname(__FILE__), "#{file}.xml"
50
- IO.readlines(file_path, "").to_s
51
- end
52
-
53
- end
54
- end
@@ -1,15 +0,0 @@
1
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
2
- <soap:Body>
3
- <ns2:findUserResponse xmlns:ns2="http://v1_0.ws.user.example.com">
4
- <return>
5
- <id>666</id>
6
- <email>thedude@example.com</email>
7
- <username>thedude</username>
8
- <firstname>The</firstname>
9
- <lastname>Dude</lastname>
10
- <registered>2010-11-22T11:22:33</registered>
11
- <active>true</active>
12
- </return>
13
- </ns2:findUserResponse>
14
- </soap:Body>
15
- </soap:Envelope>
@@ -1,124 +0,0 @@
1
- <wsdl:definitions
2
- name="UserWebService"
3
- targetNamespace="http://v1_0.ws.user.example.com"
4
- xmlns:ns1="http://cxf.apache.org/bindings/xformat"
5
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
6
- xmlns:tns="http://v1_0.ws.user.example.com"
7
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
8
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
9
-
10
- <wsdl:types>
11
- <xs:schema
12
- attributeFormDefault="unqualified"
13
- elementFormDefault="unqualified"
14
- targetNamespace="http://v1_0.ws.user.example.com"
15
- xmlns:tns="http://v1_0.ws.user.example.com"
16
- xmlns:xs="http://www.w3.org/2001/XMLSchema">
17
- <xs:element name="findUser" type="tns:findUser" />
18
- <xs:element name="User.FindById" type="tns:findUser" />
19
- <xs:element name="findUserRequest" type="tns:findUserRequest" />
20
- <xs:element name="baseFindUserRequest" type="tns:baseFindUserRequest" />
21
- <xs:element name="idCredential" type="tns:idCredential" />
22
- <xs:element name="emailCredential" type="tns:emailCredential" />
23
- <xs:element name="findUserResponse" type="tns:findUserResponse" />
24
- <xs:element name="User.FindByIdResponse" type="tns:findUserResponse" />
25
- <xs:element name="userResponse" type="tns:userResponse" />
26
-
27
- <xs:complexType name="findUser">
28
- <xs:sequence>
29
- <xs:element minOccurs="1" name="requestData" type="tns:findUserRequest" />
30
- </xs:sequence>
31
- </xs:complexType>
32
- <xs:complexType name="findUserRequest">
33
- <xs:complexContent>
34
- <xs:extension base="tns:baseFindUserRequest">
35
- <xs:sequence>
36
- <xs:element minOccurs="0" name="mandant" type="tns:mandant" />
37
- </xs:sequence>
38
- </xs:extension>
39
- </xs:complexContent>
40
- </xs:complexType>
41
- <xs:complexType name="baseFindUserRequest">
42
- <xs:choice>
43
- <xs:element ref="tns:idCredential" />
44
- <xs:element ref="tns:emailCredential" />
45
- </xs:choice>
46
- </xs:complexType>
47
- <xs:complexType name="idCredential">
48
- <xs:sequence>
49
- <xs:element name="id" type="xs:string" />
50
- <xs:element name="token" type="xs:string" />
51
- </xs:sequence>
52
- </xs:complexType>
53
- <xs:complexType name="emailCredential">
54
- <xs:sequence>
55
- <xs:element name="email" type="xs:string" />
56
- <xs:element name="token" type="xs:string" />
57
- </xs:sequence>
58
- </xs:complexType>
59
- <xs:complexType name="findUserResponse">
60
- <xs:sequence>
61
- <xs:element minOccurs="0" name="return" type="tns:userResponse" />
62
- </xs:sequence>
63
- </xs:complexType>
64
- <xs:complexType name="userResponse">
65
- <xs:sequence>
66
- <xs:element minOccurs="0" name="id" type="xs:string" />
67
- <xs:element minOccurs="0" name="email" type="xs:string" />
68
- <xs:element minOccurs="0" name="username" type="xs:string" />
69
- <xs:element minOccurs="0" name="firstname" type="xs:string" />
70
- <xs:element minOccurs="0" name="lastname" type="xs:string" />
71
- </xs:sequence>
72
- </xs:complexType>
73
- </xs:schema>
74
- </wsdl:types>
75
-
76
- <wsdl:message name="findUser">
77
- <wsdl:part element="tns:findUser" name="parameters"></wsdl:part>
78
- </wsdl:message>
79
- <wsdl:message name="findUserResponse">
80
- <wsdl:part element="tns:findUserResponse" name="parameters"></wsdl:part>
81
- </wsdl:message>
82
-
83
- <wsdl:message name="User.FindById">
84
- <wsdl:part element="tns:findUser" name="parameters"></wsdl:part>
85
- </wsdl:message>
86
- <wsdl:message name="User.FindByIdResponse">
87
- <wsdl:part element="tns:findUserResponse" name="parameters"></wsdl:part>
88
- </wsdl:message>
89
-
90
- <wsdl:portType name="UserWebService">
91
- <wsdl:operation name="findUser">
92
- <wsdl:input message="tns:findUser" name="findUser"></wsdl:input>
93
- <wsdl:output message="tns:findUserResponse" name="findUserResponse"></wsdl:output>
94
- </wsdl:operation>
95
- </wsdl:portType>
96
-
97
- <wsdl:binding name="UserWebServiceSoapBinding" type="tns:UserWebService">
98
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
99
- <wsdl:operation name="findUser">
100
- <soap:operation soapAction="" style="document" />
101
- <wsdl:input name="findUser">
102
- <soap:body use="literal" />
103
- </wsdl:input>
104
- <wsdl:output name="findUserResponse">
105
- <soap:body use="literal" />
106
- </wsdl:output>
107
- </wsdl:operation>
108
- <wsdl:operation name="User.FindById">
109
- <soap:operation soapAction="" style="document" />
110
- <wsdl:input name="User.FindById">
111
- <soap:body use="literal" />
112
- </wsdl:input>
113
- <wsdl:output name="User.FindByIdResponse">
114
- <soap:body use="literal" />
115
- </wsdl:output>
116
- </wsdl:operation>
117
- </wsdl:binding>
118
-
119
- <wsdl:service name="UserWebService">
120
- <wsdl:port binding="tns:UserWebServiceSoapBinding" name="UserWebServicePort">
121
- <soap:address location="http://example.com/user/1.0/UserService" />
122
- </wsdl:port>
123
- </wsdl:service>
124
- </wsdl:definitions>