[IronPython] WCF Service Contracts implemented using IronPython
Anthony Tarlano
mailinglist.account at gmail.com
Sun Feb 26 17:03:12 CET 2006
Hi,
I just downloaded the Feb CTP WinFx SDK and I was working my way
through the WCF documentation. My goal is to create a WCF service
using IronPython.
>From the tutorial they show the following C# code as an example of a
ServiceContract.
namespace Microsoft.ServiceModel.Samples
{
using System;
using System.ServiceModel;
[ServiceContract(Namespace = "http://Microsoft.ServiceModel.Samples")]
public interface ICalculator
{
[OperationContract]
double Add(double n1, double n2);
[OperationContract]
double Subtract(double n1, double n2);
[OperationContract]
double Multiply(double n1, double n2);
[OperationContract]
double Divide(double n1, double n2);
}
}
I used csc to compile it into a DLL assembly, successfully used the
clr.Add.. methods to access the interface, and Implemented the
operations in python.
But what I would really like to do next is translate the service
contract code from above and use a python class and skip the step of
using C# to define my WCF ServiceContracts and the csc compiler.
My question to the group is how would I add the ServiceContract and
OperationContract declarative attributes to a python class?
Thanks,
A.
More information about the Ironpython-users
mailing list