toolkit: Mono C#

<toolkit 
   xml:id="Mono_11136_cs"
   name="Mono"
   version="1.1.13.6"
   language="C#"
   uri="http://go-mono.com/archive/1.1.13.6/download/"
   license="LGPL/GPL/X11">

   <instructions>
      The genit script creates 'service.asmx' from the given WSDL URI. 
      This may then be run using 'xsp --verbose'
   </instructions>

   <script name="genit"><![CDATA[

#!/bin/bash
wsdl=$1
$TOOLKITDIR/bin/wsdl -server -out:service.cs $wsdl
service=$(awk '/: System.Web.Services.WebService {/ { print $4 }' service.cs)
{
  echo "<%@ WebService Language='C#'  Class='$service' %>"
  sed -e 's/ abstract / /' -e '/ echo/s/;$/{ return; }/'  < service.cs
} > service.asmx

]]></script>

</toolkit>


Example service file:

<%@ WebService Language='C#'  Class='ElementCollectionProductService' %>
// ------------------------------------------------------------------------------
//  <autogenerated>
//      This code was generated by a tool.
//      Mono Runtime Version: 1.1.4322.2032
//
//      Changes to this file may cause incorrect behavior and will be lost if
//      the code is regenerated.
//  </autogenerated>
// ------------------------------------------------------------------------------

//
// This source code was auto-generated by Mono Web Services Description Language Utility
//

/// <remarks/>
[System.Web.Services.WebServiceAttribute(Namespace="http://www.w3.org/2002/ws/databinding/patterns/6/05/Collection/ElementCollectionProduct/wsdl")]
[System.Web.Services.WebServiceBinding(Name="ElementCollectionProductPort", Namespace="http://www.w3.org/2002/ws/databinding/patterns/6/05/Collection/ElementCollectionProduct/wsdl")]
public class ElementCollectionProductService : System.Web.Services.WebService {

    [System.Web.Services.WebMethodAttribute()]
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare, Use=System.Web.Services.Description.SoapBindingUse.Literal)]
    public void echoElementCollectionProduct([System.Xml.Serialization.XmlElement(Namespace="http://www.w3.org/2002/ws/databinding/patterns/6/05/Collection")] ref Product elementCollectionProduct){ return; }
}

/// <remarks/>
[System.Xml.Serialization.XmlType(Namespace="http://www.w3.org/2002/ws/databinding/patterns/6/05/Collection")]
[System.Xml.Serialization.XmlRoot("elementCollectionProduct", Namespace="http://www.w3.org/2002/ws/databinding/patterns/6/05/Collection")]
public class Product {

    /// <remarks/>
    public string name;

    /// <remarks/>
    public string shade;

    /// <remarks/>
    public int length;

    /// <remarks/>
    [System.Xml.Serialization.XmlAttribute()]
    public string id;

    /// <remarks/>
    [System.Xml.Serialization.XmlAttribute()]
    public int inStock;

    /// <remarks/>
    [System.Xml.Serialization.XmlIgnore()]
    public bool inStockSpecified;
}
==========


 

Received on Tuesday, 27 June 2006 11:43:53 UTC