473,394 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 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 2679
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.