Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Send JSON data over Restful using CICS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
mukun264

New User


Joined: 01 Jan 2008
Posts: 29
Location: Bangalore

PostPosted: Fri Oct 18, 2013 1:20 am    Post subject: Send JSON data over Restful using CICS
Reply with quote

Hi,

I am trying to send JSON data from cics to Restful server using http call But I am getting Bad request from server.

But same data is getting process from open tool like crome.

any one have idea how to send JSON data from cics.

I study the manual but not helping to much icon_cry.gif
Back to top
View user's profile Send private message

Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Fri Oct 18, 2013 6:20 pm    Post subject:
Reply with quote

Can your http call from cics work with anything else?

I only ask because I usually have to start with something simple, like a straight out 'GET' against a known url, like www.google.com. This allows me to know for certain that my mainframe region has connectivity.

Once you know that, then you have to start breaking it down...are you actually getting to the server, is the data in ASCII/UTF8 when it gets there, is your error message REALLY coming from the server, what does the server log tell you the problem is.
Back to top
View user's profile Send private message
mukun264

New User


Joined: 01 Jan 2008
Posts: 29
Location: Bangalore

PostPosted: Sat Oct 19, 2013 11:35 pm    Post subject: Reply to: Send JSON data over Restful using CICS
Reply with quote

yes I have proven cics web call to other server and data was sent in XML and SOAP. this is first time our we are trying to send the data in JSON format to restful server.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Sun Oct 20, 2013 2:31 am    Post subject: Reply to: Send JSON data over Restful using CICS
Reply with quote

OK, so how do you check to make sure the message/request is being formatted correctly? Are you able to look at it before it gets squeezed through the IP pipe?
Back to top
View user's profile Send private message
mukun264

New User


Joined: 01 Jan 2008
Posts: 29
Location: Bangalore

PostPosted: Sun Oct 20, 2013 3:04 pm    Post subject:
Reply with quote

we do not use pipe concept. but i am checking http header and its coming correct.

can you suggest me what other needs to be verify
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Mon Oct 21, 2013 9:42 pm    Post subject:
Reply with quote

OK...
The server is giving a bad response. What is the server being given to work with?

Verify the entire message, not just the header, by looking at the log from the server.

"But Ed, I don't have access to that" you say. Then take a look at what your program is actually outputting.

"But Ed, I don't know what to look for" you say. Then compare it to the data being sent from chrome.
Back to top
View user's profile Send private message
mukun264

New User


Joined: 01 Jan 2008
Posts: 29
Location: Bangalore

PostPosted: Tue Oct 22, 2013 10:22 pm    Post subject: Reply to: Send JSON data over Restful using CICS
Reply with quote

Good news ,

The issue WaS resolved . There were a little error in my program. I defined data lenght as s9(4) comp instead of s9(8) comp. Due this the length was getting calculated wrongly .


There were some error in terms of content type. They were excepting in text/json but I was used application/json
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Oct 23, 2013 12:40 am    Post subject:
Reply with quote

Good to hear this is resolved - thank you for posting the solution icon_smile.gif

d
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Oct 23, 2013 9:01 pm    Post subject:
Reply with quote

Sweet!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us