savonrb / wasabi

A simple WSDL parser
MIT License
90 stars 84 forks source link

endpoint url problem with symbolic endpoints #2

Closed erhard closed 12 years ago

erhard commented 12 years ago

I use WASABI with savon

When there is a symbolic endpoint in the wsdl like : with server:port in order to be replaced at runtime thru wsdl.endpoint an error is thrown. This is caused because the url is parsed always from the xml and URI(URI.escape(endpoint.to_s)) is called in the method parse_endpoint, which throws an error with symbolic urls.

It can be avoided by wrapping the URI class in a begin end.

  begin
    @endpoint = URI(URI.escape(endpoint.to_s)) if endpoint
  rescue
    @endpoint=nil
  end
rubiii commented 12 years ago

never heard of symbolic endpoints. is this documented somewhere? if not, can you explain how it works?

erhard commented 12 years ago

symbolic endpoints : Every stage has its own endpoint so you can't write the endpoints in the wsdl directly - you have to replace them for every stage on the fly. In wasabi its only possible when a valid endpoint is in the wsdl. In SoapUI you can use server:port in the wsdl and set the endpoint via gui. In WASABI the URI is called before the endpoint is changed and URI does not like server:port.

rubiii commented 12 years ago

not sure if i got this right: you want to be able to manually set the soap endpoint?

erhard commented 12 years ago

Yes, in every stage another endpoint is set. It should be possible with "wsdl.endpoint" . It is only not possible when in the wsdl is server:port. Problems only because of the URI Class call described above,

rubiii commented 12 years ago

do you have an example wsdl for the specs?

erhard commented 12 years ago

I have sent you the example 3 weeks ago. Did You see anything to do ?

rubiii commented 12 years ago

are you ok with me using your wsdl for the wasabi specs?

erhard commented 12 years ago

Yes it is OK. Yust replace "vkb" with something else.

rubiii commented 12 years ago

commited 4c9b88e0ee and soon to be released. don't know if it's perfect to also silently ignore invalid endpoints though.

rubiii commented 12 years ago

released version 2.1.0