Can't compile slSvcUtil generated code, again

A long time ago, slSvcUtil didn’t generate the right stuff. Now, I had to regenerate the service interface code again on a different project and this one seems really messed up. For one thing, NONE of the datacontract classes got generated. (I can see them in the wsdl output.)

And I get a bunch of duplicates and a bunch of identifiers that start with a “.”.

Here is an example of the generated code for the interface:

type
    [System.CodeDom.Compiler.GeneratedCodeAttribute('System.ServiceModel', '4.0.0.0')]
    [System.ServiceModel.ServiceContractAttribute(&Namespace := 'http://www.swtechnologies.com/VSDS', ConfigurationName := 'IVSDSRestService')]
    IVSDSRestService = public interface
    [System.ServiceModel.OperationContractAttribute(AsyncPattern := true, Action := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/ValidateLogin', ReplyAction := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/ValidateLoginResponse')]
    method BeginValidateLogin(callback: System.AsyncCallback; asyncState: System.Object): System.IAsyncResult;
    method EndValidateLogin(&result: System.IAsyncResult): System.Int32;
    [System.ServiceModel.OperationContractAttribute(AsyncPattern := true, Action := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/GetVSDSInfo', ReplyAction := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/GetVSDSInfoResponse')]
    method BeginGetVSDSInfo(includeGuestsInPersonListString: System.String; standardMapsOnlyString: System.String; callback: System.AsyncCallback; asyncState: System.Object): System.IAsyncResult;
    method EndGetVSDSInfo(&result: System.IAsyncResult): VSDS.Data.DataContracts.VSDSInfo;
    [System.ServiceModel.OperationContractAttribute(AsyncPattern := true, Action := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/SaveSurveys', ReplyAction := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/SaveSurveysResponse')]
    method BeginSaveSurveys(surveys: array of VSDS.Data.DataContracts.SurveyHeader; callback: System.AsyncCallback; asyncState: System.Object): System.IAsyncResult;
    method EndSaveSurveys(&result: System.IAsyncResult): VSDS.Data.DataContracts.VSDSError;
    [System.ServiceModel.OperationContractAttribute(AsyncPattern := true, Action := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/GetVSDSSettings', ReplyAction := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/GetVSDSSettingsResponse')]
    method BeginGetVSDSSettings(callback: System.AsyncCallback; asyncState: System.Object): System.IAsyncResult;
    method EndGetVSDSSettings(&result: System.IAsyncResult): VSDS.Settings.VSDSSettings;
end;

And later in the file, I find this:

type
[System.CodeDom.Compiler.GeneratedCodeAttribute('System.ServiceModel', '4.0.0.0')]
[System.ServiceModel.ServiceContractAttribute(&Namespace := 'http://www.swtechnologies.com/VSDS', ConfigurationName := 'IVSDSRestService')]
.IVSDSRestService = public interface
    [System.ServiceModel.OperationContractAttribute(AsyncPattern := true, Action := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/ValidateLogin', ReplyAction := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/ValidateLoginResponse')]
    method BeginValidateLogin(callback: System.AsyncCallback; asyncState: System.Object): System.IAsyncResult;
    method EndValidateLogin(&result: System.IAsyncResult): System.Int32;
    [System.ServiceModel.OperationContractAttribute(AsyncPattern := true, Action := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/GetVSDSInfo', ReplyAction := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/GetVSDSInfoResponse')]
    method BeginGetVSDSInfo(includeGuestsInPersonListString: System.String; standardMapsOnlyString: System.String; callback: System.AsyncCallback; asyncState: System.Object): System.IAsyncResult;
    method EndGetVSDSInfo(&result: System.IAsyncResult): VSDS.Data.DataContracts.VSDSInfo;
    [System.ServiceModel.OperationContractAttribute(AsyncPattern := true, Action := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/SaveSurveys', ReplyAction := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/SaveSurveysResponse')]
    method BeginSaveSurveys(surveys: array of VSDS.Data.DataContracts.SurveyHeader; callback: System.AsyncCallback; asyncState: System.Object): System.IAsyncResult;
    method EndSaveSurveys(&result: System.IAsyncResult): VSDS.Data.DataContracts.VSDSError;
    [System.ServiceModel.OperationContractAttribute(AsyncPattern := true, Action := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/GetVSDSSettings', ReplyAction := 'http://www.swtechnologies.com/VSDS/IVSDSRestService/GetVSDSSettingsResponse')]
    method BeginGetVSDSSettings(callback: System.AsyncCallback; asyncState: System.Object): System.IAsyncResult;
    method EndGetVSDSSettings(&result: System.IAsyncResult): VSDS.Settings.VSDSSettings;
end;

Note the “.” at the front of IVTSRestService in the “duplicate” one.

The version of the compiler I am using is: 9.0.97.2071

Does this version not work correctly with slSvcUtil?

(oh, the Silverlight version is 5.0 with .net 4.5)

I switched back to version 8.3.95.2031 and the slSvcUtil generated code looks okay, so far. No duplicate interfaces, and datacontract classes are there.

Is this something that will be fixed?

Hello!
Could you write steps for reproducing this issue?
What command line/test service should I use to test it?

Thanks in advance!

Here is the bat file line that creates the interfaces:

slSvcUtil https://localhost/VSDSRest/Service.svc?wsdl /language:Oxygene /directory:“C:\Users\Mark\Documents\Visual Studio 2013\Projects\SW\VSDSRest\VSDSRest” /config:c:\temp\ServiceReferences /serializer:DataContractSerializer /enableDataBinding

I don’t have a sample application that I can zip up for you. I’m in the middle of a lot of “hot issues” right now so I can’t make something now.

However, I would assume that some part of the compiler is responsible for outputting the interface code as requested by slSvcUtil. If so, maybe you could compare what changed in that area between the new version that doesn’t work and the old version that does.

Do you still need stuff from me, or were you able to reproduce the problem already?

Hello!

Could you please try that issue with last beta and let us know if it works for you? I can’t reproduce your issue here with last build.

Thanks in advance!

ok, might not be able to do that until Monday

I tried it with the latest beta and get similar error results. version 9.1.100.2119

Any new word on this? It still doesn’t seem to work with slSvcUtil using the 9.0.97.2071 version of Oxygene. And 9.1.100.2119 I couldn’t use for some OTHER reason (that doesn’t pop in my head right now)

Well, its it’s broken in 9.0.97.2071, then that’s not gonna change, its gonna keep being broken in that version. But i can’t consolidate your last two messages. did you test with 9.1.100.2119 (or later), or can’t you use 9.1.100.2119? the issue does not reproduce here for us, with latest.

I didn’t mean that I expected it to change :slight_smile:

Just that I still have that problem. I’ll give 9.1.100.2119 another try, but my recollection was that it was even more broken than the 9.0.97.2071 was.

I’ll uninstall the 8.x version and try 9.0.97.2071 again, but I’m sure I’m not using that one now because something was broken. But by trying it again, I’ll find out what it was.

ok, but whatever is broken there is not gonna magically report itself, unless you let uw know what is broken for buy in the beta ;). .2129 is the latest, i suggest using that.

thanx,
marc

More details as to what exactly you run slSvcUtil on might of course also help reproduce the problem, should it still persist with latest.

I installed that latest beta ( .2129 ), ran the slsvcutil and got the same kind of errors originally reported. My first post shows the kind of errors that are generated.

I’m not exactly sure what you mean when you ask “what exactly you run slSvcUtil on”. Do you mean the machine, the OS, the SL version, the service that it processes, or something else?

But in the first few posts, I gave the example output and showed the slSvcUtil command and its parameters.

This new .2129 version still generates 1000+ errors (including the first one reported in the first post) when I try to regenerate the service interface using slSvcUtil.

I just uninstalled the 9.x.x.2129 version and reinstalled the 8.3.95.2031 and executed the slSvcUtil again. Now the generated service code compiles just fine.

I thought of something that might be confusing the code generator. I want to be generating both a WCF and a Rest service endpoint.

Here is an example of the markup.

 [OperationContract] 
 [WebGet(UriTemplate  := "VSDSInfo?includeGuestsInPersonList={includeGuestsInPersonListString}&standardMapsOnly={standardMapsOnlyString}&returnTemplates={returnTemplatesString}" )]
 function  GetVSDSInfo( includeGuestsInPersonListString : String := '0'; standardMapsOnlyString : String := '1'; returnTemplatesString : String := '0' ): VSDSInfo;

I wonder if that combination of attributes is confusing anything?

Yes, but what input do you run it with? surely that will matter?

I’m sorry Marc, I don’t think I’m understanding what you are asking. The 5th post or so in this thread showed the slSvcUtil command and its inputs. If you are asking where it came from, it is code I wrote in Oxygene. And two posts back shows a typical interface in the service.

ok. so what is https://localhost/VSDSRest/Service.svc?wsdl? what does it look like? obviously the content of the WSDL you’re importing would affect the code thats generated, and iff you are seeing problems that we cannot reproduce, it stands to reason that the exact WSDL you are using might be a factor?