Legacy Dev Forum Posts

 View Only

Sign Up

Excute Error of Web Service Data Action

  • 1.  Excute Error of Web Service Data Action

    Posted 06-05-2025 18:48

    MakotoNagai | 2019-01-09 04:57:36 UTC | #1

    Hi,

    I'd like to API-link (POST) to external service using Custom Web Services Data Actions,I will not succeed. Below, I will write my Action definition, so can you advise me?


    Contract(Input)


    { "$schema": "http://json-schema.org/draft-04/schema#", "title": "SMS Sending", "description": "A Phone Number based request.", "type": "object", "required": [ "clientId", "password", "address", "messageNo" ], "properties": { "clientId": { "description": "clientId", "type": "string" }, "password": { "description": "password", "type": "string" }, "address": { "description": "address", "type": "string" }, "messageNo": { "description": "messageNo", "type": "string" } } }


    Contract(Output)


    { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "required": [ "permitErrCode" ], "properties": { "permitErrCode": { "type": "string" }, "permitNo": { "type": "string" }, "permitTime": { "type": "string" } } }


    Request


    { "requestUrlTemplate": "https://*************", "requestType": "POST", "headers": { "Content-Type": "application/json", "Transfer-Encoding": "buffered" }, "requestTemplate": "${input.rawRequest}" }


    Response


    { "translationMap": {}, "translationMapDefaults": {}, "successTemplate": "${rawResult}" }


    Execution result


    { "status": 500, "code": "internal.server.error", "message": "The server encountered an unexpected condition which prevented it from fulfilling the request.", "messageParams": {}, "contextId": "d3d43ed7-7a31-4dc6-8883-28323dd1adce", "details": [], "errors": [ { "status": 200, "code": "INTERNALSERVERERROR", "message": "REST call for action execute failed. Message:We were unable to process the response from the remote endpoint (octpass.ibsms.info) because it had a 'content-type' header of 'text/html;charset=UTF-8' instead of the required value of 'application/json'. [d3d43ed7-7a31-4dc6-8883-28323dd1adce]", "messageParams": {}, "details": [], "errors": [] } ] }

    I saw some threads of the same issue, but I don't solve my problem. I'm happy to give you advice.

    Regart,


    Jason_Mathison | 2019-01-09 12:38:15 UTC | #2

    So this error indicates that the remote web service is not returning an application/json response. If you test out this same webservice with a tool like postman is it returning application/json?

    MakotoNagai, post:1, topic:4314
    We were unable to process the response from the remote endpoint (octpass.ibsms.info) because it had a 'content-type' header of 'text/html;charset=UTF-8' instead of the required value of 'application/json'

    MakotoNagai | 2019-01-11 11:07:57 UTC | #3

    Hi Jason,

    Thank you for giving us your opinion. In the process that I am struggling to implement with Postman, this time I solved it with the URL query string. I will post implementation training at Postman for the future.

    Thank you!


    system | 2019-02-11 11:11:24 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 4314