SP1问题SOAPException不返回quote和Umlaute correcty [英] SP1 Problem SOAPException doesn't return quote and Umlaute correcty

查看:58
本文介绍了SP1问题SOAPException不返回quote和Umlaute correcty的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的Web服务工作正常,直到我们安装.net Framework 1.1 Service Pack 1.卸载SP1不是一个选项,因为我们最大的客户说服务包标记为关键必须在他们的服务器上安装Microsoft。


现在德语Umlaute(?,ü,?)和引号在SOAP故障响应中返回错误。

这个可以轻松验证:


在Web服务方法中实现以下内容(仅使用包含引号字符()的消息文本引发SOAPException:


string errMsg ="这是一个\" quote \"。" ;;

抛出新的SoapException(errMsg,new XmlQualifiedName(" Server.Problem")) ;


调用此SOAP异常时会创建以下SOAP响应:


HTTP / 1.1 500内部服务器错误。

服务器:Microsoft-IIS / 5.1
日期:2004年12月3日星期五13:02:23 GMT

X-Powered-By:ASP.NET

X-AspNet-版本:1.1.4322

缓存控制:私有

内容类型:text / xml; charset = utf-8

内容长度:431

<?xml version =" 1.0" zh coding =" utf-8"?>

< soap:Envelope xmlns:soap =" http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi =" http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd =" http://www.w3.org/ 2001 / XMLSchema">

< soap:Body>

< soap:Fault>

< faultcode> Server.Problem< / faultcode>

< faultstring>这是& quot; quote& quot;。< / faultstring>

< detail />

< / soap:错误>

< / soap:Body>

< / soap:Envelope>


尽管编码应该是utf-8和& q o o t;是不正确的。这在没有SP1的.net 1.1中运行良好。正确的< faultstring>应该是:

< faultstring>这是一个引用。< / faultstring>


当使用德语Umlaute时也会出现此问题:f.e。带有Fahrvergnügen的异常消息。它被错误地转换为< faultstring> Fahrvergn& amp;#252; gen< / faultstring> ;.


这对我们来说是一个严重的问题,因为在德语和法语中有很多错误消息将会有?,?,é,à等特殊字符,这些字符未正确处理。


感谢您的帮助!

Dany

Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by Microsoft must be installed on their servers.

Now german Umlaute (?, ü, ?) and quotes are returned incorrectly in SOAP fault responses.
This can be easily verified:

Implement the following in a web service method (just raises a SOAPException with a message text containing quote characters ("):

string errMsg = "Here is a \"quote\".";
throw new SoapException( errMsg,new XmlQualifiedName("Server.Problem"));

The following SOAP response is created when calling this SOAP-Exception:

HTTP/1.1 500 Internal Server Error.
Server: Microsoft-IIS/5.1
Date: Fri, 03 Dec 2004 13:02:23 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Length: 431

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>Server.Problem</faultcode>
<faultstring>Here is a &quot;quote&quot;.</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>

All though the encoding should be utf-8 and "& q u o t ;" is not correct. This worked fine in .net 1.1 without the SP1. The correct <faultstring> should be:
<faultstring>Here is a "quote".</faultstring>

This problem also occurs when using german Umlaute: f.e. with an exception message of "Fahrvergnügen". It is converted incorrectly to <faultstring>Fahrvergn&amp;#252;gen</faultstring>.

This is a serious problem for us, because in german and french many error messages will have special characters like ?,?, é, à in them and these are not correctly processed.

Thanks for any help!
Dany

推荐答案




您所描述的是使用编码字符串。对于我的

知识,它们在XML中有效,并且解析器有责任正确转换




什么是问题的根源,鉴于这些是有效的

表示数据?客户是否无法正确处理这些




问候


Dan Rogers

Microsoft Corporation


--------------------

日期:周六,2004年12月4日13:43:30 +0100

X-Newsreader:Groupwise 6.5

来自:Dany< Da ** @ newsgroups.com>

主题:SP1问题SOAPException没有返回引号和Umlaute正确

消息ID:< uC ************** @ TK2MSFTNGP14 .phx.gbl>

新闻组:microsoft.public.dotnet.framework.webservices

NNTP-Posting-Host:adsl-62-167-138-146.adslplus。 ch 62.167.138.146

行:1

路径:

cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGP08.phx。 gbl!TK2MSFTNGP14

.phx.gbl

外部参照:cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:7851

X-Tomcat-NG:microsoft.public.dotnet.framework.webservices


我们的网络服务是工作正常,直到我们安装.net Framework 1.1

service pack 1.卸载SP1不是一个选项,因为我们最大的

客户称服务包标记为关键由微软必须在他们的服务器上安装



现在德语Umlaute(?,ü,?)和引号在SOAP中错误地返回

故障响应。

这可以很容易地验证:


在Web服务方法中实现以下功能(只需提高一个

SOAPException,消息文本包含引号字符("):


string errMsg ="这是\quote \"。" ;;

抛出新的SoapException(errMsg,new XmlQualifiedName(" Server.Problem"));


调用此SOAP-Exception时会创建以下SOAP响应:


HTTP / 1.1 500内部服务器错误。

服务器:Microsoft-IIS / 5.1
日期:2004年12月3日星期五13:02:23 GMT

X-Powered-By:ASP.NET

X-AspNet-Version:1.1.4322

Cache-控制:私人

内容类型:text / xml; charset = utf-8

内容长度:431


&l t;?xml version =" 1.0" encoding =" utf-8"?>

< soap:Envelope xmlns:soap =" http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi =" http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd =" http://www.w3.org/ 2001 / XMLSchema">

< soap:Body>

< soap:Fault>

< faultcode> Server.Problem< / faultcode>

< faultstring>这是& quot; quote& quot;。< / faultstring>

< detail />

< / soap:错误>

< / soap:Body>

< / soap:Envelope>


尽管编码应该是utf-8和& q o o t;是不正确的。

这在没有SP1的.net 1.1中运行良好。正确的< faultstring>

应该是:

< faultstring>这是一个引用。< / faultstring>


使用德语Umlaute:fe时也会出现此问题有一个例外

消息Fahrvergnügen。它被错误地转换为

< faultstring> Fahrvergn& amp;#252; gen< / faultstring> ;.


这对我们来说是一个严重的问题,因为在德语和法语中很多错误

消息会有特殊字符,如?,?,é,à,这些都是

未正确处理。


感谢您的帮助!

Dany

Hi,

What you are describing is the use of encoded strings. These are, to my
knowlege, valid in XML and the responsibility of the parser to convert
properly.

What is the source of the problem, given that these are valid
representations of the data? Is the client not able to process these
properly as it should?

Regards

Dan Rogers
Microsoft Corporation

--------------------
Date: Sat, 4 Dec 2004 13:43:30 +0100
X-Newsreader: Groupwise 6.5
From: Dany <Da**@newsgroups.com>
Subject: SP1 Problem SOAPException doesn''t return quote and Umlaute correcty
Message-ID: <uC**************@TK2MSFTNGP14.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: adsl-62-167-138-146.adslplus.ch 62.167.138.146
Lines: 1
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP14
.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7851
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Our web service was working fine until we installed .net Framework 1.1
service pack 1. Uninstalling SP1 is not an option because our largest
customer says service packs marked as "critical" by Microsoft must be
installed on their servers.

Now german Umlaute (?, ü, ?) and quotes are returned incorrectly in SOAP
fault responses.
This can be easily verified:

Implement the following in a web service method (just raises a
SOAPException with a message text containing quote characters ("):

string errMsg = "Here is a \"quote\".";
throw new SoapException( errMsg,new XmlQualifiedName("Server.Problem"));

The following SOAP response is created when calling this SOAP-Exception:

HTTP/1.1 500 Internal Server Error.
Server: Microsoft-IIS/5.1
Date: Fri, 03 Dec 2004 13:02:23 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Length: 431

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>Server.Problem</faultcode>
<faultstring>Here is a &quot;quote&quot;.</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>

All though the encoding should be utf-8 and "& q u o t ;" is not correct.
This worked fine in .net 1.1 without the SP1. The correct <faultstring>
should be:
<faultstring>Here is a "quote".</faultstring>

This problem also occurs when using german Umlaute: f.e. with an exception
message of "Fahrvergnügen". It is converted incorrectly to
<faultstring>Fahrvergn&amp;#252;gen</faultstring>.

This is a serious problem for us, because in german and french many error
messages will have special characters like ?,?, é, à in them and these are
not correctly processed.

Thanks for any help!
Dany


嗨丹


是的,我认为你是对的。我浏览了XML 1.0规范,这是正确的XML。


问题似乎在客户端。我们使用MSXML-DOM来解析SOAPFault,但是当获取nodeValue时,它没有正确地将这些符号转换为它们的宽字符串表示。如果这确实是问题,将不得不进一步研究它并可能在MSXML新闻组中发布。


您认为使用SOAPExtension将所有特殊字符替换为真实"像以前一样表示.net Framework Service Pack 1可以工作吗?或者之后转换完成了吗?这将使我们有可能只更新服务器。更新所有客户是我们最大客户的巨大企业。


谢谢&问候

Dany
Hi Dan

Yes, I think you''re right. I went through the XML 1.0 Specs and it is correct XML as such.

The problem seems to be on the client side. We use MSXML-DOM to parse the SOAPFault, but when getting nodeValue it does not correctly convert these symbols to their wide string representation. Will have to look into that further and probably post it in the MSXML newsgroup if this is really the problem.

Do you think using a SOAPExtension to replace all the special chars with the "real" representation like they were before .net Framework Service Pack 1 would work? Or is the conversion done afterwards? This would give us the possibility to update only the server. Updating all clients is a huge enterprise with our biggest customer.

Thanks & Regards
Dany
Dan Rogers< da *** @ microsoft.com> 06.12.2004 21:42:15>>>
Dan Rogers<da***@microsoft.com> 06.12.2004 21:42:15 >>>






你有什么正在描述的是编码字符串的使用。对于我的

知识,它们在XML中有效,并且解析器有责任正确转换




什么是问题的根源,鉴于这些是有效的

表示数据?客户是否无法正确处理这些




问候


Dan Rogers

Microsoft Corporation


--------------------

日期:周六,2004年12月4日13:43:30 +0100

X-Newsreader:Groupwise 6.5

来自:Dany< Da ** @ newsgroups.com>

主题:SP1问题SOAPException没有返回引号和Umlaute正确

消息ID:< uC ************** @ TK2MSFTNGP14 .phx.gbl>

新闻组:microsoft.public.dotnet.framework.webservices

NNTP-Posting-Host:adsl-62-167-138-146.adslplus。 ch 62.167.138.146

行:1

路径:

cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGP08.phx。 gbl!TK2MSFTNGP14

..phx.gbl

外部参照:cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:7851

X-Tomcat-NG:microsoft.public.dotnet.framework.webservices


我们的网络服务wa在我们安装之前工作正常.net Framework 1.1

service pack 1.卸载SP1不是一个选项,因为我们最大的

客户说服务包标记为关键由微软必须在他们的服务器上安装



现在德语Umlaute(?,ü,?)和引号在SOAP中错误地返回

故障响应。

这可以很容易地验证:


在Web服务方法中实现以下功能(只需提高一个

SOAPException,消息文本包含引号字符("):


string errMsg ="这是\quote \"。" ;;

抛出新的SoapException(errMsg,new XmlQualifiedName(" Server.Problem"));


调用此SOAP-Exception时会创建以下SOAP响应:


HTTP / 1.1 500内部服务器错误。

服务器:Microsoft-IIS / 5.1
日期:2004年12月3日星期五13:02:23 GMT

X-Powered-By:ASP.NET

X-AspNet-Version:1.1.4322

Cache-控制:私人

内容类型:text / xml; charset = utf-8

内容长度:431


&l t;?xml version =" 1.0" encoding =" utf-8"?>

< soap:Envelope xmlns:soap =" http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi =" http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd =" http://www.w3.org/ 2001 / XMLSchema">

< soap:Body>

< soap:Fault>

< faultcode> Server.Problem< / faultcode>

< faultstring>这是& quot; quote& quot;。< / faultstring>

< detail />

< / soap:错误>

< / soap:Body>

< / soap:Envelope>


尽管编码应该是utf-8和& q o o t;是不正确的。

这在没有SP1的.net 1.1中运行良好。正确的< faultstring>

应该是:

< faultstring>这是一个引用。< / faultstring>


使用德语Umlaute:fe时也会出现此问题有一个例外

消息Fahrvergnügen。它被错误地转换为

< faultstring> Fahrvergn& amp;#252; gen< / faultstring> ;.


这对我们来说是一个严重的问题,因为在德语和法语中很多错误

消息会有特殊字符,如?,?,é,à,这些都是

未正确处理。


感谢您的帮助!

Dany


Hi,

What you are describing is the use of encoded strings. These are, to my
knowlege, valid in XML and the responsibility of the parser to convert
properly.

What is the source of the problem, given that these are valid
representations of the data? Is the client not able to process these
properly as it should?

Regards

Dan Rogers
Microsoft Corporation

--------------------
Date: Sat, 4 Dec 2004 13:43:30 +0100
X-Newsreader: Groupwise 6.5
From: Dany <Da**@newsgroups.com>
Subject: SP1 Problem SOAPException doesn''t return quote and Umlaute correcty
Message-ID: <uC**************@TK2MSFTNGP14.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: adsl-62-167-138-146.adslplus.ch 62.167.138.146
Lines: 1
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP14
..phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7851
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Our web service was working fine until we installed .net Framework 1.1
service pack 1. Uninstalling SP1 is not an option because our largest
customer says service packs marked as "critical" by Microsoft must be
installed on their servers.

Now german Umlaute (?, ü, ?) and quotes are returned incorrectly in SOAP
fault responses.
This can be easily verified:

Implement the following in a web service method (just raises a
SOAPException with a message text containing quote characters ("):

string errMsg = "Here is a \"quote\".";
throw new SoapException( errMsg,new XmlQualifiedName("Server.Problem"));

The following SOAP response is created when calling this SOAP-Exception:

HTTP/1.1 500 Internal Server Error.
Server: Microsoft-IIS/5.1
Date: Fri, 03 Dec 2004 13:02:23 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Length: 431

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>Server.Problem</faultcode>
<faultstring>Here is a &quot;quote&quot;.</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>

All though the encoding should be utf-8 and "& q u o t ;" is not correct.
This worked fine in .net 1.1 without the SP1. The correct <faultstring>
should be:
<faultstring>Here is a "quote".</faultstring>

This problem also occurs when using german Umlaute: f.e. with an exception
message of "Fahrvergnügen". It is converted incorrectly to
<faultstring>Fahrvergn&amp;#252;gen</faultstring>.

This is a serious problem for us, because in german and french many error
messages will have special characters like ?,?, é, à in them and these are
not correctly processed.

Thanks for any help!
Dany


发现.net网络服务客户对处理这些客户同样无能为力字符引用。


我在VC#中构建了一个简单的Web服务使用者。在按钮上单击执行以下代码:

尝试

{

localhost.UmbrellaNTAppServer appserv = new localhost.UmbrellaNTAppServer();

string result = appserv.HelloWorld();

MessageBox.Show(result);

}

catch(异常) exc)

{

MessageBox.Show(&发生错误:" + exc.Message);

}


如果在Web服务方法中引发异常,即''The method" HelloWorld"正在建设中。''作为例外消息。将向用户显示出现错误:方法&HelloWorld& quot;正在建设中。在一个真实世界的例子中,用户肯定会抱怨这个显示。


在SP1之前一切都很好,但是现在必须专门处理来自Web服务调用的异常消息。

在正常的SOAP响应(不是SOAP错误)中,正确发送包含特殊字符的字符串。因此,如果''方法''HelloWorld"正在建设中。''返回,客户端也将保持不变,没有任何字符引用。


所以我想知道为什么这种不一致的行为是由MS内置到SP1中的。 />

问候Dany
Found out .net web service clients are just as helpless with handling these character references.

I''ve built a simple web service consumer in VC#. On a button click the following code is executed:
try
{
localhost.UmbrellaNTAppServer appserv = new localhost.UmbrellaNTAppServer();
string result = appserv.HelloWorld();
MessageBox.Show( result );
}
catch (Exception exc)
{
MessageBox.Show( "Error has occured: " + exc.Message );
}

If an exception is raised in the web service method saying i.e. ''The method "HelloWorld" is under construction.'' as the exception message. The user will be shown ''Error has occured: The method &quot;HelloWorld&quot; is under construction. In a real world example the user would be sure to complain about this display.

Before SP1 everything was fine, but now handling of exception messages coming from web service calls must be handled specifically.
In normal SOAP responses (not SOAP faults) strings containing special characters are correctly sent. So if ''The method "HelloWorld" is under construction.'' is returned the client will also receive it unchanged and without any character references.

So I wonder why this inconsistent behaviour was built into the SP1 by MS.

Regards Dany
Dan Rogers< da *** @ microsoft。 COM> 06.12.2004 21:42:15>>>
Dan Rogers<da***@microsoft.com> 06.12.2004 21:42:15 >>>






你有什么正在描述的是编码字符串的使用。对于我的

知识,它们在XML中有效,并且解析器有责任正确转换




什么是问题的根源,鉴于这些是有效的

表示数据?客户是否无法正确处理这些




问候


Dan Rogers

Microsoft Corporation


--------------------

日期:周六,2004年12月4日13:43:30 +0100

X-Newsreader:Groupwise 6.5

来自:Dany< Da ** @ newsgroups.com>

主题:SP1问题SOAPException没有返回引号和Umlaute正确

消息ID:< uC ************** @ TK2MSFTNGP14 .phx.gbl>

新闻组:microsoft.public.dotnet.framework.webservices

NNTP-Posting-Host:adsl-62-167-138-146.adslplus。 ch 62.167.138.146

行:1

路径:

cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGP08.phx。 gbl!TK2MSFTNGP14

..phx.gbl

外部参照:cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:7851

X-Tomcat-NG:microsoft.public.dotnet.framework.webservices


我们的网络服务wa在我们安装之前工作正常.net Framework 1.1

service pack 1.卸载SP1不是一个选项,因为我们最大的

客户说服务包标记为关键由微软必须在他们的服务器上安装



现在德语Umlaute(?,ü,?)和引号在SOAP中错误地返回

故障响应。

这可以很容易地验证:


在Web服务方法中实现以下功能(只需提高一个

SOAPException,消息文本包含引号字符("):


string errMsg ="这是\quote \"。" ;;

抛出新的SoapException(errMsg,new XmlQualifiedName(" Server.Problem"));


调用此SOAP-Exception时会创建以下SOAP响应:


HTTP / 1.1 500内部服务器错误。

服务器:Microsoft-IIS / 5.1
日期:2004年12月3日星期五13:02:23 GMT

X-Powered-By:ASP.NET

X-AspNet-Version:1.1.4322

Cache-控制:私人

内容类型:text / xml; charset = utf-8

内容长度:431


&l t;?xml version =" 1.0" encoding =" utf-8"?>

< soap:Envelope xmlns:soap =" http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi =" http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd =" http://www.w3.org/ 2001 / XMLSchema">

< soap:Body>

< soap:Fault>

< faultcode> Server.Problem< / faultcode>

< faultstring>这是& quot; quote& quot;。< / faultstring>

< detail />

< / soap:错误>

< / soap:Body>

< / soap:Envelope>


尽管编码应该是utf-8和& q o o t;是不正确的。

这在没有SP1的.net 1.1中运行良好。正确的< faultstring>

应该是:

< faultstring>这是一个引用。< / faultstring>


使用德语Umlaute:fe时也会出现此问题有一个例外

消息Fahrvergnügen。它被错误地转换为

< faultstring> Fahrvergn& amp;#252; gen< / faultstring> ;.


这对我们来说是一个严重的问题,因为在德语和法语中很多错误

消息会有特殊字符,如?,?,é,à,这些都是

未正确处理。


感谢您的帮助!

Dany


Hi,

What you are describing is the use of encoded strings. These are, to my
knowlege, valid in XML and the responsibility of the parser to convert
properly.

What is the source of the problem, given that these are valid
representations of the data? Is the client not able to process these
properly as it should?

Regards

Dan Rogers
Microsoft Corporation

--------------------
Date: Sat, 4 Dec 2004 13:43:30 +0100
X-Newsreader: Groupwise 6.5
From: Dany <Da**@newsgroups.com>
Subject: SP1 Problem SOAPException doesn''t return quote and Umlaute correcty
Message-ID: <uC**************@TK2MSFTNGP14.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: adsl-62-167-138-146.adslplus.ch 62.167.138.146
Lines: 1
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP14
..phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7851
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Our web service was working fine until we installed .net Framework 1.1
service pack 1. Uninstalling SP1 is not an option because our largest
customer says service packs marked as "critical" by Microsoft must be
installed on their servers.

Now german Umlaute (?, ü, ?) and quotes are returned incorrectly in SOAP
fault responses.
This can be easily verified:

Implement the following in a web service method (just raises a
SOAPException with a message text containing quote characters ("):

string errMsg = "Here is a \"quote\".";
throw new SoapException( errMsg,new XmlQualifiedName("Server.Problem"));

The following SOAP response is created when calling this SOAP-Exception:

HTTP/1.1 500 Internal Server Error.
Server: Microsoft-IIS/5.1
Date: Fri, 03 Dec 2004 13:02:23 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Length: 431

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>Server.Problem</faultcode>
<faultstring>Here is a &quot;quote&quot;.</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>

All though the encoding should be utf-8 and "& q u o t ;" is not correct.
This worked fine in .net 1.1 without the SP1. The correct <faultstring>
should be:
<faultstring>Here is a "quote".</faultstring>

This problem also occurs when using german Umlaute: f.e. with an exception
message of "Fahrvergnügen". It is converted incorrectly to
<faultstring>Fahrvergn&amp;#252;gen</faultstring>.

This is a serious problem for us, because in german and french many error
messages will have special characters like ?,?, é, à in them and these are
not correctly processed.

Thanks for any help!
Dany


这篇关于SP1问题SOAPException不返回quote和Umlaute correcty的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆