Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace issues with Savon 2.0? #342

Closed
Flink opened this issue Dec 19, 2012 · 3 comments
Closed

Namespace issues with Savon 2.0? #342

Flink opened this issue Dec 19, 2012 · 3 comments
Assignees

Comments

@Flink
Copy link

Flink commented Dec 19, 2012

Hi!

I just tried Savon 2.0 and have some problems with the following webservice: http://www.ratp.fr/wsiv/services/Wsiv?wsdl
When I make a request with nested attributes, first level ones use the correct namespace but nested ones don’t.

Here is an example:

client.call(:get_stations, message: { station: {:id => 1975}, limit: 1})

This raises an error from the webserver:

Savon::SOAPFault: (soapenv:Server) org.apache.axis2.databinding.ADBException: Unexpected subelement id

This is the XML that is sent:

<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://wsiv.ratp.fr" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://wsiv.ratp.fr/xsd">
  <env:Body>
    <ns1:getStations>
      <ns1:station>
        <ns1:id>1975</ns1:id>
      </ns1:station>
      <ns1:limit>1</ns1:limit>
    </ns1:getStations>
  </env:Body>
</env:Envelope>

Now, if I try the same call with Savon 1.2, there is no error, but the XML is different:

<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://wsiv.ratp.fr" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://wsiv.ratp.fr" xmlns:ins1="http://wsiv.ratp.fr/xsd">
  <env:Body>
    <ins0:getStations>
      <ins0:station>
        <ins1:id>1975</ins1:id>
      </ins0:station>
      <ins0:limit>1</ins0:limit>
    </ins0:getStations>
  </env:Body>
</env:Envelope>
@rubiii
Copy link
Contributor

rubiii commented Dec 19, 2012

excellent error report. i'll take a look at it. thanks!

@ghost ghost assigned rubiii Dec 19, 2012
@rubiii rubiii closed this as completed in 8da00e4 Dec 19, 2012
@Flink
Copy link
Author

Flink commented Dec 19, 2012

Great, thanks!

@rubiii
Copy link
Contributor

rubiii commented Dec 19, 2012

released v2.0.1 to fix this issue. thanks again.

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

No branches or pull requests

2 participants