I am using a Http job and Post String to communicate with a Webservice, I just ran into an error with a user who typed an & into a description field that is included in the data being sent. The formatted SOAP envelope looks like
The & in the description element is causing an ERROR 400 as the post is interpreting it as indicating another parameter and is therefore breaking the service. How can I avoid this?
B4X:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:kal="http://">
<soap:Header/>
<soap:Body>
<kal:dtUploadCompanyTimeTickets>
<kal:Json>[{
"custid":"ASSHEA",
"phase":"E06","task":"E06",
"rateid":"CNS150",
"description":"Call and GoToMeeting with Amin and Jollean to make the necessary changes to the NL & NB tax rates",
"hours":"0.25",
"transdate":"2016-07-04",
"timelink":"201607181437025",
"projectdetailid":"81"}]
</kal:Json>
<kal:compId>KAL</kal:compId>
<kal:userid>JSZAKAL</kal:userid>
<kal:pw></kal:pw>
<kal:PcBatch>######</kal:PcBatch>
</kal:dtUploadCompanyTimeTickets>
</soap:Body>
</soap:Envelope>
The & in the description element is causing an ERROR 400 as the post is interpreting it as indicating another parameter and is therefore breaking the service. How can I avoid this?