Skip to Main Content

Oracle Service Bus REST request without formatting

Miguel RamirezJan 15 2020 — edited Jan 15 2020

Hi there.

I have developed a OSB Application that receives SOAP request and calls REST back-end services. This was accomplished using REST adapters and nXSD schemas by Service Callouts, so the transformation is automatically done by the Adapter when calling the REST services. Using an HTTP Analyzer, the raw payload of the HTTP request message in the REST back-end service is a formatted JSON representation with alignment and line breaks .

POST /core/realizarCalculoSimuladorList HTTP/1.1

SOAPAction: "simularArrendamiento"

Accept: application/json

Content-Type: application/json;charset=utf-8

User-Agent: Jersey/2.22.4 (HttpUrlConnection 1.8.0_221)

Host: localhost:8090

Connection: Keep-Alive

Content-Length: 1831

ECID-Context: 1.667d2cfd-edca-4f93-9e4b-6936c204fed8-000001fe;kXhgv0YD6SRRrPGPPGCCk0DJtLORiPPSp9QNkCIUtNSCtNLCLNFR4JKCk0CCk8GW9VNNNSGH6VKHPLJNMLJGKVIKVHGEp8DEt3CDp9EC

X-Forwarded-For: 127.0.0.1

{

  "Simulacion" : {

    "AnticipoCapital" : {

      "MontoBase" : "1000.00",

      "Monto" : 1000.00,

      "MontoMasIva" : 1000.00,

      "Porc" : 1000.00,

      "IVA" : 1000.00

    },

    "RentaExtraordinaria" : {

      "MontoBase" : 1000.00,

      "Monto" : 1000.00,

      "MontoMasIva" : 1000.00,

      "Porc" : 1000.00,

      "IVA" : 1000.00

    },

    "ComisionDisposicion" : {

      "MontoBase" : 1000.00,

      "Monto" : 1000.00,

      "MontoMasIva" : 1000.00,

      "Porc" : 1000.00,

      "IVA" : 1000.00

    },

    "RentasDeposito" : {

      "MontoBase" : 1000.00,

      "Monto" : 1000.00,

      "Capital" : 1000.00,

      "Interes" : 1000.00,

      "IvaCap" : 1000.00,

      "IvaInt" : 1000.00,

      "Cant" : 1000.00

    },

    "Seguros" : {

      "Monto" : 1000.00,

      "IVA" : 1000.00,

      "MontoMasIva" : 1000.00,

      "ContadoFinanciado" : 100

    },

    "Mantenimiento" : {

      "Monto" : 1000.00,

      "IVA" : 1000.00,

      "MontoMasIva" : 1000.00,

      "ContadoFinanciado" : 100

    },

    "GastosAdministrativos" : {

      "Monto" : 1000.00,

      "IVA" : 1000.00,

      "MontoMasIva" : 1000.00,

      "ContadoFinanciado" : 100

    },

    "Otros" : {

      "Monto" : 1000.00,

      "IVA" : 1000.00,

      "MontoMasIva" : 1000.00,

      "ContadoFinanciado" : 100

    },

    "TasaIva" : 1000.00,

    "TasaTabla" : 1000.00,

    "Feriados" : 100,

    "InteresesSiInhabil" : 100,

    "Sistema" : "string",

    "SaldoInsoluto" : 1000.00,

    "TNA" : 1000.00,

    "DiaTope" : 100,

    "DiaPago" : 100,

    "Plazo" : 100,

    "Periodicidad" : 100,

    "Esquema" : "string",

    "Denominador" : 100,

    "FechaI" : "string",

    "Residual" : 1000.00,

    "CuotaFinal" : 1000.00,

    "IvaInteres" : false,

    "IvaCapital" : true

  }

}

For some reason out of my scope, the back-end service doesn't accept the formatted JSON, instead it needs a flatten JSON payload.

Is that posible?

Thank You!

Comments
Post Details
Added on Jan 15 2020
0 comments
63 views