How could I invoke a webservice with some nillable values

Discussion in 'ASP .Net Web Services' started by vqqmbhlu8s88lz1@jetable.net, Mar 7, 2005.

  1. Guest

    In document mode, I want to fill some values in my SOAP Request with
    literal values but I want also pass "null values" on it to set to blank
    distant data like datas, addresses, ... and so on, as I will reset
    them.

    Thanks for your help.
    , Mar 7, 2005
    #1
    1. Advertising

  2. Depends on if you nulls are valid values for the objects. Fundamental types
    like int, etc. are value-types, and you can not assign nulls to these. If
    you really need to null these out, consider create a flag to indicate that
    these values are nulls, and handle this accordingly in your web methods.

    --
    Manohar Kamath
    Editor, .netWire
    www.dotnetwire.com


    <> wrote in message
    news:...
    > In document mode, I want to fill some values in my SOAP Request with
    > literal values but I want also pass "null values" on it to set to blank
    > distant data like datas, addresses, ... and so on, as I will reset
    > them.
    >
    > Thanks for your help.
    >
    Manohar Kamath, Mar 7, 2005
    #2
    1. Advertising

  3. Dan Rogers Guest

    Also, consider passing (or not passing) elements as a way to do this. An
    optional element that is not set is not serialized (refernce types). If
    you want to not pass a value type, create a field with the same name as
    your field, but of type boolean with the word Specified appended to the
    field name.

    public int myInt;
    public bool myIntSpecified = false;

    This will make the myInt field be supressed from serialization if the value
    of myIntSpecified is false.
    --------------------
    >From: "Manohar Kamath" <>
    >References: <>
    >Subject: Re: How could I invoke a webservice with some nillable values
    >Date: Mon, 7 Mar 2005 10:42:09 -0600
    >Lines: 22
    >X-Priority: 3
    >X-MSMail-Priority: Normal
    >X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
    >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
    >Message-ID: <#>
    >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    >NNTP-Posting-Host: c-67-173-77-191.client.comcast.net 67.173.77.191
    >Path:

    TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFTNGP0
    8.phx.gbl!TK2MSFTNGP12.phx.gbl
    >Xref: TK2MSFTNGXA02.phx.gbl

    microsoft.public.dotnet.framework.aspnet.webservices:28434
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    >
    >Depends on if you nulls are valid values for the objects. Fundamental types
    >like int, etc. are value-types, and you can not assign nulls to these. If
    >you really need to null these out, consider create a flag to indicate that
    >these values are nulls, and handle this accordingly in your web methods.
    >
    >--
    >Manohar Kamath
    >Editor, .netWire
    >www.dotnetwire.com
    >
    >
    ><> wrote in message
    >news:...
    >> In document mode, I want to fill some values in my SOAP Request with
    >> literal values but I want also pass "null values" on it to set to blank
    >> distant data like datas, addresses, ... and so on, as I will reset
    >> them.
    >>
    >> Thanks for your help.
    >>

    >
    >
    >
    Dan Rogers, Mar 7, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Samuel
    Replies:
    0
    Views:
    557
    Samuel
    Jul 30, 2003
  2. Standist
    Replies:
    0
    Views:
    1,373
    Standist
    Feb 8, 2006
  3. Bob Foster

    XML Schema nillable and fixed?

    Bob Foster, Aug 4, 2003, in forum: XML
    Replies:
    0
    Views:
    562
    Bob Foster
    Aug 4, 2003
  4. Daniel Serodio

    Pattern vs. nillable

    Daniel Serodio, Aug 10, 2006, in forum: XML
    Replies:
    1
    Views:
    936
    George Bina
    Aug 11, 2006
  5. thomas

    How to secure a webservice - could some expert advise?

    thomas, Oct 13, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    97
    thomas
    Oct 13, 2006
Loading...

Share This Page