[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.6

Value of type '1-dimensional array of Service' cannot be converted to '1-dimensional array of RogersWebService.Service'

Asked by mathieu_cupryk in Microsoft Visual Basic.Net

Error      1      Value of type '1-dimensional array of Service' cannot be converted to '1-dimensional array of RogersWebService.Service' because 'Service' is not derived from 'RogersWebService.Service'.      C:\Inetpub\wwwroot\WAM\App_Code\TransactionWAM.vb      162      57      C:\...\WAM\
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
Imports System.Text
Imports System.Collections.Generic
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Web.Services.Protocols
Imports System.Xml
 
 
Public Class TransactionWAM
    Inherits Transaction
 
 
    Private Enum WAMTransactionType As Integer
 
        Activation = 201
        Deactivation = 211
        ProfileChange = 501
        SIMQuery = 601
 
        RatePlanChange = 701
 
    End Enum
 
    ''' <summary>
    ''' A rogers activation will be data only or voice enabled, at the SIM features level
    ''' </summary>
    ''' <remarks></remarks>
    Private Enum SIMDataOnlyStatus As Integer
 
        HasDataOnly = 1
        HasVoiceEnabled = 2
        Issue_NoKeySAFFeature = 3
        Issue_ConflictingSAFFeature = 4
 
    End Enum
 
 
 
    'Fields
    Private strSQL As String = ""
 
    Private m_simID As Integer = 0
    Private m_imei As String = "222222222222228"
    Private m_subscriberName As String = "KORE Telematics"
    Private m_msisdn As String = ""
    Private m_simNumber As String = ""
    Private m_pricePlanCode As String = ""
    Private m_simDataOnlyStatus As Integer = 0
    Private m_contractType As String = ""
    Private m_pricePlanCodeID As Integer = 0
 
    Private arrServices As New ArrayList()
    Private serviceList As List(Of Service) = New List(Of Service)
 
    Private m_batch As SAGBatch
 
 
 
 
    Public Property Batch() As SAGBatch
        Get
            Return m_batch
        End Get
        Set(ByVal Value As SAGBatch)
            m_batch = Value
        End Set
    End Property
 
 
 
    'Constructor
    Sub New(ByVal intTransactionID As Integer, ByVal intSIMTypeID As Integer, _
                        ByVal sagBatch As SAGBatch)
 
        MyBase.New(intTransactionID, intSIMTypeID)
        Batch = sagBatch
 
        Dim intResult As Integer = 0
        Dim strSQL As String = ""
 
        Dim dr As SqlClient.SqlDataReader
 
        'Get all the transaction info we need, which now includes the ContractType
        strSQL = ""
        strSQL = strSQL & "SELECT "
        strSQL = strSQL & "tbl_sag_transaction.SIMID, "
        strSQL = strSQL & "tbl_sag_transaction.[SIM_Number], "
        strSQL = strSQL & "tbl_sag_transaction.MSISDN, "
        strSQL = strSQL & "tbl_sag_transaction.TransactionTypeID, "
        strSQL = strSQL & "ISNULL(tbl_sims.PricePlan, 0) AS PricePlanCodeID, "
        strSQL = strSQL & "tbl_billing_contracts.ContractType "
        strSQL = strSQL & "FROM tbl_sag_transaction "
        strSQL = strSQL & "JOIN tbl_sims "
        strSQL = strSQL & "ON tbl_sag_transaction.SIMID = tbl_sims.SIMID "
        strSQL = strSQL & "JOIN tbl_locations "
        strSQL = strSQL & "ON tbl_sims.LocationID = tbl_locations.LocationID "
        strSQL = strSQL & "JOIN tbl_billing_contracts "
        strSQL = strSQL & "ON tbl_locations.LocationID = tbl_billing_contracts.LocationID "
        strSQL = strSQL & "WHERE tbl_sag_transaction.TransactionID = " & Me.TransactionID.ToString
        dr = helperData.GetSQLDataReader(strSQL, "sid")
 
        'A note about Price Plans.
        'when you are activating a SIM the correct price plan is calculated based on contract type & features.
        'when this is a general request bulk feature change (501) the SIM is already active on a price plan
        'which does not change.
 
        If dr.Read Then
 
            TransactionTypeID = Convert.ToInt32(dr("TransactionTypeID"))
 
            m_simID = Convert.ToInt32(dr("SIMID"))
            m_simNumber = dr("SIM_Number").ToString()
            m_msisdn = dr("MSISDN").ToString()
 
            m_contractType = dr("ContractType").ToString
            m_pricePlanCodeID = dr("PricePlanCodeID").ToString
 
 
            'Create Services from tbl_sag_commands
            'Dim arrServices As New ArrayList()
            arrServices = GetServices(TransactionID)
 
            'Dim serviceList As List(Of Service) = New List(Of Service)
            If arrServices.Count > 0 Then
                For i As Integer = 0 To arrServices.Count - 1
                    If Not arrServices(i) Is Nothing AndAlso CStr(arrServices(i)) <> "" Then
                        Dim service As New Service()
                        service.code = Trim(arrServices(i).ToString())
                        serviceList.Add(service)
                    End If
                Next
            End If
 
        End If 'If dr.Read
        dr.Close()
 
    End Sub
 
    Public Sub ActivateWAMTransaction()
 
        Dim intResult As Integer = 0
        Dim status As New TransactionStatus()
        Dim errorCode As String = ""
        Dim errorMessage As String = ""
        Dim sagStatus As String = ""
        Dim transactionState As String = ""
 
 
        Try 'SoapException handler 
 
            Dim Obj As New RogersWebService.Wam
            Obj.Url = "127.0.0.1"
            status = Obj.activateSubscriber(TransactionID.ToString(), _
                                                        Me.m_msisdn, _
                                                        EquipmentType.GSM, _
                                                        Language.English, _
                                                        Me.m_simNumber, _
                                                        Me.m_imei, _
                                                        Me.m_subscriberName, _
                                                        Me.m_pricePlanCode, _
                                                        serviceList.ToArray())
 
        Catch sExp As SoapException
            status.status = TransactionStatusStatus.apperror
            Dim xmlDoc As New XmlDocument()
            xmlDoc.LoadXml(sExp.Detail.InnerXml)
            Dim elemList As XmlNodeList = xmlDoc.GetElementsByTagName("wam:englishMessage")
            If elemList.Count > 0 Then errorMessage = elemList(0).InnerText
            elemList = xmlDoc.GetElementsByTagName("wam:errorCode")
            If elemList.Count > 0 Then errorCode = elemList(0).InnerText
        End Try
 
    End Sub
 
    Private Function GetServices(ByVal transactionID As Integer) As ArrayList
        Dim arr As New ArrayList()
        Dim sql As String = "select [Service] from tbl_sag_command where transactionid=" & transactionID.ToString() & " "
        Dim dr As SqlDataReader = helperData.GetSQLDataReader(sql, "sid")
        If dr.Read() Then
            Dim services As String = dr("Service").ToString()
            For Each s As String In services.Split(Convert.ToChar(";"))
                arr.Add(s)
            Next
        End If
        dr.Close()
        Return arr
    End Function
 
End Class
--------------------------------------------------------------------------------------------------
Attachments:
 
web service code
 
 
Related Solutions
 
Loading Advertisement...
 
[+][-]08/24/09 12:58 PM, ID: 25171889Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/24/09 05:21 PM, ID: 25173726Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/25/09 03:06 AM, ID: 25175932Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Microsoft Visual Basic.Net
Sign Up Now!
Solution Provided By: CodeCruiser
Participating Experts: 2
Solution Grade: B
 
[+][-]08/25/09 06:50 AM, ID: 25177564Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/25/09 07:01 AM, ID: 25177664Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/25/09 07:03 AM, ID: 25177689Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/25/09 07:06 AM, ID: 25177723Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/25/09 07:13 AM, ID: 25177783Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/25/09 07:28 AM, ID: 25177953Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/25/09 07:41 AM, ID: 25178078Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625