Here is the function that would call the GetList operation, it will retrieve the entries in a collection object and then iterate through it.
It uses a Byte array to retrieve the data from an attachment field in the web service. I have used VS2005 do develop this code and tested this function in ARS/MidTier 6.3. It should work in 7.x environment. Per my requirement i am passing a ListView to this function to display all the entries that i have collected from the WebService. you can write me directly in case any of any difficulties. Thanks, -Sam Public Sub LoadWS(ByRef myLv As System.Windows.Forms.ListView) Dim ws As New ARWS.TD_WebServicesService() Dim auth As New ARWS.AuthenticationInfo() 'Dim mytype As New ARWS.TypeType() auth.userName = "Demo" ' Authentication Information auth.password = "" ws.AuthenticationInfoValue = auth Dim filData() As Byte Dim dtModifedDate As Date Dim nFileSize As Int32 'Dim szLastModifedby As String Dim szName As String Dim szFileName As String Dim szFileshortName As String Dim szType As String Dim szAction As String szType = "" szAction = "" szFileshortName = "" Dim szSD As String Dim myCollection() As ARWS.GetListOutputMapGetListValues ' getlist 'myCollection = ws.OpGetList("'State' =" & Chr(34) & "Deployed" & Chr(34)) ' Passing Qualification to get list operation myCollection = ws.OpGetList() ' Calling the Get list operation Dim nCounter As Int16 Dim arArrWsTemp() As WsTemplate ' an arrary of a user defined class to retrieve and store the data If UBound(myCollection) >= 0 Then ReDim arArrWsTemp(UBound(myCollection)) For nCounter = 0 To UBound(myCollection) dtModifedDate = myCollection(nCounter).Modified_Date szName = myCollection(nCounter).Name_ szType = "Mail Template" If myCollection(nCounter).Type_ = ARWS.Type_Type.InstructionThen szType = "Instruction" End If If myCollection(nCounter).Type_ = ARWS.Type_Type.MailTemplate Then szType = "Mail Template" End If szSD = myCollection(nCounter).Short_Description If szType <> "Instruction" Then szFileName = myCollection(nCounter).OLTemplate_attachmentName filData = myCollection(nCounter).OLTemplate_attachmentData nFileSize = myCollection(nCounter).OLTemplate_attachmentOrigSize szAction = "Submit" If InStrRev(szFileName, "\") <> 0 Then szFileshortName = Mid(szFileName, InStrRev(szFileName, "\") + 1) End If Else szAction = "Critical" End If Dim myListItem As New ListViewItem() myListItem = myLv.Items.Add(szName) myListItem.SubItems.Add(szType) If szType <> "Instruction" Then myListItem.SubItems.Add(szFileshortName) myListItem.SubItems.Add(nFileSize) End If Dim arWsTemp As New WsTemplate() arWsTemp.Email = "" arWsTemp.Name = szName arWsTemp.Type = szType arWsTemp.FileName = szFileshortName arWsTemp.LastModifed = myCollection(nCounter).Modified_Date arWsTemp.User = "" arWsTemp.Password = "" arWsTemp.Action = szAction arArrWsTemp(nCounter) = arWsTemp If Len(szFileshortName) <> 0 And szType <> "Instruction" Then Dim fs As New FileStream(szSysPath & "\" & szServer & "\" & szFileshortName, FileMode.Create, FileAccess.Write) fs.Write(filData, 0, filData.Length - 1) fs.Close() End If szName = "" szType = "" szFileshortName = "" Next If arArrWsTemp.Length <> 0 Then UpdateXMLFile(arArrWsTemp, szServer) ' passes the array to another function to update an xml file End If End If End Sub On 5/2/07, Robert Halstead <[EMAIL PROTECTED]> wrote:
Sam, We are trying to consume a remedy webservice as well using php but we are having a hard time trying to get results from Remedy. We keep getting errors and we are not sure what's happening. We've looked through tons of documentation on this and can't find anything in the Remedy Docs, we've also tried other sources as well. I was wondering if you could send us a copy of your vb.net code? Thanks -- "A fool acts, regardless; knowing well that he is wrong. The ignoramus acts on only what he knows, but all that he knows. The ignoramus may be saved, but the fool knows that he is doomed." Robert Halstead On 4/30/07, Sam Rx <[EMAIL PROTECTED]> wrote: > > ** I have written some VB.net code to consume GetList operation.. > Let me know if that can be of any use. > > -Sam > > On 5/1/07, Candace DeCou <[EMAIL PROTECTED]> wrote: > > > > Thanks Archana - I'll look into that and appreciate your sharing it. > > :) > > Candace > > > > -----Original Message----- > > From: Action Request System discussion list(ARSList) > > [mailto:[EMAIL PROTECTED] On Behalf Of Vyom Labs - ITSM Support > > Sent: Tuesday, May 01, 2007 4:55 PM > > To: arslist@ARSLIST.ORG > > Subject: Re: Need Help Getting a WSDL Consumed with .NET C# > > > > Program code for webservices consumed using C#.NET for Remedy web > > services is available at: > > > > http://www.codeproject.com/cs/webservices/webservicecallback.asp > > > > > > Regards, > > > > Archana Singh > > -- > > www.vyomlabs.com > > Consulting | Oursourcing | Training || ITIL | IT Governance |BMC > > Remedy > > > > Candace DeCou wrote: > > > ** > > > > > > ARS 6.3 Patch 20 > > > > > > Mid-Tier 6.3 Patch 20 > > > > > > MS SQL 2000 > > > > > > > > > > > > I have built a web service for opGetList operations. The WSDL is > > > working correctly and we can see the resulting values in mid-tier > > > logs. However, in trying to consume my web service using .NET C# > > > Visual Studio, we are getting NULL results and the following error > > in > > > the .NET side of things: > > > > > > > > > > > > Unhandled Exception: System.NullReferenceException: Object reference > > > not set to an instance of an object. > > > > > > at RemedyTest.Program.Main (String[] args) in > > > C:\c.projects\rem\RemedyTest\Rem edyTest\Program.cs:line 29 Press > > any > > > key to continue > > > > > > > > > > > > Does anyone out there have a sample of .NET C# code that does work > > > with a Remedy web service, or any other hints on what we might look > > for. > > > > > > > > > > > > Thanks in advance for any help. > > > > > > > > > > > > /*/Candace DeCou/*/** > > > > > > Applications Support Analyst > > > Silicon Valley Bank > > > Office: 408-654-6358 > > > Email: [EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]> > > > > > > > > > > > > __20060125_______________________This posting was submitted with > > HTML > > > in it___ > > > > > > ________________________________________________________________________ > > _______ > > UNSUBSCRIBE or access ARSlist Archives at www.arslist.orgARSlist:"Where > > the Answers Are" > > > > > > _______________________________________________________________________________ > > UNSUBSCRIBE or access ARSlist Archives at www.arslist.orgARSlist:"Where the Answers Are" > > > > __20060125_______________________This posting was submitted with HTML in > it___ >
_______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers Are"