mathieu_cupryk
asked on
how to return a collection in a web service.
How Can I return a collection.
Dim EquipentOrderInfoObj1 As ScrapeFilesFromCingular.co m.att.wire less.eod.A vailableEq uipmentSKU = _
wsTransaction.Get_Availabl e_Equipmen t_SKUs(str CustPrefix )
Response elements for the Get_Available_Equipment_SK Us methods AvailableSKUs
element collection are as follows:
AVAILABLESKUS (COLLECTION OF AVAILABLE SKUS)
EQUIPMENT_SKU Number SKU of equipment 50
(MAX)
EQUIPMENT_TYPE Text Text description of equipment 50
(MAX)
14) Equipment_Order accepts the following 11 parameter specifications:
Name Format Description Field Command
CUST
PREFIX
Text Customer Prefix
Will err when prefix incorrect
or length > 3.
3 custPrefix
COMPANY Text Company name
Will err when length > 50.
50
(Max)
Company
ATTENTIO
N
Text Attention
Will err when length > 50.
50
(Max)
Attention
ADDRESS1 Text Full address including # and
street
50
(Max)
Address1
CITY Text City 50
(Max)
City
STATE Text
-------------------------- ---------- ---------- ---------- ---------- ---------- --------
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<Get_Available_Equipment_S KUsRespons e
xmlns="https://eod.wireless.att.com">
<Get_Available_Equipment_S KUsResult>
<Status_Code>int</Status_C ode>
<Message>string</Message>
<AvailableSKUs>
<Equipment_SKU>string</Equ ipment_SKU >
<Equipment_Type>string</Eq uipment_Ty pe>
</AvailableSKUs>
<AvailableSKUs>
<Equipment_SKU>string</Equ ipment_SKU >
<Equipment_Type>string</Eq uipment_Ty pe>
</AvailableSKUs>
</Get_Available_Equipment_ SKUsResult >
</Get_Available_Equipment_ SKUsRespon se>
</soap12:Body>
</soap12:Envelope>
Dim EquipentOrderInfoObj1 As ScrapeFilesFromCingular.co
wsTransaction.Get_Availabl
Response elements for the Get_Available_Equipment_SK
element collection are as follows:
AVAILABLESKUS (COLLECTION OF AVAILABLE SKUS)
EQUIPMENT_SKU Number SKU of equipment 50
(MAX)
EQUIPMENT_TYPE Text Text description of equipment 50
(MAX)
14) Equipment_Order accepts the following 11 parameter specifications:
Name Format Description Field Command
CUST
PREFIX
Text Customer Prefix
Will err when prefix incorrect
or length > 3.
3 custPrefix
COMPANY Text Company name
Will err when length > 50.
50
(Max)
Company
ATTENTIO
N
Text Attention
Will err when length > 50.
50
(Max)
Attention
ADDRESS1 Text Full address including # and
street
50
(Max)
Address1
CITY Text City 50
(Max)
City
STATE Text
--------------------------
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<Get_Available_Equipment_S
xmlns="https://eod.wireless.att.com">
<Get_Available_Equipment_S
<Status_Code>int</Status_C
<Message>string</Message>
<AvailableSKUs>
<Equipment_SKU>string</Equ
<Equipment_Type>string</Eq
</AvailableSKUs>
<AvailableSKUs>
<Equipment_SKU>string</Equ
<Equipment_Type>string</Eq
</AvailableSKUs>
</Get_Available_Equipment_
</Get_Available_Equipment_
</soap12:Body>
</soap12:Envelope>
If you build a class to represent this then returning one of these will return everything which is seen as a public property if I remember correctly.
ASKER
This is my class how can I go through the collection:
'''<remarks/>
<System.CodeDom.Compiler.G eneratedCo deAttribut e("System. Xml", "2.0.50727.3053"), _
System.SerializableAttribu te(), _
System.Diagnostics.Debugge rStepThrou ghAttribut e(), _
System.ComponentModel.Desi gnerCatego ryAttribut e("code"), _
System.Xml.Serialization.X mlTypeAttr ibute([Nam espace]:=" https://eod.wireless.att.com")> _
Partial Public Class AvailableEquipmentSKU
Private status_CodeField As String
Private messageField As String
Private availableSKUsField() As AvailableItems
'''<remarks/>
Public Property Status_Code() As String
Get
Return Me.status_CodeField
End Get
Set
Me.status_CodeField = value
End Set
End Property
'''<remarks/>
Public Property Message() As String
Get
Return Me.messageField
End Get
Set
Me.messageField = value
End Set
End Property
'''<remarks/>
<System.Xml.Serialization. XmlElement Attribute( "Available SKUs")> _
Public Property AvailableSKUs() As AvailableItems()
Get
Return Me.availableSKUsField
End Get
Set
Me.availableSKUsField = value
End Set
End Property
End Class
'''<remarks/>
<System.CodeDom.Compiler.G
System.SerializableAttribu
System.Diagnostics.Debugge
System.ComponentModel.Desi
System.Xml.Serialization.X
Partial Public Class AvailableEquipmentSKU
Private status_CodeField As String
Private messageField As String
Private availableSKUsField() As AvailableItems
'''<remarks/>
Public Property Status_Code() As String
Get
Return Me.status_CodeField
End Get
Set
Me.status_CodeField = value
End Set
End Property
'''<remarks/>
Public Property Message() As String
Get
Return Me.messageField
End Get
Set
Me.messageField = value
End Set
End Property
'''<remarks/>
<System.Xml.Serialization.
Public Property AvailableSKUs() As AvailableItems()
Get
Return Me.availableSKUsField
End Get
Set
Me.availableSKUsField = value
End Set
End Property
End Class
Not quite sure what you mean, can you rephrase the question?
ASKER
availableskus (Collection of available skus)
How can I go through each one
- EquipentOrderInfoObj2 {ScrapeFilesFromCingular.c om.att.wir eless.eod. AvailableE quipmentSK U} ScrapeFilesFromCingular.co m.att.wire less.eod.A vailableEq uipmentSKU
- AvailableSKUs {Length=1} ScrapeFilesFromCingular.co m.att.wire less.eod.A vailableIt ems()
- (0) {ScrapeFilesFromCingular.c om.att.wir eless.eod. AvailableI tems} ScrapeFilesFromCingular.co m.att.wire less.eod.A vailableIt ems
Equipment_SKU "64206" String
equipment_SKUField "64206" String
Equipment_Type "New SIM (Gold)" String
equipment_TypeField "New SIM (Gold)" String
- availableSKUsField {Length=1} ScrapeFilesFromCingular.co m.att.wire less.eod.A vailableIt ems()
- (0) {ScrapeFilesFromCingular.c om.att.wir eless.eod. AvailableI tems} ScrapeFilesFromCingular.co m.att.wire less.eod.A vailableIt ems
Equipment_SKU "64206" String
equipment_SKUField "64206" String
Equipment_Type "New SIM (Gold)" String
equipment_TypeField "New SIM (Gold)" String
Message Nothing String
messageField Nothing String
Status_Code "01" String
status_CodeField "01" String
How can I go through each one
- EquipentOrderInfoObj2 {ScrapeFilesFromCingular.c
- AvailableSKUs {Length=1} ScrapeFilesFromCingular.co
- (0) {ScrapeFilesFromCingular.c
Equipment_SKU "64206" String
equipment_SKUField "64206" String
Equipment_Type "New SIM (Gold)" String
equipment_TypeField "New SIM (Gold)" String
- availableSKUsField {Length=1} ScrapeFilesFromCingular.co
- (0) {ScrapeFilesFromCingular.c
Equipment_SKU "64206" String
equipment_SKUField "64206" String
Equipment_Type "New SIM (Gold)" String
equipment_TypeField "New SIM (Gold)" String
Message Nothing String
messageField Nothing String
Status_Code "01" String
status_CodeField "01" String
Response elements for the Get_Available_Equipment_SKUs methods AvailableSKUs
element collection are as follows:
AVAILABLESKUS (COLLECTION OF AVAILABLE SKUS)
EQUIPMENT_SKU Number SKU of equipment 50
(MAX)
EQUIPMENT_TYPE Text Text description of equipment 50
(MAX)
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Dim EquipentOrderInfoObj2 As ScrapeFilesFromCingular.co m.att.wire less.eod.A vailableEq uipmentSKU = _
wsTransaction.Get_Availabl e_Equipmen t_SKUs(str CustPrefix )
wsTransaction.Get_Availabl