proxy-classes

How do you stop a Visual Studio generated web service proxy class from encoding?

I'm using a Visual Studio generated proxy class to access a web service (added the web service as a web reference to my project). The problem is that the function the web service exposes expects a CDATA element, i.e.: <Function><![CDATA[<Blah></Blah>]]></Function> Unfortunately, when I pass in "" into the proxy class, it calls the we...

.NET webservice using an instance of a parameter type?

I have a Windows forms project and a Web Service project in my solution, and I'm trying to call the web service and return a customer object as the result. The problem is that when I try to receive the return object, I get an error that it can't convert it. For example, here is the signature for my webservice: Public Function GetDriverB...

Force .NET webservice to use local object class, not proxy class

I have a webservice that I'm calling from a windows forms application (both .NET, both in the same solution), and I'd like my webservice to return a custom object from elsewhere in the project - it's a common object that they both share a reference to, as it's in the third project in my solution. When I call the webservice, it returns a ...

C# Proxies and the var keyword

This question is related to a previous post of mine Here. Basically, I want to inject a DAO into an entity i.e. public class User { IUserDAO userDAO; public User() { userDAO = IoCContainer.Resolve<IUserDAO>; } public User(IUserDAO userDAO) { this.userDAO = userDAO; } //Wrapped DAO methods i.e ...

Activator.GetObject - MarshalByRefObject

In .Net Activator.GetObject(Type type, string url, object data) returns a proxy to the object. I guess that proxy inherits from MarshalByRefObject and can be sent across AppDomains. Am I right? In my app, I am creating an object in appdomain A and using it appdomain B. The object's members are proxyobjects created using Activator.GetObj...

What is a .NET proxy object in the Inversion of Control / Aspect-Oriented sense?

What is a proxy object in the Inversion of Control / Aspect-Oriented sense? Any good articles on what a proxy object is ? Why you would want to use one ? And how to write one in C# ? ...

.NET web service without proxy class

I'm trying to create an application that will let me execute a method specified at runtime on an arbitrary webservice (the URL of which I'll also provide at runtime). I've figured out how to use Type.InvokeMember to execute the arbitrary method, but how do I specify the web service to consume without creating a proxy class. I found htt...

Unexpected proxy objects in Nhibernate with composite ID's

I have a data structure which uses composite ids (Which I dont wish to change to single) Everything loads fine except for many-to-one joins which if the join is empty, instead of mapping the property to null, maps it to an empty proxy object. I have written an ugly work around( see bleow). Any solutions to this? private Node _Parent; ...

Exceptions from SoapHttpClientProtocol.Invoke Method .NET web service

I am calling a web service from a C# forms based app. ServReturnType obj = ServProxyClass(int i, int k); I have the potential to get back an exception. The exception could be that the service didn't connect at all, that there was a failure on the receive, but the original message went, or anything in between. I then need to make a dec...

In Java, how can I construct a "proxy wrapper" around an object which invokes a method upon changing a property?

I'm looking for something similar to the Proxy pattern or the Dynamic Proxy Classes, only that I don't want to intercept method calls before they are invoked on the real object, but rather I'd like to intercept properties that are being changed. I'd like the proxy to be able to represent multiple objects with different sets of properties...

How to build a kind of firewall.

Actually what i am trying to build is like a kind of firewall. It should be able to get to know all the requests going from my machine. It should be able to stop selected ones. I am not sure how to even start about with this. I am having VS 2008/2005 with framework 2.0. Please let me know if there is any particular class i can start with...

Wrapping a Vararg Method in ActionScipt

I have a vararg method that I'd like to act as a proxy for another vararg method, but I'm not sure how to do it. Here's the basic code: class MyClass { public function a(...args:*):* { // other code b(args); // other code } public function b(...args:*):* { // do stuff with args } } I'm porting th...

dynamic proxies with jmx can cause thread leaks?

I have a problem in Java where I set up a dynamic proxy with a JMX interface, pass this on to another component which then makes calls to the proxy object. When I do this, the application leaks two threads for each call, threads which never seem to time out and keep building up until the application runs out of memory. The threads appe...

How do i get the the full name of the proxyed type for a nhibernate DynamicProxy?

I am using a netdatacontractserializer and a SerializationBinder to create my own runtime types for nhibernate proxies on the client side. This all works except I am forced to assume that there is only one type by each name in the domain model. i.e. i am forced to ignore the namespace. The reason is that SerializationBinder only gives m...

Fixing BeanNotOfRequiredTypeException on Spring proxy cast on a non-singleton bean?

I'm having an issue with pulling a Spring bean from an application context. When I try; InnerThread instance = (InnerThread) SpringContextFactory.getApplicationContext().getBean("innerThread", InnerThread.class); I get; org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'innerThread' must be of type [com.g...

Wcf Service Proxy Name / Namespace naming strategy

Anyone have a naming strategy that works well for service proxy classes? For example, if I am given three web services within two projects as follows: XWs AService.asmx YWs BService.svc CService.svc What would use as the Service Reference Name & Namespace for AService, BService and CService ? In general, I'd like something in ...

how is seam proxying classes

seam actually proxies every class for interception. is there a difference between proxied classes and proxied classes that implement interfaces?? f.e. like in spring where a proxy instance is made implementing all interfaces specified in the class. has someone any performance experiences between java.lang.reflect.Proxy vs. cglib or java...

Alternatives to wsdl.exe for creating proxy classes from wsdl

wsdl.exe, appears to be the default tool for .Net to generate proxy class from wsdl. It has known problems (see here and here, also some SO questions). Is there an alternative proxy class generator? I am not doing WCF, so tools such as svcutil.exe may not be usable. ...

How to add attributes to properties of a class generated (web service proxy)?

I have a Silverlight 3 application which gets data from a web service. When I add a reference to my web service, all the classes used by the web service are defined in a proxy class. So far, so good... Now, I would like to use the DataForm offered in Silverlight 3. To use that component, I must add metadata to my class (e.g. see code bel...

How do I use a common class between winforms client and web service?

I have inherited a large admin winforms application that shares a 'Common' library of classes for holding data with a web service. The problem I am having is that if I return a populated instance of a class from a web service call then it comes out on the client as a different type and I cannot use the other 'Common' project logic to man...