[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 374
  • Last Modified:

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>
0
mathieu_cupryk
Asked:
mathieu_cupryk
  • 4
  • 3
1 Solution
 
daveamourCommented:
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.
0
 
mathieu_cuprykAuthor Commented:
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
0
 
daveamourCommented:
Not quite sure what you mean, can you rephrase the question?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mathieu_cuprykAuthor Commented:
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

0
 
mathieu_cuprykAuthor Commented:
how can I loop throught AvailableSKUs

Am I explaining myself properly.

shoprogers002.jpg
0
 
daveamourCommented:
Ok are you already getting a collection of object then?
Is this your webmethod:
Get_Available_Equipment_SKUs
If so what kind of object or collection does that return?
0
 
mathieu_cuprykAuthor Commented:
Dim EquipentOrderInfoObj2 As ScrapeFilesFromCingular.com.att.wireless.eod.AvailableEquipmentSKU = _
               wsTransaction.Get_Available_Equipment_SKUs(strCustPrefix)


0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now