Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

pass a simple bean object to a vba client  RSS feed

 
Shubh Bhat
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am able to pass an ArrayList of String, however I want to pass an array of bean object (java) to a vba client. Could you please help.

Do I have to write wsdl if so how etc. If you could even point me to the write document it would help.

Thanks in advance.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By "bean object", do you mean a serialized Java object? That won't work, because VBA can't access java objects. You can send the result of serializing the bean through the java.beans.XMLEncoder class.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not going to help you with JavaBeans - but ultimately you want to transfer information, so if you haven't read these already, you may want to review these:
Calling XML Web Services from Office VBA Using the Web Service References Tool
Microsoft Office XP Web Services Toolkit
Handling Complex SOAP Data Types in XML Web Services
Using the Office XP Web Services Toolkit 2.0 to Interact with Complex Types in XML Web Services
What's New in the Microsoft Office 2003 Web Services Toolkit
Office and Web Services
 
Shubh Bhat
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ulf Dittmer,

I just have a simple bean (having more or less Strings as members) and I want to pass that to the VBA client. I know I can use struct. etc. however I am specifically looking for an Example or may be other ways to do it with a little code snippet.

I am pretty new to it, so most of the jargons doesn't mean much to me.

Thanks again!
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will have to use a representation that VBA understands, either an array (see http://www-128.ibm.com/developerworks/xml/library/ws-tip-coding.html), or an XML representation like I suggested earlier. VBA can not work with Java objects.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is vba client?
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pradip Bhat:
What is vba client?


VBA (Visual Basic for Applications). A VBA client would be an application that can be scripted or extended with VBA and that wants to access a web service. In most cases the VBA client would turn out to be one of the Microsoft Office products like Excel or Word. However some other applications that aren't developed/published by Microsoft also support VBA.
VBA is different from Visual Basic Script (VBScript) and Visual Basic (VB) and Visual Basic .NET (VB.NET). VBA, VBScript, and VB are somewhat similar in syntax but the runtime environment and libraries can be quite different.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peer
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!