Quantcast
Channel: Discussion Forum > Connect Data Services
Viewing all articles
Browse latest Browse all 2504

Unable to update Customer Address containing a NamedID element.

$
0
0

Topic by Farhad Pagdiwala

Content

We are having issue while updating CustomerAddress object, which is a custom object.

This object contains a NamedID type column called Purpose, which stores a value 1 for Bill_To or 2 for Ship_To.

The incoming XML Payload coming from Oracle EBS after applying XSLT is the one below:

  <?xml version="1.0" encoding="UTF-8"?>
  <RNObjects xmlns:rn_cr="urn:generic.ws.rightnow.com/v1_3" xmlns:rnb_v1_3="urn:base.ws.rightnow.com/v1_3" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance">
     <GenericFields dataType="STRING" name="Address1" xmlns="urn:generic.ws.rightnow.com/v1_3">
        <DataValue>
           <StringValue>Statteggerstrasse 18-2</StringValue>
        </DataValue>
     </GenericFields>
     <GenericFields dataType="STRING" name="City" xmlns="urn:generic.ws.rightnow.com/v1_3">
        <DataValue>
           <StringValue>Graz</StringValue>
        </DataValue>
     </GenericFields>
     <GenericFields dataType="STRING" name="PostalCode" xmlns="urn:generic.ws.rightnow.com/v1_3">
        <DataValue>
           <StringValue>A-8045</StringValue>
        </DataValue>
     </GenericFields>
     <GenericFields dataType="STRING" name="CountryCode" xmlns="urn:generic.ws.rightnow.com/v1_3">
        <DataValue>
           <StringValue>AT</StringValue>
        </DataValue>
     </GenericFields>
     <GenericFields dataType="INTEGER" name="party_site_id" xmlns="urn:generic.ws.rightnow.com/v1_3">
        <DataValue>
           <IntegerValue>8119</IntegerValue>
        </DataValue>
     </GenericFields>
     <GenericFields dataType="NAMED_ID" name="Purpose" xmlns="urn:generic.ws.rightnow.com/v1_3">
        <DataValue>
           <NamedIDValue>
              <ID id="2" xmlns="urn:base.ws.rightnow.com/v1_3"/>
           </NamedIDValue>
        </DataValue>
     </GenericFields>
     <GenericFields dataType="NAMED_ID" name="Status" xmlns="urn:generic.ws.rightnow.com/v1_3">
        <DataValue>
           <NamedIDValue>
              <ID id="1" xmlns="urn:base.ws.rightnow.com/v1_3"/>
           </NamedIDValue>
        </DataValue>
     </GenericFields>
  </RNObjects>

The update XML payload been passed to Oracle Service Cloud engine is:

  <?xml version="1.0" encoding="UTF-8"?>
  <Update xmlns="urn:messages.ws.rightnow.com/v1_3">
     <RNObjects xmlns:p0="urn:generic.ws.rightnow.com/v1_3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="p0:GenericObject">
        <ID id="143" xmlns="urn:base.ws.rightnow.com/v1_3"/>
        <ObjectType xmlns="urn:generic.ws.rightnow.com/v1_3">
           <Namespace>CO</Namespace>
           <TypeName>CustomerAddress</TypeName>
        </ObjectType>
        <GenericFields dataType="STRING" name="Address1" xmlns="urn:generic.ws.rightnow.com/v1_3">
           <DataValue>
              <NamedIDValue>
                 <ID id="" xmlns="urn:base.ws.rightnow.com/v1_3"/>
              </NamedIDValue>
              <StringValue>Statteggerstrasse 18-2</StringValue>
           </DataValue>
        </GenericFields>
        <GenericFields dataType="STRING" name="City" xmlns="urn:generic.ws.rightnow.com/v1_3">
           <DataValue>
              <NamedIDValue>
                 <ID id="" xmlns="urn:base.ws.rightnow.com/v1_3"/>
              </NamedIDValue>
              <StringValue>Graz</StringValue>
           </DataValue>
        </GenericFields>
        <GenericFields dataType="STRING" name="PostalCode" xmlns="urn:generic.ws.rightnow.com/v1_3">
           <DataValue>
              <NamedIDValue>
                 <ID id="" xmlns="urn:base.ws.rightnow.com/v1_3"/>
              </NamedIDValue>
              <StringValue>A-8045</StringValue>
           </DataValue>
        </GenericFields>
        <GenericFields dataType="STRING" name="CountryCode" xmlns="urn:generic.ws.rightnow.com/v1_3">
           <DataValue>
              <NamedIDValue>
                 <ID id="" xmlns="urn:base.ws.rightnow.com/v1_3"/>
              </NamedIDValue>
              <StringValue>AT</StringValue>
           </DataValue>
        </GenericFields>
        <GenericFields dataType="INTEGER" name="party_site_id" xmlns="urn:generic.ws.rightnow.com/v1_3">
           <DataValue>
              <IntegerValue>8119</IntegerValue>
              <NamedIDValue>
                 <ID id="" xmlns="urn:base.ws.rightnow.com/v1_3"/>
              </NamedIDValue>
           </DataValue>
        </GenericFields>
        <GenericFields dataType="NAMED_ID" name="Purpose" xmlns="urn:generic.ws.rightnow.com/v1_3">
           <DataValue>
              <NamedIDValue>
                 <ID id="2" xmlns="urn:base.ws.rightnow.com/v1_3"/>
              </NamedIDValue>
           </DataValue>
        </GenericFields>
        <GenericFields dataType="NAMED_ID" name="Status" xmlns="urn:generic.ws.rightnow.com/v1_3">
           <DataValue>
              <NamedIDValue>
                 <ID id="1" xmlns="urn:base.ws.rightnow.com/v1_3"/>
              </NamedIDValue>
           </DataValue>
        </GenericFields>
     </RNObjects>
  </Update>

We are receiving a below error message while update record in CustomerAddress:

SOAP fault from Item: RightNowSyncService|urn:wsdl.ws.rightnow.com/v1_3 failed
Found out-of-order or unrecognized node while parsing node of type DataValue|urn:generic.ws.rightnow.com/v1_3
NULL value is set to a non-nillable element GenericFields of object GenericObject
Failed in setting value for element GenericFields array position 0 of object GenericObject
NULL value is set to a non-nillable element RNObjects of object UpdateMsg
Failed in setting value for element RNObjects array position 0 of object UpdateMsg
NULL value is set to a non-nillable element Update of object Update 
NULL returned from the Update deserializer due to missing or invalid XML

From the message being passed to Service Cloud, I see that Named_ID element is passed for all the other elements, which is wrong.

I don't know what is wrong here or what I'm doing wrong. I have been scratching my head for past one week now.

Please advise.

Version

Oracle Service Cloud August 2016 (Build 619 SP 5, CP 619)

Viewing all articles
Browse latest Browse all 2504

Trending Articles