Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Services and Custom Attributes

Status
Not open for further replies.

CrashDome

Technical User
Jan 7, 2002
86
US
I coded myself into a corner!

I wrote an object in my Web Service which utilizes a custom attribute. In my client app, the web reference does not support that custom attribute! (AFAIK)

I didn't even think about this, but is it possible to send metadata over a web service?

example:

Web Service:
Code:
public Foo 
{
   private string id;
   [CustomSearchableAttribute("Identity")]
   public string ID { get...set...};
}
Client:
Code:
using WebServiceNamespace;
.
.
.

   MyWebSvc mySvc = new MyWebSvc();
   Foo f = mySvc.GetAFoo();
^^^ Foo's ID property does not have custom attribute "Searchable"

Other than breaking down the object and rebuilding under a different namespace on the client side, is there a way to get my custom attribute to be recognized over a Web Reference????
 
I haven't worked too much with Webservice but these too links my be helpful
4 Guys From Rolla (Part 6)
Google Results(query: send metadata over a web service asp.net)

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Thanks, but that's for something else actually.

I'm beginning to see the difference of a web reference.
 
No, the client proxy will never see your custom attributes.

This is because the philosophy of web services is that they have to be language agnostic -- your service must be as easily called from PHP or Ruby as it would be from C# or Java, and some of those other languages don't have attributes.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top