- Cesar Albospino
- PowerBuilder
- Monday, 6 June 2022 06:17 PM UTC
hello all
We are using this code to call a WebService :
Please help
lo_client = Create httpClient
lo_client.SetRequestHeader("Content-Type", "text/xml;charset=UTF-8")
lo_client.SetRequestHeader("SOAPAction", ls_soap_action)
lo_client.SetRequestHeader("Accept-Language", "es")
lo_client.SetRequestHeader("Content-Length", String(len(ls_xml_request) ))
lo_client.Timeout = 15
li_ret = lo_client.sendrequest('POST', ls_url, ls_xml_request, EncodingUTF8! )
Request :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsm="http://190.104.150.226:8030/MidaTest/WSMidaMobile">
<soapenv:Header/>
<soapenv:Body>
<wsm:WSMidaMobile_setClientes>
<wsm:User>admin</wsm:User>
<wsm:Pass>m1dam0bile3</wsm:Pass>
<wsm:Empresa>1</wsm:Empresa>
<wsm:Cliente>200</wsm:Cliente>
<wsm:Origen>1</wsm:Origen>
<wsm:Cabecera>CENTRAL IMPORT SRL;80009876;5;;1;11;;;;1;;1;0;0;0;5;0;0.000000;0.000000;;fantástico ;;0</wsm:Cabecera>
</wsm:WSMidaMobile_setClientes>
</soapenv:Body>
</soapenv:Envelope>
when the cabecera have a text with accent like the sample we recieve the error Bad Request
if we use the same request just removing the accent in fantástico it works with no problems
using the same request in SOAPUI it works with no issues
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.