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

Creating Custom Object under Contact through Connect Web Services

$
0
0

Topic by Prasad Sawant

Hi All,

I've created a custom object called 'Loyalty_Info' and associated it as a child of Contact entity(Parent field: c_id and Child field: Contact). Now I want to create a Contact through CWSS with the information for Loyalty_Info below it.

I get this error, 

RightNowSyncService|urn:wsdl.ws.rightnow.com/v1_2 failed
Found out-of-order or unrecognized node RNObjects|urn:messages.ws.rightnow.com/v1_2 while parsing node of type Contact|urn:objects.ws.rightnow.com/v1_2
Failed in constructing object CreateMsg : NULL input can not be deserialized
Failed in setting value for element RNObjects array position 0 of object CreateMsg
Failure in setting value for object Create element Create of type messages_ws_rightnow_com_v1_2::CreateMsg
NULL returned from the Create deserializer due to missing or invalid XML

The XML I am using is, 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
      <ns7:ClientInfoHeader soapenv:mustUnderstand="0" xmlns:ns7="urn:messages.ws.rightnow.com/v1_2">
         <ns7:AppID>Basic Create</ns7:AppID>
      </ns7:ClientInfoHeader>
      <wsse:Security mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken>
            <wsse:Username>prasad</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">Welcome02</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <ns7:Create xmlns:ns7="urn:messages.ws.rightnow.com/v1_2">
         <ns7:RNObjects xsi:type="ns4:Contact" xmlns:ns4="urn:objects.ws.rightnow.com/v1_2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <ns4:Emails>
               <ns4:EmailList action="add">
                  <ns4:Address>joe.root@example.com</ns4:Address>
                  <ns4:AddressType>
                     <ID id="0" xmlns="urn:base.ws.rightnow.com/v1_2"/>
                  </ns4:AddressType>
               </ns4:EmailList>
            </ns4:Emails>
            <ns4:Name>
               <ns4:First>Joe</ns4:First>
               <ns4:Last>Root</ns4:Last>
            </ns4:Name>
            <ns7:RNObjects xsi:type="q1:GenericObject" xmlns:q1="urn:generic.ws.rightnow.com/v1_2">
               <q1:ObjectType>
                  <q1:Namespace>CO</q1:Namespace>
                  <q1:TypeName>Loyalty_Info</q1:TypeName>
               </q1:ObjectType>
               <q1:GenericFields name="Contact">
                  <q1:DataValue>
                     <q1:IntegerValue>2028</q1:IntegerValue>
                  </q1:DataValue>
               </q1:GenericFields>
               <q1:GenericFields name="Reward_Points">
                  <q1:DataValue>
                     <q1:IntegerValue>12345</q1:IntegerValue>
                  </q1:DataValue>
               </q1:GenericFields>
            </ns7:RNObjects>
         </ns7:RNObjects>
         <ns7:ProcessingOptions>
            <ns7:SuppressExternalEvents>false</ns7:SuppressExternalEvents>
            <ns7:SuppressRules>false</ns7:SuppressRules>
         </ns7:ProcessingOptions>
      </ns7:Create>
   </soapenv:Body>
</soapenv:Envelope>

 

If I remove the Custom Object Tag then, the Contact gets created successfully. I'm not sure if I have correctly added the custom Object tag within the standard Contact object. Please advice.

 

Regards,

Prasad.

 


Viewing all articles
Browse latest Browse all 2504

Trending Articles