Programming Test
If you are interested in pursuing your career with us, please forward your resume
via email and wait for a response prior to beginning the tests.
|
Corporate Office: |
|
10401 Miller Road
Suite 150
Dallas, Texas 75238-1238
|
|
|
Contact: |
|
(214) 691-4884
Email: sbuck@duoshare.com
*All emails are responded to within 24 hours. If you do not receive a response, please call us.
|
|
Programming Test:
The following exercise involves two interfaces, our HTTP interface and our Web Services interface. Write an application that uses both interfaces and compare and contrast the two methods.
DuoShare Integration: Web Interface
This information provides sample code for web page to web page integration or application integration with DuoShare's web page.
This is an example of a call to DuoShare's http interface that would go in a web form:
<form method="post"
action="http://duoshare.com/ds/App/AddressValidate?task=BeginInteractive
&name=City Of Odessa&firmOrRecipientInput=City
Hall&deliveryAddressLine1Input=411 W 8th
St&city=Odessa&state=TX&zipCode=79761-4499&foreignID=3103
&originatingCallBackURL=YourReturnURLgoesHere"></form>
Enter the originating URL for "YourReturnURLgoesHere" following originatingCallBackURL=.
The first validation request call will require user authentication to interface with DuoShare. After authentication, the user can
continue to call until their session expires or until the browser is closed.
Upon submitting the form, the address is sent and the user is taken through one or more web forms until the address is saved or the
validation is cancelled. The answer is posted back to the originating URL's web server. This is an example of the form data returned
to your web server or application when a user saves an address correction and is returned to your website:
<form method="post" action="yourReturnURL">
<table>
<tbody>
<tr>
<td>
<input type="hidden" name="listDetailPK" id="listDetailPK" value="106871181"/>
<input type="hidden" name="foreignID" id="foreignID" value="&foreignID=3103"/>
<input type="hidden" name="firmOrRecipientInput" id="firmOrRecipientInput" value="City Hall"/>
<input type="hidden" name="urbanization" id="urbanization" value=""/>
<input type="hidden" name="addressPrimaryNumber" id="addressPrimaryNumber" value="411"/>
<input type="hidden" name="addressSecondaryAbbr" id="addressSecondaryAbbr" value=""/>
<input type="hidden" name="addressSecondaryNumber" id="addressSecondaryNumber" value=""/>
<input type="hidden" name="carrierRouteID" id="carrierRouteID" value="C004"/>
<input type="hidden" name="city" id="city" value="ODESSA"/>
<input type="hidden" name="congressionalDistrictNum" id="congressionalDistrictNum" value="11"/>
<input type="hidden" name="dpc" id="dpc" value="11"/>
<input type="hidden" name="name" id="name" value=""/>
<input type="hidden" name="state" id="state" value="TX"/>
<input type="hidden" name="streetName" id="streetName" value="8TH"/>
<input type="hidden" name="streetPostDirectionalAbbr" id="streetPostDirectionalAbbr" value=""/>
<input type="hidden" name="streetPreDirectionalAbbr" id="streetPreDirectionalAbbr" value="W"/>
<input type="hidden" name="streetSuffixAbbr" id="streetSuffixAbbr" value="ST"/>
<input type="hidden" name="zipCode" id="zipCode" value="79761"/>
<input type="hidden" name="zipSector" id="zipSector" value="44"/>
<input type="hidden" name="zipSegment" id="zipSegment" value="99"/>
<input type="hidden" name="elotAscDes" id="elotAscDes" value="A"/>
<input type="hidden" name="elotSeqNum" id="elotSeqNum" value="0081"/>
<input type="hidden" name="foreignCountry" id="foreignCountry" value=""/>
<input type="hidden" name="foreignPostalCode" id="foreignPostalCode" value=""/>
<input type="hidden" name="deliveryLine1" id="deliveryLine1" value="411 W 8TH ST"/>
<input type="hidden" name="recordType" id="recordType" value="F"/>
<input type="hidden" name="validationStatus" id="validationStatus" value="validated" />
<input type="hidden" name="originatingCallBackURL" id="originatingCallBackURL" value="yourReturnURL"/>
<input type="hidden" name="deliveryAddressLine1Input" id="deliveryAddressLine1Input" value="411 W 8th St"/>
<input type="hidden" name="lastLineInput" id="lastLineInput" value="Odessa TX 79761-4499"/>
<input type="submit" name="Submit" id="Submit" value="Save Address" />
</td>
</tr>
</tbody>
</table>
</form>
The originating CallBack URL will be displayed in place of "yourReturnURL" in <form method="post" action="yourReturnURL"> in the
source code.
To login programmatically on the first call to our server, try calling http://duoshare.com/ds/App/Main?task=LoginUser with this
form data:
<input type="hidden" name="j_username" value="youruserid" />
<input type="hidden" name="j_password" value="yourpassword" />
(You can copy our login form from http://duoshare.com/ds/login.html . We will give you real userids/passwords in production, but
you can use the above for development.)
If you're not currently logged in, you will be redirected to http://duoshare.com/ds/App/Main?task=LoginUser regardless of what
URL you request because we have some housekeeping code that needs to run at login.
You should be given one or more session cookies in the form of "LtpaToken" and "JSESSIONID" and your communication will be switched
from http://duoshare.com to https://duoshare.com. Just return those cookies on subsequent calls and use the secure port.
After the login, you should be able to call the address validation URL. All of our output is XHTML 1.1 compliant, so you shouuld be able to programmatically parse our output easily.
DuoShare Integration: Web Service Interface
http://duoshare.com/PostML.wsdl is a web services description language file that describes our web service. See if you can write a simple program to connect and use our web service, passing one or more input addresses and getting answers. (Note: this version of the web service is not operational, so this will have to be untested code that you write).
Thanks for your time and interest in pursuing your career with DuoShare!
|