[MonoDevelop] Creating asmx server stubs file from wsdl
Devin Venable
venable.devin at gmail.com
Wed Sep 1 15:52:00 EDT 2010
Here's what I'm trying to do. I have a wsdl that describes the SOAP
interface that I need to implement, as a server, in mono.
In the past I've successfully deployed simple web services by creating asmx
files and running them under Apache via XSP.
Here's what I've tried this time around:
1. Used wsdl2 to generate server stubs.
wsdl2 -server MyServices.wsdl
Web Services Description Language Utility
Mono Framework v2.0.50727.1433
There where some warnings while generating the code:
MyServices.wsdl
- This web reference does not conform to WS-I Basic Profile v1.1
R2718: A wsdl:binding in a DESCRIPTION MUST have the same set of
wsdl:operations as the wsdl:portType to which it refers.
* Binding 'BasicHttpBinding_IMyServices', in Service Description
'http://tempuri.org/'
Help me out with the warning...I'm new to .NET.
2. Renamed resulting cs file to MyServices.asmx
3. Added header to file:
<%@ WebService Language="c#" Codebehind="MyServices.asmx.cs"
Class="MyServices" %>
This KINDA worked. I can load up and view the page in my browser:
http://localhost/MyServices.asmx
But when I try to invoke a method on the service from the web forms that
display, I get a message like:
*500 - Internal Server Error*
System.MissingMethodException: Cannot create an abstract class 'MyServices'.
at System.Activator.CheckAbstractType (System.Type type) [0x00000]
at System.Activator.CreateInstance (System.Type type, Boolean
nonPublic) [0x00000]
at System.Activator.CreateInstance (System.Type type) [0x00000]
at System.Web.Services.Protocols.WebServiceHandler.CreateServerInstance
() [0x00000]
at System.Web.Services.Protocols.HttpSimpleWebServiceHandler.Invoke
(System.Web.Services.Protocols.LogicalMethodInfo method,
System.Object[] parameters) [0x00000]
at System.Web.Services.Protocols.HttpSimpleWebServiceHandler.ProcessRequest
(System.Web.HttpContext context) [0x00000]
So that's where my experimentation landed me. I'm guessing that my next
step is to implement the abstract classes created by the stub the compiler
generated. So...where to do this? In the same directory? And then how will
I know which methods need to be overridden? Finally, how can monodevelop
make what I'm trying to do a bit easier?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20100901/5dbc0038/attachment.html
More information about the Monodevelop-list
mailing list