Quantcast
Channel: SCN: Message List - Software Support and Maintenance
Viewing all articles
Browse latest Browse all 2823

UUID issue with SAP C4C OData service

$
0
0

We consuming SAP C4C OData service in our custom application. We are acting as OData client.

When we try to send the HTTP PATCH OData request to the SAP C4C endpoint (https://myXXXXX.crm.ondemand.com/sap/byd/odata/v1/c4codata/AccountCollection(‘00163E10B4641EE689CA46FD90805706’))

We have observed that SAP C4C doesn't honor lowercase UUID string. (Refer below sample OData patch request)

 

PATCH https://myXXXXX.crm.ondemand.com/sap/byd/odata/v1/c4codata/AccountCollection('00163E10B4641EE689CA46FD90805706')

 

<?xml version="1.0" encoding="UTF-8"?>

<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" xml:base="AccountCollection">

   <content type="application/xml">

      <m:properties>

<d:AccountFormattedName>abc2</d:AccountFormattedName>

<d:CategoryCode>1</d:CategoryCode>

<d:ETag>2016-05-30T10:35:25.988000000000000000000Z</d:ETag>

<d:ObjectID>00163E10B4641EE689CA46FD90805706</d:ObjectID>

<d:PrimaryContactName>abc2</d:PrimaryContactName>

<d:RoleCode>CRM000</d:RoleCode>

<d:StatusCode>1</d:StatusCode>

<d:UUID>00163e10-b464-1ee6-89ca-46fd90805706</d:UUID>

<d:Web m:null="true" />

      </m:properties>

   </content>

</entry>

 

For the above request I get following OData response

 

sap-message: {"code":"ODATA_ERROR","message":"Error occurred during processing","severity":"error","target":"","details":[{"code":"/APBP/CENT:003","message":"Cannot maintain internal field","target":"","severity":"error"},{"code":"/APBP/CENT:003","message":"Cannot maintain internal field","target":"","severity":"error"},{"code":"/APBP/CENT:003","message":"Cannot maintain internal field","target":"","severity":"error"}]}

 

It looks like the SAP C4C OData service expects the UUID in upper case only. I believe this is defect in the C4C OData service.


Note that above OData request works when UUID is in upper case.

 

As per specification (https://www.itu.int/ITU-T/studygroups/com17/oid/X.667-E.pdf) UUID shall not use upper case letters.

Refer section below from the spec

 

  1. 6.5.4 Software generating the hexadecimal representation of a UUID shall not use upper case letters.

NOTE – It is recommended that the hexadecimal representation used in all human-readable formats be restricted to lower-case

  1. letters. Software processing this representation is, however, required to accept both upper and lower case letters as specified

in 6.5.2.

 

Even Java java.util.UUID API UUID.fromString() return the UUID in lower case.


Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>