File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes pass a simple bean object to a vba client Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "pass a simple bean object to a vba client" Watch "pass a simple bean object to a vba client" New topic
Author

pass a simple bean object to a vba client

Shubh Bhat
Ranch Hand

Joined: Sep 08, 2002
Posts: 32
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.


~-<br />Doing my best this time and everytime.<br />-- Me
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32767
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.


Android appsImageJ pluginsJava web charts
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
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


"Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
Shubh Bhat
Ranch Hand

Joined: Sep 08, 2002
Posts: 32
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
Marshal

Joined: Mar 22, 2005
Posts: 32767
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

Joined: Feb 27, 2002
Posts: 8845

What is vba client?


Groovy
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
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

Joined: Feb 27, 2002
Posts: 8845

Thanks Peer
 
 
subject: pass a simple bean object to a vba client
 
Threads others viewed
Need your advice...
How to pass HttpSession to SessionBean?
ejbobject/bean instance
argument type mismatch problem using java.util.Date
Rand a floating number in MS Access
IntelliJ Java IDE