[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Send and Receive text string with imbedded ampersands
I am using Scott's HTTPAPI service program and code - Thank You Scott!
I am working with stamps.com and the first step is to get an
authenticator code which is then used in all subsequent communication
for the duration of the transaction.
USPS sends an authenticator code to us and we need to retransmit the
authenticator code back to them exactly as they sent to us.
The Authenticator code from USPS has embedded `&'s that are received as
`&', but when pulled into the RPGLE program the `&'s are
translated to `&'.
When I send back the authenticator code to USPS those `&' values
are required to be sent back.
What is the best way to handle this?
Here is an example of what they send ...
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap=[1]http://schemas.xmlsoap.org/soap/envelope/
xmlns:xsi=[2]http://www.w3.org/2001/XMLSchema-instance
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<AuthenticateUserResponse
xmlns="http://stamps.com/xml/namespace/2015/05/swsim/swsimv45">
<Authenticator>exp=1434059237&uid=2940452&cty=swsim&ctk=Kuy
p36psRu+0l68yzrTXyLchc3o=&iid=Wlri1xV330e3iJyQkIEKAA==&rsid=0&a
mp;irsid=0&eac=2088717755&eacx=29554687&eac3=0&rrsid=0&
amp;raid=0&resellerid=0&pexp=0&pl=&ast=1&ipaddr=198
.46.122.34&ace=1433976437&mac=KOZiCb87BBzjLDKlErQFcctDSko=</Aut
henticator>
<LastLoginTime>2015-06-10T21:32:37.77</LastLoginTime>
<ClearCredential>false</ClearCredential>
<LoginBannerText />
<PasswordExpired>false</PasswordExpired>
<CodewordsSet>true</CodewordsSet>
</AuthenticateUserResponse>
</soap:Body>
</soap:Envelope>
If I try to send back this:
<Authenticator>exp=1434059237&uid=2940452&cty=swsim&ctk=Kuyp36psRu+0l68
yzrTXyLchc3o=&iid=Wlri1xV330e3iJyQkIEKAA==&rsid=0&irsid=0&eac=208871775
5&eacx=29554687&eac3=0&rrsid=0&raid=0&resellerid=0&pexp=0&pl=&ast=1&ipa
ddr=198.46.122.34&ace=1433976437&mac=KOZiCb87BBzjLDKlErQFcctDSko=</Auth
enticator>
It fails.
Thanks in advance.
This is new territory for me.
Paul Therrien
Andeco Software, LLC
225-229-2491
paultherrien@xxxxxxxxxxxxxxxxxx
www.andecosoftware.com
References
1. http://schemas.xmlsoap.org/soap/envelope/
2. http://www.w3.org/2001/XMLSchema-instance
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------