473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Problem while returning array from web service!

ntxsoft
Hello everybody,
I have a small problem while returning array from web service. Firstly I'm new at java web services and I'm using netbeans 6 with glassfish 2. The problem is I have a class, name is "Experience" and I want to return Experience[] array from service.
In web service I implement like that
Expand|Select|Wrap|Line Numbers
  1. @WebMethod(operationName = "getExperience")
  2.     public Experience[] getExperience(
  3.             @WebParam(name = "user") User user, 
  4.             @WebParam(name = "page") int page, 
  5.             @WebParam(name = "count") int count, 
  6.             @WebParam(name = "order") String order, 
  7.             @WebParam(name = "filter") String filter) {
  8.         ExpGallery gallery=new ExpGallery();
  9.         gallery.setUser(user);
  10.  
  11.         return gallery.getExperiences(page, count, order, filter);
  12.     }
And I use in my client program
Expand|Select|Wrap|Line Numbers
  1. try {
  2.             db_client.DBServiceService service = new db_client.DBServiceService();
  3.             db_client.DBService port = service.getDBServicePort();
  4.  
  5.             Experience[] result = port.getExperience(user, page, count, order, filter);
  6.         } catch (Exception ex) {
  7.         }
But the problem is in client program at the line I'm getting results like that
incompatible types
found : DBservice.getExperience
required: Experience[]

How can I solve this problem?
Thanks
Jan 22 '08 #1
0 1342

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Morten | last post by:
Hi! I have a problem displaying some values in a datagrid. I have an array that consists of a number of objects. Each object has 2 properties: Name and a list of web addresses. (e.g: Name:...
0
by: Abhishek Srivastava | last post by:
Hello All, I have written a WebService using ASP.Net. This Service is returning an Object called ModuleVO. I have defined many properties in this class. I have added a web reference to this...
5
by: Stacey Levine | last post by:
I have a webservice that I wanted to return an ArrayList..Well the service compiles and runs when I have the output defined as ArrayList, but the WSDL defines the output as an Object so I was...
1
by: Matthew | last post by:
Using .NET 1.1 I trying to consume a web service that returns an integer and an array of type string which I declare and use line this Dim Results() As String Me.txtMain.Text =...
2
by: David R | last post by:
Can someone tell me what I am doing wrong here? This will not compile because of line 2, but if I replace with Service.ContactTO contacts = null; it will through an exception on line 3. Thanks...
5
by: Jim Murphy | last post by:
In creating a C# web service, I am having trouble returning a DataTable object as the result of a web method. I have no problem returning native types like string or int, but cannot return a .NET...
1
by: Alan Sloan | last post by:
I have written a Web Service that interacts with a COM component to extract a file from another system. Basically the Web Service accepts a part number and a rev and extracts the file to a...
2
by: =?Utf-8?B?RHJldw==?= | last post by:
I have a current requirement to all a subsidiary to use a current legacy application and interface with my new system to inject data when appropriate. I wanted to create a web service since we are...
0
by: =?Utf-8?B?QmlsbCBC?= | last post by:
I am having a problem where no data is being returned from an Axis web service. I can invoke the service just fine and it does not give any errors, but the data objects do not hold any data. If I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.