Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Web Services
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Web Services
consume web service
guenter krannich
Greenhorn
Posts: 24
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi there,
this is my first step into webservices, so..
When executing this, I get an exception (ok, it's a response, but I'm looking for more).
What did I miss?
public static void main(String [] args) { try { String endpoint = "http://www.webserviceX.NET/stockquote.asmx"; Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress( new java.net.URL(endpoint) ); call.setSOAPActionURI("http://www.webserviceX.NET/GetQuote"); call.setUseSOAPAction(true); call.setOperationName("GetQuote"); String ret = (String) call.invoke( new Object[] { "IBM" } ); System.out.println("Sent 'IBM', got '" + ret + "'"); } catch (Exception e) { System.err.println(e.toString()); } }
Thanks for your help!
Ulf Dittmer
Rancher
Posts: 43081
77
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What exception would that be? Post the stacktrace.
guenter krannich
Greenhorn
Posts: 24
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
sorry, I wasn't precise:
the result of
(String) call.invoke( new Object[] { "IBM" } );
is "exception", so
System.out.println("Sent 'IBM', got '" + ret + "'");
produces "Sent 'IBM', got 'exception'"
[ February 17, 2008: Message edited by: guenter krannich ]
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
invoking webservice using Dynamic Invcation Interface
Soap client giving error
My first webservice call
SOAP Fault for SOAP Action property
How to invoke a webservice in .net from servlet application
More...