usr-local-ΕΨΗΕΛΩΝ
usr-local-ΕΨΗΕΛΩΝ

Reputation: 26874

Working with xsd:id in C# web service

I have a WSDL that defines a field that is type xsd:id. I found that wsdl.exe treats it as string and everything works fine with a Silverlight client VS ASP.NET Web Service. IDs, in fact, are generated by DB as auto incrementing integers and cast to string when put into SOAP.

With Java, xsd:ID is org.apache.axis.types.ID and integers don't work anymore. I tried to find the correct definition and examples of the xsd:ID type but fund nothing.

Where can I find examples of legal and illegal values for this type?

Upvotes: 0

Views: 130

Answers (1)

user1187008
user1187008

Reputation: 492

Here you can find a definition of the xsd:id field:

http://www.schemacentral.com/sc/xsd/t-xsd_ID.html

xsd:id is a restriction over an NCName which in turn is a restriction over a Name. If you take a look at the invalid values for a Name you will see that a name can't start with a number. So, an id, being a restriction over a Name, can not start with a number too. In this case I guess that Java is right not accepting integers. As stated in the linked page an id must match this regular expression: [\i-[:]][\c-[:]]*

Upvotes: 1

Related Questions