Click here to Skip to main content
15,881,559 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
how to access login with hotel details from WSDL in window application.i have one wsdl.how to extract login details from wsdl


Reference.cs


C#
public partial class AuthenticationHeader : System.Web.Services.Protocols.SoapHeader {

       private string usernameField;

       private string passwordField;

       private string hotelcodeField;

       private string idContextField;

       /// <remarks/>
       [System.Xml.Serialization.XmlElementAttribute(DataType="NCName")]
       public string Username {
           get {
               return this.usernameField;
           }
           set {
               this.usernameField = value;
           }
       }

       /// <remarks/>
       [System.Xml.Serialization.XmlElementAttribute(DataType="NCName")]
       public string Password {
           get {
               return this.passwordField;
           }
           set {
               this.passwordField = value;
           }
       }

       /// <remarks/>
       [System.Xml.Serialization.XmlElementAttribute(DataType="NCName")]
       public string Hotelcode {
           get {
               return this.hotelcodeField;
           }
           set {
               this.hotelcodeField = value;
           }
       }

       /// <remarks/>
       [System.Xml.Serialization.XmlElementAttribute(DataType="NCName")]
       public string idContext {
           get {
               return this.idContextField;
           }
           set {
               this.idContextField = value;
           }
       }
   }




WSDL:


XML
<xs:element name="AuthenticationHeader">
<xs:complexType>
<xs:sequence>
<xs:element name="Username" type="xs:NCName"/>
<xs:element name="Password" type="xs:NCName"/>
<xs:element name="Hotelcode" type="xs:NCName"/>
<xs:element minOccurs="0" name="idContext" type="xs:NCName"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Hotelcode" type="xs:string"/>
<xs:element name="Password" type="xs:string"/>
<xs:element name="Username" type="xs:string"/>
<xs:element name="ErrorDetails" nillable="true" type="ns0:errorMessage"/>
</xs:schema>
Posted
Comments
Member 10918596 9-Sep-15 3:16am    
how to use wsdl to my window application login method
Patrice T 9-Sep-15 3:33am    
This code is doing nothing !
What have you done ? What is your problem ?
Member 10918596 9-Sep-15 3:42am    
autually i have one wsdl.Name like
https://*******/mmtadmin/rs/hotels?wsdl
sandeep Nishad 11-Sep-15 4:37am    
are you have REST Service or SOAP service.
Member 10918596 9-Sep-15 3:43am    
i need to extract login information from above wsdl.How can i call to my code

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900