Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.dotnet.framework.aspnet.webservices
Re: String Restriction
Dino Chiesa [Microsoft]
6/1/2004 10:21:00 PM
Mauricio,
you have a couple of options.
You can do the validation and checking on the client side,
or you can do it on the server (Receiver) side.
For #1, the class generated from wsdl.exe or xsd.exe or "Add Web Reference"
does not enforce string length restrictions, or other restrictions. You
can manually augment the generated classes with such intelligence, if you
wish.
For #2, you can validate a message against a given schema. This article
tells how:
http://msdn.microsoft.com/msdnmag/issues/03/07/XMLSchemaValidation/de...
You can use one or the other, or both options.
-Dino
"Mauricio Arroyo" <arroyocm@bccr.fi.cr> wrote in message
news:OpWeISOREHA.628@TK2MSFTNGP11.phx.gbl...
> Hi,
> I am trying to generate a WebService Stub based on a xsd as explained in
> "Place XML Message Design Ahead of Schema Planning to Improve WebService
> Interoperability"
> (
http://msdn.microsoft.com/msdnmag/issues/02/12/WebServ...
).
> Every thing works fine, but if I try to restrict the length of a string
> parameter, it doesn't work, the client is able to send string of any
length
> without restriction. Any idea?
>
> I am attaching the xsd and WSDL of my WebService. Thanks in advance.
>
>
> Mauricio
>
>
>
1 Answer
Mauricio
6/2/2004 2:45:00 AM
0
Dino,
I'll check the #2 (because I don't have control over the client), and I let
you know. Thank you so much.
Mauricio
"Dino Chiesa [Microsoft]" <dinoch@online.microsoft.com> wrote in message
news:u%23dKFYBSEHA.1160@TK2MSFTNGP09.phx.gbl...
> Mauricio,
> you have a couple of options.
> You can do the validation and checking on the client side,
> or you can do it on the server (Receiver) side.
>
> For #1, the class generated from wsdl.exe or xsd.exe or "Add Web
Reference"
> does not enforce string length restrictions, or other restrictions. You
> can manually augment the generated classes with such intelligence, if you
> wish.
>
> For #2, you can validate a message against a given schema. This article
> tells how:
>
http://msdn.microsoft.com/msdnmag/issues/03/07/XMLSchemaValidation/de...
>
> You can use one or the other, or both options.
>
> -Dino
>
>
>
> "Mauricio Arroyo" <arroyocm@bccr.fi.cr> wrote in message
> news:OpWeISOREHA.628@TK2MSFTNGP11.phx.gbl...
> > Hi,
> > I am trying to generate a WebService Stub based on a xsd as explained in
> > "Place XML Message Design Ahead of Schema Planning to Improve WebService
> > Interoperability"
> > (
http://msdn.microsoft.com/msdnmag/issues/02/12/WebServ...
).
> > Every thing works fine, but if I try to restrict the length of a string
> > parameter, it doesn't work, the client is able to send string of any
> length
> > without restriction. Any idea?
> >
> > I am attaching the xsd and WSDL of my WebService. Thanks in advance.
> >
> >
> > Mauricio
> >
> >
> >
>
>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: String Restriction
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password