My Oracle Support Banner

Error In REST Web Service Call - Failed To Create JSON Stream From MAP (Doc ID 2834972.1)

Last updated on FEBRUARY 27, 2022

Applies to:

Oracle Fusion B2B Service Cloud Service - Version 11.13.21.10.0 and later
Oracle Fusion CX Sales Cloud Service - Version 11.13.21.10.0 and later
Information in this document applies to any platform.

Symptoms

On : 11.13.21.10.0 version, Service Request

Error in REST web service call - Failed to create JSON Stream from MAP

When attempting to use REST Web Service inside groovy code, the following error is generated:

Exception in expression "ServiceRequestVO" object function <your_custom_funtion>() : oracle.binding.expr.ServiceInvocationException Unexpected exception caught: oracle.adf.model.adapter.AdapterException, msg=DCA-50008: 
ERROR
-----------------------
oracle.adf.model.adapter.AdapterException, msg=DCA-50008 Failed to create JSON Stream from MAP.


STEPS
-----------------------
The issue can be reproduced at will with the following steps:

1. Created a sandbox

2. Navigate to Application Composer

3. Click Web Services

4. Click Create Web Service Reference 

5. Select Connection Type. Select REST

Pass a map to the web service, to be treated as a JSON object, for example

def Contact_Number = ContactPerson?.PartyNumber
def SR_Number = getAttribute('SrNumber')
def corpo_message = MessageTicketServiceSol_c // string
def public_response = false

def Message =
[
description :body_message,
responsibleCode :Contact_Number,
externalTicketId :SR_Number,
publicresponse :public_response
]

def conn = adf.webServices.SendMessageTicket_ServiceSol
def httpHeaders = [:]
httpHeaders.'Content-Type' = 'application/json'
httpHeaders.'Authorization' = token
conn.requestHTTPHeaders = httpHeaders
def resp_envia_mensagem_ticket = conn.POST(Message)




Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.