• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Webservice return type

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How did you create your own client?
 
Ajay Chawla
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeh I too think thats the reason.
Thanks Lasse
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic