Skip to main content

"Hello" from Russell. Please allow me to ask for help with an RMCobol application
using "HTTP Post" command. I apologize in advance for the lack of specific details.
This is all I have to work with.

I work for a company that provides a complete software package for automobile dealerships.
My latest project, which was received on Oct 18, is to integrate our application with:
Georgia Electronic Title and Registration System (GA-ETR)

To be short & blunt:
We requested the specs.
We were sent a sample document, which is below. Nothing else. Just a sample document.
We have requested credentails for:
(1) Transaction.userName
(2) Transaction.password
and are still waiting

The sample document contains this line:
<form action= "georgia.qa.titletec.com/.../HTTPDealPost.aspx" method="POST" name="myform" id = "myform" >

Judging by that line, it appears a command such as "HTTPPOst" would work.
I created a "hack" program that would "inhale" the sample document into a "request"
and attempt to post it to URL = georgia.qa.titletec.com/.../HTTPDealPost.aspx
Below is the response. I won't pretend to know what that response means, but it appears negative to me.

I am accustom to SOAP/XML since most of my experience is with GM, Ford, and Chrysler.
I don't know how to handle the "request" below.

My question:
Does anyone have any advice/comments/suggestions to share on how to handle
the "request" below to obtain a valid "response".

Sample Request Provided:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html>
<head></head>
<body>
<form action= "georgia.qa.titletec.com/.../HTTPDealPost.aspx" method="POST" name="myform" id = "myform" >
<input type = "hidden" name = "Transaction.VendorID" value ="" />
<input type = "hidden" name = "Transaction.Type" value ="TEMP_TAG" />
<input type = "hidden" name = "Transaction.userName" value ="" />
<input type = "hidden" name = "Transaction.password" value ="" />
<input type = "hidden" name = "Deal.DealNumber" value ="437test" />
<input type = "hidden" name = "Deal.DealerNumber" value ="001106692255" />
<input type = "hidden" name = "Customer.buyerDriversLicenseNumber" value ="000000000012" />
<input type = "hidden" name = "Customer.buyerCustomerType" value ="I" />
<input type = "hidden" name = "Customer.buyerLastName" value ="WALDO" />
<input type = "hidden" name = "Customer.buyerFirstName" value ="SLATON" />
<input type = "hidden" name = "Customer.buyerMiddleName" value ="" />
<input type = "hidden" name = "Customer.buyerCompanyName" value ="" />
<input type = "hidden" name = "Customer.buyerSuffix" value ="" />
<input type = "hidden" name = "Customer.buyerAddress" value ="22 OWL CT" />
<input type = "hidden" name = "Customer.buyerAppartmentNo" value ="" />
<input type = "hidden" name = "Customer.buyerCity" value ="MONTICELLO" />
<input type = "hidden" name = "Customer.buyerState" value ="GA" />
<input type = "hidden" name = "Customer.buyerZip" value ="31064" />
<input type = "hidden" name = "Customer.buyerZipPlus" value ="" />
<input type = "hidden" name = "Customer.buyerCounty" value ="BIBB" />
<input type = "hidden" name = "Vehicle.vehicleYear" value ="2002" />
<input type = "hidden" name = "Vehicle.vehicleMake" value ="Toyota" />
<input type = "hidden" name = "Vehicle.vehicleModel" value ="Celica" />
<input type = "hidden" name = "Vehicle.bodyCode" value ="4D" />
<input type = "hidden" name = "Vehicle.majorColor" value ="WHITE" />
<input type = "hidden" name = "Vehicle.minorColor" value ="WHITE" />
<input type = "hidden" name = "Vehicle.fuelType" value ="G" />
<input type = "hidden" name = "Vehicle.newUsed" value ="U" />
<input type = "hidden" name = "Vehicle.vin" value ="JTDDR32T520139446" />
<input type = "hidden" name = "Vehicle.titleNumber" value ="" />
<input type = "hidden" name = "Vehicle.noOfCylinders" value ="4" />
<input type = "hidden" name = "Vehicle.useType" value ="TOP" />
<input type = "hidden" name = "Vehicle.engineType" value ="C" />
<input type = "hidden" name = "Insurance.insuranceType" value ="B" />
<input type = "hidden" name = "Financing.dealSaleDate" value ="03/05/2010" />
<input type = "hidden" name = "Customer.coBuyerLastName" value ="" />
<input type = "hidden" name = "Customer.coBuyerFirstName" value ="" />
<input type = "hidden" name = "Customer.coBuyerMiddleName" value ="" />
<input type = "hidden" name = "Customer.coBuyerFEIDNumber" value ="" />
<input type = "hidden" name = "Customer.coBuyerCompanyName" value ="" />
<input type = "hidden" name = "Customer.coBuyerCustomerType" value ="" />
<input type = "hidden" name = "Customer.coBuyerAddress" value ="" />
<input type = "hidden" name = "Customer.coBuyerAppartmentNo" value ="" />
<input type = "hidden" name = "Customer.coBuyerCity" value ="" />
<input type = "hidden" name = "Customer.coBuyerState" value ="" />
<input type = "hidden" name = "Customer.coBuyerZip" value ="" />
<input type = "hidden" name = "Trade1.vehicleType" value ="" />
<input type = "hidden" name = "Trade1.vehicleYear" value ="" />
<input type = "hidden" name = "Trade1.vehicleMake" value ="" />
<input type = "hidden" name = "Trade1.vehicleModel" value ="" />
<input type = "hidden" name = "Trade1.vehicleBody" value ="" />
<input type = "hidden" name = "Trade1.vehicleMiles" value ="" />
<input type = "hidden" name = "Trade1.majorColor" value ="" />
<input type = "hidden" name = "Trade1.minorColor" value ="" />
<input type = "hidden" name = "Trade1.fuelType" value ="" />
<input type = "hidden" name = "Trade1.vin" value ="" />
<input type = "hidden" name = "Trade1.DealerStockNumber" value ="" />
<input type = "hidden" name = "Trade1.emptyWt" value ="" />
<input type = "hidden" name = "Trade1.grossWt" value ="" />
<input type = "hidden" name = "Trade1.currentTitleNumber" value ="" />
<input type = "hidden" name = "Trade1.currentTitleState" value ="" />
<input type = "hidden" name = "Trade1.currentTitleDate" value =" / / " />
<input type = "hidden" name = "Trade2.vehicleType" value ="" />
<input type = "hidden" name = "Trade2.vehicleYear" value ="" />
<input type = "hidden" name = "Trade2.vehicleMake" value ="" />
<input type = "hidden" name = "Trade2.vehicleModel" value ="" />
<input type = "hidden" name = "Trade2.vehicleBody" value ="" />
<input type = "hidden" name = "Trade2.vehicleMiles" value ="" />
<input type = "hidden" name = "Trade2.odometerStatus" value ="" />
<input type = "hidden" name = "Trade2.majorColor" value ="" />
<input type = "hidden" name = "Trade2.minorColor" value ="" />
<input type = "hidden" name = "Trade2.fuelType" value ="" />
<input type = "hidden" name = "Trade2.vin" value ="" />
<input type = "hidden" name = "Trade2.DealerStockNumber" value ="" />
<input type = "hidden" name = "Trade2.emptyWt" value ="" />
<input type = "hidden" name = "Trade2.grossWt" value ="" />
<input type = "hidden" name = "Trade2.currentTitleNumber" value ="" />
<input type = "hidden" name = "Trade2.currentTitleState" value ="" />
<input type = "hidden" name = "Trade2.currentTitleDate" value =" / / " />
<input type = "hidden" name = "Lien1.LienDate" value ="" />
<input type = "hidden" name = "Lien1.ElectronicLien" value ="" />
<input type = "hidden" name = "Lien1.FEIDNumber" value ="" />
<input type = "hidden" name = "Lien1.CompanyName" value ="" />
<input type = "hidden" name = "Lien1.Address" value ="" />
<input type = "hidden" name = "Lien1.City" value ="" />
<input type = "hidden" name = "Lien1.State" value ="" />
<input type = "hidden" name = "Lien1.Zip" value =" " />
<input type = "hidden" name = "Lien2.LienDate" value =" / / " />
<input type = "hidden" name = "Lien2.ElectronicLien" value ="" />
<input type = "hidden" name = "Lien2.CompanyName" value ="" />
<input type = "hidden" name = "Lien2.Address" value ="" />
<input type = "hidden" name = "Lien2.City" value ="" />
<input type = "hidden" name = "Lien2.State" value ="" />
<input type = "hidden" name = "Lien2.Zip" value ="" />
<input type = "hidden" name = "Customer.coBuyerDriversLicenseNumber" value ="" />
<input type = "submit" />
</form>

</body>
</html>

Response rusultng from HTTPPost command:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/.../xhtml1-transitional.dtd">
<html xmlns="www.w3.org/.../xhtml">
<head id="Head1"><title>
t21 HTTP Post API
</title><link rel="stylesheet" type="text/css" href="/Styles/global.css" /><link rel="stylesheet" type="text/css" href="/styles/menu.css" /><link rel="stylesheet" type="text/css" href="/styles/DefaultFonts.css" /></head>
<body>
<form name="form1" method="post" action="HTTPDealPost.aspx" id="form1">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTQ5NTY2MzE4MA9kFgICAw9kFgICBw9kFgICBQ88KwALAGRk0Jdg0ws5QkOBGE87pxqkBH5zpWY=" />

<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="24E8DBFA" />
<table class="formTitle" cellpadding="1" cellspacing="0" width="100%" border="0">
<tr>
<td class="formTitle" style="white-space: nowrap;">
t21 HTTP Post API :
<span id="lblTransactionTypeDesc"></span></td>
</tr>
</table>
<table border="0" cellpadding="5" cellspacing="0" style="width: 800px">
<tr>
<td style="padding-top: 10px">
<div class="messageOuter">
<div class="messageInner">
<table cellpadding=0 cellspacing=0 style="padding-top:2px;padding-bottom:2px;"><tr><td valign=top style="width: 25px;"><img src='/images/icon_error1.gif' align=absmiddle>&nbsp;&nbsp;</td><td valign=top><div class='messageError'>Error : No Data has been posted.</div></td></tr></table>
</div>
</div>
</td>
</tr>




</table>
</form>
</body>
</html>


#RMCOBOL

"Hello" from Russell. Please allow me to ask for help with an RMCobol application
using "HTTP Post" command. I apologize in advance for the lack of specific details.
This is all I have to work with.

I work for a company that provides a complete software package for automobile dealerships.
My latest project, which was received on Oct 18, is to integrate our application with:
Georgia Electronic Title and Registration System (GA-ETR)

To be short & blunt:
We requested the specs.
We were sent a sample document, which is below. Nothing else. Just a sample document.
We have requested credentails for:
(1) Transaction.userName
(2) Transaction.password
and are still waiting

The sample document contains this line:
<form action= "georgia.qa.titletec.com/.../HTTPDealPost.aspx" method="POST" name="myform" id = "myform" >

Judging by that line, it appears a command such as "HTTPPOst" would work.
I created a "hack" program that would "inhale" the sample document into a "request"
and attempt to post it to URL = georgia.qa.titletec.com/.../HTTPDealPost.aspx
Below is the response. I won't pretend to know what that response means, but it appears negative to me.

I am accustom to SOAP/XML since most of my experience is with GM, Ford, and Chrysler.
I don't know how to handle the "request" below.

My question:
Does anyone have any advice/comments/suggestions to share on how to handle
the "request" below to obtain a valid "response".

Sample Request Provided:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html>
<head></head>
<body>
<form action= "georgia.qa.titletec.com/.../HTTPDealPost.aspx" method="POST" name="myform" id = "myform" >
<input type = "hidden" name = "Transaction.VendorID" value ="" />
<input type = "hidden" name = "Transaction.Type" value ="TEMP_TAG" />
<input type = "hidden" name = "Transaction.userName" value ="" />
<input type = "hidden" name = "Transaction.password" value ="" />
<input type = "hidden" name = "Deal.DealNumber" value ="437test" />
<input type = "hidden" name = "Deal.DealerNumber" value ="001106692255" />
<input type = "hidden" name = "Customer.buyerDriversLicenseNumber" value ="000000000012" />
<input type = "hidden" name = "Customer.buyerCustomerType" value ="I" />
<input type = "hidden" name = "Customer.buyerLastName" value ="WALDO" />
<input type = "hidden" name = "Customer.buyerFirstName" value ="SLATON" />
<input type = "hidden" name = "Customer.buyerMiddleName" value ="" />
<input type = "hidden" name = "Customer.buyerCompanyName" value ="" />
<input type = "hidden" name = "Customer.buyerSuffix" value ="" />
<input type = "hidden" name = "Customer.buyerAddress" value ="22 OWL CT" />
<input type = "hidden" name = "Customer.buyerAppartmentNo" value ="" />
<input type = "hidden" name = "Customer.buyerCity" value ="MONTICELLO" />
<input type = "hidden" name = "Customer.buyerState" value ="GA" />
<input type = "hidden" name = "Customer.buyerZip" value ="31064" />
<input type = "hidden" name = "Customer.buyerZipPlus" value ="" />
<input type = "hidden" name = "Customer.buyerCounty" value ="BIBB" />
<input type = "hidden" name = "Vehicle.vehicleYear" value ="2002" />
<input type = "hidden" name = "Vehicle.vehicleMake" value ="Toyota" />
<input type = "hidden" name = "Vehicle.vehicleModel" value ="Celica" />
<input type = "hidden" name = "Vehicle.bodyCode" value ="4D" />
<input type = "hidden" name = "Vehicle.majorColor" value ="WHITE" />
<input type = "hidden" name = "Vehicle.minorColor" value ="WHITE" />
<input type = "hidden" name = "Vehicle.fuelType" value ="G" />
<input type = "hidden" name = "Vehicle.newUsed" value ="U" />
<input type = "hidden" name = "Vehicle.vin" value ="JTDDR32T520139446" />
<input type = "hidden" name = "Vehicle.titleNumber" value ="" />
<input type = "hidden" name = "Vehicle.noOfCylinders" value ="4" />
<input type = "hidden" name = "Vehicle.useType" value ="TOP" />
<input type = "hidden" name = "Vehicle.engineType" value ="C" />
<input type = "hidden" name = "Insurance.insuranceType" value ="B" />
<input type = "hidden" name = "Financing.dealSaleDate" value ="03/05/2010" />
<input type = "hidden" name = "Customer.coBuyerLastName" value ="" />
<input type = "hidden" name = "Customer.coBuyerFirstName" value ="" />
<input type = "hidden" name = "Customer.coBuyerMiddleName" value ="" />
<input type = "hidden" name = "Customer.coBuyerFEIDNumber" value ="" />
<input type = "hidden" name = "Customer.coBuyerCompanyName" value ="" />
<input type = "hidden" name = "Customer.coBuyerCustomerType" value ="" />
<input type = "hidden" name = "Customer.coBuyerAddress" value ="" />
<input type = "hidden" name = "Customer.coBuyerAppartmentNo" value ="" />
<input type = "hidden" name = "Customer.coBuyerCity" value ="" />
<input type = "hidden" name = "Customer.coBuyerState" value ="" />
<input type = "hidden" name = "Customer.coBuyerZip" value ="" />
<input type = "hidden" name = "Trade1.vehicleType" value ="" />
<input type = "hidden" name = "Trade1.vehicleYear" value ="" />
<input type = "hidden" name = "Trade1.vehicleMake" value ="" />
<input type = "hidden" name = "Trade1.vehicleModel" value ="" />
<input type = "hidden" name = "Trade1.vehicleBody" value ="" />
<input type = "hidden" name = "Trade1.vehicleMiles" value ="" />
<input type = "hidden" name = "Trade1.majorColor" value ="" />
<input type = "hidden" name = "Trade1.minorColor" value ="" />
<input type = "hidden" name = "Trade1.fuelType" value ="" />
<input type = "hidden" name = "Trade1.vin" value ="" />
<input type = "hidden" name = "Trade1.DealerStockNumber" value ="" />
<input type = "hidden" name = "Trade1.emptyWt" value ="" />
<input type = "hidden" name = "Trade1.grossWt" value ="" />
<input type = "hidden" name = "Trade1.currentTitleNumber" value ="" />
<input type = "hidden" name = "Trade1.currentTitleState" value ="" />
<input type = "hidden" name = "Trade1.currentTitleDate" value =" / / " />
<input type = "hidden" name = "Trade2.vehicleType" value ="" />
<input type = "hidden" name = "Trade2.vehicleYear" value ="" />
<input type = "hidden" name = "Trade2.vehicleMake" value ="" />
<input type = "hidden" name = "Trade2.vehicleModel" value ="" />
<input type = "hidden" name = "Trade2.vehicleBody" value ="" />
<input type = "hidden" name = "Trade2.vehicleMiles" value ="" />
<input type = "hidden" name = "Trade2.odometerStatus" value ="" />
<input type = "hidden" name = "Trade2.majorColor" value ="" />
<input type = "hidden" name = "Trade2.minorColor" value ="" />
<input type = "hidden" name = "Trade2.fuelType" value ="" />
<input type = "hidden" name = "Trade2.vin" value ="" />
<input type = "hidden" name = "Trade2.DealerStockNumber" value ="" />
<input type = "hidden" name = "Trade2.emptyWt" value ="" />
<input type = "hidden" name = "Trade2.grossWt" value ="" />
<input type = "hidden" name = "Trade2.currentTitleNumber" value ="" />
<input type = "hidden" name = "Trade2.currentTitleState" value ="" />
<input type = "hidden" name = "Trade2.currentTitleDate" value =" / / " />
<input type = "hidden" name = "Lien1.LienDate" value ="" />
<input type = "hidden" name = "Lien1.ElectronicLien" value ="" />
<input type = "hidden" name = "Lien1.FEIDNumber" value ="" />
<input type = "hidden" name = "Lien1.CompanyName" value ="" />
<input type = "hidden" name = "Lien1.Address" value ="" />
<input type = "hidden" name = "Lien1.City" value ="" />
<input type = "hidden" name = "Lien1.State" value ="" />
<input type = "hidden" name = "Lien1.Zip" value =" " />
<input type = "hidden" name = "Lien2.LienDate" value =" / / " />
<input type = "hidden" name = "Lien2.ElectronicLien" value ="" />
<input type = "hidden" name = "Lien2.CompanyName" value ="" />
<input type = "hidden" name = "Lien2.Address" value ="" />
<input type = "hidden" name = "Lien2.City" value ="" />
<input type = "hidden" name = "Lien2.State" value ="" />
<input type = "hidden" name = "Lien2.Zip" value ="" />
<input type = "hidden" name = "Customer.coBuyerDriversLicenseNumber" value ="" />
<input type = "submit" />
</form>

</body>
</html>

Response rusultng from HTTPPost command:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/.../xhtml1-transitional.dtd">
<html xmlns="www.w3.org/.../xhtml">
<head id="Head1"><title>
t21 HTTP Post API
</title><link rel="stylesheet" type="text/css" href="/Styles/global.css" /><link rel="stylesheet" type="text/css" href="/styles/menu.css" /><link rel="stylesheet" type="text/css" href="/styles/DefaultFonts.css" /></head>
<body>
<form name="form1" method="post" action="HTTPDealPost.aspx" id="form1">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTQ5NTY2MzE4MA9kFgICAw9kFgICBw9kFgICBQ88KwALAGRk0Jdg0ws5QkOBGE87pxqkBH5zpWY=" />

<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="24E8DBFA" />
<table class="formTitle" cellpadding="1" cellspacing="0" width="100%" border="0">
<tr>
<td class="formTitle" style="white-space: nowrap;">
t21 HTTP Post API :
<span id="lblTransactionTypeDesc"></span></td>
</tr>
</table>
<table border="0" cellpadding="5" cellspacing="0" style="width: 800px">
<tr>
<td style="padding-top: 10px">
<div class="messageOuter">
<div class="messageInner">
<table cellpadding=0 cellspacing=0 style="padding-top:2px;padding-bottom:2px;"><tr><td valign=top style="width: 25px;"><img src='/images/icon_error1.gif' align=absmiddle>&nbsp;&nbsp;</td><td valign=top><div class='messageError'>Error : No Data has been posted.</div></td></tr></table>
</div>
</div>
</td>
</tr>




</table>
</form>
</body>
</html>


#RMCOBOL

Russell, this is fortunately quite similar to SOAP web services; you send the request and get a response.  However, since the request assumes an HTML form, you have to understand how an HTML form is packaged by a browser to be sent.  

The sample you have assumes that a 'browser-like' object is going to submit the form.  You must imitate the browser's action to build a correct request string.  

Each of the <input> elements that is considered active (and type=hidden elements are always active) is converted into a name=value pair.  The name=value pairs are separated with the ampersand character.  Any non-alphanumeric character in the name or value must be 'percent escaped' so for example given <input name="sample" value="A&B"/> the name-value pair would be sample=A&B.  (26 is the hexadecimal value of the ascii representation of ampersand.)

You need to have a text-producing XSLT, or a COBOL routine, that builds the request string.  If you want to use XSLT, see this demo for helpful XSLT: https://skew.org/xml/stylesheets/url-encode/ .  You may be more comfortable building the string using COBOL, but there are some conveniences in the XSLT approach.

The content-type parameter (for the call to HttpPost) for this is not XML, but "application/x-www-form-urlencoded".

Here is the specification for HTML form processing at w3.org: https://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2.1

Now, in terms of processing the response, it appears that the web 'service' is returning an HTML page that is well-formed XML.  If this holds for the non-error responses, then you probably can use XSLT to harvest the response information.  In this error case, you can use an XPath such as //div[@class='messageError']/text() to obtain the error message.  It is a bit tedious to build an XSLT that 'probes around' in an HTML page, but it can be done.

Hope this helps.