wasabi 2.4.1 → 2.5.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.
@@ -1,3 +1,8 @@
1
+ ## 2.5.0 (2012-06-28)
2
+
3
+ * Fix: [#10](https://github.com/rubiii/wasabi/issues/10) fixes an issue where
4
+ Wasabi used the wrong operation name.
5
+
1
6
  ## 2.4.1 (2012-06-18)
2
7
 
3
8
  * Fix: [rubiii/savon#296](https://github.com/rubiii/savon/issues/296) fixes an issue where
@@ -146,7 +146,7 @@ module Wasabi
146
146
  end
147
147
 
148
148
  def input_for(operation)
149
- operation_name = operation.attribute("name")
149
+ operation_name = operation["name"]
150
150
 
151
151
  # Look up the input by walking up to portType, then up to the message.
152
152
 
@@ -164,11 +164,11 @@ module Wasabi
164
164
  end
165
165
  end
166
166
 
167
- # Fall back to message name in portType input if no 'element' attribute in wsdl:message
167
+ # Fall back to the name of the binding operation
168
168
  if message_type
169
169
  [message_ns_id, message_type]
170
170
  else
171
- [port_message_ns_id, port_message_type]
171
+ [port_message_ns_id, operation_name]
172
172
  end
173
173
  end
174
174
 
@@ -1,5 +1,5 @@
1
1
  module Wasabi
2
2
 
3
- VERSION = "2.4.1"
3
+ VERSION = "2.5.0"
4
4
 
5
5
  end
@@ -0,0 +1,52 @@
1
+ <?xml version="1.0" encoding="ISO-8859-1"?>
2
+ <definitions name="SendSMS" targetNamespace="http://bedrift.telefonkatalogen.no" xmlns:tns="http://bedrift.telefonkatalogen.no" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
3
+ <types>
4
+ <xsd:schema elementFormDefault="qualified" targetNamespace="http://bedrift.telefonkatalogen.no" xmlns="http://www.w3.org/2001/XMLSchema">
5
+
6
+ </xsd:schema>
7
+ </types>
8
+
9
+
10
+ <message name="sendsmsRequest">
11
+ <part name="sender" type="xsd:string"/>
12
+ <part name="cellular" type="xsd:string"/>
13
+ <part name="msg" type="xsd:string"/>
14
+ <part name="smsnumgroup" type="xsd:string"/>
15
+ <part name="emailaddr" type="xsd:string"/>
16
+ <part name="udh" type="xsd:string"/>
17
+ <part name="datetime" type="xsd:string"/>
18
+ <part name="format" type="xsd:string"/>
19
+ <part name="dlrurl" type="xsd:string"/>
20
+ </message>
21
+ <message name="sendsmsResponse">
22
+ <part name="body" type="xsd:string"/>
23
+ </message>
24
+
25
+ <portType name="SendSmsPortType">
26
+ <operation name="sendsms">
27
+ <input message="tns:sendsmsRequest"/>
28
+ <output message="tns:sendsmsResponse"/>
29
+ </operation>
30
+ </portType>
31
+
32
+ <binding name="SendSmsBinding" type="tns:SendSmsPortType">
33
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
34
+ <operation name="sendsms">
35
+ <soap:operation soapAction="sendsms"/>
36
+ <input>
37
+ <soap:body use="literal"/>
38
+ </input>
39
+ <output>
40
+ <soap:body use="literal"/>
41
+ </output>
42
+ </operation>
43
+ </binding>
44
+
45
+ <service name="SendSms">
46
+ <documentation>Interfaces to telephone directory services, using rpc/literal</documentation>
47
+ <port name="SendSmsPort" binding="tns:SendSmsBinding">
48
+ <soap:address location="http://bedrift.telefonkatalogen.no/tk/websvcsendsms.php"/>
49
+ </port>
50
+ </service>
51
+
52
+ </definitions>
@@ -0,0 +1,15 @@
1
+ require "spec_helper"
2
+
3
+ describe Wasabi::Document do
4
+ context "with: savon295.wsdl" do
5
+
6
+ subject { Wasabi::Document.new fixture(:savon295).read }
7
+
8
+ its(:operations) do
9
+ should include(
10
+ { :sendsms => { :input => "sendsms", :action => "sendsms", :namespace_identifier => "tns" } }
11
+ )
12
+ end
13
+
14
+ end
15
+ end
@@ -12,7 +12,7 @@ describe Wasabi::Parser do
12
12
  let(:xml) { fixture(:no_message_parts).read }
13
13
 
14
14
  it "falls back to using the message type in the port element" do
15
- subject.operations[:save][:input].should == "SaveSoapIn"
15
+ subject.operations[:save][:input].should == "Save"
16
16
  end
17
17
 
18
18
  it "falls back to using the namespace ID in the port element" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wasabi
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
- - 4
9
- - 1
10
- version: 2.4.1
8
+ - 5
9
+ - 0
10
+ version: 2.5.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel Harrington
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-06-18 00:00:00 Z
18
+ date: 2012-06-28 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement
@@ -128,6 +128,7 @@ files:
128
128
  - spec/fixtures/namespaced_actions.wsdl
129
129
  - spec/fixtures/no_message_parts.wsdl
130
130
  - spec/fixtures/no_namespace.wsdl
131
+ - spec/fixtures/savon295.wsdl
131
132
  - spec/fixtures/soap12.wsdl
132
133
  - spec/fixtures/symbolic_endpoint.wsdl
133
134
  - spec/fixtures/two_bindings.wsdl
@@ -141,6 +142,7 @@ files:
141
142
  - spec/wasabi/document/multiple_namespaces_spec.rb
142
143
  - spec/wasabi/document/namespaced_actions_spec.rb
143
144
  - spec/wasabi/document/no_namespace_spec.rb
145
+ - spec/wasabi/document/savon295_spec.rb
144
146
  - spec/wasabi/document/soap12_spec.rb
145
147
  - spec/wasabi/document/two_bindings_spec.rb
146
148
  - spec/wasabi/document_spec.rb
@@ -195,6 +197,7 @@ test_files:
195
197
  - spec/fixtures/namespaced_actions.wsdl
196
198
  - spec/fixtures/no_message_parts.wsdl
197
199
  - spec/fixtures/no_namespace.wsdl
200
+ - spec/fixtures/savon295.wsdl
198
201
  - spec/fixtures/soap12.wsdl
199
202
  - spec/fixtures/symbolic_endpoint.wsdl
200
203
  - spec/fixtures/two_bindings.wsdl
@@ -208,6 +211,7 @@ test_files:
208
211
  - spec/wasabi/document/multiple_namespaces_spec.rb
209
212
  - spec/wasabi/document/namespaced_actions_spec.rb
210
213
  - spec/wasabi/document/no_namespace_spec.rb
214
+ - spec/wasabi/document/savon295_spec.rb
211
215
  - spec/wasabi/document/soap12_spec.rb
212
216
  - spec/wasabi/document/two_bindings_spec.rb
213
217
  - spec/wasabi/document_spec.rb