Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Consuming WS on full vs compact framework - XmlException

9 views
Skip to first unread message

Bert

unread,
Mar 25, 2004, 4:55:41 AM3/25/04
to
Hi,

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.

Ronnie Yates [MS]

unread,
Apr 2, 2004, 7:05:59 PM4/2/04
to
Can you post the complete Soap messages for both responses? Can you check
which namespace the href and id namespaces are in, they should be in no
namespace? Also, what service is the CF client talking to, ASP.Net, Axis,
etc? If its ASP.Net, can you post the service code.

.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.


Ronnie Yates [MS]

unread,
Apr 2, 2004, 7:06:59 PM4/2/04
to
Also, does this repro on SP2?

Ronnie Yates [MS]

unread,
Apr 2, 2004, 7:37:17 PM4/2/04
to
One more question. Which response is causing the exception, the first or
the second?

Rob

unread,
Apr 4, 2004, 4:09:49 AM4/4/04
to

Rob

unread,
Apr 4, 2004, 5:01:09 AM4/4/04
to
I have posted the code to reproduce the error in another thread. I
said in one posting that it was fixed by sp2 but I was wrong. I am
still getting "ref-4" not found. The post was "Remoting w/ Soap Error
".


http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=230c9a75.0312190603.7376b45f%40posting.google.com&rnum=2&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26q%3Drobbeers%26meta%3Dgroup%253Dmicrosoft.public.dotnet.framework.compactframework


rya...@online.microsoft.com (Ronnie Yates [MS]) wrote in message news:<NnMbQQRG...@cpmsftngxa06.phx.gbl>...

Ronnie Yates [MS]

unread,
Apr 5, 2004, 2:26:49 PM4/5/04
to
I'm sorry, my questions were a bit vague. Does the call to "string
method1()" succeed or fail? Does the call to "AClass method2()" succeed or
failt? I took a look at your other thread, but the code to generate the
responses on this thread would be easier to debug and diagnosis. Do you
have the code to generate these two response? If so, can you post it?
Thanks.

Bert

unread,
Apr 7, 2004, 4:44:49 AM4/7/04
to

Here are the exact messages:

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

Ronnie Yates [MS]

unread,
Apr 7, 2004, 7:47:48 PM4/7/04
to
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

Bert

unread,
Apr 8, 2004, 9:46:30 AM4/8/04
to
I'm not using ASP.NET, all the objects are hosted on .NET Remoting using
the HttpChannel.

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
>

Rob

unread,
Apr 8, 2004, 3:05:40 PM4/8/04
to
I was also using .Net Remoting using the HttpChannel.

--Rob

Bert <n...@thanks.com> wrote in message news:<Xns94C5A1CF83...@195.130.132.70>...

0 new messages