Topic by s k
I create incidents by consuming RightNow WDSL using the xml file.
But I can't add custom field while creating an incident.
My xml file:
<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<ns7:ClientInfoHeaderxmlns:ns7="urn:messages.ws.rightnow.com/v1_2"soapenv:mustUnderstand="0">
<ns7:AppID>Incident Create</ns7:AppID>
</ns7:ClientInfoHeader>
<wsse:Securityxmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
mustUnderstand="1">
<wsse:UsernameToken>
<wsse:Username>test</wsse:Username>
<wsse:PasswordType="http://docs.oasis-open.org/sdsd">test</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ns7:Createxmlns:ns7="urn:messages.ws.rightnow.com/v1_2">
<ns7:RNObjectsxmlns:ns4="urn:objects.ws.rightnow.com/v1_2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:type="ns4:Incident">
<ns4:PrimaryContact>
<ns4:Contact>
<IDxmlns="urn:base.ws.rightnow.com/v1_2"id="325"/>
</ns4:Contact>
</ns4:PrimaryContact>
<ns4:Subject>Conversation</ns4:Subject>
<ns4:Threads>
<ns4:ThreadListaction="add">
<ns4:EntryType>
<IDxmlns="urn:base.ws.rightnow.com/v1_2"id="1"/>
</ns4:EntryType>
<ns4:Text>Test</ns4:Text>
</ns4:ThreadList>
</ns4:Threads>
<ns4:CustomFieldsxmlns:ns2="urn:generic.ws.rightnow.com/v1_3"xsi:type="ns2:GenericObject">
<ns2:ObjectType>
<ns2:TypeName>IncidentCustomFields</ns2:TypeName>
</ns2:ObjectType>
<ns2:GenericFieldsdataType="OBJECT"name="c">
<ns2:DataValue>
<ns2:ObjectValuexsi:type="ns2:GenericObject">
<ns2:ObjectType>
<ns2:TypeName>IncidentCustomFieldsc</ns2:TypeName>
</ns2:ObjectType>
<ns2:GenericFieldsdataType="STRING"name="Name of custom field">
<ns2:DataValue>
<ns2:StringValue>Setting Custom Field!</ns2:StringValue>
</ns2:DataValue>
</ns2:GenericFields>
</ns2:ObjectValue>
</ns2:DataValue>
</ns2:GenericFields>
</ns4:CustomFields>
</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 following part from xml, incident will be created, BUT I need to add value of this custom field
<ns4:CustomFields xmlns:ns2="urn:generic.ws.rightnow.com/v1_3"xsi:type="ns2:GenericObject"><ns2:ObjectType><ns2:TypeName>IncidentCustomFields</ns2:TypeName></ns2:ObjectType><ns2:GenericFields dataType="OBJECT"name="c"><ns2:DataValue><ns2:ObjectValue xsi:type="ns2:GenericObject"><ns2:ObjectType><ns2:TypeName>IncidentCustomFieldsc</ns2:TypeName></ns2:ObjectType><ns2:GenericFields dataType="STRING"name="custom field name "><ns2:DataValue><ns2:StringValue>Setting Custom Field!</ns2:StringValue></ns2:DataValue></ns2:GenericFields></ns2:ObjectValue></ns2:DataValue></ns2:GenericFields></ns4:CustomFields>
Name of custom field is custom field name (three separete words - maybe this is the reason for the error???)
id is 117
Error:
RightNowSyncService|urn:wsdl.ws.rightnow.com/v1_2 failed Found out-of-order or unrecognized node CustomFields|urn:objects.ws.rightnow.com/v1_2 while parsing node of type Incident|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
Could you help me please?