T
Tony
I am developing web aplication in C#. I need to connect to some web service.
I need to enter value for some fields, but these fields are not included in
this object. My wsdl is this:
<xsd:complexType name="NameRQ">
<xsd:sequence>
<xsd:element name="RowNumber" type="xsd:int" />
<xsd:choice>
<xsd:element minOccurs="1" maxOccurs="1" name="GuestCode"
type="xsd:string" />
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" name="FirstName"
type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="MiddleName"
type="xsd:string" />
<xsd:element name="LastName" type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="DateOfBirth"
type="xsd:string" />
<xsd:element name="Gender" type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="Nationality"
type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="Disable"
type="xsd:boolean" />
<xsd:element minOccurs="0" maxOccurs="1" name="PassportNumber"
type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1"
name="PassportExpiryDate" type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="GuestTypeCode"
type="xsd:string" />
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
I can declare NameRQ object in C#, but I can find only RowNumber property
(first property in WSDL). Other fields is not present in intellisense. I am
trying to declare object ItemsChoiceType which have this fields
(ItemsChoiceType.FirstName, ItemsChoiceType.LastName etc.). Problem is how
to add some String to this fields (like "Jim" for the FirstName, "Morrison"
for the last name etc.). I am trying like this:
ItemsChoiceType[] ItemsChoiceTypeObj = new ItemsChoiceType[8];
ItemsChoiceTypeObj[0] = new ItemsChoiceType();
I can add this now:
ItemsChoiceTypeObj[0] =ItemsChoiceType.FirstName;
But on that way I can add only field FirstName, but how can I add Value for
the first name (John, Jim, Jack...)
Any idea? I need code in C# or VB.NET (maybe Java code can also help)
Thanks
I need to enter value for some fields, but these fields are not included in
this object. My wsdl is this:
<xsd:complexType name="NameRQ">
<xsd:sequence>
<xsd:element name="RowNumber" type="xsd:int" />
<xsd:choice>
<xsd:element minOccurs="1" maxOccurs="1" name="GuestCode"
type="xsd:string" />
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" name="FirstName"
type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="MiddleName"
type="xsd:string" />
<xsd:element name="LastName" type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="DateOfBirth"
type="xsd:string" />
<xsd:element name="Gender" type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="Nationality"
type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="Disable"
type="xsd:boolean" />
<xsd:element minOccurs="0" maxOccurs="1" name="PassportNumber"
type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1"
name="PassportExpiryDate" type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="GuestTypeCode"
type="xsd:string" />
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
I can declare NameRQ object in C#, but I can find only RowNumber property
(first property in WSDL). Other fields is not present in intellisense. I am
trying to declare object ItemsChoiceType which have this fields
(ItemsChoiceType.FirstName, ItemsChoiceType.LastName etc.). Problem is how
to add some String to this fields (like "Jim" for the FirstName, "Morrison"
for the last name etc.). I am trying like this:
ItemsChoiceType[] ItemsChoiceTypeObj = new ItemsChoiceType[8];
ItemsChoiceTypeObj[0] = new ItemsChoiceType();
I can add this now:
ItemsChoiceTypeObj[0] =ItemsChoiceType.FirstName;
But on that way I can add only field FirstName, but how can I add Value for
the first name (John, Jim, Jack...)
Any idea? I need code in C# or VB.NET (maybe Java code can also help)
Thanks