MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WEB SEND & USPS Shipping API

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
ek1975
Beginner


Joined: 01 Jun 2006
Posts: 3
Topics: 2

PostPosted: Thu Jan 11, 2007 1:58 pm    Post subject: WEB SEND & USPS Shipping API Reply with quote

Hello, I am new to making CICS act as an HTTP client & I am not sure what I'm doing wrong here.

If I paste this in a web browser:
Code:
 http://testing.shippingapis.com/ShippingAPITest.dll?API=Verify&XML=<AddressValidateRequest USERID="xxxx"><Address ID="0"><Address1></Address1><Address2>6406 Ivy Lane</Address2><City>Greenbelt</City><State>MD</State><Zip5></Zip5><Zip4></Zip4></Address></AddressValidateRequest>


I get a good response (for a valid USERID), But when I use the CICS WEB OPEN, WEB SEND & WEB RECEIVE commands, I consistently get a HTTP Error 400 (Bad Request) response.

This is how my WEB commands look:
Code:
 Exec cics web open host(ws-hostname) HTTP sesstoken(ws-sessiontoken) resp(ws-resp-code) End-exec

where ws-hostname = "testing.shippingapis.com"

Code:
 Exec cics web send sesstoken(ws-sessiontoken) GET
 path(ws-path) pathlength(20) querystring(ws-querystring)
 querystrlen(232) resp(ws-resp-code) End-exec

where ws-path = "/Shippingapis.dll" and ws-querystring is set to "API=Verify&XML=<AddressValidateRequest USERID="xxxx"><Address ID="0"><Address1></Address1><Address2>6406 Ivy Lane</Address2><City>Greenbelt</City><State>MD</State><Zip5></Zip5><Zip4></Zip4></Address></AddressValidateRequest>"

My web receive command looks like:
Code:
 Exec cics web receive into(ws-receive-area) length(ws-receive-length) maxlength(500) sesstoken(ws-sessiontoken) statuscode (ws-statuscode) statustext (ws-statustext) statuslen  (ws-statuslen) resp(ws-resp-code) End-exec

I see 400 in ws-statuscode and "Bad Request" in ws-statustext

if you could see something I'm doing wrong or if there are alternate ways of accomplishing this task, let me know please... I would really appreciate your help.
EK
Back to top
View user's profile Send private message
sfcgllc
Beginner


Joined: 16 Jan 2007
Posts: 1
Topics: 0

PostPosted: Wed Jan 17, 2007 10:23 am    Post subject: Reply with quote

EK, Sir,

Sorry, I don't have the good fortune of running on TS 3.1, I'm on 2.3. Have you ever done any HTTP client stuff on that version? Thanks
Beag
Back to top
View user's profile Send private message
ek1975
Beginner


Joined: 01 Jun 2006
Posts: 3
Topics: 2

PostPosted: Tue Jan 23, 2007 5:17 pm    Post subject: Reply with quote

sfcgllc wrote:
EK, Sir,

Sorry, I don't have the good fortune of running on TS 3.1, I'm on 2.3. Have you ever done any HTTP client stuff on that version? Thanks
Beag


sorry, I was out for a while and didn't see your question.

I think it may be possible. Check with CICS Application Reference 2.3 or Internet Guide 2.3.

http://www-306.ibm.com/software/htp/cics/tserver/v31/library/

Good Luck, I am able to do initiate a successful request to USPS and my TCP IP software says I am getting a good status code and response text. But I am able to see only the good status code, the response text is getting lost somewhere!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group