aspose file tools*
The moose likes Web Services and the fly likes return type in web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "return type in web service" Watch "return type in web service" New topic
Author

return type in web service

Raji Ram
Ranch Hand

Joined: Aug 22, 2002
Posts: 46
Hi,
I am trying to expose one of my methods that return a vector as a webservice.
When I do it from IBM Websphere studio, I am able to create a proxy and call the proxy from my jsp. It works fine.
But when I try to call the webservice from a vbscript thro a soapclient object, it gives me error saying that
The schema definition with targetnamespace of http://xml.apache.org/xml-soap for soapmapper vector could not be found
Please help me on this.
Thanks in advance,
Raji.


Regards,<br />Raji.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
I expect thats because VBscript doesn't know about Vectors. Seems to me you need to return something that VBscript knows about - maybe an array of strings?
Bill
Raji Ram
Ranch Hand

Joined: Aug 22, 2002
Posts: 46
Thanks Bill. But I still have a qn.
So, Does that mean that the server applicatio should return different data types for different client?
I thought the soap handles them internally.
Please advise.
Thanks,
Raji.
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
SOAP only encodes simple things like Strings and integers in a totally standard way across all platforms. The only way to handle complex types in a totally portable way is to use "literal" XML. This is the problem with RPC and SOAP-encoded Web Services.
What I've done successfully is to
(a) Start with WSDL that's reverse-engineered from a Java class
(b) Modify the WSDL to make it document-style with literal encoding and make sure that the complex types are fully encoded in the XML schema part of the WSDL.
(c) Generate a server-side implementation template from the WSDL (WebSphere studio will do this).
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
For the data types that all SOAP toolkits are supposed to understand, read the standards at the w3c web site. Go to www.w3.org and browse around.
Raji Ram
Ranch Hand

Joined: Aug 22, 2002
Posts: 46
Thanks Bill,Kyle.
But Please help me understand this. When it says,
"The schema definition with targetnamespace of http://xml.apache.org/xml-soap for soapmapper vector could not be found "
does that mean there is a schema in the http site? When I try to invoke this from my browser, it gives me Page not found error.
So does that mean that the schema link is missing and once I put the right link, this would work??
Please reply.
-Raji.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: return type in web service