NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
soap_parser encoding problem


Joined: 31 May 2006
Posts: 3
Location: Atlanta, GA
Reply with quote
I have made a service with nuSoap with a method named echoString. The service works fine, and this is the SOAP response that I get back

Code:
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?><SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Body>
        <ns1:echoStringResponse xmlns:ns1="http://tempuri_org">
            <out xsi:type="xsd:string">helloWorld</out>
        </ns1:echoStringResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


However, when I feed this to soap_parser, i get the error string

Quote:
Charset from HTTP Content-Type 'UTF-8' does not match encoding from XML declaration 'ISO-8859-1'


I have tried setting the charset_encoding on the server to 'UTF-8', but it doesn't seem to effect the output at all. Here is the full parser dump, if it helps.

Thanks in advance for your help.

Code:

soap_parser Object
(
    [title] => NuSOAP
    [version] => 0.7.2
    [revision] => $Revision: 1.94 $
    [error_str] => Charset from HTTP Content-Type 'UTF-8' does not match encoding from XML declaration 'ISO-8859-1'
    [debug_str] => 2006-06-12 12:20:44.727337 soap_parser: Charset from HTTP Content-Type 'UTF-8' does not match encoding from XML declaration 'ISO-8859-1'

    [charencoding] => 1
    [debugLevel] => 9
    [XMLSchemaVersion] => http://www.w3.org/2001/XMLSchema
    [soap_defencoding] => ISO-8859-1
    [namespaces] => Array
        (
        )

    [usedNamespaces] => Array
        (
        )

    [typemap] => Array
        (
            [http://www.w3.org/2001/XMLSchema] => Array
                (
                    [string] => string
                    [boolean] => boolean
                    [float] => double
                    [double] => double
                    [decimal] => double
                    [duration] =>
                    [dateTime] => string
                    [time] => string
                    [date] => string
                    [gYearMonth] =>
                    [gYear] =>
                    [gMonthDay] =>
                    [gDay] =>
                    [gMonth] =>
                    [hexBinary] => string
                    [base64Binary] => string
                    [anyType] => string
                    [anySimpleType] => string
                    [normalizedString] => string
                    [token] => string
                    [language] =>
                    [NMTOKEN] =>
                    [NMTOKENS] =>
                    [Name] =>
                    [NCName] =>
                    [ID] =>
                    [IDREF] =>
                    [IDREFS] =>
                    [ENTITY] =>
                    [ENTITIES] =>
                    [integer] => integer
                    [nonPositiveInteger] => integer
                    [negativeInteger] => integer
                    [long] => integer
                    [int] => integer
                    [short] => integer
                    [byte] => integer
                    [nonNegativeInteger] => integer
                    [unsignedLong] =>
                    [unsignedInt] =>
                    [unsignedShort] =>
                    [unsignedByte] =>
                    [positiveInteger] =>
                )

            [http://www.w3.org/2000/10/XMLSchema] => Array
                (
                    [i4] =>
                    [int] => integer
                    [boolean] => boolean
                    [string] => string
                    [double] => double
                    [float] => double
                    [dateTime] => string
                    [timeInstant] => string
                    [base64Binary] => string
                    [base64] => string
                    [ur-type] => array
                )

            [http://www.w3.org/1999/XMLSchema] => Array
                (
                    [i4] =>
                    [int] => integer
                    [boolean] => boolean
                    [string] => string
                    [double] => double
                    [float] => double
                    [dateTime] => string
                    [timeInstant] => string
                    [base64Binary] => string
                    [base64] => string
                    [ur-type] => array
                )

            [http://soapinterop.org/xsd] => Array
                (
                    [SOAPStruct] => struct
                )

            [http://schemas.xmlsoap.org/soap/encoding/] => Array
                (
                    [base64] => string
                    [array] => array
                    [Array] => array
                )

            [http://xml.apache.org/xml-soap] => Array
                (
                    [0] => Map
                )

        )

    [xmlEntities] => Array
        (
            [quot] => "
            [amp] => &
            [lt] => <
            [gt] => >
            [apos] => '
        )

    [xml] => <?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringResponse xmlns:ns1="http://tempuri_org"><out xsi:type="xsd:string">helloWorld</out></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
    [xml_encoding] => UTF-8
    [method] =>
    [root_struct] =>
    [root_struct_name] =>
    [root_struct_namespace] =>
    [root_header] =>
    [document] =>
    [status] =>
    [position] => 0
    [depth] => 0
    [default_namespace] =>
    [message] => Array
        (
        )

    [parent] =>
    [fault] =>
    [fault_code] =>
    [fault_str] =>
    [fault_detail] =>
    [depth_array] => Array
        (
        )

    [debug_flag] => 1
    [soapresponse] =>
    [responseHeaders] =>
    [body_position] => 0
    [ids] => Array
        (
        )

    [multirefs] => Array
        (
        )

    [decode_utf8] => 1
)
View user's profileFind all posts by jefftimestenSend private messageAIM Address


Joined: 31 May 2006
Posts: 3
Location: Atlanta, GA
Reply with quote
Nevermind - I figured it out... Finally found some documentation that explained that the response fields were already parsed as an assoc array
View user's profileFind all posts by jefftimestenSend private messageAIM Address
soap_parser encoding problem
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic