Extending web service proxy classes

Discussion in 'ASP .Net Web Services' started by Sarge, Oct 31, 2005.

  1. Sarge

    Sarge Guest

    Hi all,
    tough question. Apologies for the cross posting but it is an interesting
    architectural problem and I think deserves a wide audience.

    What is the best way to extend web service proxy classes so we can add
    our own methods and properties?

    We have an application that passes a deep hierarchical structure (four
    nodes deep) between a webservice and a smart client.
    We have built the web service using the Contract First Web Service Tool,
    which essentially builds nice web service proxy classes from a WSDL and xml
    schemas, nothing new here. This tool uses the xsd.exe generation tool + IDE
    integration, rather nice.
    On the client side of the application we need to do some complex / semi
    real time processing on this hierarchy before sending it back.

    We would like to extend the web service proxy classes without modifying
    the generated class files directly as we know that these things tend to
    change and code generation is a big help in this manner.

    We need properties and methods to be added to the individual web service
    proxy classes

    Attempts
    We have tried inheriting from the web service proxy class.
    This didn't work so well for two reasons
    a) we can't down cast from a super class into sub class. i.e can't
    cast from a type Dog into type Dalmatian
    b) we have a hierarchy of classes so even if we can get a successful
    cast into a Dalmatian class if we have a collection of FriendsToSniff they
    would need to be cast as well...

    Another option is to recreate the whole hierarchy, this seems to be an
    expensive option after all the xmldeserializer has just kinda done all this
    creating.

    Another other option is use some kind of helper class which we could use to
    help with the processing, this would be possible but complicated and would
    not support the addition of properties easily as new properties would need
    to be implemented as hashtables inside the helper class or something like
    that. Helper classes are good for processing but not properties and state.

    So you code hounds and architectural sleuths what do you think??

    Thanks in advance

    Mark
     
    Sarge, Oct 31, 2005
    #1
    1. Advertising

  2. Hi Sarge,

    Welcome to Webservice newsgroup.
    As for the question you mentioned, I think it's really a tough question.
    IMO, the best choice should be modify the autogenerated proxy code since
    that's quite direct and convenient. However, since the proxy files are
    autogenerated and our custom code may be override unexpectedly. In .NET
    2.0, there provide the new partial class which can help separate one
    class's code into mutliple source files. and for those IDE generated
    classes, VS.NET will seprate the IDE generated code from user's custom code.

    Also, as for the downcasting issue you mentioned in the creating derived
    class(from auto generated proxy) means, would you provide some more detaile
    description? Maybe you can use a simple example to describe the scenario
    you currently meet so that we can get a more visualized concept.

    Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)


    --------------------
    | From: "Sarge" <>
    | Subject: Extending web service proxy classes
    | Date: Tue, 1 Nov 2005 09:33:01 +1300
    | Lines: 53
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    | X-RFC2646: Format=Flowed; Original
    | Message-ID: <>
    | Newsgroups:
    microsoft.public.dotnet.framework.aspnet.webservices,microsoft.public.dotnet
    ..framework.webservices,microsoft.public.webservices
    | NNTP-Posting-Host: 222-153-144-207.jetstream.xtra.co.nz 222.153.144.207
    | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
    | Xref: TK2MSFTNGXA01.phx.gbl
    microsoft.public.dotnet.framework.webservices:8417
    microsoft.public.webservices:1236
    microsoft.public.dotnet.framework.aspnet.webservices:8210
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    |
    | Hi all,
    | tough question. Apologies for the cross posting but it is an
    interesting
    | architectural problem and I think deserves a wide audience.
    |
    | What is the best way to extend web service proxy classes so we can add
    | our own methods and properties?
    |
    | We have an application that passes a deep hierarchical structure
    (four
    | nodes deep) between a webservice and a smart client.
    | We have built the web service using the Contract First Web Service
    Tool,
    | which essentially builds nice web service proxy classes from a WSDL and
    xml
    | schemas, nothing new here. This tool uses the xsd.exe generation tool +
    IDE
    | integration, rather nice.
    | On the client side of the application we need to do some complex /
    semi
    | real time processing on this hierarchy before sending it back.
    |
    | We would like to extend the web service proxy classes without
    modifying
    | the generated class files directly as we know that these things tend to
    | change and code generation is a big help in this manner.
    |
    | We need properties and methods to be added to the individual web
    service
    | proxy classes
    |
    | Attempts
    | We have tried inheriting from the web service proxy class.
    | This didn't work so well for two reasons
    | a) we can't down cast from a super class into sub class. i.e
    can't
    | cast from a type Dog into type Dalmatian
    | b) we have a hierarchy of classes so even if we can get a
    successful
    | cast into a Dalmatian class if we have a collection of FriendsToSniff
    they
    | would need to be cast as well...
    |
    | Another option is to recreate the whole hierarchy, this seems to be an
    | expensive option after all the xmldeserializer has just kinda done all
    this
    | creating.
    |
    | Another other option is use some kind of helper class which we could use
    to
    | help with the processing, this would be possible but complicated and
    would
    | not support the addition of properties easily as new properties would
    need
    | to be implemented as hashtables inside the helper class or something like
    | that. Helper classes are good for processing but not properties and state.
    |
    | So you code hounds and architectural sleuths what do you think??
    |
    | Thanks in advance
    |
    | Mark
    |
    |
    |
    |
    |
    |
    |
     
    Steven Cheng[MSFT], Nov 1, 2005
    #2
    1. Advertising

  3. Hi Sarge,

    Have you got any further progress or new ideas on this? If there're
    anything else we can help, please feel free to post here.
    Also, welcome to sharing any of your good ideas with us.
    Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    --------------------
    | X-Tomcat-ID: 160503447
    | References: <>
    | MIME-Version: 1.0
    | Content-Type: text/plain
    | Content-Transfer-Encoding: 7bit
    | From: (Steven Cheng[MSFT])
    | Organization: Microsoft
    | Date: Tue, 01 Nov 2005 09:49:27 GMT
    | Subject: RE: Extending web service proxy classes
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    | Message-ID: <>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    | Lines: 109
    | Path: TK2MSFTNGXA01.phx.gbl
    | Xref: TK2MSFTNGXA01.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webservices:8214
    | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
    |
    | Hi Sarge,
    |
    | Welcome to Webservice newsgroup.
    | As for the question you mentioned, I think it's really a tough question.
    | IMO, the best choice should be modify the autogenerated proxy code since
    | that's quite direct and convenient. However, since the proxy files are
    | autogenerated and our custom code may be override unexpectedly. In .NET
    | 2.0, there provide the new partial class which can help separate one
    | class's code into mutliple source files. and for those IDE generated
    | classes, VS.NET will seprate the IDE generated code from user's custom
    code.
    |
    | Also, as for the downcasting issue you mentioned in the creating derived
    | class(from auto generated proxy) means, would you provide some more
    detaile
    | description? Maybe you can use a simple example to describe the scenario
    | you currently meet so that we can get a more visualized concept.
    |
    | Thanks,
    |
    | Steven Cheng
    | Microsoft Online Support
    |
    | Get Secure! www.microsoft.com/security
    | (This posting is provided "AS IS", with no warranties, and confers no
    | rights.)
    |
    |
    | --------------------
    | | From: "Sarge" <>
    | | Subject: Extending web service proxy classes
    | | Date: Tue, 1 Nov 2005 09:33:01 +1300
    | | Lines: 53
    | | X-Priority: 3
    | | X-MSMail-Priority: Normal
    | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    | | X-RFC2646: Format=Flowed; Original
    | | Message-ID: <>
    | | Newsgroups:
    |
    microsoft.public.dotnet.framework.aspnet.webservices,microsoft.public.dotnet
    | .framework.webservices,microsoft.public.webservices
    | | NNTP-Posting-Host: 222-153-144-207.jetstream.xtra.co.nz 222.153.144.207
    | | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
    | | Xref: TK2MSFTNGXA01.phx.gbl
    | microsoft.public.dotnet.framework.webservices:8417
    | microsoft.public.webservices:1236
    | microsoft.public.dotnet.framework.aspnet.webservices:8210
    | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    | |
    | | Hi all,
    | | tough question. Apologies for the cross posting but it is an
    | interesting
    | | architectural problem and I think deserves a wide audience.
    | |
    | | What is the best way to extend web service proxy classes so we can
    add
    | | our own methods and properties?
    | |
    | | We have an application that passes a deep hierarchical structure
    | (four
    | | nodes deep) between a webservice and a smart client.
    | | We have built the web service using the Contract First Web Service
    | Tool,
    | | which essentially builds nice web service proxy classes from a WSDL and
    | xml
    | | schemas, nothing new here. This tool uses the xsd.exe generation tool +
    | IDE
    | | integration, rather nice.
    | | On the client side of the application we need to do some complex /
    | semi
    | | real time processing on this hierarchy before sending it back.
    | |
    | | We would like to extend the web service proxy classes without
    | modifying
    | | the generated class files directly as we know that these things tend to
    | | change and code generation is a big help in this manner.
    | |
    | | We need properties and methods to be added to the individual web
    | service
    | | proxy classes
    | |
    | | Attempts
    | | We have tried inheriting from the web service proxy class.
    | | This didn't work so well for two reasons
    | | a) we can't down cast from a super class into sub class. i.e
    | can't
    | | cast from a type Dog into type Dalmatian
    | | b) we have a hierarchy of classes so even if we can get a
    | successful
    | | cast into a Dalmatian class if we have a collection of FriendsToSniff
    | they
    | | would need to be cast as well...
    | |
    | | Another option is to recreate the whole hierarchy, this seems to be an
    | | expensive option after all the xmldeserializer has just kinda done all
    | this
    | | creating.
    | |
    | | Another other option is use some kind of helper class which we could
    use
    | to
    | | help with the processing, this would be possible but complicated and
    | would
    | | not support the addition of properties easily as new properties would
    | need
    | | to be implemented as hashtables inside the helper class or something
    like
    | | that. Helper classes are good for processing but not properties and
    state.
    | |
    | | So you code hounds and architectural sleuths what do you think??
    | |
    | | Thanks in advance
    | |
    | | Mark
    | |
    | |
    | |
    | |
    | |
    | |
    | |
    |
    |
     
    Steven Cheng[MSFT], Nov 3, 2005
    #3
  4. Sarge

    Sarge Guest

    Hi Steven,

    thanks for your reply,

    we have come to the same conculsion, modifiying the generated source
    code is the simplest solution. And yes the partial class idea would be a
    neat solution to this issue.

    So far it has gone pretty well, we have been manually invoking the code
    generation process. This has allowed us to control when and where code is
    created, a small amount of file differencing and knowledge about what has
    changed still makes this an efficient process.

    Regards

    Mark (Sarge)


    "Steven Cheng[MSFT]" <> wrote in message
    news:...
    > Hi Sarge,
    >
    > Have you got any further progress or new ideas on this? If there're
    > anything else we can help, please feel free to post here.
    > Also, welcome to sharing any of your good ideas with us.
    > Thanks,
    >
    > Steven Cheng
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    > --------------------
    > | X-Tomcat-ID: 160503447
    > | References: <>
    > | MIME-Version: 1.0
    > | Content-Type: text/plain
    > | Content-Transfer-Encoding: 7bit
    > | From: (Steven Cheng[MSFT])
    > | Organization: Microsoft
    > | Date: Tue, 01 Nov 2005 09:49:27 GMT
    > | Subject: RE: Extending web service proxy classes
    > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    > | Message-ID: <>
    > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    > | Lines: 109
    > | Path: TK2MSFTNGXA01.phx.gbl
    > | Xref: TK2MSFTNGXA01.phx.gbl
    > microsoft.public.dotnet.framework.aspnet.webservices:8214
    > | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
    > |
    > | Hi Sarge,
    > |
    > | Welcome to Webservice newsgroup.
    > | As for the question you mentioned, I think it's really a tough question.
    > | IMO, the best choice should be modify the autogenerated proxy code since
    > | that's quite direct and convenient. However, since the proxy files are
    > | autogenerated and our custom code may be override unexpectedly. In .NET
    > | 2.0, there provide the new partial class which can help separate one
    > | class's code into mutliple source files. and for those IDE generated
    > | classes, VS.NET will seprate the IDE generated code from user's custom
    > code.
    > |
    > | Also, as for the downcasting issue you mentioned in the creating derived
    > | class(from auto generated proxy) means, would you provide some more
    > detaile
    > | description? Maybe you can use a simple example to describe the scenario
    > | you currently meet so that we can get a more visualized concept.
    > |
    > | Thanks,
    > |
    > | Steven Cheng
    > | Microsoft Online Support
    > |
    > | Get Secure! www.microsoft.com/security
    > | (This posting is provided "AS IS", with no warranties, and confers no
    > | rights.)
    > |
    > |
    > | --------------------
    > | | From: "Sarge" <>
    > | | Subject: Extending web service proxy classes
    > | | Date: Tue, 1 Nov 2005 09:33:01 +1300
    > | | Lines: 53
    > | | X-Priority: 3
    > | | X-MSMail-Priority: Normal
    > | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    > | | X-RFC2646: Format=Flowed; Original
    > | | Message-ID: <>
    > | | Newsgroups:
    > |
    > microsoft.public.dotnet.framework.aspnet.webservices,microsoft.public.dotnet
    > | .framework.webservices,microsoft.public.webservices
    > | | NNTP-Posting-Host: 222-153-144-207.jetstream.xtra.co.nz
    > 222.153.144.207
    > | | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
    > | | Xref: TK2MSFTNGXA01.phx.gbl
    > | microsoft.public.dotnet.framework.webservices:8417
    > | microsoft.public.webservices:1236
    > | microsoft.public.dotnet.framework.aspnet.webservices:8210
    > | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    > | |
    > | | Hi all,
    > | | tough question. Apologies for the cross posting but it is an
    > | interesting
    > | | architectural problem and I think deserves a wide audience.
    > | |
    > | | What is the best way to extend web service proxy classes so we can
    > add
    > | | our own methods and properties?
    > | |
    > | | We have an application that passes a deep hierarchical structure
    > | (four
    > | | nodes deep) between a webservice and a smart client.
    > | | We have built the web service using the Contract First Web Service
    > | Tool,
    > | | which essentially builds nice web service proxy classes from a WSDL
    > and
    > | xml
    > | | schemas, nothing new here. This tool uses the xsd.exe generation tool
    > +
    > | IDE
    > | | integration, rather nice.
    > | | On the client side of the application we need to do some complex /
    > | semi
    > | | real time processing on this hierarchy before sending it back.
    > | |
    > | | We would like to extend the web service proxy classes without
    > | modifying
    > | | the generated class files directly as we know that these things tend
    > to
    > | | change and code generation is a big help in this manner.
    > | |
    > | | We need properties and methods to be added to the individual web
    > | service
    > | | proxy classes
    > | |
    > | | Attempts
    > | | We have tried inheriting from the web service proxy class.
    > | | This didn't work so well for two reasons
    > | | a) we can't down cast from a super class into sub class. i.e
    > | can't
    > | | cast from a type Dog into type Dalmatian
    > | | b) we have a hierarchy of classes so even if we can get a
    > | successful
    > | | cast into a Dalmatian class if we have a collection of FriendsToSniff
    > | they
    > | | would need to be cast as well...
    > | |
    > | | Another option is to recreate the whole hierarchy, this seems to be an
    > | | expensive option after all the xmldeserializer has just kinda done all
    > | this
    > | | creating.
    > | |
    > | | Another other option is use some kind of helper class which we could
    > use
    > | to
    > | | help with the processing, this would be possible but complicated and
    > | would
    > | | not support the addition of properties easily as new properties would
    > | need
    > | | to be implemented as hashtables inside the helper class or something
    > like
    > | | that. Helper classes are good for processing but not properties and
    > state.
    > | |
    > | | So you code hounds and architectural sleuths what do you think??
    > | |
    > | | Thanks in advance
    > | |
    > | | Mark
    > | |
    > | |
    > | |
    > | |
    > | |
    > | |
    > | |
    > |
    > |
    >
     
    Sarge, Nov 7, 2005
    #4
  5. Thanks for your followup Sarge,

    Glad that you've got things working now. Meanwhile, if there're anything
    else we can help later, please feel free to post here.
    Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)




    --------------------
    | From: "Sarge" <>
    | References: <>
    <>
    <>
    | Subject: Re: Extending web service proxy classes
    | Date: Mon, 7 Nov 2005 13:04:05 +1300
    | Lines: 185
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    | X-RFC2646: Format=Flowed; Original
    | Message-ID: <>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    | NNTP-Posting-Host: 222-153-144-207.jetstream.xtra.co.nz 222.153.144.207
    | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
    | Xref: TK2MSFTNGXA01.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webservices:8288
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    |
    | Hi Steven,
    |
    | thanks for your reply,
    |
    | we have come to the same conculsion, modifiying the generated source
    | code is the simplest solution. And yes the partial class idea would be a
    | neat solution to this issue.
    |
    | So far it has gone pretty well, we have been manually invoking the code
    | generation process. This has allowed us to control when and where code is
    | created, a small amount of file differencing and knowledge about what has
    | changed still makes this an efficient process.
    |
    | Regards
    |
    | Mark (Sarge)
    |
    |
    | "Steven Cheng[MSFT]" <> wrote in message
    | news:...
    | > Hi Sarge,
    | >
    | > Have you got any further progress or new ideas on this? If there're
    | > anything else we can help, please feel free to post here.
    | > Also, welcome to sharing any of your good ideas with us.
    | > Thanks,
    | >
    | > Steven Cheng
    | > Microsoft Online Support
    | >
    | > Get Secure! www.microsoft.com/security
    | > (This posting is provided "AS IS", with no warranties, and confers no
    | > rights.)
    | > --------------------
    | > | X-Tomcat-ID: 160503447
    | > | References: <>
    | > | MIME-Version: 1.0
    | > | Content-Type: text/plain
    | > | Content-Transfer-Encoding: 7bit
    | > | From: (Steven Cheng[MSFT])
    | > | Organization: Microsoft
    | > | Date: Tue, 01 Nov 2005 09:49:27 GMT
    | > | Subject: RE: Extending web service proxy classes
    | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    | > | Message-ID: <>
    | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    | > | Lines: 109
    | > | Path: TK2MSFTNGXA01.phx.gbl
    | > | Xref: TK2MSFTNGXA01.phx.gbl
    | > microsoft.public.dotnet.framework.aspnet.webservices:8214
    | > | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
    | > |
    | > | Hi Sarge,
    | > |
    | > | Welcome to Webservice newsgroup.
    | > | As for the question you mentioned, I think it's really a tough
    question.
    | > | IMO, the best choice should be modify the autogenerated proxy code
    since
    | > | that's quite direct and convenient. However, since the proxy files are
    | > | autogenerated and our custom code may be override unexpectedly. In
    .NET
    | > | 2.0, there provide the new partial class which can help separate one
    | > | class's code into mutliple source files. and for those IDE generated
    | > | classes, VS.NET will seprate the IDE generated code from user's custom
    | > code.
    | > |
    | > | Also, as for the downcasting issue you mentioned in the creating
    derived
    | > | class(from auto generated proxy) means, would you provide some more
    | > detaile
    | > | description? Maybe you can use a simple example to describe the
    scenario
    | > | you currently meet so that we can get a more visualized concept.
    | > |
    | > | Thanks,
    | > |
    | > | Steven Cheng
    | > | Microsoft Online Support
    | > |
    | > | Get Secure! www.microsoft.com/security
    | > | (This posting is provided "AS IS", with no warranties, and confers no
    | > | rights.)
    | > |
    | > |
    | > | --------------------
    | > | | From: "Sarge" <>
    | > | | Subject: Extending web service proxy classes
    | > | | Date: Tue, 1 Nov 2005 09:33:01 +1300
    | > | | Lines: 53
    | > | | X-Priority: 3
    | > | | X-MSMail-Priority: Normal
    | > | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    | > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    | > | | X-RFC2646: Format=Flowed; Original
    | > | | Message-ID: <>
    | > | | Newsgroups:
    | > |
    | >
    microsoft.public.dotnet.framework.aspnet.webservices,microsoft.public.dotnet
    | > | .framework.webservices,microsoft.public.webservices
    | > | | NNTP-Posting-Host: 222-153-144-207.jetstream.xtra.co.nz
    | > 222.153.144.207
    | > | | Path:
    TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
    | > | | Xref: TK2MSFTNGXA01.phx.gbl
    | > | microsoft.public.dotnet.framework.webservices:8417
    | > | microsoft.public.webservices:1236
    | > | microsoft.public.dotnet.framework.aspnet.webservices:8210
    | > | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    | > | |
    | > | | Hi all,
    | > | | tough question. Apologies for the cross posting but it is an
    | > | interesting
    | > | | architectural problem and I think deserves a wide audience.
    | > | |
    | > | | What is the best way to extend web service proxy classes so we
    can
    | > add
    | > | | our own methods and properties?
    | > | |
    | > | | We have an application that passes a deep hierarchical structure
    | > | (four
    | > | | nodes deep) between a webservice and a smart client.
    | > | | We have built the web service using the Contract First Web
    Service
    | > | Tool,
    | > | | which essentially builds nice web service proxy classes from a WSDL
    | > and
    | > | xml
    | > | | schemas, nothing new here. This tool uses the xsd.exe generation
    tool
    | > +
    | > | IDE
    | > | | integration, rather nice.
    | > | | On the client side of the application we need to do some
    complex /
    | > | semi
    | > | | real time processing on this hierarchy before sending it back.
    | > | |
    | > | | We would like to extend the web service proxy classes without
    | > | modifying
    | > | | the generated class files directly as we know that these things
    tend
    | > to
    | > | | change and code generation is a big help in this manner.
    | > | |
    | > | | We need properties and methods to be added to the individual web
    | > | service
    | > | | proxy classes
    | > | |
    | > | | Attempts
    | > | | We have tried inheriting from the web service proxy class.
    | > | | This didn't work so well for two reasons
    | > | | a) we can't down cast from a super class into sub class. i.e
    | > | can't
    | > | | cast from a type Dog into type Dalmatian
    | > | | b) we have a hierarchy of classes so even if we can get a
    | > | successful
    | > | | cast into a Dalmatian class if we have a collection of
    FriendsToSniff
    | > | they
    | > | | would need to be cast as well...
    | > | |
    | > | | Another option is to recreate the whole hierarchy, this seems to be
    an
    | > | | expensive option after all the xmldeserializer has just kinda done
    all
    | > | this
    | > | | creating.
    | > | |
    | > | | Another other option is use some kind of helper class which we could
    | > use
    | > | to
    | > | | help with the processing, this would be possible but complicated and
    | > | would
    | > | | not support the addition of properties easily as new properties
    would
    | > | need
    | > | | to be implemented as hashtables inside the helper class or something
    | > like
    | > | | that. Helper classes are good for processing but not properties and
    | > state.
    | > | |
    | > | | So you code hounds and architectural sleuths what do you think??
    | > | |
    | > | | Thanks in advance
    | > | |
    | > | | Mark
    | > | |
    | > | |
    | > | |
    | > | |
    | > | |
    | > | |
    | > | |
    | > |
    | > |
    | >
    |
    |
    |
     
    Steven Cheng[MSFT], Nov 7, 2005
    #5
    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. vidy5300
    Replies:
    0
    Views:
    874
    vidy5300
    Jun 7, 2004
  2. posthumecaver

    Web service, web proxy and timeout problem

    posthumecaver, Aug 25, 2003, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    209
    posthumecaver
    Aug 26, 2003
  3. Joe G

    Issues with web references and proxy classes.

    Joe G, May 3, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    126
    Dino Chiesa [Microsoft]
    May 4, 2004
  4. dave v

    XsdObjectGen classes in Web Service Client Proxy

    dave v, Feb 9, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    192
    Steven Cheng[MSFT]
    Feb 10, 2005
  5. Leo Violette
    Replies:
    0
    Views:
    1,055
    Leo Violette
    Apr 17, 2009
Loading...

Share This Page