PUIUDFINTO Questions

Use this board to ask questions or have discussions with other Universal Displays users.
emhill
Experienced User
Posts: 116
Joined: Wed Sep 05, 2012 11:14 am
First Name: Eric
Last Name: Hill
Company Name: Integrated Corporate Solutions
Phone: 256-760-8239
Address 1: 501 S Wood Avenue
City: Florence
State / Province: Alabama
Zip / Postal Code: 35630
Country: United States
Contact:

PUIUDFINTO Questions

Post by emhill »

Scott,

As you know we deal with the diesel engine parts and services industry. One of their big players, Allison Diesel, has decided to completely change the way warranty claims are uploaded to them. Currently we FTP data to them and get status info in return (successful upload, rejected, etc.). They sprung this on us last week and have a deadline of August 1 to implement all the changes. It's going to be massive.

That being said I think the PUIUDFINTO might be the best route to go. I've been looking at the PUI ViewSource for PUIUDFINTO and it seems like it would work. Just a couple of questions that have me confused. I'm not proficient in web service API's and was not sure about some things. I know I can build the JSON file to send using the UDF editor. I've one this in the past but sending the POST to the URL and then the GET to return the status is where I'm lost. Would one of your HTTPAPI examples be a good one for this? Since PUIUDFINTO will be the parser I just need something that will take the URL I need and send the JSON data. I've been playing around with SOAPUI for testing using PUT, GET, and POST but need something coming from an RPG program.

Any suggestions?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: PUIUDFINTO Questions

Post by Scott Klement »

Hmmm... is Allison Diesel related to Vin? Maybe his wife?

emhill> I've one this in the past but sending the POST to the URL and then the GET to return the status is where I'm lost.

I feel like there's some text missing in the above line?

Did they tell you you need to send the document with POST and then make a separate request to get the status with GET? If so, that means you'll be in the role of a web service consumer (also known as "client"). Whereas, if Allison Diesel is the one doing the POST/GET, then you would be in the role of the provider (aka "server".)

The PUIUDFINTO and Universal Display stuff is for the provider-side.

HTTPAPI is for the consumer side. If you can do it with SoapUI, then you are most likely on the consumer side.

You'll need to determine which role you're playing before determining which tool and/or examples to use. But, even if we assume you are the consumer, I couldn't tell you which example is the closest, as I know absolutely nothing about Allison Diesel's web api.
emhill
Experienced User
Posts: 116
Joined: Wed Sep 05, 2012 11:14 am
First Name: Eric
Last Name: Hill
Company Name: Integrated Corporate Solutions
Phone: 256-760-8239
Address 1: 501 S Wood Avenue
City: Florence
State / Province: Alabama
Zip / Postal Code: 35630
Country: United States
Contact:

Re: PUIUDFINTO Questions

Post by emhill »

Let me see if I can clarify a bit.

I would send a POST with credentials to the URL below to submit a warranty claim. I would then be sending the claim data in JSON that I can develop in a UDF I do believe. The site would then send a response back of success or rejection. (see attached for examples of URL, data to send. and the response).

I've done something similar with UPS to get estimated shipping but it was XML. I did use the HTTPAPI open source for that but pretty much just hardcoded the XML data to send and receive (before I got familiar with UDF). Now with PUIUDFINTO I think it would make it so much better.

I'm going to revisit that UPS procedure I have to see if I can mimic it a bit using "rc=http_post" to connect and send the JSON claim data.

I may be making this harder than it needs to be. I do that sometimes. :-)

Hope you have a great 4th holiday!!!!
Attachments
Claim JSON.txt
(4.75 KiB) Downloaded 782 times
emhill
Experienced User
Posts: 116
Joined: Wed Sep 05, 2012 11:14 am
First Name: Eric
Last Name: Hill
Company Name: Integrated Corporate Solutions
Phone: 256-760-8239
Address 1: 501 S Wood Avenue
City: Florence
State / Province: Alabama
Zip / Postal Code: 35630
Country: United States
Contact:

Re: PUIUDFINTO Questions

Post by emhill »

Scott,

I've done a little bit more research and googling and may have a little bit of a grasp on this. Let me see if I can muddle my way through it.

Thanks for the reply!!!!
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: PUIUDFINTO Questions

Post by Scott Klement »

You won't be able to use PUIUDFINTO, here. That is for a web services PROVIDER, not a client. It has no ability to create a document. When readding a document, it can only read from data sent via HTTP to it while it is acting as a web service provider.

For what you are describing, you can use DATA-GEN to build the document (assuming, of course, that you are reasonably up-to-date on the OS). And/or you can use the YAJL subprocedures to create it. Then, you can use HTTPAPI to communicate, and DATA-INTO and/or YAJL to interpret the document that is sent back.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests