Solved

No Constructor defined

Posted on 2011-03-01
13
448 Views
Last Modified: 2012-05-11
Here is a simple code to retrieve value from my webservice,some how i got a error like "No Constructor defined"



namespace DLAWebservice
{

    class Program
    {
        static void Main(string[] args)
        {
            
            Microsoft.SqlServer.ReportingServices2010.ExportEmployeesCompletedEventArgs export = new Microsoft.SqlServer.ReportingServices2010.ExportEmployeesCompletedEventArgs();
            
        }
    }
}

Open in new window


Am calling my webservice and it throws "No constructor Defined" here "Microsoft.SqlServer.ReportingServices2010.ExportEmployeesCompletedEventArgs();"

and this is my proxy webservice file

namespace Microsoft.SqlServer.ReportingServices2010 {
    using System.Diagnostics;
    using System.Web.Services;
    using System.ComponentModel;
    using System.Web.Services.Protocols;
    using System;
    using System.Xml.Serialization;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="DLAImportExportServiceV2Soap", Namespace="https://www.payoffice.biz/")]
    public partial class DLAImportExportServiceV2 : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback ExportEmployeesOperationCompleted;
        
        private System.Threading.SendOrPostCallback ImportEmployeesOperationCompleted;
        
        /// <remarks/>
        public DLAImportExportServiceV2() {
            this.Url = "http://localhost/DLAImportExportServiceV2/DLAImportExportServiceV2.asmx";
        }
        
        /// <remarks/>
        public event ExportEmployeesCompletedEventHandler ExportEmployeesCompleted;
        
        /// <remarks/>
        public event ImportEmployeesCompletedEventHandler ImportEmployeesCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://www.payoffice.biz/ExportEmployees", RequestNamespace="https://www.payoffice.biz/", ResponseNamespace="https://www.payoffice.biz/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public DLAEmployeeExport[] ExportEmployees(string LoginName, string Password, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] System.Nullable<System.DateTime> LastExport, out string ErrorMessage) {
            object[] results = this.Invoke("ExportEmployees", new object[] {
                        LoginName,
                        Password,
                        LastExport});
            ErrorMessage = ((string)(results[1]));
            return ((DLAEmployeeExport[])(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginExportEmployees(string LoginName, string Password, System.Nullable<System.DateTime> LastExport, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("ExportEmployees", new object[] {
                        LoginName,
                        Password,
                        LastExport}, callback, asyncState);
        }
        
        /// <remarks/>
        public DLAEmployeeExport[] EndExportEmployees(System.IAsyncResult asyncResult, out string ErrorMessage) {
            object[] results = this.EndInvoke(asyncResult);
            ErrorMessage = ((string)(results[1]));
            return ((DLAEmployeeExport[])(results[0]));
        }
        
        /// <remarks/>
        public void ExportEmployeesAsync(string LoginName, string Password, System.Nullable<System.DateTime> LastExport) {
            this.ExportEmployeesAsync(LoginName, Password, LastExport, null);
        }
        
        /// <remarks/>
        public void ExportEmployeesAsync(string LoginName, string Password, System.Nullable<System.DateTime> LastExport, object userState) {
            if ((this.ExportEmployeesOperationCompleted == null)) {
                this.ExportEmployeesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnExportEmployeesOperationCompleted);
            }
            this.InvokeAsync("ExportEmployees", new object[] {
                        LoginName,
                        Password,
                        LastExport}, this.ExportEmployeesOperationCompleted, userState);
        }
        
        private void OnExportEmployeesOperationCompleted(object arg) {
            if ((this.ExportEmployeesCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.ExportEmployeesCompleted(this, new ExportEmployeesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://www.payoffice.biz/ImportEmployees", RequestNamespace="https://www.payoffice.biz/", ResponseNamespace="https://www.payoffice.biz/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public DLAEmployeeImportResult[] ImportEmployees(string LoginName, string Password, DLAEmployeeImport[] ToImport, out string ErrorMessage) {
            object[] results = this.Invoke("ImportEmployees", new object[] {
                        LoginName,
                        Password,
                        ToImport});
            ErrorMessage = ((string)(results[1]));
            return ((DLAEmployeeImportResult[])(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginImportEmployees(string LoginName, string Password, DLAEmployeeImport[] ToImport, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("ImportEmployees", new object[] {
                        LoginName,
                        Password,
                        ToImport}, callback, asyncState);
        }
        
        /// <remarks/>
        public DLAEmployeeImportResult[] EndImportEmployees(System.IAsyncResult asyncResult, out string ErrorMessage) {
            object[] results = this.EndInvoke(asyncResult);
            ErrorMessage = ((string)(results[1]));
            return ((DLAEmployeeImportResult[])(results[0]));
        }
        
        /// <remarks/>
        public void ImportEmployeesAsync(string LoginName, string Password, DLAEmployeeImport[] ToImport) {
            this.ImportEmployeesAsync(LoginName, Password, ToImport, null);
        }
        
        /// <remarks/>
        public void ImportEmployeesAsync(string LoginName, string Password, DLAEmployeeImport[] ToImport, object userState) {
            if ((this.ImportEmployeesOperationCompleted == null)) {
                this.ImportEmployeesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnImportEmployeesOperationCompleted);
            }
            this.InvokeAsync("ImportEmployees", new object[] {
                        LoginName,
                        Password,
                        ToImport}, this.ImportEmployeesOperationCompleted, userState);
        }
        
        private void OnImportEmployeesOperationCompleted(object arg) {
            if ((this.ImportEmployeesCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.ImportEmployeesCompleted(this, new ImportEmployeesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        public new void CancelAsync(object userState) {
            base.CancelAsync(userState);
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="https://www.payoffice.biz/")]
    public partial class DLAEmployeeExport {
        
        private string referenceIDField;
        
        private string cMSInitialsField;
        
        private string preferredNameField;
        
        private string middleNameField;
        
        private string surnameField;
        
        private string titleField;
        
        private string suffixField;
        
        private string sexField;
        
        private string positionDescriptionField;
        
        private string suggestedPERSTypeField;
        
        private int employeeNumberField;
        
        private System.Nullable<System.DateTime> startDateField;
        
        private System.Nullable<System.DateTime> previouslyHiredField;
        
        private System.Nullable<System.DateTime> terminationDateField;
        
        private System.Nullable<System.DateTime> previouslyTerminatedField;
        
        private System.Nullable<System.DateTime> admissionDateField;
        
        private string officeField;
        
        private string departmentField;
        
        private string locationField;
        
        private string holidayGroupField;
        
        private System.Nullable<int> reportsToField;
        
        private System.Nullable<decimal> fTEPercentageField;
        
        private string workerTypeField;
        
        private string positionField;
        
        private System.Nullable<System.DateTime> birthDateField;
        
        private int payPointField;
        
        private string residentialAddress1Field;
        
        private string residentialAddress2Field;
        
        private string residentialAddress3Field;
        
        private string residentialPostCodeField;
        
        private string homePhoneField;
        
        private string cardIDField;
        
        private string referralSourceField;
        
        private string highestEducationLevelField;
        
        private decimal standardHoursPerWeekField;
        
        private string positionStatusField;
        
        private string positionCategoryField;
        
        private System.Nullable<System.DateTime> serviceReferenceDateField;
        
        private decimal initialYearsAtDLALevelField;
        
        private string postitionGroupField;
        
        private string payLocationField;
        
        private System.DateTime modifiedAtField;
        
        /// <remarks/>
        public string ReferenceID {
            get {
                return this.referenceIDField;
            }
            set {
                this.referenceIDField = value;
            }
        }
        
        /// <remarks/>
        public string CMSInitials {
            get {
                return this.cMSInitialsField;
            }
            set {
                this.cMSInitialsField = value;
            }
        }
        
        /// <remarks/>
        public string PreferredName {
            get {
                return this.preferredNameField;
            }
            set {
                this.preferredNameField = value;
            }
        }
        
        /// <remarks/>
        public string MiddleName {
            get {
                return this.middleNameField;
            }
            set {
                this.middleNameField = value;
            }
        }
        
        /// <remarks/>
        public string Surname {
            get {
                return this.surnameField;
            }
            set {
                this.surnameField = value;
            }
        }
        
        /// <remarks/>
        public string Title {
            get {
                return this.titleField;
            }
            set {
                this.titleField = value;
            }
        }
        
        /// <remarks/>
        public string Suffix {
            get {
                return this.suffixField;
            }
            set {
                this.suffixField = value;
            }
        }
        
        /// <remarks/>
        public string Sex {
            get {
                return this.sexField;
            }
            set {
                this.sexField = value;
            }
        }
        
        /// <remarks/>
        public string PositionDescription {
            get {
                return this.positionDescriptionField;
            }
            set {
                this.positionDescriptionField = value;
            }
        }
        
        /// <remarks/>
        public string SuggestedPERSType {
            get {
                return this.suggestedPERSTypeField;
            }
            set {
                this.suggestedPERSTypeField = value;
            }
        }
        
        /// <remarks/>
        public int EmployeeNumber {
            get {
                return this.employeeNumberField;
            }
            set {
                this.employeeNumberField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public System.Nullable<System.DateTime> StartDate {
            get {
                return this.startDateField;
            }
            set {
                this.startDateField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public System.Nullable<System.DateTime> PreviouslyHired {
            get {
                return this.previouslyHiredField;
            }
            set {
                this.previouslyHiredField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public System.Nullable<System.DateTime> TerminationDate {
            get {
                return this.terminationDateField;
            }
            set {
                this.terminationDateField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public System.Nullable<System.DateTime> PreviouslyTerminated {
            get {
                return this.previouslyTerminatedField;
            }
            set {
                this.previouslyTerminatedField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public System.Nullable<System.DateTime> AdmissionDate {
            get {
                return this.admissionDateField;
            }
            set {
                this.admissionDateField = value;
            }
        }
        
        /// <remarks/>
        public string Office {
            get {
                return this.officeField;
            }
            set {
                this.officeField = value;
            }
        }
        
        /// <remarks/>
        public string Department {
            get {
                return this.departmentField;
            }
            set {
                this.departmentField = value;
            }
        }
        
        /// <remarks/>
        public string Location {
            get {
                return this.locationField;
            }
            set {
                this.locationField = value;
            }
        }
        
        /// <remarks/>
        public string HolidayGroup {
            get {
                return this.holidayGroupField;
            }
            set {
                this.holidayGroupField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public System.Nullable<int> ReportsTo {
            get {
                return this.reportsToField;
            }
            set {
                this.reportsToField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public System.Nullable<decimal> FTEPercentage {
            get {
                return this.fTEPercentageField;
            }
            set {
                this.fTEPercentageField = value;
            }
        }
        
        /// <remarks/>
        public string WorkerType {
            get {
                return this.workerTypeField;
            }
            set {
                this.workerTypeField = value;
            }
        }
        
        /// <remarks/>
        public string Position {
            get {
                return this.positionField;
            }
            set {
                this.positionField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public System.Nullable<System.DateTime> BirthDate {
            get {
                return this.birthDateField;
            }
            set {
                this.birthDateField = value;
            }
        }
        
        /// <remarks/>
        public int PayPoint {
            get {
                return this.payPointField;
            }
            set {
                this.payPointField = value;
            }
        }
        
        /// <remarks/>
        public string ResidentialAddress1 {
            get {
                return this.residentialAddress1Field;
            }
            set {
                this.residentialAddress1Field = value;
            }
        }
        
        /// <remarks/>
        public string ResidentialAddress2 {
            get {
                return this.residentialAddress2Field;
            }
            set {
                this.residentialAddress2Field = value;
            }
        }
        
        /// <remarks/>
        public string ResidentialAddress3 {
            get {
                return this.residentialAddress3Field;
            }
            set {
                this.residentialAddress3Field = value;
            }
        }
        
        /// <remarks/>
        public string ResidentialPostCode {
            get {
                return this.residentialPostCodeField;
            }
            set {
                this.residentialPostCodeField = value;
            }
        }
        
        /// <remarks/>
        public string HomePhone {
            get {
                return this.homePhoneField;
            }
            set {
                this.homePhoneField = value;
            }
        }
        
        /// <remarks/>
        public string CardID {
            get {
                return this.cardIDField;
            }
            set {
                this.cardIDField = value;
            }
        }
        
        /// <remarks/>
        public string ReferralSource {
            get {
                return this.referralSourceField;
            }
            set {
                this.referralSourceField = value;
            }
        }
        
        /// <remarks/>
        public string HighestEducationLevel {
            get {
                return this.highestEducationLevelField;
            }
            set {
                this.highestEducationLevelField = value;
            }
        }
        
        /// <remarks/>
        public decimal StandardHoursPerWeek {
            get {
                return this.standardHoursPerWeekField;
            }
            set {
                this.standardHoursPerWeekField = value;
            }
        }
        
        /// <remarks/>
        public string PositionStatus {
            get {
                return this.positionStatusField;
            }
            set {
                this.positionStatusField = value;
            }
        }
        
        /// <remarks/>
        public string PositionCategory {
            get {
                return this.positionCategoryField;
            }
            set {
                this.positionCategoryField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public System.Nullable<System.DateTime> ServiceReferenceDate {
            get {
                return this.serviceReferenceDateField;
            }
            set {
                this.serviceReferenceDateField = value;
            }
        }
        
        /// <remarks/>
        public decimal InitialYearsAtDLALevel {
            get {
                return this.initialYearsAtDLALevelField;
            }
            set {
                this.initialYearsAtDLALevelField = value;
            }
        }
        
        /// <remarks/>
        public string PostitionGroup {
            get {
                return this.postitionGroupField;
            }
            set {
                this.postitionGroupField = value;
            }
        }
        
        /// <remarks/>
        public string PayLocation {
            get {
                return this.payLocationField;
            }
            set {
                this.payLocationField = value;
            }
        }
        
        /// <remarks/>
        public System.DateTime ModifiedAt {
            get {
                return this.modifiedAtField;
            }
            set {
                this.modifiedAtField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="https://www.payoffice.biz/")]
    public partial class DLAEmployeeImportResult {
        
        private DLAEmployeeImport importRequestField;
        
        private ImportResultFlag resultField;
        
        private string resultStringField;
        
        /// <remarks/>
        public DLAEmployeeImport ImportRequest {
            get {
                return this.importRequestField;
            }
            set {
                this.importRequestField = value;
            }
        }
        
        /// <remarks/>
        public ImportResultFlag Result {
            get {
                return this.resultField;
            }
            set {
                this.resultField = value;
            }
        }
        
        /// <remarks/>
        public string ResultString {
            get {
                return this.resultStringField;
            }
            set {
                this.resultStringField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="https://www.payoffice.biz/")]
    public partial class DLAEmployeeImport {
        
        private int employeeNumberField;
        
        private string cMSPERSTypeField;
        
        private string workEmailField;
        
        private string workPhoneField;
        
        /// <remarks/>
        public int EmployeeNumber {
            get {
                return this.employeeNumberField;
            }
            set {
                this.employeeNumberField = value;
            }
        }
        
        /// <remarks/>
        public string CMSPERSType {
            get {
                return this.cMSPERSTypeField;
            }
            set {
                this.cMSPERSTypeField = value;
            }
        }
        
        /// <remarks/>
        public string WorkEmail {
            get {
                return this.workEmailField;
            }
            set {
                this.workEmailField = value;
            }
        }
        
        /// <remarks/>
        public string WorkPhone {
            get {
                return this.workPhoneField;
            }
            set {
                this.workPhoneField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="https://www.payoffice.biz/")]
    public enum ImportResultFlag {
        
        /// <remarks/>
        ImportSuccess,
        
        /// <remarks/>
        ImportFailure,
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void ExportEmployeesCompletedEventHandler(object sender, ExportEmployeesCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class ExportEmployeesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal ExportEmployeesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public DLAEmployeeExport[] Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((DLAEmployeeExport[])(this.results[0]));
            }
        }
        
        /// <remarks/>
        public string ErrorMessage {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[1]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void ImportEmployeesCompletedEventHandler(object sender, ImportEmployeesCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class ImportEmployeesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal ImportEmployeesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public DLAEmployeeImportResult[] Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((DLAEmployeeImportResult[])(this.results[0]));
            }
        }
        
        /// <remarks/>
        public string ErrorMessage {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[1]));
            }
        }
    }
}

Open in new window

0
Comment
Question by:Sha1395
  • 8
  • 3
  • 2
13 Comments
 
LVL 8

Accepted Solution

by:
crysallus earned 167 total points
Comment Utility
The only constructor defined for that class takes 4 arguments, and it's also defined as internal, which means that the constructor is only accessible within the assembly unit within which it is defined.

If your webservice is defined in it's own dll, and you want to create an instance of ExportEmployeesCompletedEventArgs outside that dll, perhaps in your main application, then you'll need to change the constructor modifier from internal to public. Then you'll also need to pass it the arguments that it requires.

Alternatively, leave the current constructor alone, if you only use that constructor within the dll, and define a public constructor with 0 arguments for use in your main program.
0
 

Author Comment

by:Sha1395
Comment Utility
thanks for your comment crysallus,

actually am passing three values before call my webservice

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ExportEmployees xmlns="https://www.payoffice.biz/">
      <LoginName>string</LoginName>
      <Password>string</Password>
      <LastExport>dateTime</LastExport>
    </ExportEmployees>
  </soap:Body>
</soap:Envelope>

Open in new window



First pass those strings then pull the record from webservice. can you please guide me on that
0
 

Author Comment

by:Sha1395
Comment Utility
Hi crysallus,

Can you please correct me,am not sure how to pass the value and get the response back from wsdl.

When i try to invoke "exportEmployees" its not showing.

some where i miss something. please please give me a heads up
0
 
LVL 8

Expert Comment

by:crysallus
Comment Utility
Sorry, perhaps I should have read your question a little more closely. I thought you were just building your own application, I didn't realise you were using SOAP. I haven't used that before, so I can't really help you with that. Hopefully, someone else on here can.
0
 

Author Comment

by:Sha1395
Comment Utility
Hey Crysallus,

Actually its an XML file (normal wsdl),but when i try to pass the string to  "Export Employees" method i couldn't able to see in the property.

That's why i just stuck,i can see the other methods like "EmployeeExport" and others but am not sure why i can't able to call that particular method.

is this any other way to invoke  and retrieve the value ?
0
 
LVL 11

Expert Comment

by:Sudhakar Pulivarthi
Comment Utility
Hi Sha1395
You have to ways to go:
1:Define a default constructor in ur ExportEmployeesCompletedEventArgs class:
internal ExportEmployeesCompletedEventArgs()  { }
2. Pass the parameters during the object creation in Main method.
Microsoft.SqlServer.ReportingServices2010.ExportEmployeesCompletedEventArgs export = new Microsoft.SqlServer.ReportingServices2010.ExportEmployeesCompletedEventArgs(results,  exception,  cancelled, userState); // Similar to like this.

Note: When we create our own constructor then CLR will not create a default constructor for the class. We need to explicitly write it.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:Sha1395
Comment Utility
Thanks a lot Sudhakar,

Is this any example can you able to give,this is my first attempt to consume webservice.
0
 

Author Comment

by:Sha1395
Comment Utility
I couldn't able to call the method "ExportEmployees",am not sure why its not showing that method.

Because am going to pass three sting in that method

(login ,password,Date)

but am not able to get that method,do i miss something ?
0
 
LVL 11

Assisted Solution

by:Sudhakar Pulivarthi
Sudhakar Pulivarthi earned 333 total points
Comment Utility
Sorry Sha, I have not worked with Reporting services.
Pls refer this link to continue with investigation
http://msdn.microsoft.com/en-us/library/ms155134.aspx
http://msdn.microsoft.com/en-us/library/d2s8y7bs(v=vs.80).aspx
0
 

Author Comment

by:Sha1395
Comment Utility
Thanks Sudhakar,i will check it  those links you provided
0
 

Author Comment

by:Sha1395
Comment Utility
Hey Sudhakar,

I do have one more doubt about Internal Constructor,

1:Define a default constructor in ur ExportEmployeesCompletedEventArgs class:
internal ExportEmployeesCompletedEventArgs()  { }

You mean the class file in my webservice,to change as an Internal ?
0
 
LVL 11

Assisted Solution

by:Sudhakar Pulivarthi
Sudhakar Pulivarthi earned 333 total points
Comment Utility
No i mean only the constructor...
As thumb rule: The access modifier for class and constructor should be same. Because the scope of creation and its visibility is similar right?

I see in the code class is public so make ur constructors also public !!!
0
 

Author Closing Comment

by:Sha1395
Comment Utility
It helped me partially to understand the problem but not rectified
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now