Created
June 22, 2012 21:42
-
-
Save mvastola/2975359 to your computer and use it in GitHub Desktop.
Parsing Changes across Wasabi Versions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby1.9.1 | |
require 'pp' | |
# Current (Broken) Wasabi: 2.4.1 | |
# Old (Working) Wasabi: 2.1.0 | |
if !ARGV[0].nil? && ARGV[0].downcase == 'new' | |
gem 'wasabi', '~> 2.4.0' | |
else | |
gem 'wasabi', '2.1.1' | |
end | |
require 'wasabi' | |
wsdl_doc = <<XML | |
<definitions name='ProteusAPI' targetNamespace='http://api.proteus.bluecatnetworks.com' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://jaxb.dev.java.net/array' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://api.proteus.bluecatnetworks.com' xmlns:xsd='http://www.w3.org/2001/XMLSchema'> | |
<message name='ProteusAPI_loginResponse'></message> | |
<message name='ProteusAPI_login'> | |
<part name='username' type='xsd:string'></part> | |
<part name='password' type='xsd:string'></part> | |
</message> | |
<portType name='ProteusAPI'> | |
<operation name='login' parameterOrder='username password'> | |
<input message='tns:ProteusAPI_login'></input> | |
<output message='tns:ProteusAPI_loginResponse'></output> | |
</operation> | |
</portType> | |
<binding name='ProteusAPIBinding' type='tns:ProteusAPI'> | |
<soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/> | |
<operation name='login'> | |
<soap:operation soapAction=''/> | |
<input> | |
<soap:body namespace='http://api.proteus.bluecatnetworks.com' use='literal'/> | |
</input> | |
<output> | |
<soap:body namespace='http://api.proteus.bluecatnetworks.com' use='literal'/> | |
</output> | |
</operation> | |
</binding> | |
<service name='ProteusAPI'> | |
<port binding='tns:ProteusAPIBinding' name='ProteusAPIPort'> | |
<soap:address location='https://localhost/Services/API'/> | |
</port> | |
</service> | |
</definitions> | |
XML | |
wsdl = Wasabi.document(wsdl_doc) | |
pp wsdl.operations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment