on 08-31-2017 8:15 PM
We have some issues when utilizing the “Product” entity within Hybris.
Getting an error that says ‘Error while parsing an XML stream’ when trying to import data into Hybris using the OData interface.
Here’s a link to what the request looks like that I’m sending to Hybris: https://gist.github.com/mniehe/c25f4130b811889ec0b9f9df18e57159
If I take that same request but delete the “Products.Quantity” and “Products.Amount”, it works without any problems. So it must be with how I’m sending those two fields. I checked the interface guide for our version of Hybris, and it says those two fields should exist on “InteractionProduct”. Am I misreading how those fields should be used? Or maybe that “Products” array isn’t mapping properly to “InteractionProduct”? Any guidance would be helpful since ‘Error while parsing an XML stream’ is a completely useless error message.
Hoping you can assist or point us in the right direction.
Hello Andrew,
please try with putting the amount value in double quotes:
"Amount" : "13394.8"
The amount is sent as JSON string - according to OData json format documentation http://www.odata.org/documentation/odata-version-2-0/json-format/ the double value must use quotes (") because double are formatted as a JSON string.
best regards,
Johannes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.