Main Site Documentation

DPWS : WSDL and CS generation with MFSVCUTIL.exe (SDK 4.1)


#1

Hi all,

Does anyone encountered a problem while generating wsdl and/or cs with MFSVCUTIL ???

In my case, I produced a very simple implementation of the following :


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace WCFServerConsole
{
    [ServiceContract]
    public interface IServiceContract
    {
        [OperationContract]
        string GetCards(string systime);
    }

...

    public class ServiceContract : IServiceContract
    {
        string IServiceContract.GetCards(string systime)
        {
            return ("4434287047,4434288788,4434284743,4434287163");
        }
    }

}

It normally give a list of values…

The purpose would be to have a PC running WCF server, and a MF client requesting the method, so that I decided to parse the given assembly with MFCUTIL to generate the wsdl and cs source related to, such as in one of the given samples from microsoft…

But, however the wsdl is apparently correctly generated by the tool, it is not the case with the CS generation (from the wsdl)…

I have a list of warning (in verbose mode), and finally an exception on the GetValuesIn parameter, but when I look to the wsdl, I do not understand why…

Scrolling to the top verbose in my command prompt, I see that the tool is unable to resolve the schema definitions…Does it mean that something is missing ?

I have the same problem if I try to parse the sample ServiceHelloWorld.wsdl file…

Any idea


#2

One more Information : ULTRA important :

If I remove the string parameter (no param at all) on the method, the generation is OK !!!

The problem occur with every simple parameters (string, datetime, and so on…).

SO, if you want to solve the problem (walk around), just implement a DataContract class that will contain the params you want to pass, and pass this class to your method. It will pass thru the generation correctly…

Murphy low nbr 2 : Why do simple when you can do complex :slight_smile:

Can be marked as solved with work around !!!


#3

DPWS is the thing that is used the least on NETMF, so it is not easy to find a lot of details and possibility of bugs is larger than other parts of NETMF.

I would suggest you stick to the tools and emulator for trying things and if there is an issue, try to get some details directly from Microsoft, www.netmf.com
Once that is working, move the code to the device and at that point will will be able to help further.


#4

Hi Gus,

I effectively posted on NETMF, so that I’m having discussions with Microsoft on that point…

I guess that if I finally succeed in generating the CS classes, it wont be a problem then on the device…For thie reason, I posted on the “General Discussion” intstead of CHIPWORKX… AM I right doing this ?

I will feedback when all is on the run…

Thanks


#5

You are fine posting here or on chipworkx since this is related to both.

Please keep us posted.


#6

Hi All,

Just to tell that the Bug report to MIcrosoft has shown the problem with MFCUTIL is well known and will probably be solved in the 4.2…