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

Different xml output since wasabi 3.6 update #99

Closed
rocket-turtle opened this issue Oct 7, 2020 · 3 comments · Fixed by #103
Closed

Different xml output since wasabi 3.6 update #99

rocket-turtle opened this issue Oct 7, 2020 · 3 comments · Fixed by #103
Labels

Comments

@rocket-turtle
Copy link

Thank you for your time and this gem.
We are using the wasabi (3.6.1) gem via the savon (2.12.1) gem.

With wasabi 3.6.1 we get a different xml output.

wasabi 3.5.0

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://servlets.iex.jv.com/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
  <env:Body>
    <tns:mergeToXML>
      <username>user</username>
      <inputDocument>
        <item>
          <data>JVBER ...JUVPRgo=</data>
          <filename>max-mustermann.pdf</filename>
        </item>
      </inputDocument>
    </tns:mergeToXML>
  </env:Body>
</env:Envelope>

wasabi 3.6.1

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://servlets.iex.jv.com/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
  <env:Body>
    <mergeToXML>
      <username xsi:type="xsd:string">user</username>
      <inputDocument xsi:type="tns:inputDocArray">[{:item=&gt;{:data=&gt;"JVBER...JUVPRgo=\n", :filename=&gt;"max-mustermann.pdf"}}]</inputDocument>
    </mergeToXML>
  </env:Body>
</env:Envelope>

If we remove this block the XML is like the XML from wasabi 3.5.0.
https://github.com/savonrb/wasabi/compare/v3.5.0..v3.6.1#diff-7c3adc3042c46c5df567b221e60c3442R285

This block comes from this commit:
8b18d4e

The .wsdl File looks like this:

<message name="mergeToXML">
<part name="username" type="xsd:string"/>
<part name="inputDocument" type="tns:inputDocArray"/>
</message>

Is there a Problem with the .wsdl File or the commit or savon?
Thank you in advance.

@olleolleolle
Copy link
Contributor

olleolleolle commented Oct 7, 2020

Appreciate the digging!

Wasabi does a wrong thing to create "Ruby hash representation", instead of XML, here:

<inputDocument xsi:type="tns:inputDocArray">[{:item=&gt;{:data=&gt;"JVBER...JUVPRgo=\n", :filename=&gt;"max-mustermann.pdf"}}]</inputDocument>

I marked this as a Bug report.

@arashm
Copy link

arashm commented Feb 24, 2021

this is also stopping us from updating to version 3.6.

fsateler added a commit to fsateler/wasabi that referenced this issue Mar 2, 2021
This change breaks backwards compatibility, by changing the parsing of
the SOAP messages.

I do not know if the change is incorrect. But if introduced, according
to SemVer it must be introduced in a new major release, to give
downstreams the chance to port their code accordingly.

Fixes savonrb#99

See also savonrb/savon#935

This reverts commit 6fc97c6.
@LewisYoul
Copy link

I also struggled with this for some time as part of the savon gem. Have added wasabi to our gemfile now and locked it to 3.5.0.

olleolleolle pushed a commit that referenced this issue Jun 24, 2021
This change breaks backwards compatibility, by changing the parsing of
the SOAP messages.

Fixes #99

See also savonrb/savon#935

This reverts commit 6fc97c6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

4 participants