[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HTTPAPI - character set utf-8



Has anybody called a web service that is expecting a Content-Type of text/xml; charset=utf-8 using HTTPAPI and SOAP?

 

I just had a couple of questions if anybody has gotten this to work:

1) When I build the SOAP package, do I still need to convert this to UTF-8 (ccsid of 1208)?

            I am thinking that I definitely need to do some sort of conversion because the error I get from the httpapi_debug.txt file is:

SetError() #13: HTTP/1.1 500 Internal Server Error.

recvdoc parms: identity 53                        

recvdoc(): entered                                 

SetError() #0:                                    

Request format is invalid: text/xml; charset=utf-8.

 

I tried converting this with iconv() before the http_url_post_xml but still get the above message.

 

2) Here’s the SOAP package, does it need a CRLF (const(x’od25)) at the end of each line?

xml =                                                                   

'<?xml version="1.0" encoding="utf-8"?>' +  CRLF +          

'<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/">' +   CRLF +  

'  <soap:Body>' +                                         CRLF +

'    <LoadROList xmlns="http://rcis.com/">' +            CRLF +               

'      <sintCropYear>2005</sintCropYear>' +               CRLF +              

'      <sintStateId>27</sintStateId>' +                          CRLF +      

'      <sintInsuranceType>11</sintInsuranceType>' +   CRLF +                  

'    </LoadROList>' +           CRLF +                                        

'  </soap:Body>' +   CRLF +                                                    

'</soap:Envelope> + CRLF';                                                     

 

 

THANKS for all the help.