[Mono-list] WCF's helloWorld example's WSDL requiring MONO_STRICT_MS_COMPLIANT; tempuri

Piotr Wysocki piotr.wysocki at mlabs.pl
Thu Oct 20 10:41:04 EDT 2011


Hello,

I am having trouble running a WCF Soap WebService including servicing
WSDL. I created a small example for reproducing the error.
The example is attached. Just compile it referencing System.ServiceModel
(I tried with both gmcs and dmcs, mono 2.10.6), run and check
http://127.0.0.1:8000/myHelloService?wsdl

I get:
XmlSchema error: Named item http://some.other.tempuri.org/:Hello was
already contained in the schema object table. Consider setting
MONO_STRICT_MS_COMPLIANT to 'yes' to mimic MS implementation. Related
schema item SourceUri: , Line 0, Position 0.

A common error, as searching mono-list and other resources on the web
indicates, and setting MONO_STRICT_MS_COMPLIANT to "yes" fixes this, indeed.
However, I feel like this is a workaround. It seems there is something
wrong going on here. Probably I forgot about something. Any idea what is it?

One more thing I would like to ask: I am trying to get rid of all
http://tempuri.org/ in WSDLs, however there is one more left in the main
XML tag:
<definitions name="service" targetNamespace="http://tempuri.org/">
...
</definitions>
I tried setting Namespace in various properties inside the ServiceHost
class, but with no success. Any idea how to change it?

It seems like it is being set to tempuri somewhere around
mono-2.10.6/mcs/class/System.ServiceModel/System.ServiceModel.Description/WsdlExporter.cs, 

line 191 (or search for tempuri in this file). Unfortunately I don't
know how to fix it (that is, if it is a bug indeed).

Regards,
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WebServiceExample.cs
Type: text/x-csharp
Size: 1389 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20111020/f4aecec0/attachment.bin 


More information about the Mono-list mailing list