Yeah, got it done!
1. .Net doesn't have VBA or VBScript support as I read somewhere
2. MS Soap Toolkit is crap, at least in my opinion
3. I discovered a little (even for commercial concerns) usefull library for SoapIssues
with VBScript, VB6.0, C++, eVB, eVC and C#: PocketSoap (See
http://www.pocketsoap.com/pocketsoap/)
4. I needed to play around awhile, but finaly:
My WebService class:
| @Stateless
| @WebService
| @WebContext(contextRoot="/SimpleWebServices")
| public class SimpleWeb implements SimpleWebInterface {
|
| @WebMethod
| public boolean isAlive() {
| System.out.println("SimpleWeb.isAlive()");
| return true;
| }
|
| @WebMethod
| public String hello(@WebParam(name="name") String name) {
| System.out.println("SimpleWeb.helloWorld(): " + name);
| return "Hello " + name + "!";
| }
|
| }
|
Called by a Testscript PocketSimpleWeb.vbs:
| Option Explicit
|
| Dim service, ns
|
| service = "http://localhost:8080/SimpleWebServices/SimpleWeb?wsdl"
| ns = "http://webservice.simple/"
|
| WScript.Echo "isAlive(): " & isAlive(service, ns)
| WScript.Echo "hello('World'): " & hello("World",
service, ns)
|
| ' Should return true
| function isAlive(wsdl, namespace)
| Dim f, p
| Set f = CreateObject("pocketsoap.Factory")
| Set p = f.CreateProxy(wsdl, namespace)
| isAlive = p.isAlive
| end function
|
| ' should return "Hello " & name & "!"
| function hello(name, wsdl, namespace)
| dim e, t
| set e = CreateObject("PocketSOAP.Envelope.2")
|
| e.setMethod "hello", namespace
| e.parameters.create "name", name
|
| set t = CreateObject("PocketSOAP.HTTPTransport.2")
| t.SOAPAction = ""
| t.Send wsdl, e.serialize
|
| e.parse t
| hello = e.parameters.item(0).value
| end function
|
Gives me what I want, even without @SOAPBinding(style = SOAPBinding.Style.RPC):
| C:\Data\Tests>cscript PocketWebService.vbs
| Microsoft (R) Windows Script Host Version 5.6
| Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
|
| isAlive(): true
| hello('World'): Hello World!
|
Thanks for your help, the pieces of infos really helped me getting along.
I hope this example is usefull for others around here,
Greetz GHad[/url]
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082524#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...