Professional Web Applications Themes

String Restriction - ASP.NET Web Services

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: [url]http://msdn.microsoft.com/msdnmag/issues/03/07/XMLSchemaValidation/default.aspx[/url] You can use one or the other, or both options. -Dino "Mauricio Arroyo" <arroyocmbccr.fi.cr> wrote in message news:OpWeISOREHA.628TK2MSFTNGP11.phx.gbl... > Hi, > ...

  1. #1

    Default Re: String Restriction

    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:
    [url]http://msdn.microsoft.com/msdnmag/issues/03/07/XMLSchemaValidation/default.aspx[/url]

    You can use one or the other, or both options.

    -Dino



    "Mauricio Arroyo" <arroyocmbccr.fi.cr> wrote in message
    news:OpWeISOREHA.628TK2MSFTNGP11.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"
    > ([url]http://msdn.microsoft.com/msdnmag/issues/02/12/WebServicesDesign[/url]).
    > 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
    >
    >
    >

    Dino Chiesa [Microsoft] Guest

  2. #2

    Default Re: String Restriction

    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]" <dinochonline.microsoft.com> wrote in message
    news:u%23dKFYBSEHA.1160TK2MSFTNGP09.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:
    >
    [url]http://msdn.microsoft.com/msdnmag/issues/03/07/XMLSchemaValidation/default.aspx[/url]
    >
    > You can use one or the other, or both options.
    >
    > -Dino
    >
    >
    >
    > "Mauricio Arroyo" <arroyocmbccr.fi.cr> wrote in message
    > news:OpWeISOREHA.628TK2MSFTNGP11.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"
    > > ([url]http://msdn.microsoft.com/msdnmag/issues/02/12/WebServicesDesign[/url]).
    > > 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
    > >
    > >
    > >
    >
    >

    Mauricio Arroyo Guest

Similar Threads

  1. IP Restriction
    By Graham Carroll in forum Macromedia Flash Flashcom
    Replies: 2
    Last Post: March 16th, 08:25 AM
  2. IP Restriction Administration
    By wendigo in forum Coldfusion Server Administration
    Replies: 2
    Last Post: September 16th, 03:57 PM
  3. IP Restriction Question
    By Tony Schlak in forum ASP.NET Web Services
    Replies: 1
    Last Post: February 6th, 06:53 AM
  4. No. of dirs restriction in JFS?
    By Ray Banana in forum AIX
    Replies: 2
    Last Post: August 8th, 01:46 PM
  5. system restriction message where no restriction implemented
    By Zack in forum Windows Setup, Administration & Security
    Replies: 0
    Last Post: July 12th, 10:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139