It's because the content-type on the response is incorrect. the
response appears to be utf-8, in which case the content-type header
should be
Content-type: text/xml; charset='utf-8'
whereas its just
Content-type: text/xml
In which case the specs require the parser to treat the response as
us-ascii (which it isn't), that's why you get the parser error. This
is a bug in your server software.
see Using SOAP in HTTP in the SOAP 1.1 spec
http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383526
which points to RFC 2376 on how to use text/xml which says
6.4 text/xml with Omitted Charset
Content-type: text/xml
{BOM}<?xml version="1.0" encoding="utf-16"?>
This example shows text/xml with the charset parameter omitted. In
this case, MIME and XML processors must assume the charset is "us-
ascii", the default charset value for text media types specified in
[RFC-2046]. The default of "us-ascii" holds even if the text/xml
entity is transported using HTTP.
Omitting the charset parameter is NOT RECOMMENDED for text/xml. For
example, even if the contents of the XML entity are UTF-16 or
UTF-8, or the XML entity has an explicit encoding declaration, XML and
MIME processors must assume the charset is "us-ascii".
It works in .NET because it incorrectly ignores the charset (because
MS don't have a parser that lets you override the charset), this is a
bug in .NET.
Cheers
Simon
www.pocketsoap.com
On Fri, 15 Apr 2005 12:32:54 -0000, in ws you wrote:
>
>
>Hi Simon
>Thanks for your help
>Follow both message results, one by .net client e another by
>pocketsoap
>
>To me it sees to be Ok. Please take a little minute to analyse this
>Thanks again!!!
>
>>>>> SOAP MESSAGE CREATE BY .NET CLIENT
>HTTP/1.1 200 OK
>content-type: text/xml
>content-length: 4746
>x-xmb_ws_encoded: version=1%2e0&Sender.Party=http%3a%2f%2fsap%2ecom%
>2fxi%2fXI%3aXIParty%3aDATACENTER&Sender.Service=SAP_R3&Interface=urn%
>3asap-com%3adocument%3asap%3arfc%3afunctions%
>5eY_O_COND_VENDA&Receiver.Party=http%3a%2f%2fsap%2ecom%2fxi%2fXI%
>3aXIParty%
>3aDADOS_AUXILIARES&Receiver.Service=GECEX&To.Interface=http%3a%2f%
>2fwww%2ecitrosuco%2ecom%2ebr%2fgecex%2fdadosauxiliares%
>5eCONDICAO_VENDA_SYNCH_OUTBOUND&MessageClass=RS&ProcessingMode=S&Conv
>ersationId=&MessageId=23D25C40-ADA8-11D9-9560-
>00306E4B1417&RefToMessageId=425ED85A-EB29-1313-E100-
>00000FA7FE8C&QualityOfService=BestEffort&TimeSent=2005-04-15T12%3a16%
>3a05Z
>soapaction: 'http://sap.com/xi/XI/Message/30'
>content-id: <soap-425ED860EB291313E10000000FA7FE8C@...>
>server: SAP Web Application Server (1.0;640)
>
><SOAP:Envelope
>xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
><SOAP:Body>
><CONDICAO_VENDA_RESPONSE><T_COND_VENDA><item><INCO1>CFR</INCO1><ORTOB
>>X</ORTOB><SPRAS>D</SPRAS><BEZEI>Kosten und
>Fracht</BEZEI></item><item><INCO1>CFR</INCO1><ORTOB>X</ORTOB><SPRAS>E
></SPRAS><BEZEI>Costs and
>freight</BEZEI></item><item><INCO1>CFR</INCO1><ORTOB>X</ORTOB><SPRAS>
>P</SPRAS><BEZEI>Custos e
>frete</BEZEI></item><item><INCO1>CIF</INCO1><ORTOB>X</ORTOB><SPRAS>D<
>/SPRAS><BEZEI>Kosten, Versicherung &
>Fracht</BEZEI></item><item><INCO1>CIF</INCO1><ORTOB>X</ORTOB><SPRAS>E
></SPRAS><BEZEI>Costs, insurance &
>freight</BEZEI></item><item><INCO1>CIF</INCO1><ORTOB>X</ORTOB><SPRAS>
>P</SPRAS><BEZEI>Custo, seguro &
>frete</BEZEI></item><item><INCO1>CIP</INCO1><ORTOB>X</ORTOB><SPRAS>D<
>/SPRAS><BEZEI>Frachtfrei
>versichert</BEZEI></item><item><INCO1>CIP</INCO1><ORTOB>X</ORTOB><SPR
>AS>E</SPRAS><BEZEI>Carriage and insurance paid
>to</BEZEI></item><item><INCO1>CIP</INCO1><ORTOB>X</ORTOB><SPRAS>P</SP
>RAS><BEZEI>Seguro com frete
>pago</BEZEI></item><item><INCO1>CPT</INCO1><ORTOB>X</ORTOB><SPRAS>D</
>SPRAS><BEZEI>Frachtfrei</BEZEI></item><item><INCO1>CPT</INCO1><ORTOB>
>X</ORTOB><SPRAS>E</SPRAS><BEZEI>Carriage paid
>to</BEZEI></item><item><INCO1>CPT</INCO1><ORTOB>X</ORTOB><SPRAS>P</SP
>RAS><BEZEI>Frete
>pago</BEZEI></item><item><INCO1>DAF</INCO1><ORTOB>X</ORTOB><SPRAS>D</
>SPRAS><BEZEI>Geliefert
>Grenze</BEZEI></item><item><INCO1>DAF</INCO1><ORTOB>X</ORTOB><SPRAS>E
></SPRAS><BEZEI>Delivered at
>frontier</BEZEI></item><item><INCO1>DAF</INCO1><ORTOB>X</ORTOB><SPRAS
>>P</SPRAS><BEZEI>Entregue na
>fronteira</BEZEI></item><item><INCO1>DDP</INCO1><ORTOB>X</ORTOB><SPRA
>S>D</SPRAS><BEZEI>Geliefert
>verzollt</BEZEI></item><item><INCO1>DDP</INCO1><ORTOB>X</ORTOB><SPRAS
>>E</SPRAS><BEZEI>Delivered Duty
>Paid</BEZEI></item><item><INCO1>DDP</INCO1><ORTOB>X</ORTOB><SPRAS>P</
>SPRAS><BEZEI>Entregue
>desalfandegado</BEZEI></item><item><INCO1>DDU</INCO1><ORTOB>X</ORTOB>
><SPRAS>D</SPRAS><BEZEI>Geliefert
>unverzollt</BEZEI></item><item><INCO1>DDU</INCO1><ORTOB>X</ORTOB><SPR
>AS>E</SPRAS><BEZEI>Delivered Duty
>Unpaid</BEZEI></item><item><INCO1>DDU</INCO1><ORTOB>X</ORTOB><SPRAS>P
></SPRAS><BEZEI>Entregue sem desembaraço
>alf.</BEZEI></item><item><INCO1>DEQ</INCO1><ORTOB>X</ORTOB><SPRAS>D</
>SPRAS><BEZEI>Geliefert ab Kai (verzollt)
></BEZEI></item><item><INCO1>DEQ</INCO1><ORTOB>X</ORTOB><SPRAS>E</SPRA
>S><BEZEI>Delivered ex quay (duty paid)
></BEZEI></item><item><INCO1>DEQ</INCO1><ORTOB>X</ORTOB><SPRAS>P</SPRA
>S><BEZEI>Entrega no cais(direitos pag.)
></BEZEI></item><item><INCO1>DES</INCO1><ORTOB>X</ORTOB><SPRAS>D</SPRA
>S><BEZEI>Geliefert ab
>Schiff</BEZEI></item><item><INCO1>DES</INCO1><ORTOB>X</ORTOB><SPRAS>E
></SPRAS><BEZEI>Delivered ex
>ship</BEZEI></item><item><INCO1>DES</INCO1><ORTOB>X</ORTOB><SPRAS>P</
>SPRAS><BEZEI>Entregue no
>navio</BEZEI></item><item><INCO1>EXW</INCO1><ORTOB>X</ORTOB><SPRAS>D<
>/SPRAS><BEZEI>Ab
>Werk</BEZEI></item><item><INCO1>EXW</INCO1><ORTOB>X</ORTOB><SPRAS>E</
>SPRAS><BEZEI>Ex
>Works</BEZEI></item><item><INCO1>EXW</INCO1><ORTOB>X</ORTOB><SPRAS>P<
>/SPRAS><BEZEI>Na
>fábrica</BEZEI></item><item><INCO1>FAS</INCO1><ORTOB>X</ORTOB><SPRAS
>>D</SPRAS><BEZEI>Frei Längsseite
>Seeschiff</BEZEI></item><item><INCO1>FAS</INCO1><ORTOB>X</ORTOB><SPRA
>S>E</SPRAS><BEZEI>Free Alongside
>Ship</BEZEI></item><item><INCO1>FAS</INCO1><ORTOB>X</ORTOB><SPRAS>P</
>SPRAS><BEZEI>Posto ao lado do
>navio</BEZEI></item><item><INCO1>FCA</INCO1><ORTOB>X</ORTOB><SPRAS>D<
>/SPRAS><BEZEI>Frei
>Frachtführer</BEZEI></item><item><INCO1>FCA</INCO1><ORTOB>X</ORTOB><
>SPRAS>E</SPRAS><BEZEI>Free
>Carrier</BEZEI></item><item><INCO1>FCA</INCO1><ORTOB>X</ORTOB><SPRAS>
>P</SPRAS><BEZEI>Transportador
>livre</BEZEI></item><item><INCO1>FH</INCO1><ORTOB/><SPRAS>D</SPRAS><B
>EZEI>Frei
>Haus</BEZEI></item><item><INCO1>FH</INCO1><ORTOB/><SPRAS>E</SPRAS><BE
>ZEI>Free
>house</BEZEI></item><item><INCO1>FH</INCO1><ORTOB/><SPRAS>P</SPRAS><B
>EZEI>Franco domicÃ
>lio</BEZEI></item><item><INCO1>FOB</INCO1><ORTOB>X</ORTOB><SPRAS>D</S
>PRAS><BEZEI>Frei an
>Bord</BEZEI></item><item><INCO1>FOB</INCO1><ORTOB>X</ORTOB><SPRAS>E</
>SPRAS><BEZEI>Free on
>board</BEZEI></item><item><INCO1>FOB</INCO1><ORTOB>X</ORTOB><SPRAS>P<
>/SPRAS><BEZEI>Franco a
>bordo</BEZEI></item><item><INCO1>UN</INCO1><ORTOB/><SPRAS>D</SPRAS><B
>EZEI>Unfrei</BEZEI></item><item><INCO1>UN</INCO1><ORTOB/><SPRAS>E</SP
>RAS><BEZEI>Not
>Free</BEZEI></item><item><INCO1>UN</INCO1><ORTOB/><SPRAS>P</SPRAS><BE
>ZEI>Porte/frete a
>pagar</BEZEI></item><item><INCO1>ZAN</INCO1><ORTOB/><SPRAS>P</SPRAS><
>BEZEI>CIT-Compra na
>Arvore</BEZEI></item><item><INCO1>ZNC</INCO1><ORTOB/><SPRAS>P</SPRAS>
><BEZEI>CIT-Compra no
>Caminhão</BEZEI></item><item><INCO1>ZNF</INCO1><ORTOB/><SPRAS>P</SPR
>AS><BEZEI>CIT-Compra na
>Fábrica</BEZEI></item></T_COND_VENDA></CONDICAO_VENDA_RESPONSE></SOA
>P:Body>
></SOAP:Envelope>
>
>
>>>>> SOAP MESSAGE CREATE BY POCKETSOAP CLIENT
>HTTP/1.1 200 OK
>content-type: text/xml
>content-length: 4746
>x-xmb_ws_encoded: version=1%2e0&Sender.Party=http%3a%2f%2fsap%2ecom%
>2fxi%2fXI%3aXIParty%3aDATACENTER&Sender.Service=SAP_R3&Interface=urn%
>3asap-com%3adocument%3asap%3arfc%3afunctions%
>5eY_O_COND_VENDA&Receiver.Party=http%3a%2f%2fsap%2ecom%2fxi%2fXI%
>3aXIParty%
>3aDADOS_AUXILIARES&Receiver.Service=GECEX&To.Interface=http%3a%2f%
>2fwww%2ecitrosuco%2ecom%2ebr%2fgecex%2fdadosauxiliares%
>5eCONDICAO_VENDA_SYNCH_OUTBOUND&MessageClass=RS&ProcessingMode=S&Conv
>ersationId=&MessageId=2D710480-ADA9-11D9-B55D-
>00306E4B1417&RefToMessageId=425EDA9C-EB29-1313-E100-
>00000FA7FE8C&QualityOfService=BestEffort&TimeSent=2005-04-15T12%3a23%
>3a30Z
>soapaction: 'http://sap.com/xi/XI/Message/30'
>content-id: <soap-425EDAA2EB291313E10000000FA7FE8C@...>
>server: SAP Web Application Server (1.0;640)
>
><SOAP:Envelope
>xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
><SOAP:Body>
><CONDICAO_VENDA_RESPONSE><T_COND_VENDA><item><INCO1>CFR</INCO1><ORTOB
>>X</ORTOB><SPRAS>D</SPRAS><BEZEI>Kosten und
>Fracht</BEZEI></item><item><INCO1>CFR</INCO1><ORTOB>X</ORTOB><SPRAS>E
></SPRAS><BEZEI>Costs and
>freight</BEZEI></item><item><INCO1>CFR</INCO1><ORTOB>X</ORTOB><SPRAS>
>P</SPRAS><BEZEI>Custos e
>frete</BEZEI></item><item><INCO1>CIF</INCO1><ORTOB>X</ORTOB><SPRAS>D<
>/SPRAS><BEZEI>Kosten, Versicherung &
>Fracht</BEZEI></item><item><INCO1>CIF</INCO1><ORTOB>X</ORTOB><SPRAS>E
></SPRAS><BEZEI>Costs, insurance &
>freight</BEZEI></item><item><INCO1>CIF</INCO1><ORTOB>X</ORTOB><SPRAS>
>P</SPRAS><BEZEI>Custo, seguro &
>frete</BEZEI></item><item><INCO1>CIP</INCO1><ORTOB>X</ORTOB><SPRAS>D<
>/SPRAS><BEZEI>Frachtfrei
>versichert</BEZEI></item><item><INCO1>CIP</INCO1><ORTOB>X</ORTOB><SPR
>AS>E</SPRAS><BEZEI>Carriage and insurance paid
>to</BEZEI></item><item><INCO1>CIP</INCO1><ORTOB>X</ORTOB><SPRAS>P</SP
>RAS><BEZEI>Seguro com frete
>pago</BEZEI></item><item><INCO1>CPT</INCO1><ORTOB>X</ORTOB><SPRAS>D</
>SPRAS><BEZEI>Frachtfrei</BEZEI></item><item><INCO1>CPT</INCO1><ORTOB>
>X</ORTOB><SPRAS>E</SPRAS><BEZEI>Carriage paid
>to</BEZEI></item><item><INCO1>CPT</INCO1><ORTOB>X</ORTOB><SPRAS>P</SP
>RAS><BEZEI>Frete
>pago</BEZEI></item><item><INCO1>DAF</INCO1><ORTOB>X</ORTOB><SPRAS>D</
>SPRAS><BEZEI>Geliefert
>Grenze</BEZEI></item><item><INCO1>DAF</INCO1><ORTOB>X</ORTOB><SPRAS>E
></SPRAS><BEZEI>Delivered at
>frontier</BEZEI></item><item><INCO1>DAF</INCO1><ORTOB>X</ORTOB><SPRAS
>>P</SPRAS><BEZEI>Entregue na
>fronteira</BEZEI></item><item><INCO1>DDP</INCO1><ORTOB>X</ORTOB><SPRA
>S>D</SPRAS><BEZEI>Geliefert
>verzollt</BEZEI></item><item><INCO1>DDP</INCO1><ORTOB>X</ORTOB><SPRAS
>>E</SPRAS><BEZEI>Delivered Duty
>Paid</BEZEI></item><item><INCO1>DDP</INCO1><ORTOB>X</ORTOB><SPRAS>P</
>SPRAS><BEZEI>Entregue
>desalfandegado</BEZEI></item><item><INCO1>DDU</INCO1><ORTOB>X</ORTOB>
><SPRAS>D</SPRAS><BEZEI>Geliefert
>unverzollt</BEZEI></item><item><INCO1>DDU</INCO1><ORTOB>X</ORTOB><SPR
>AS>E</SPRAS><BEZEI>Delivered Duty
>Unpaid</BEZEI></item><item><INCO1>DDU</INCO1><ORTOB>X</ORTOB><SPRAS>P
></SPRAS><BEZEI>Entregue sem desembaraço
>alf.</BEZEI></item><item><INCO1>DEQ</INCO1><ORTOB>X</ORTOB><SPRAS>D</
>SPRAS><BEZEI>Geliefert ab Kai (verzollt)
></BEZEI></item><item><INCO1>DEQ</INCO1><ORTOB>X</ORTOB><SPRAS>E</SPRA
>S><BEZEI>Delivered ex quay (duty paid)
></BEZEI></item><item><INCO1>DEQ</INCO1><ORTOB>X</ORTOB><SPRAS>P</SPRA
>S><BEZEI>Entrega no cais(direitos pag.)
></BEZEI></item><item><INCO1>DES</INCO1><ORTOB>X</ORTOB><SPRAS>D</SPRA
>S><BEZEI>Geliefert ab
>Schiff</BEZEI></item><item><INCO1>DES</INCO1><ORTOB>X</ORTOB><SPRAS>E
></SPRAS><BEZEI>Delivered ex
>ship</BEZEI></item><item><INCO1>DES</INCO1><ORTOB>X</ORTOB><SPRAS>P</
>SPRAS><BEZEI>Entregue no
>navio</BEZEI></item><item><INCO1>EXW</INCO1><ORTOB>X</ORTOB><SPRAS>D<
>/SPRAS><BEZEI>Ab
>Werk</BEZEI></item><item><INCO1>EXW</INCO1><ORTOB>X</ORTOB><SPRAS>E</
>SPRAS><BEZEI>Ex
>Works</BEZEI></item><item><INCO1>EXW</INCO1><ORTOB>X</ORTOB><SPRAS>P<
>/SPRAS><BEZEI>Na
>fábrica</BEZEI></item><item><INCO1>FAS</INCO1><ORTOB>X</ORTOB><SPRAS
>>D</SPRAS><BEZEI>Frei Längsseite
>Seeschiff</BEZEI></item><item><INCO1>FAS</INCO1><ORTOB>X</ORTOB><SPRA
>S>E</SPRAS><BEZEI>Free Alongside
>Ship</BEZEI></item><item><INCO1>FAS</INCO1><ORTOB>X</ORTOB><SPRAS>P</
>SPRAS><BEZEI>Posto ao lado do
>navio</BEZEI></item><item><INCO1>FCA</INCO1><ORTOB>X</ORTOB><SPRAS>D<
>/SPRAS><BEZEI>Frei
>Frachtführer</BEZEI></item><item><INCO1>FCA</INCO1><ORTOB>X</ORTOB><
>SPRAS>E</SPRAS><BEZEI>Free
>Carrier</BEZEI></item><item><INCO1>FCA</INCO1><ORTOB>X</ORTOB><SPRAS>
>P</SPRAS><BEZEI>Transportador
>livre</BEZEI></item><item><INCO1>FH</INCO1><ORTOB/><SPRAS>D</SPRAS><B
>EZEI>Frei
>Haus</BEZEI></item><item><INCO1>FH</INCO1><ORTOB/><SPRAS>E</SPRAS><BE
>ZEI>Free
>house</BEZEI></item><item><INCO1>FH</INCO1><ORTOB/><SPRAS>P</SPRAS><B
>EZEI>Franco domicÃ
>lio</BEZEI></item><item><INCO1>FOB</INCO1><ORTOB>X</ORTOB><SPRAS>D</S
>PRAS><BEZEI>Frei an
>Bord</BEZEI></item><item><INCO1>FOB</INCO1><ORTOB>X</ORTOB><SPRAS>E</
>SPRAS><BEZEI>Free on
>board</BEZEI></item><item><INCO1>FOB</INCO1><ORTOB>X</ORTOB><SPRAS>P<
>/SPRAS><BEZEI>Franco a
>bordo</BEZEI></item><item><INCO1>UN</INCO1><ORTOB/><SPRAS>D</SPRAS><B
>EZEI>Unfrei</BEZEI></item><item><INCO1>UN</INCO1><ORTOB/><SPRAS>E</SP
>RAS><BEZEI>Not
>Free</BEZEI></item><item><INCO1>UN</INCO1><ORTOB/><SPRAS>P</SPRAS><BE
>ZEI>Porte/frete a
>pagar</BEZEI></item><item><INCO1>ZAN</INCO1><ORTOB/><SPRAS>P</SPRAS><
>BEZEI>CIT-Compra na
>Arvore</BEZEI></item><item><INCO1>ZNC</INCO1><ORTOB/><SPRAS>P</SPRAS>
><BEZEI>CIT-Compra no
>Caminhão</BEZEI></item><item><INCO1>ZNF</INCO1><ORTOB/><SPRAS>P</SPR
>AS><BEZEI>CIT-Compra na
>Fábrica</BEZEI></item></T_COND_VENDA></CONDICAO_VENDA_RESPONSE></SOA
>P:Body>
></SOAP:Envelope>
>
>
>--- In pocketsoap@yahoogroups.com, Simon Fell <ws@z...> wrote:
>> On Thu, 14 Apr 2005 14:58:08 -0000, in ws you wrote:
>>
>> >Hi
>> >
>> >I received the follow errn when receive XML SOAP response of SAP
>XI
>> >Webservice
>> >
>> >But I receive a correct XML and receive It OK when running by C#
>> >(.NET)
>> >
>> >Please I had 35 WebServices to use
>> >When I use pocket SOAP to run WebService developed in .NET,
>> >everything
>> >ok
>> >But When I use SOAP to run WebService in SAP XI, receive errno in
>> >Subject of this message
>> >
>> >1) Can I change PARSE by another comand to make separated
>> >- send
>> >- receive
>> >- parse xml
>> >
>> >Thansk!!!!
>> >
>> >CODE THAT WAS RECEINVING ERROR
>> >//
>> >OLETransp.SOAPAction = "http://sap.com/xi/WebService/soap1.1"
>> >OLEsoap.ThrowFaults = true
>> >OLETransp.Authentication ("myuser","xxxx")
>> >OLEtransp.Send( isUrl, lsSerialized )
>> >OLEsoap.parse(OLEtransp)
>>
>> You'll need to post a capture of the response message that causes
>the
>> problem, try using YATT or proxyTrace.
>>
>> Cheers
>> Simon
>> www.pocketsoap.com
>
>
>
>
>
>read the FAQ at http://www.pocketsoap.com/faq/
>
>
>Yahoo! Groups Links
>
>
>
>
>
>