HTTP/1.1 500 Internal Server Error on JSON call from RPG

<midrangel-zbO79nAUJZvJTQUaaPvyeQC/[email protected]>
Newsgroups gmane.comp.systems.as400.web
Message-ID <[email protected]>
Folks:

 

I have a web service running on a V7R3 machine (ccsid = 37) that SoapUI runs
and gets an http code 200 from.  The program runs and does as expected.  It
does report "unsupported content-type [application/json]"  in the HTML
response box, but everything appears to work.

 

When I run the following  RPG (snipped to show relevant code) to call the
exact same web service all I get is the 500 error code.

 

Where do I turn on the logging or where do I look to see what the server is
failing on?  I look in the logs in the apache folder and nothing of values
seems to show up.  Clearly I've got some adjustments to make but I'm in the
dark about what's causing the error.  

 

 

 

dcl-c BASEURL 'http://123.456.789.123:61354/web/services/MsgMon';

  dcl-c JOB_CCSID 37;

 

  dcl-ds message qualified;

    sernbr     char(7)      INZ('78ABCDE');

    sysname    char(8)      INZ('V7R4PRD');

    msgid      char(7)      INZ('CPF9898');

    msg        char(140)    INZ('This is a test from RPG');

    severity   char(1)      INZ('1');

  END-DS;

//*********************************************************************

 

  rc= 0;

  http_debug(*on);

  http_setCCSIDs(1208: JOB_CCSID);

 

  method = 'POST';

  url = BASEURL;

 

  DATA-GEN message %DATA(Json) %GEN('YAJLDTAGEN');

 

  monitor;

     http_string( method: url: Json: 'application/json; charset=utf-8' );

 

  on-error;

     msg = http_error();

     rc= 1;

  endmon;     

 

--

Jim Oberholtzer

Agile Technology Architects

 

-- 
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.