Hi,
first of all thanks for your reply.
actually you can have member variable called 'schemaLocation' but if you
tag it with this attribute
[System.Xml.Serialization.XmlAttribute
(Namespace="http://www.w3.org/2001/XMLSchema-instance")]
the wsdl.exe doesn't like it when adding a webreference to your project.
I know how to fix it, I just don't know what the error message means,
absolutly blank here, so i was hoping that some of you xml/xsd experts out
there could help with this error in relation to the wsdl.exe tool.
thanks, @llan
>I am not very experienced in this area, and wouldn't have answered except
that no one else has. If this is way off base, my apologies.
>
>It seems that if you serialize a class that contains a member "public
string schemaLocation" that this might generate XML that
uses "schemaLocation" as an element name, and that could be the source of
the problem. If you just change the publicly visible name of that string,
perhaps that will help.
>
>Good luck.
>
>At 02:36 PM 3/1/2005, Allan N. wrote
>>Hi
>>
>>I have created a WS where one of the methods[1] takes a class[2] as an
>>argument. When a client is adding a web reference to this WS an error
>>message appears [3]
>>
>>I do not understand this error message here, can anybody tell me what
this
>>is about and what it means....and for future references where can I get
>>information about such error messages ?
>>
>>The solution is to remove the XmlAttribute from the member
>>variable 'schemeLocation'. The XmlAttribute was there in the first place
>>to produce an xml header like [4] when serializing the class[2] to an xml
>>file on disk but unfortunate this will not do when passing the same class
>>[2] as an arg to [1]. I did find a solution with XmlAttributeOverrides so
>>I do not have to use the XmlAttribute on [2] and then is works when
adding
>>the web reference also ....
>>
>>but what does the error message mean ? 'schemeLocation' is keyword in the
>>w3.org/2001/XMLSchema-instance allright..but ?
>>
>>
>>[1]
>>[WebMethod]
>>public byte[] GetPDF(Invoice invoice........);
>>{....}
>>
>>[2]
>>[System.Xml.Serialization.XmlTypeAttribute(Namespace="http:......")]
>>[System.Xml.Serialization.XmlRootAttribute("Invoice",
>>Namespace="http://.....", IsNullable=false)]
>>public class Invoice
>>{
>> ...
>> [System.Xml.Serialization.XmlAttribute
>>(Namespace="http://www.w3.org/2001/XMLSchema-instance")]
>> public string schemaLocation;
>> ....
>>}
>>
>>[3]
>>"Custom tool error: Unable to import WebService/Schema. Unable to import
>>binding 'WSeFakServiceSoap' from namespace 'http://tempuri.org/'.
>>Unable to import operation 'GetPDF'. Schema with
>>targetNamespace='http://www.w3.org/2001/XMLSchema-instance' has invalid
>>syntax.
>>The target namespace of an attribute declaration, whether local or
global,
>>must not match http://www.w3.org/2001/XMLSchema-instance.
>>"
>>
>>[4]snippet:
>>
>><Invoice
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>xsi:schemaLocation="http:......
>>
>>
>>
>>best regards @llan
>
>
>J. Merrill / Analytical Software Corp
>
>===================================
>This list is hosted by DevelopMentor� http://www.develop.com
>
>View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentor� http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com