[Mono-list] Webservice problem

Andreas Färber andreas.faerber at web.de
Thu Mar 16 13:06:50 EST 2006


Hi Bryan,

Now that you've posted some code ...

> namespace Default {
>    using System;
>    using System.IO;
>    using Decisio.Orchestration;
>    using Decisio.Orchestration.Data;
>    using Decisio.Orchestration.Models.Decision;
>    using System.Web.Services;
>
>    public class MyService : System.Web.Services.WebService {
>
>        static DecisionExecutionEngine engine;
>
>        [WebMethod()]
>        public virtual void Execute(string Subject, string PersonName) {
>            Decisio.Orchestration.Data.OrchestrationData data = new
> Decisio.Orchestration.Data.OrchestrationData();
>            data["Subject"] = Subject;
>            data["PersonName"] = PersonName;
>            DecisionExecutionEngine engine = GetEngine();
>            engine.Start(data);
>        }
>
>        public virtual DecisionExecutionEngine GetEngine() {
>            if(engine==null)
> {
> lock(this)
> {
> if(engine==null)
> {
>        // engine = new DecisionExecutionEngine(new
> FileInfo(AppDomain.CurrentDomain.BaseDirectory + "new.Maestro"));
>     engine = new DecisionExecutionEngine(new
> FileInfo(System.IO.Path.GetDirectoryName (Request.PhysicalPath) +
> "new.Maestro"));
... try Path.Combine to build the new path.
> }
> }
> }
> return engine;
>        }
>    }
> }

Andreas


More information about the Mono-list mailing list