B2B Integration

 View Only
  • 1.  REST API POST Error - 500 Internal Server Error

    Posted Tue January 05, 2021 05:32 AM
    Edited by System Wed March 22, 2023 11:52 AM
    Hello Team,

    When trying to post the same request via postman or swagger to the same endpoint, it is working fine.But when trying to send the request (endpoint is expecting only header, no body) which ideally does some validation check before inserting to database, it is throwing 500 internal server error.

    <Response_Code>500</Response_Code>
    <error>Internal Server Error</error>

    Snippet of the BP code -

    <process name="ANSI-277">
    <sequence>
    <operation name="RESTAPIClient">
    <participant name="RESTAPIClient"/>
    <output message="RESTAPIClientInputMessage">
    <assign to="." from="*"></assign>
    <assign to="restoperation">POST</assign>
    <assign to="url">https://billing-service-dev.apps.az-nonprod.com/api/v1/Billing/ansi-277</assign>
    <assign to="Content-type">Application/json</assign>
    <assign to="Accept">Application/json</assign>
    <assign to="Headers">ES.Utils.ApplicationInfrastructure.Claims:[{"Type":"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier","Value":"name_id"},{"Type":"name","Value":"John Deere"},{"Type":"jti","Value":"ID.JTI_key"},{"Type":"http://schemas.microsoft.com/claims/authnmethodsreferences","Value":"pwd"},{"Type":"http://schemas.microsoft.com/identity/claims/identityprovider","Value":"fake_identity_provider"},{"Type":"preferred_username","Value":"abcadmin@smadtest.local"},{"Type":"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn","Value":"abcadmin@smadtest.local"},{"Type":"roleName","Value":"Clinician Supervisor"},{"Type":"attribute","Value":"SMELoginName:SYSADM"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.SEARCH"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.CLINICAL.PROFILE"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.VIEW"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.EDIT"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.MANAGE"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.MEDSUMMARY.VIEW"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.ALLERGIES.VIEW"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.ALLERGIES.MANAGE"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.MEDCOND.VIEW"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.MEDCOND.MANAGE"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.REPMEDS.VIEW"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.REPMEDS.MANAGE"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.RXACTIVITY.VIEW"},{"Type":"permissionName","Value":"Clinician Supervisor|REFERRAL.SUMMARY.VIEW"},{"Type":"permissionName","Value":"Clinician Supervisor|RX.SUMMARY.VIEW"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.IMAGES.VIEW"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.INSURANCE.VIEW"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.INTERVENTION.SUMMARY.VIEW"},{"Type":"permissionName","Value":"Clinician Supervisor|TASKS.MYTASKS.MANAGE"},{"Type":"permissionName","Value":"Clinician Supervisor|TASKS.MANAGE"},{"Type":"permissionName","Value":"Clinician Supervisor|TASKS.COMPLETE"},{"Type":"permissionName","Value":"Clinician Supervisor|TASKS.CREATE"},{"Type":"permissionName","Value":"Clinician Supervisor|REPORTS.VIEW"},{"Type":"permissionName","Value":"Clinician Supervisor|ORDERS.SUMMARY.VIEW"},{"Type":"permissionName","Value":"Clinician Supervisor|PATIENT.INTERVENTION.VIEW"},{"Type":"permissionName","Value":"Clinician Supervisor|BILLINGWORKLIST.VIEW"},{"Type":"customer","Value":"CRE.DEV02"},{"Type":"given_name","Value":"John"},{"Type":"family_name","Value":"Deere"}]</assign>
    </output>
    <input message="inmsg">
    <assign to="." from="*"></assign>
    </input>
    </operation>
    </sequence>
    </process>

    Kindly let me know what could be the issue ?


    ------------------------------
    Pranjit Biswas
    ------------------------------
    #B2BIntegration
    #SupplyChain


  • 2.  RE: REST API POST Error - 500 Internal Server Error

    Posted Wed January 06, 2021 03:28 PM
    how r u doing your database validation?

    I mean, maybe the db doen't find or return teh correct values

    ------------------------------
    Alejandro Rodriguez
    ------------------------------



  • 3.  RE: REST API POST Error - 500 Internal Server Error

    Posted Thu January 07, 2021 02:48 AM
    We are not concerned about the target endpoint database lookup etc..all we are doing is passing the json request and expecting 200 ok response which we are receiving wth the same content via postman,swagger but not with Sterling Integrator, we are getting 500 internal server error..not able to find any clue through the logs that might help further troubleshoot.

    ------------------------------
    Pranjit Biswas
    ------------------------------



  • 4.  RE: REST API POST Error - 500 Internal Server Error

    Posted Thu January 07, 2021 04:05 PM
    well I had a similar issue when I tried to use  SSPCM REST APIs, the URL in IBM site was not correct or has some issue, I do not know if you can try another endpoints in order to verify if the URL is correct

    ------------------------------
    Alejandro Rodriguez
    ------------------------------



  • 5.  RE: REST API POST Error - 500 Internal Server Error

    Posted Thu January 07, 2021 04:21 PM
      |   view attached
    Try this one, I am getting a Response Code of 200.  You need this input data file for the Rest call.  The application server is in the IBM Cloud.
    <?xml version="1.0" encoding="UTF-8"?>
    <ProcessData>
      <PrimaryDocument SCIObjectID="
    936504176deaf06b5node1
    "/>
      <URL_0>http://itx-rs-route-itx.democluster-580184-14cc747866faab74c9640c8ac367af7f-0000.us-south.containers.appdomain.cloud/itx-rs/v1/maps/direct/837ToJson?input=1&output=1</URL_0>
      <REQUESTTYPE_0>PUT</REQUESTTYPE_0>
      <Response_Code>200</Response_Code>
      <Response_0>Succesfully Updated</Response_0>
    </ProcessData>


    ------------------------------
    Rex Chan
    ------------------------------

    Attachment(s)



  • 6.  RE: REST API POST Error - 500 Internal Server Error

    Posted Thu January 07, 2021 07:48 PM
    I Am Also Facing The Same Error From Last 2 Weeks​ :/

    ------------------------------
    Olivia Jhon
    ------------------------------



  • 7.  RE: REST API POST Error - 500 Internal Server Error

    Posted Fri January 08, 2021 09:44 AM
    If you are doing this for B2B REST API and then you updgraded or fixed your installation u must re install the API.

    I hope this helps

    ------------------------------
    Alejandro Rodriguez
    ------------------------------