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

Re: [xmlblaster] VB .NET InvalidCastException on Demo Client



Hey - Thanks for the quick response!!!

I use the sample code that came with XMLBlaster (the VB6 frm) and was
able to subscribe and publish. If you mean receiving a message from a
subscription by "callback", then no, I didn't get it working. I got
further than I did in .NET though ;) I guess I can try a little more -
but I saw where the DoEvents was commented out and that def. didn't
work when I uncommented it.

I'm running 2000 Pro SP4. The exception is thrown on the argument
initialization:
 xmlBlaster.initArgs(argArr)
however, just for the helll of it - I commented that out, and the
exception still went off at the next line. It seems like any access to
the instantiation of the XMLScriptAccess class bombs...

I will try VC7... Is it possible that even though the bridge was built
successfully, that there may still be a problem?
I built it with: J2EE SDK 1.4 and my RE is: 1.4.2_03 - I hope that's
right - I know very little about Java ;)

Thanks
B


On Tue, 02 Nov 2004 15:50:21 +0100, Marcel Ruff <mr at marcelruff.info> wrote:
> Bradley Jonas wrote:
> > Hi!
> >
> > I've built the Activex bridge and tested it without a problem in VB6.
> 
> Did the callback work with VB6?
> I've never found out how to do it, it would be nice
> if you can guide me how to do it.
> 
> > I am trying to work with it in .NET and have copied the code exactly
> > as included with the XMLBlaster download (same as what is on the site
> > as well).
> > I get the following error:
> > An unhandled exception of type 'System.InvalidCastException' occurred
> > in mscorlib.dll
> 
> This works perfectly on my WinXP (with different service packs) test machine.
> 
> At which line is your exception thrown?
> Can you lookup the ActiveX control in VC7?
> 
> Marcel
> 
> 
> 
> >
> > Additional information: QueryInterface for interface
> > XmlScriptAccess.XmlScriptAccessDispatch failed.
> >
> > I'm using the simple client for now, but I get the same error with
> > HelloWorld3 - my code is as follows:
> >
> >     Sub Main()
> >         Dim request, response As String
> >         Dim xmlBlaster As XmlScriptAccess.XmlScriptAccessClass
> >
> >         xmlBlaster = New XmlScriptAccess.XmlScriptAccessClass
> >
> >         ' Configure using the SOCKET protocol
> >         Dim argArr(1) As String
> >         argArr(0) = "-protocol"
> >         argArr(1) = "SOCKET"
> >
> >         xmlBlaster.initArgs(argArr)
> >
> >         ' Connect to the server
> >         response = xmlBlaster.sendRequest("<xmlBlaster><connect/></xmlBlaster>")
> >
> >         ' Query the free memory
> >         request = "<xmlBlaster><get><key
> > oid='__cmd:?freeMem'/></get></xmlBlaster>"
> >         response = xmlBlaster.sendRequest(request)
> >         Console.WriteLine("Got response:" & response)
> >
> >         ' Leave the server
> >         response =
> > xmlBlaster.sendRequest("<xmlBlaster><disconnect/></xmlBlaster>")
> >     End Sub
> >
> > Any help would be greatly appreciated!
> >
> > Thanks!
> > B
> >
> >
> 
> 
> --
> http://www.xmlBlaster.org
>