Hello,
I am using ActiveResource to integrate with a 3rd party service.
when calling MyModel.save a POST with xml is sent.
I need to make sure that xml is created with defined order of
elements (the service requires it) How can I do that?
Some have suggested using rxml or builder, but I am not sure how. Has
anyone done this before?
---------------------
SalesDocument < ActiveResource
I need to make sure that when I call
@sales_document.save
the order of elements in the xml is predetermined and consistent,
which currently not the case.
POST http://<myurl>/sales_documents.xml
body: <?xml version="1.0" encoding="UTF-8"?>
<sales-document>
<items type="array">
<item>
<quantity type="float">3.0</quantity>
<product>AD_DASHERBOARD-200</product>
</item>
</items>
<sales-group>110</sales-group>
<division>10</division>
<sales-office>110</sales-office>
<ref-inquiry>Sales Lett</ref-inquiry>
<distr-channel>10</distr-channel>
<document-type>AG</document-type>
<customer>0000100007</customer>
<sales-org>1100</sales-org>
</sales-document>
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---