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

Re: RE : Error : Invalid byte 2 of 3-byte UTF-8 sequence



Hi Alain,

> I remark that SaopUI adds ";charset=UTF-8" after "Content-Type: text/xml"

The content-type is a parameter that you pass from your program to 
HTTPAPI.  From your earlier message, you said your code looks like
this:

    rc = http_url_post( 'http://192.36.95.109:8080/drc/drc'
                      : %addr(SOAP) + 2
                      : %len(SOAP)
                      : '/tmp/DrcMsg.txt'
                      : HTTP_TIMEOUT
                      : HTTP_USERAGENT
                      : 'text/xml'
        : 'http://192.36.95.109:8080/drc/drc/constructRoutes');

Take a close look at the 7th parameter.

I also note another discrepancy between your pgm and SoapUI.  SoapUI has 
this:

    SOAPAction: "drcns:constructRoutes"

Whereas your pgm has this:

    SOAPAction: http://192.36.95.109:8080/drc/drc/constructRoutes

I wonder where you found that SoapAction?  I would've expected you to 
get that value from SoapUI.  I guess not!

Anyway, perhaps your code should look like this?

rc = http_url_post( 'http://192.36.95.109:8080/drc/drc'
                   : %addr(SOAP) + 2
                   : %len(SOAP)
                   : '/tmp/DrcMsg.txt'
                   : HTTP_TIMEOUT
                   : HTTP_USERAGENT
                   : 'text/xml;charset=UTF-8'
                   : '"drcns:constructRoutes"');

Good luck.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------