Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Support imports with relative URLs #5

Open
tjarratt opened this issue Apr 22, 2014 · 0 comments
Open

Support imports with relative URLs #5

tjarratt opened this issue Apr 22, 2014 · 0 comments

Comments

@tjarratt
Copy link
Contributor

Migrated from savonrb/savon#479


Ruby 2.0.0-p247 w/ rbenv. MacOS X 10.8.4.

After loading my wsdl file into Savon and selecting an operation, savon is unable to load/parse the associated .xsd file.

client = Savon.new('wsdl17/AirspaceServices_PREOPS_17.wsdl')
=> #<Savon:0x007fab0c859968 @http=#<Savon::HTTPClient:0x007fab0c859940 @client=#<HTTPClient:0x007fab0c859918 @Proxy=nil, @no_proxy=nil, @no_proxy_regexps=[], @www_auth=#<HTTPClient::WWWAuth:0x007fab0c859878 @basic_auth=#<HTTPClient::BasicAuth:0x007fab0c859850 @cred=nil, @set=false, @auth={}, @challengeable={}, @scheme="Basic">, digest_auth#<HTTPClient::DigestAuth:0x007fab0c8597b0 @auth={}, @Challenge={}, @set=false, @nonce_count=0, @scheme="Digest">, negotiate_auth#<HTTPClient::NegotiateAuth:0x007fab0c859710 @auth={}, @auth_default=nil, @Challenge={}, @scheme="Negotiate", @set=false, @ntlm_opt={:ntlmv2=>true}, ntlm_auth#<HTTPClient::NegotiateAuth:0x007fab0c859620
[...]

p client.services
{"AirspaceAvailabilityService"=>{:ports=>{"AirspaceAvailabilityPort"=>{:type=>"http://schemas.xmlsoap.org/wsdl/soap/", :location=>"https://www.cfmu.eurocontrol.int:16443/B2B_PREOPS_17/gateway/spec"}}}, "AirspaceStructureService"=>{:ports=>{"AirspaceStructurePort"=>{:type=>"http://schemas.xmlsoap.org/wsdl/soap/", :location=>"https://www.cfmu.eurocontrol.int:16443/B2B_PREOPS_17/gateway/spec"}}}}
=> {"AirspaceAvailabilityService"=>{:ports=>{"AirspaceAvailabilityPort"=>{:type=>"http://schemas.xmlsoap.org/wsdl/soap/", :location=>"https://www.cfmu.eurocontrol.int:16443/B2B_PREOPS_17/gateway/spec"}}}, "AirspaceStructureService"=>{:ports=>{"AirspaceStructurePort"=>{:type=>"http://schemas.xmlsoap.org/wsdl/soap/", :location=>"https://www.cfmu.eurocontrol.int:16443/B2B_PREOPS_17/gateway/spec"}}}}

client.http.ssl_config.set_client_cert_file('store/CC0000003728_502.pem','store/CC0000003728_502.key')
=> {} (Expected output?)

op = client.operation(:AirspaceStructureService, :AirspaceStructurePort, :queryADRAIXMFileList)
=> #<Savon::Operation:0x007fab1182be00 @operation=#<Savon::WSDL::Operation:0x007fab118202d0 @name="queryADRAIXMFileList", @endpoint="https://www.cfmu.eurocontrol.int:16443/B2B_PREOPS_17/gateway/spec", @binding_operation=#<Savon::WSDL::BindingOperation:0x007fab118210e0 @operation_node=#<Nokogiri::XML::Element:0x3fd5884e9268 name="operation" namespace=#<Nokogiri::XML::Namespace:0x3fd5870e15cc href="http://schemas.xmlsoap.org/wsdl/"> attributes[#<Nokogiri::XML::Attr:0x3fd5884e9204 name="name" value="queryADRAIXMFileList"] children=[#<Nokogiri::XML::Text:0x3fd5884e8c28 "\n ", #<Nokogiri::XML::Element:0x3fd5884e8b88 name="operation" namespace=#<Nokogiri::XML::Name
[...]
p op.example_header
RuntimeError: Unable to find schema for "eurocontrol/cfmu/b2b/AirspaceServices"
from /Users/roberto/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/savon-3.0.0/lib/savon/element_builder.rb:41:in build_element' from /Users/roberto/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/savon-3.0.0/lib/savon/element_builder.rb:16:in block in build'
from /Users/roberto/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/savon-3.0.0/lib/savon/element_builder.rb:13:in map' from /Users/roberto/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/savon-3.0.0/lib/savon/element_builder.rb:13:in build'
from /Users/roberto/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/savon-3.0.0/lib/savon/wsdl/input_output.rb:31:in build_parts' from /Users/roberto/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/savon-3.0.0/lib/savon/wsdl/input_output.rb:11:in initialize'
from /Users/roberto/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/savon-3.0.0/lib/savon/wsdl/operation.rb:30:in new' from /Users/roberto/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/savon-3.0.0/lib/savon/wsdl/operation.rb:30:in input'
from /Users/roberto/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/savon-3.0.0/lib/savon/operation.rb:57:in example_header' from (irb):6 from /Users/roberto/.rbenv/versions/2.0.0-p247/bin/irb:12:in

'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant