I'm really desperate here, so I'll try to post my problem once more..
I'm building a web service (to be consumed by a .NET Compact Framework
client), using the Remoting infrastructure. Depending on the incoming
message, I change some properties in the IMessage object (in a
ChannelSink). Sometimes I have to change the return value from a method
from AClass to string. Whenever I do this the soap message gets another
formatting; eg:
invoking "string method1()"
Soap response:
<SOAP-ENV:Body>
<i2:SayHelloResponse id="ref-1" xmlns:i2
="http://schemas.microsoft.com/clr/nsassem/TestClassesLib.Class1/TestType
s" >
<return id="ref-3">Hello World</return>
</i2:SayHelloResponse>
</SOAP-ENV:Body>
invoking "AClass method2()" (AClass is substituted by a string, which
contains a custom reference to the object, when
returning)
Soap response:
<SOAP-ENV:Body>
<i2:GetClass2InstanceResponse id="ref-1" xmlns:i2
="http://schemas.microsoft.com/clr/nsassem/TestClassesLib.Class1/TestType
s">
<return href="#ref-3" />
</i2:GetClass2InstanceResponse>
<SOAP-ENC:string id="ref-3">
R2WS:http://192.168.0.2:1234/TestClassesLib.Class2[582f19a6-19f9-48d0-
ac9c-44bfdb5de304]</SOAP-ENC:string>
</SOAP-ENV:Body>
So the second message returns a string using a reference, while the first
one does it directly. These two work fine on a normal client (using the
full framework), but if I try it on a Compact client an XmlException
with message: "The identifier \"ref-3\" does not appear in the
document." is thrown, while clearly "ref-3" is present.
Is this a bug in the CF? Is there a way to force the formatting of the
soap message to always follow the first approach? Any other suggestions?
Your help is much appriciated,
Bert.
.NET Compact Framework FAQ:
http://msdn.microsoft.com/mobility/prodtechinfo/devtools/netcf/FAQ/default.a
spx
.NET Compact Framework KickStart:
http://www.amazon.com/exec/obidos/tg/detail/-/0672325705/qid=1070652954//ref
=sr_8_xs_ap_i0_xgl14/103-0627618-0577446?v=glance&s=books&n=507846
This posting is provided "AS IS" with no warranties, and confers no rights.
rya...@online.microsoft.com (Ronnie Yates [MS]) wrote in message news:<NnMbQQRG...@cpmsftngxa06.phx.gbl>...
rya...@online.microsoft.com (Ronnie Yates [MS]) wrote in message news:<NnMbQQRG...@cpmsftngxa06.phx.gbl>...
This is the response message that causes the exception (ref-3 is not
found):
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-
ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<i2:GetClass2InstanceResponse id="ref-1" xmlns:i2
="http://schemas.microsoft.com/clr/nsassem/TestClassesLib.Class1/TestType
s">
<return href="#ref-3" />
</i2:GetClass2InstanceResponse>
<SOAP-ENC:string id="ref-3">
R2WS:http://192.168.0.2:1234/TestClassesLib.Class2[a2bced06-635d-4c3d-
bfdc-8ed6ba865eed]</SOAP-ENC:string>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The exception doesn't occur with the following message:
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-
ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<i2:SayHelloResponse id="ref-1" xmlns:i2
="http://schemas.microsoft.com/clr/nsassem/TestClassesLib.Class1/TestType
s">
<return>Hello World</return>
</i2:SayHelloResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
And the problem remains with SP2.
If you need some other info, just let me known.
Thanks for the help,
Bert.
rya...@online.microsoft.com (Ronnie Yates [MS]) wrote in
news:NnMbQQRG...@cpmsftngxa06.phx.gbl:
> One more question. Which response is causing the exception, the first
> or the second?
>
> .NET Compact Framework FAQ:
> http://msdn.microsoft.com/mobility/prodtechinfo/devtools/netcf/FAQ/defa
> ult.a spx
If you want to see my code, I'd rather mail to you directly than post it in
this group, because I'm not shure I can share all this code and that way it
is a bit more confidential.
Thanks,
Bert.
rya...@online.microsoft.com (Ronnie Yates [MS]) wrote in
news:82lr8qPH...@cpmsftngxa06.phx.gbl:
> Are you talk to an ASP.Net server? If so, can you post the server code
> and a simple client? This would help me create a repro scenario.
> Thanks
>
> NET Compact Framework FAQ:
> http://msdn.microsoft.com/mobility/prodtechinfo/devtools/netcf/FAQ/defa
> ult.a spx
> NET Compact Framework KickStart:
> http://www.amazon.com/exec/obidos/tg/detail/-/0672325705/qid=1070652954
> //ref
--Rob
Bert <n...@thanks.com> wrote in message news:<Xns94C5A1CF83...@195.130.132.70>...