File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Webservice return type

 
Ajay Chawla
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I've a web service deployed on weblogic7. This service returns a custom object which has a property of type Vector. This is working fine when i check it with the client auto-generated by weblogic.
The problem comes when i try to access it with the client that I've created. On checking with the obj.getClass().getName(), i get java.lang.Object. I do not get the Vector which i need.
Iam new to web services, so need input from you people..
Ajay
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How did you create your own client?
 
Ajay Chawla
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created my own client using the clientgen utility, and using webserviceclient.jar.
The build.xml was--
<project name="ClientSoccer" default="generate-client">
<target name="generate-client">
<taskdef name="clientgen" classname="weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask"/>
<clientgen wsdl="http://localhost:7001/ws_clubsoccer/SoccerService?wsdl"
packageName="soccer.client"
clientJar="E:/soccer_client.jar"
/>
</target>
</project>
Running this build.xml gave me the soccer_client.jar, which I used to compile the java files at my client end.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess the problem is that because Vector isn't one of the built-in supported data types, the clientgen task generates some kind of a generic serialization class for it, causing you to see only a java.lang.Object.
Looking at http://edocs.bea.com/wls/docs70/webserv/anttasks.html#1080160, you should try using the useServerTypes="true" and ear="../foo/bar.ear" attributes.
 
Ajay Chawla
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeh I too think thats the reason.
Thanks Lasse
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic