472,791 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,791 software developers and data experts.

Remoting Class From Seperate DLL

I have a class in a seperate dll which I want to remote. I have referenced
the class and registered it using a simple exe. I can connect to the class's
interface using Activator.GetObject and call it's methods. However, when I
use soapsuds to extract meta data, I get the following error:

Error: Unable to retrieve schema from url:
http://localhost:1234/RemoteObject.soap?WSDL, The remote server returned an
error: (500) Internal Server Error.

Browser response is below. What am I doing wrong? Thanks.

System.NullReferenceException: Object reference not set to an instance of an
object. at
System.Runtime.Remoting.MetadataServices.RealSchem aType.Resolve(StringBuilde
r sb) at System.Runtime.Remoting.MetadataServices.XMLNamesp ace.Resolve() at
System.Runtime.Remoting.MetadataServices.WsdlGener ator.Resolve() at
System.Runtime.Remoting.MetadataServices.WsdlGener ator.Generate() at
System.Runtime.Remoting.MetadataServices.SUDSGener ator.Generate() at
System.Runtime.Remoting.MetadataServices.MetaData. ConvertTypesToSchemaToStre
am(ServiceType[] serviceTypes, SdlType sdlType, Stream outputStream) at
System.Runtime.Remoting.MetadataServices.SdlChanne lSink.GenerateSdl(SdlType
sdlType, IServerResponseChannelSinkStack sinkStack, ITransportHeaders
requestHeaders, ITransportHeaders responseHeaders, Stream& outputStream) at
System.Runtime.Remoting.MetadataServices.SdlChanne lSink.ProcessMessage(IServ
erChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders
requestHeaders, Stream requestStream, IMessage& responseMsg,
ITransportHeaders& responseHeaders, Stream& responseStream) at
System.Runtime.Remoting.Channels.Http.HttpServerTr ansportSink.ServiceRequest
(Object state) at
System.Runtime.Remoting.Channels.SocketHandler.Pro cessRequestNow()
Nov 16 '05 #1
8 2649
Hi, using soapsuds is not good idea. There are a lot of problems with
this. I'd recomend you to use abstract class or interface approach.

Sunny
In article <eW*************@TK2MSFTNGP11.phx.gbl>, ri******@rogge.co.uk
says...
I have a class in a seperate dll which I want to remote. I have referenced
the class and registered it using a simple exe. I can connect to the class's
interface using Activator.GetObject and call it's methods. However, when I
use soapsuds to extract meta data, I get the following error:

Error: Unable to retrieve schema from url:
http://localhost:1234/RemoteObject.soap?WSDL, The remote server returned an
error: (500) Internal Server Error.

Browser response is below. What am I doing wrong? Thanks.

System.NullReferenceException: Object reference not set to an instance of an
object. at
System.Runtime.Remoting.MetadataServices.RealSchem aType.Resolve(StringBuilde
r sb) at System.Runtime.Remoting.MetadataServices.XMLNamesp ace.Resolve() at
System.Runtime.Remoting.MetadataServices.WsdlGener ator.Resolve() at
System.Runtime.Remoting.MetadataServices.WsdlGener ator.Generate() at
System.Runtime.Remoting.MetadataServices.SUDSGener ator.Generate() at
System.Runtime.Remoting.MetadataServices.MetaData. ConvertTypesToSchemaToStre
am(ServiceType[] serviceTypes, SdlType sdlType, Stream outputStream) at
System.Runtime.Remoting.MetadataServices.SdlChanne lSink.GenerateSdl(SdlType
sdlType, IServerResponseChannelSinkStack sinkStack, ITransportHeaders
requestHeaders, ITransportHeaders responseHeaders, Stream& outputStream) at
System.Runtime.Remoting.MetadataServices.SdlChanne lSink.ProcessMessage(IServ
erChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders
requestHeaders, Stream requestStream, IMessage& responseMsg,
ITransportHeaders& responseHeaders, Stream& responseStream) at
System.Runtime.Remoting.Channels.Http.HttpServerTr ansportSink.ServiceRequest
(Object state) at
System.Runtime.Remoting.Channels.SocketHandler.Pro cessRequestNow()

Nov 16 '05 #2
I would recommend switching to an abstract class or interface based
approach. See examples in my article here

http://www.glacialcomponents.com/Art...D=RemoteObject
Allen Anderson
http://www.glacialcomponents.com
mailto: allen@put my website url here.com
On Tue, 18 May 2004 08:44:27 +0100, "Richard Bell"
<ri******@rogge.co.uk> wrote:
I have a class in a seperate dll which I want to remote. I have referenced
the class and registered it using a simple exe. I can connect to the class's
interface using Activator.GetObject and call it's methods. However, when I
use soapsuds to extract meta data, I get the following error:

Error: Unable to retrieve schema from url:
http://localhost:1234/RemoteObject.soap?WSDL, The remote server returned an
error: (500) Internal Server Error.

Browser response is below. What am I doing wrong? Thanks.

System.NullReferenceException: Object reference not set to an instance of an
object. at
System.Runtime.Remoting.MetadataServices.RealSche maType.Resolve(StringBuilde
r sb) at System.Runtime.Remoting.MetadataServices.XMLNamesp ace.Resolve() at
System.Runtime.Remoting.MetadataServices.WsdlGene rator.Resolve() at
System.Runtime.Remoting.MetadataServices.WsdlGene rator.Generate() at
System.Runtime.Remoting.MetadataServices.SUDSGene rator.Generate() at
System.Runtime.Remoting.MetadataServices.MetaData .ConvertTypesToSchemaToStre
am(ServiceType[] serviceTypes, SdlType sdlType, Stream outputStream) at
System.Runtime.Remoting.MetadataServices.SdlChann elSink.GenerateSdl(SdlType
sdlType, IServerResponseChannelSinkStack sinkStack, ITransportHeaders
requestHeaders, ITransportHeaders responseHeaders, Stream& outputStream) at
System.Runtime.Remoting.MetadataServices.SdlChann elSink.ProcessMessage(IServ
erChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders
requestHeaders, Stream requestStream, IMessage& responseMsg,
ITransportHeaders& responseHeaders, Stream& responseStream) at
System.Runtime.Remoting.Channels.Http.HttpServerT ransportSink.ServiceRequest
(Object state) at
System.Runtime.Remoting.Channels.SocketHandler.Pr ocessRequestNow()


Nov 16 '05 #3
Thanks for your comments, but I want to use the 'new' operator and configure
remoting using the standard framework. The reason it was failing is that my
object exposed an interface which was contained in a separate dll. I have
moved the interface to the server dll and it all works fine. However, I have
2 questions for the group
1) I understood from the Soapsuds docs that classes for the assembly and
referenced assemblies would be imported. This does not appear to be the
case. Can this be forced?
2) Attributes assigned to the objects are not exported in the output
assembly/code. Is it possible to enforce this?
Thanks.
Nov 16 '05 #4
Hi Richard,

as a general, I do not recomend to use soapsuds. It's the less scalable
method. Try using abstract classes or interfaces in a separate assembly.

Sunny

In article <#1**************@TK2MSFTNGP10.phx.gbl>, ri******@rogge.co.uk
says...
Thanks for your comments, but I want to use the 'new' operator and configure
remoting using the standard framework. The reason it was failing is that my
object exposed an interface which was contained in a separate dll. I have
moved the interface to the server dll and it all works fine. However, I have
2 questions for the group
1) I understood from the Soapsuds docs that classes for the assembly and
referenced assemblies would be imported. This does not appear to be the
case. Can this be forced?
2) Attributes assigned to the objects are not exported in the output
assembly/code. Is it possible to enforce this?
Thanks.

Nov 16 '05 #5
Why is it less scaleable?
Nov 16 '05 #6
Lets say, that you find some problem in the server object. You have to
correct this. And now you have a new class. All remoting clients will
fail to use it, unless you recompile them with the new meta data,
extracted from the new class. Even replacing only 50 clients can be a
lot of pain.

And if to search in the newsgroups, you will find a lot of problems
experienced by people, using soapsuds.

Using interfaces, if you do not change the interface assembly, clients
does not have to be touched, they will work with every class which
implements the well known interface.

Or, let's say, you are ready for version 2. You create a new interface,
which extends the previous one. And your server object implements it as
well. Now, the old clients will continue to work using the old
interface, and the new clients, with richer functionality, will use the
new one.

I think that only these 2 reasons are enough.

Sunny

In article <#8**************@TK2MSFTNGP12.phx.gbl>, ri******@rogge.co.uk
says...
Why is it less scaleable?

Nov 16 '05 #7
OK, thanks, but I do not think that your comments relate to saleability but
to deployment. Even so, I am not sure that I entirely agree with you.

1. You can control how versioning is implemented in the serialization of
calls using the 'includeVersions' and 'strictBinding' attributes of the
formatter element. As long as you do not change the signature of the method
and configure versioning correctly, server rebuilds need not break the
client. The server side execution of Invoke should continue to work. You
only have issues with strongly named assemblies where versioning appears to
be enforced for the binary formatter, but you can get round this, if you
want to (but should you?).
2. Using the 'new' operator does not preclude you from using
interfaces/abstract classes on the client. The issue relates to how the
reference to the remote proxy is obtained. In the 'interface only case', the
location of the 'CoClass' is either hardcoded into the app or obtained by
some custom method. In the case of soapsuds, it is obtained by the framework
method.
3. You are not precluded from implementing a v2 interface type framework
using soapsuds. However, using the 'interface only method' can cause
problems in deployment. You cannot force 'old' clients to use the 'old'
assembly since the 'new' assembly will be listening on the same socket the
'old' client is talking to, and, you might want to (ie back to DLL hell).
The Soapsuds framework does allow you to control versioning precisely. In
fact I believe that it was designed with that intent in mind.

So there are pros and cons. However, it seems to me that soapsuds satisfies
the "location transparency" goal of a remoting framework in that neither the
server nor client objects need to know whether they are being remoted or in
fact whether they are being called by a remote object at all.
Nov 16 '05 #8
Its more of a deployment issue as opposed to a scalability issue isnt it ;)

Sunny wrote:
Lets say, that you find some problem in the server object. You have to
correct this. And now you have a new class. All remoting clients will
fail to use it, unless you recompile them with the new meta data,
extracted from the new class. Even replacing only 50 clients can be a
lot of pain.

And if to search in the newsgroups, you will find a lot of problems
experienced by people, using soapsuds.

Using interfaces, if you do not change the interface assembly, clients
does not have to be touched, they will work with every class which
implements the well known interface.

Or, let's say, you are ready for version 2. You create a new interface,
which extends the previous one. And your server object implements it as
well. Now, the old clients will continue to work using the old
interface, and the new clients, with richer functionality, will use the
new one.

I think that only these 2 reasons are enough.

Sunny

In article <#8**************@TK2MSFTNGP12.phx.gbl>, ri******@rogge.co.uk
says...
Why is it less scaleable?


--
Regards,
Dilip Krishnan
MCAD, MCSD.net
dilipdotnet at apdiya dot com
Nov 16 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Patty O'Dors | last post by:
Hi I posted a similar question like this to a reply to another thread but it wasn't really relevant to that thread and I don't think anybody read it so I'm posting a new one. I'm trying to...
4
by: Uchiha Jax | last post by:
Hello everyone, I am a plenty silly person who is trying to learn .NET remoting through trial and error (all articles I read are going over my head at the moment (mostly) so I thought i'd give...
0
by: David Stevenson | last post by:
If anyone else is having the error Unhandled Exception: System.InvalidCastException: Return argument has an invalid type. when calling a method on a remote object that returns a complex data type...
2
by: Sharon | last post by:
I have a Form class that can be open by parent Form or by .NET Remoting command. When the parent Form opens the Form - All fine ! But when the .NET Remoting command is trying to Show the Form, the...
2
by: matthew_glen_evans | last post by:
Hi there, Quick one about interfaces in c#. It seems that it is illegal to declare types within an interface. I was quite used to doing this in VB.net where the interface can define a...
0
by: anilkoli | last post by:
A. Whether following by using remoting One application is running, and one object is instantiated of a any class from that. Is it possible to get access to that object through another...
8
by: nyhetsgrupper | last post by:
I have written a windows service and want to expose a web based user interface for this service. I then wrote a class library containing a ..net remoting server. The class library have a method...
1
by: Derrick | last post by:
Hello all; I'm having a bit of trouble with .NET remoting. Here's my scenario: I have a "remotable" type which is served by a Windows Service. I have a WinForms app which consumes the...
2
by: erbilkonuk | last post by:
Hi, I am very new to .NET Remoting and I try to run a simple program to subscribe to an event raised by Remoting Class. The Remoting Server initiates an instance of Remoting Class as Singleton /...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.