472,126 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,126 software developers and data experts.

Defining String parameter max length?

Is there a way of defining the maximum length of a string parameter to
a web service in .Net?

I assumed that there would be an Xml... attribute that I could apply
to a string definition in the class that would control the generation
of the necessary maxlength attribute in the WSDL but I can't seem to
find one.

Thanks for any help you can offer,
John.

May 16 '07 #1
3 9255
<fu*******@yahoo.comwrote in message
news:11*********************@l77g2000hsb.googlegro ups.com...
Is there a way of defining the maximum length of a string parameter to
a web service in .Net?

I assumed that there would be an Xml... attribute that I could apply
to a string definition in the class that would control the generation
of the necessary maxlength attribute in the WSDL but I can't seem to
find one.
I don't believe there is one. Neither are there attributes to control other
schema facets.
--
John Saunders [MVP]
May 16 '07 #2
On 16 May, 18:39, "John Saunders [MVP]" <john.saunders at
trizetto.comwrote:
<fussel...@yahoo.comwrote in message

news:11*********************@l77g2000hsb.googlegro ups.com...
Is there a way of defining the maximum length of a string parameter to
a web service in .Net?
I assumed that there would be an Xml... attribute that I could apply
to a string definition in the class that would control the generation
of the necessary maxlength attribute in the WSDL but I can't seem to
find one.

I don't believe there is one. Neither are there attributes to control other
schema facets.
--
John Saunders [MVP]
John - thank you very much for your reply.

It seems to be a surprising ommission to me - given how big Microsoft
are on the position of .Net & Web Services.

Do you know if there's any way of hooking into the automated process
that generates the WSDL to add this kind of functionlity myself?

Thanks,
John.

May 17 '07 #3
On 16 May, 18:39, "John Saunders [MVP]" <john.saunders at
trizetto.comwrote:
<fussel...@yahoo.comwrote in message

news:11*********************@l77g2000hsb.googlegro ups.com...
Is there a way of defining the maximum length of a string parameter to
a web service in .Net?
I assumed that there would be an Xml... attribute that I could apply
to a string definition in the class that would control the generation
of the necessary maxlength attribute in the WSDL but I can't seem to
find one.

I don't believe there is one. Neither are there attributes to control other
schema facets.
--
John Saunders [MVP]
Thank you very much for your response John.

This seems like quite a big omission on Microsoft's part, given how
strongly they position .Net in terms of Web Services.

Do you know if it's possible to hook into the code that auto-generates
the WSDL and write custom code to achieve this?

Many thanks,
John.

May 17 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Matt Garman | last post: by
1 post views Thread by Billy N. Patton | last post: by
51 posts views Thread by Alan | last post: by
16 posts views Thread by Raj Kotaru | last post: by
7 posts views Thread by Alpha | last post: by
4 posts views Thread by Trapulo | last post: by
2 posts views Thread by =?Utf-8?B?Z2FkeWE=?= | last post: by
2 posts views Thread by =?Utf-8?B?Z3Jva25yb2xs?= | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.