|
-
March 18th, 2008, 10:41 AM
#1
How to create a SOAP interface from the .NET DLL?
Hello,
Bonjour,
I'm newbie in .NET (I usually program in Java ).
I have received the source code of a .NET DLL (framework 2.0) and I need to migrate the functionality of this DLL into a serveur application written in Java.
To do this I will modify the DLL (written in .NET) to forward all function calls into SOAP requests to my Java Soap application.
The only problem is that this DLL interface is quiet huge and if I can generate a WSDL file from the DLL definition this will help me to save a lot of time.
Then, I'm wondering if there is any possibility to generate a WSDL file from the DLL source code I have.
I don't know if you understand what I mean, this is not so easy to explain... Here below you will find a picture which should help you to understand my problem.
In blue you will see the existing part and in red you will see the part I have to develop.
Thanks in advance for your helps.
Remi.
Last edited by Philipina; March 18th, 2008 at 10:45 AM.
-
March 18th, 2008, 11:29 AM
#2
Re: How to create a SOAP interface from the .NET DLL?
You may be able to do this using WCF (Windows Communication Foundation) but that requires .NET 3.0.
-
March 18th, 2008, 11:35 AM
#3
Re: How to create a SOAP interface from the .NET DLL?
Code:
Question: Is it possible to generate the WSDL file from the source code that I have?
If the .net dll is hosted and exposed by a web service, yes; otherwise, no.
-
March 19th, 2008, 01:59 AM
#4
Re: How to create a SOAP interface from the .NET DLL?
Ok, than I think that my only option is to start creating a webService around my DLL.
Remi,
-
March 20th, 2008, 02:16 AM
#5
Re: How to create a SOAP interface from the .NET DLL?
I have started integrating DLL functions into a webservice and for some functions I get an error saying : .....cannot be serialized because it does not have a parameterless constructor
For example with the code
---------------------------------------------
<WebMethod()> _
Public Function Connect(ByVal conParam As ConnectionDLL.ConnectionParameters) As Boolean
...
Return True
End Function
--------------------------------------------
I get
ConnectionDLL.ConnectionParameters cannot be serialized because it does not have a parameterless constructor.
Does any one of you know how to solve this problem?
Thanks in advance for your help.
Remi.
-
March 20th, 2008, 03:48 AM
#6
Re: How to create a SOAP interface from the .NET DLL?
Do you have the source code for the Connection.dll? It appears you've got a class there called ConnectionParameters. What you are seeking to do is to develop Xml web services right? That means that all the data types that appear in the interface (web methods) should be fit for xml serialisation. One of the constraints for a class it that it must have the default parameterless constructor otherwise it wont be serializable. Here's an example in C#
Code:
[Serializable]
public class ConnectionParameters
{
// this is the parameterless constructor
public ConnectionParameters()
{
}
}
By the way are writing your web services in VB.NET? I've got nothing against but I would have thought you'd find the C# syntax easier on they eye
-
March 20th, 2008, 04:31 AM
#7
Re: How to create a SOAP interface from the .NET DLL?
Ok, thanks I understand now.
you'd find the C# syntax easier on they eye ....
Yes, but I did not find any example showing how to create a webService in C# with .NET framework 2.0
Do you know where can I find such exmaple.
-
March 20th, 2008, 05:13 AM
#8
Re: How to create a SOAP interface from the .NET DLL?
I'm sure there are many examples out there but I would start with MSDN library. Here's a link to one of their articles...
Walkthrough: Creating XML Web Services using Visual Basic or Visual C#
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|