RE: Soap class definition question

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Scott,

Thanks for your reply.

Yes, for the "standard webservce" proxy, it hasn't provided support on
reusing types(defined in a referenced or specific assembly) like what WCF
client proxy uses.

For your scenario, I think you can consider the following approaches:

1. still us the standard webservice "add WebReference" to generate
webservice client proxy. However, after generated the proxy code, you can
directly dig into the source code(Reference.cs ..) and change the type from
its autogenerated one to your shared common types. However, such change
will be overwritten when you upcate the webservice. To resolve the problem,
you can consider use partial class file to do the change or use wsdl.exe to
generate the proxy in commandline. Here is a article introduce some on this:

How to customize the Web Service proxy generated by wsdl.exe (or add web
references)


2. If using .NET 3.X is ok for your case. You can consider use "Add
ServiceReference" to generate a WCF proxy to consume the webservice. And
the WCF proxy generation support type sharing(in referenced assemblies or
in specified assemblies). It doesn't limit to TCP port only.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

From: =?Utf-8?B?U2NvdHQ=?= <snorberg@xxxxxxxxxxxxxxxxx>
References: <BFB6A67A-EB7D-4D09-9322-32C793C25FAF@xxxxxxxxxxxxx>
<#Fb2fyVnJHA.5108@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: Soap class definition question
Date: Thu, 5 Mar 2009 07:53:01 -0800

Steven,

Yes, we use the the standard web service client proxy, and it does pick up
the custom types from my common assembly. BUT the exported types,
available
from the proxy are under a different namespace, generally
program.reference.class. That makes the common class definition useless
since
the name is different, the class is different and you need to copy data
from
one class to another just to get it to work. This is not the way to re-use
anything :-(

I looked at the codeproject article. That example uses a tcp transport not
soap. We may need to go that way just to make this thing work, or just
live
with copying classes everytime we need to reference the soap service.

In this project there are actually 3 tiers. The client, the front end
service and a back end service. It would really be nice [required] that I
can
create a class in the client, pass it to the front end service and then
have
that SAME class sent to the backend service. The way this appears to work
that structure is not possible.

What is the recommended way to do the above using soap web service with
the
standard proxy generation?
--
Scott Norberg


""Steven Cheng"" wrote:

Hi Scott,


.



Relevant Pages

  • RE: Webservices sharing types with client Apps (and BLTs :) )
    ... behavior of webservice and its client-side proxy generator. ... And the client application maybe of heterogenous ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.general)
  • RE: Soap class definition question
    ... Steven Cheng ... Microsoft MSDN Online Support Lead ... Yes, for the "standard webservce" proxy, it hasn't provided support on ... still us the standard webservice "add WebReference" to generate ...
    (microsoft.public.dotnet.xml)
  • RE: Soap class definition question
    ... Yes, for the "standard webservce" proxy, it hasn't provided support on ... reusing typeslike what WCF ... its autogenerated one to your shared common types. ...
    (microsoft.public.dotnet.xml)
  • Re: How to alias 2 classes in c#
    ... For ASP.NET webservice's client proxy, if you use "Add WebReference" to ... the type sharing support is still limited. ... where an initial response from the community or a Microsoft Support ... having 2 versions of a web service with a total compatibility ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: How to alias 2 classes in c#
    ... For ASP.NET webservice's client proxy, if you use "Add WebReference" to ... it will always create a new copy of the custom types(even ... the type sharing support is still limited. ... having 2 versions of a web service with a total compatibility ...
    (microsoft.public.dotnet.languages.csharp)