Integrations and APIs for Service

Get Involved. Join the Conversation.


    Unable To Create Attachments Using RightNow Adapter When...
    Topic posted September 19, 2019 by NickL, tagged SOAP 
    17 Views, 1 Comment
    Unable To Create Attachments Using RightNow Adapter When Using Create Incident
    Although attachments are created, they are not complete

    I'm currently using the RightnNow adapter from BPEL to create new Incidents in Oracle Service Cloud.

    The Incidents are created successfully, along with the attachment, but when the attachment is viewed in AgentWeb, it shows as being only 57 bytes.

    The payload sent to Oracle Service Cloud is as below:

       <part xmlns:xsi="" name="parameters">
          <Create xmlns="[removed]/ProcessCXService/RightNowIncidentCreate/types">
                <Category xmlns="">
                   <Name xmlns="">Contracts</Name>
                <Channel xmlns="">
                   <Name xmlns="">Post</Name>
                <IncidentCustomFields xmlns="">
                         <Name xmlns="">Request</Name>
                <FileAttachments xmlns="">
                   <FileAttachmentList action="add">
                <PrimaryContact xmlns="">
                      <Name xmlns="">Scanning Dummy</Name>
                <Product xmlns="">
                   <Name xmlns="">Employee Changes</Name>
                <Subject xmlns="">Contracts</Subject>

    The call is successful, and returns the ID of the newly created Incident::

       <part xmlns:xsi="" name="parameters">
          <ns0:CreateResponse xmlns:n0="" xmlns:n2="" xmlns:xsi="" xmlns:n1="" xmlns:ns0="[removed]/ProcessCXService/RightNowIncidentCreate/types">
             <ns0:Incident xmlns:ns0="[removed]/ProcessCXService/RightNowIncidentCreate/types">
                <n2:ID id="2067"/>

    However, when viewing the Incident in Oracle Service Cloud (see uploaded image) attachment file size is shown as 57 bytes.

    When downloading the attachment, and opening the file in Notepad++, only the following lines are present:

    5 0 obj



    JDeveloper Service Cloud 18B (Build 274) - Browser UI Version



    • NickL

      We finally managed to resolve this issue for ourselves.

      We discovered that it looks like the CXService web service is not correctly decoding base64 attachments.

      If we passed our base64 attachments with multiple lines (i.e. containing carriage returns, line feeds, end of line etc) the attachments were created as shown, but only 57 bytes.

      So, to resolve this, we simply remove these before assigning the base64 to the call.