Skip to main content

How to call a SOAP server with Java

2 replies [Last post]
guarriman
Offline
Joined: 2007-08-31

Using J2SE v1.4.2, I'd like to call a remote SOAP service:
http://foo.com/HelloService.wsdl
and use a function I built within that service.

I'd be extremely grateful if someone could provide me any webpage showing a very simple code.

Thank you very much.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Witold Szczerba

I remember, there was some free (but not free as in freedom, it is
commercial but for free) library, the file was called: glue-all.jar.
It could be used to invoke methods using web services without
generating interfaces, it looked like this:

import electric.proxy.IProxy;
import electric.registry.Registry;
import electric.soap.SOAPException;
[...]
Object[] parameters = {"abc",123};
IProxy proxy = Registry.bind("http://some.address/someService.wsdl");
Object result = proxy.invoke("methodName", parameters);

If course, it worked with interfaces as well, but I used it only for
very basic web services.
I can't remember where did I get it from, and if it is still
available, but Google might help :)

W.Szczerba
2007/8/31, glassfish@javadesktop.org :
> Using J2SE v1.4.2, I'd like to call a remote SOAP service:
> http://foo.com/HelloService.wsdl
> and use a function I built within that service.
>
> I'd be extremely grateful if someone could provide me any webpage showing a very simple code.
>
> Thank you very much.
> [Message sent by forum member 'guarriman' (guarriman)]
>
> http://forums.java.net/jive/thread.jspa?messageID=233453
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

kohlert
Offline
Joined: 2003-06-16

With J2SE v 1.4.2 you will have to use JAX-RPC: check out scenario 2 in https://jax-rpc.dev.java.net/whitepaper/1.1/index-part2.html

If you can use Java SE 5 you can use Metro's JAX-WS. http://metro.dev.java.net