msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Ambiguous Web Service References

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Enterprise
Author Message
Craig



Joined: 04 Oct 2007
Posts: 5

PostPosted: Wed May 16, 2007 8:17 pm    Post subject: Ambiguous Web Service References Reply with quote

Background:
I am building a Windows enterprise application that has separate assemblies
for UI, business logic/rules, and data access (i.e. typical N-tier
architecture). Many of the assemblies reference a "name and address web
service," which gives me validation lists for name honorifics (e.g. Dr, Mr,
Miss, Mrs), name suffixes (e.g. Sr, Jr, III), and City/State/ZIP combos. The
same "name and address web service" also can save and retrieve addresses.
Obviously, it's a pretty generic little web service that gets used in
multiple places in the app (return addresses for mailings; contact info for
A/R accounts; and more). Multiple assemblies have need to use the web service.

The Problem:
If each assembly has a reference to the same web service and names the proxy
the same thing (i.e. NameAndAddressWebService), then I start getting
ambiguous reference errors popping up everywhere. If I name all the web
references differently, then I'm okay. But I have to be careful that all my
references really have different names, even those "built into" other
assemblies developed by other programmers. Some options:
1) Why can't web references be marked "Private" or "Friend" so their
visibility is restricted to the assembly that they're declared in? The
VS2005-generated code always generates "Public" proxy objects. (I can go into
the Reference.vb and change everything from Public to Friend, but that seems
like a really dangerous thing to do; "Update Web Reference" wipes out all
these manual override changes.)
2) I can create a wrapper assembly that essentially just has the web
reference proxy objects in it (i.e. NameAndAddressWSProxy.dll). I can then
reference this assembly from all my other assemblies and everything works.
But wrapping a web service seems hokey.
3) I could scrap the whole name and address web service and just turn it
into a standard Windows assembly (Windows Class Library). At this point, I'm
just not seeing the advantage of having this functionality in a web service
(heresy, I know!).

I've been looking for some best practices, or at least "here's-what-we-did",
articles, but I haven't found anything yet. Recommendations?

Archived from group: microsoft>public>vb>enterprise
Back to top
View user's profile Send private message
Ken Halter



Joined: 04 Oct 2007
Posts: 4150

PostPosted: Thu May 17, 2007 1:13 am    Post subject: Re: Ambiguous Web Service References Reply with quote

"Craig" wrote in message @microsoft.com...
> Background:

All groups on the MS server with names that start with "microsoft.public.vb"
are for pre-dotNet versions of VB, aka VB Classic
The name of this group was cast in stone hundreds of years before MS decided
the VB language was just too popular for its own good.

> Recommendations?

dotNet groups have either "dotnet" or "vsnet" in their names. You'll have
far better luck getting help with dotNet related issues there.

--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm
Back to top
View user's profile Send private message
Craig



Joined: 04 Oct 2007
Posts: 5

PostPosted: Thu May 17, 2007 10:46 am    Post subject: Re: Ambiguous Web Service References Reply with quote

Oops. I'll repost in the correct forum.

"Ken Halter" wrote:

> "Craig" wrote in message
> @microsoft.com...
> > Background:
>
> All groups on the MS server with names that start with "microsoft.public.vb"
> are for pre-dotNet versions of VB, aka VB Classic
> The name of this group was cast in stone hundreds of years before MS decided
> the VB language was just too popular for its own good.
>
> > Recommendations?
>
> dotNet groups have either "dotnet" or "vsnet" in their names. You'll have
> far better luck getting help with dotNet related issues there.
>
> --
> Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
> In Loving Memory - http://www.vbsight.com/Remembrance.htm
>
>
>

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Enterprise All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group