This is a public Forum  publicRSS

Topic

    SOFIA BERMEJO SANZ
    Set a value on Disposition field from SOAP callAnswered
    Topic posted July 6, 2018 by SOFIA BERMEJO SANZRegular 
    33 Views, 7 Comments
    Title:
    Set a value on Disposition field from SOAP call
    Content:

    Hello,

    I try to do a SOAP call to close incidents and put some values to the incident. But I have an issue on disposition field, I tried to set a value but it doesn't work,

    I first do a query to select an incident and after I use a batch to change the values of the status of the incident and the disposition. For the first field it's working as expected.

    I put in code block, what I tried to do and in attachment the entire code.

    Thanks you for your help.

    Version:
    Connect V1_3
    Code Block:

    Best Answer

    Anuj Behl

    Hi Sofia,

    The error you encountered is self-explanatory. OSvC expects certain order in which you should add the nodes in the request xml, in this case I think it's alphabetical.

    So, if you are passing any other field along with disposition, keep the <ns4:Disposition> node inside Incident node but alter the sequence of those fields to make them alphabetical.

    -Anuj

    Answer

     

    • Just Rhianna

      Are you using SOAP UI pro? It helps a lot. I distinctly remember when setting values on incidents there is a particular order in which you have to do it or the darn things don't update. It is always an issue for me with namedids. I am sorry I don't know the order offhand and my SOAPUI subscription expired since I mainly use rest now.

    • Anuj Behl

      Your second option is closer. Just lose the ServiceDisposition element. Try this:

      <ns4:Disposition>
      <ID xmlns="urn:base.ws.rightnow.com/v1_3" id="99" />
      </ns4:Disposition>

      -Anuj

       

    • SOFIA BERMEJO SANZ

      Thanks you for your answers. Using only <ns4:Disposition>, I still have an issue. I first try to put the code inside the node incident ( ns7:RNObjects with type=Incident) but I have the following error message:
      Found out-of-order or unrecognized node Disposition

      So I tried to put the code outside the node incident, it's processing without error but the disposition field is not updated.

    • Anuj Behl

      Hi Sofia,

      The error you encountered is self-explanatory. OSvC expects certain order in which you should add the nodes in the request xml, in this case I think it's alphabetical.

      So, if you are passing any other field along with disposition, keep the <ns4:Disposition> node inside Incident node but alter the sequence of those fields to make them alphabetical.

      -Anuj

    • SOFIA BERMEJO SANZ

      Exactly, the XML request expected an alphabetical order. It's working now ! Thank you Anuj. 

    • Just Rhianna

      Glad you got your answer SOfia it was making me crazy trying to remember what the rules of the order were. Thanks Anuj for jogging my memory.

    • Anuj Behl
      SOFIA BERMEJO SANZ said:

      Exactly, the XML request expected an alphabetical order. It's working now ! Thank you Anuj. 

      View original

      Happy to help! And when in doubt about a node's syntax, try the Get operation first. Check the response and use the same syntax after fixing the namespaces.