Title: XML Issue Revisited....AGAIN wow...
Hey fellow programmers,

Here’s something I’m tackling again after much grief and frustration. So here goes it again:

Vendor requires data to be sent in XML format. After getting some guidance from all of you, I figured out that the best way to do this is to assign them all into a DOM and spit it out with an @URL.

Here’s the DOM being assigned (everything was condensed into one line in Tango, but here it’s all spread apart for ease of readability:

<@ASSIGN NAME="aiiDom" SCOPE="request" VALUE="<@DOM VALUE='<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ProcessLead xmlns="http://eleads.edmc.edu/leadServicePoster">
<lead>
<vendorCode xmlns="">COLONLINE</vendorCode>
<vendorLeadIdentifier xmlns="">
@@Market_MID</vendorLeadIdentifier>
<versionIdentifier xmlns="">3</versionIdentifier>
<testCase xmlns="">Y</testCase>
<nameLast xmlns="">
<@ARG LASTNAME></nameLast>
<nameMiddle xmlns=""></nameMiddle>
<nameFirst xmlns="">
<@ARG FIRSTNAME></nameFirst>
<nameSuffix xmlns=""></nameSuffix><addressLine1 xmlns="">
<@FORMAT STR="<@ARG ADDRESS_1>" FORMAT="case:word"></addressLine1>
<addressLine2 xmlns="">
<@FORMAT STR="<@ARG ADDRESS_2>" FORMAT="case:word"></addressLine2>
<addressCity xmlns="">
<@ARG CITY></addressCity>
<addressState xmlns="">
<@ARG STATE></addressState>
<addressZip xmlns="">
<@ARG ZIPCODE></addressZip>
<addressCountryCode xmlns="">
<@ARG COUNTRY_CODE></addressCountryCode>
<homePhone xmlns="">
<@ARG AREA_CODE_1>@@user$phone1</homePhone>
<workPhone xmlns=""></workPhone>
<otherPhone xmlns=""></otherPhone>
<internationalPhone xmlns="">1
<@ARG AREA_CODE_1>@@user$phone1</internationalPhone>
<email xmlns="">
<@ARG EMAIL></email><bestTimeToCall xmlns="">
<@ARG TIME_TO_CALL></bestTimeToCall>
<highSchoolGradYear xmlns="">
<@ARG GRAD_YEAR></highSchoolGradYear>
<locationCode xmlns="">
@@request$SCHOOL_CODE</locationCode>
<educationCompleted xmlns=""></educationCompleted>
<dateDegreeCompleted xmlns=""></dateDegreeCompleted>
<studentVisaRequired xmlns="">N</studentVisaRequired>
<countryCitizenship xmlns=""></countryCitizenship>
<militaryStatus xmlns=""></militaryStatus>
<areaOfInterest xmlns=""></areaOfInterest>
<programOfInterest xmlns="">
<@ARG PROGRAM_CODE></programOfInterest>
<educationObjective xmlns=""></educationObjective>
<inquiredBefore xmlns="">N</inquiredBefore>
<sourceCode xmlns="">COLOL</sourceCode>
<sourceDate xmlns="">
<@CURRENTDATE></sourceDate>
<sourceTime xmlns="">
<@CURRENTTIME></sourceTime>
<sourceTimeOffset xmlns=""></sourceTimeOffset>
<sourceNumber xmlns=""></sourceNumber>
<vendorAffiliate xmlns=""></vendorAffiliate>
<comments xmlns=""></comments>
<preassignedAda xmlns=""></preassignedAda>
<warmTransferResult xmlns=""></warmTransferResult>
<other xmlns=""></other>
<validationResults xmlns=""></validationResults><validationNotes xmlns="">
</validationNotes>
<validationMessage xmlns=""></validationMessage>
</lead>
</ProcessLead>
</soap:Body>
</soap:Envelope>'
>">

So we can go ahead and do the whole <@URL> thing:

<@URL LOCATION='https://eleads.edmc.edu/eLeadsWebServicePost/LeadServicePoster.asmx'  USERAGENT='Witango <@VERSION> <@PLATFORM>' POSTARGS='<@VAR aiiDOM>'>

Currently I’m getting an error stating this:
soap:Client Unable to handle request without a valid action parameter. Please supply a valid soap action.

This makes sense since I didn’t specifically set an action for the program to go and do something with all this info. I tried setting the header into a separate  DOM Variable, and passing both the soapheader variable aiiDOM variable to the vendor.

The error I always got was this: “Content-Length: Required”. According to my research, I found that the Content-Length in Soap-Headers refer to the size document. This is the barrier to my completion of the project. I have a feeling that the numbers are not coinciding.

I am counting the number of characters in one scenario in the aiiDOM variable having that number show up in the header DOMvariable.

My one question has turned into a few I guess:

  • Is this method correct?
  • Should I condense the Soap Header dom and the aii dom into one?
  • Does the header even need to exist? If it does, should this be hard-coded into the application, or should this need to be set up on the Tango Server?
  • If the content-length is wrong, how can I write a loop that’ll keep hitting the vendors server until the lead is accepted without the values being lost? Is this something I have to use “DetailedResponse” with?

Any thoughts on the matter?

Thanks!

Kaustav
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to