Payload Creation differs in IE and Mozilla

Aug 16, 2012 at 9:21 AM

Hi,
I wanted to check with you if anybody has encountered this problem earlier .

When a ODATA.Update is fired it works correctly in IE but not in Mozilla,

On debugging we found that issue seems to be how payload mproperties is prepared by datajs in both cases

PAYLOAD CREATED IN MOZILLA :

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><author><name/></author><title/><content type="application/xml"><m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><d:OBJECT_ID xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">0010033288</d:OBJECT_ID><d:DOC_MODE xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"/><d:WIID xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">000000000000</d:WIID><d:CURRENCY xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">EUR</d:CURRENCY><d:TOTAL_VALUE xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">0.00</d:TOTAL_VALUE><d:SUBMIT_FLAG xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">X</d:SUBMIT_FLAG><d:DELETE_FLAG xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"/><d:BUILDING_NUM xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"/><d:CITY xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"/><d:DISTRICT xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"/></m:properties></content></entry>



PAYLOAD CREATED IN IE AND CHROME :

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><author><name/></author><title/><content type="application/xml"><m:properties><d:OBJECT_ID>0010033289</d:OBJECT_ID><d:DOC_MODE/><d:WIID>000000000000</d:WIID><d:CURRENCY>EUR</d:CURRENCY><d:TOTAL_VALUE>0.00</d:TOTAL_VALUE><d:SUBMIT_FLAG>X</d:SUBMIT_FLAG><d:DELETE_FLAG/><d:BUILDING_NUM/><d:CITY/><d:DISTRICT/></m:properties></content></entry>



In Mozilla's case payload is quite heavy( extra xml namespace with each property ) and it exceeds content length and service gets failed…

Could you please suggest best option to solve this..


Thanks a lot in advance..

Regards,
Ankit Jain

 

 

 

Aug 17, 2012 at 7:25 PM

Hi Ankit

   DataJS uses the browsers' XML DOM to build the ATOM payload to be sent back to the endpoint.  The difference, ableit ugly, is browser specific and most probably is a bug in Mozilla's implementation of the XMLSerializer object.  Can you please let me know which version of Mozilla are you using and a network trace of the request / response?

   As a workaround can you use JSON or the endpoint only supports ATOM ?

Regards,

Alex Trigo.