[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] vb.net and activex dll



Silver Blea wrote:
hello,

I am tyring to get the vb.net activex demo working. However, I am
having a
problem with the asynchronously subroutine XmlScriptAccess_update.  I
am
able to successfully connect to the server, howerver, a get invalid
cast
exceptions when I try to get the messge contents.

Environment: W2K, JDK1.5.0, VB.NET
(sending a text file of size = 344)

private sub xmlScriptAccess_update(byval msg as object) handles
   xmlBlaster.XmlScriptAccessSource_Event_update

dim qos as object dim contents, contentStr as string
dim byteContents() as Byte = new Byte(1024) {} ' byte array of
size 1K
try
qos = msg.getQos() ' no errors
len = msg.getContents().length ' returns 344
contents = msg.getContents() ' ERROR
contentStr = msg.getContentsStr() ' ERROR ALSO


      xmlBlaster.setUpdateReturn("<qos><state>
id='OK' /></qos>")
catch e as SystemException
      msgBox(e.toString())
end try

end sub

whats the proper method to get the data out (string or byte array?).

Hi Silviano,

please correct the method call from

  msg.getContentsStr()

to

  msg.getContentStr()

(Note there is no 's' after Content)

The 'msg' is of type

 http://www.xmlblaster.org/xmlBlaster/doc/client-api/org/xmlBlaster/client/activex/UpdateEvent.html


The other setup is similar to mine, only i've used WinXP instead of W2K, but i think this shouldn't matter,

regards

Marcel


thanks
in advance.

Silviano Blea Jr.
sblea at cs.unm.edu
(505) 853-0462 (Office)



--
http://www.xmlBlaster.org