Link to home
Start Free TrialLog in
Avatar of mathieu_cupryk
mathieu_cuprykFlag for Canada

asked on

how to return a collection in a web service.

How Can I return a collection.
  Dim EquipentOrderInfoObj1 As ScrapeFilesFromCingular.com.att.wireless.eod.AvailableEquipmentSKU = _
                wsTransaction.Get_Available_Equipment_SKUs(strCustPrefix)


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)
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_SKUsResponse
xmlns="https://eod.wireless.att.com">
<Get_Available_Equipment_SKUsResult>
<Status_Code>int</Status_Code>
<Message>string</Message>
<AvailableSKUs>
<Equipment_SKU>string</Equipment_SKU>
<Equipment_Type>string</Equipment_Type>
</AvailableSKUs>
<AvailableSKUs>
<Equipment_SKU>string</Equipment_SKU>
<Equipment_Type>string</Equipment_Type>
</AvailableSKUs>
</Get_Available_Equipment_SKUsResult>
</Get_Available_Equipment_SKUsResponse>
</soap12:Body>
</soap12:Envelope>
Avatar of daveamour
daveamour
Flag of United Kingdom of Great Britain and Northern Ireland image

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.
Avatar of mathieu_cupryk

ASKER

This is my class how can I go through the collection:

    '''<remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3053"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute([Namespace]:="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.XmlElementAttribute("AvailableSKUs")>  _
        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?
availableskus (Collection of available skus)
How can I go through each one
-            EquipentOrderInfoObj2      {ScrapeFilesFromCingular.com.att.wireless.eod.AvailableEquipmentSKU}      ScrapeFilesFromCingular.com.att.wireless.eod.AvailableEquipmentSKU
-            AvailableSKUs      {Length=1}      ScrapeFilesFromCingular.com.att.wireless.eod.AvailableItems()
-            (0)      {ScrapeFilesFromCingular.com.att.wireless.eod.AvailableItems}      ScrapeFilesFromCingular.com.att.wireless.eod.AvailableItems
            Equipment_SKU      "64206"      String
            equipment_SKUField      "64206"      String
            Equipment_Type      "New SIM (Gold)"      String
            equipment_TypeField      "New SIM (Gold)"      String
-            availableSKUsField      {Length=1}      ScrapeFilesFromCingular.com.att.wireless.eod.AvailableItems()
-            (0)      {ScrapeFilesFromCingular.com.att.wireless.eod.AvailableItems}      ScrapeFilesFromCingular.com.att.wireless.eod.AvailableItems
            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)

Open in new window

how can I loop throught AvailableSKUs

Am I explaining myself properly.

shoprogers002.jpg
ASKER CERTIFIED SOLUTION
Avatar of daveamour
daveamour
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dim EquipentOrderInfoObj2 As ScrapeFilesFromCingular.com.att.wireless.eod.AvailableEquipmentSKU = _
               wsTransaction.Get_Available_Equipment_SKUs(strCustPrefix)