Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Cannot get the webservice to work
Last Post 11/06/2009 4:56 PM by Peter Donker. 1 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Avi Kleyman
New Member
New Member
Posts:4


--
11/04/2009 12:28 PM

I have added the DMXService.asmx file as web reference.  The following code errors out with following message:

"  ex.Message "System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.NullReferenceException: Object reference not set to an instance of an object.    at DotNetNuke.Common.Globals.ConvertDataReaderToDataTable(IDataReader reader)    at DotNetNuke.Common.Globals.ConvertDataReaderToDataSet(IDataReader reader)    at Bring2mind.DNN.Modules.DMX.Webservice.Service.GetPortalCollectionlist()    --- End of inner exception stack trace ---"
 

Am I doing something wrong?

Imports

 

 

 

 

Bring2mind.DNN.Modules.DMX.Business.EntriesController

Imports

System.IO

Imports

DotNetNuke.Entities.Users

Imports

 

 

System.Web

Module

 

 

 

 

 

 

ProgramSub Main()Dim User As New UserInfo()Dim PortalId As Integer = 0Dim CollectionId As Integer = 1Dim File As System.IO.Stream = New FileStream("D:\vmware license.txt", FileMode.Open)Dim OriginalFilename As String = "desktop.ini"

 

Dim Title As String = "desktop.ini"

User.UserID = 5

 

Try

 

'Dim rc As Integer = SimplifiedUpload(PortalId, CollectionId, File, OriginalFilename, Title, User, True)

 

lc.PortalId = 0

lc.Username =

Dim lc As New DMXService.LoginCredentials()"name"

lc.Password =

"password"

 

 

Dim ssc As New DMXService.ServiceSoapClient()Dim buffer(File.Length) As Byte

File.Read(buffer, 0, File.Length)

ssc.Open()

 

If ssc.Login(lc) Then

 

 

Dim ds As System.Data.DataSet = ssc.GetPortalCollectionlist(lc)'Dim i As Integer = ssc.SimpleUploadNewEntry(lc, 3, buffer, "vmware license.txt")

 

 

 

 

End If

 

MsgBox(ex.Message)

 

Catch ex As ExceptionFinally

File.Close()

 

 

End Try

 

End

End Sub Module

 

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
11/06/2009 4:56 PM

Hi Avi,

Try this:

 

   Dim lc As New DMXService.LoginCredentials()
   lc.PortalId = 0
   lc.Username = ""
   lc.Password = ""
 
   Dim ssc As New DMXService.Service
   ssc.LoginCredentialsValue = lc
 
   ''ssc.Open()
 
   'If ssc.Login(lc) Then
   Dim ds As System.Data.DataSet = ssc.GetPortalCollectionlist()
   'End If

Peter

You are not authorized to post a reply.