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)