Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1030043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:38:20+00:00 2026-05-16T12:38:20+00:00

I have created a JAX-WS client within eclipse that will communicate with a web

  • 0

I have created a JAX-WS client within eclipse that will communicate with a web service that was written in VB.net. I have gotten this to work successfully.

One of my web service methods will return an obect of type KitchenItems[]

The KitchenItems has a bunch of get/set methods for various kitchen properties. However, I cannot access those methods when using KitchenItems[]

Do the brackets convert the object into an array? How can I gain access to the get methods in KitchenItems? I had a test class automatically generated which did the following in order to extract the results:

KitchenItem[] kitchenItem= soap.getKitchenItemsByLoginId(kitchenId);
List list = Arrays.asList(kitchenItem.);
String result = list.toString();

Ideally, I would like to work with the object, and not convert to a string. The above won’t let me convert the array to as a list anyway, as it throws the error:

Type mismatch: cannot convert from List<KitchenItem> to List

Any suggestions? Thanks!

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:38:21+00:00Added an answer on May 16, 2026 at 12:38 pm

    Square brackets on the variable’s type, KitchenItem[], or on the variable’s name, kitchenItem[], indicate that this variable is an array.

    The elements of an array are accessed with the square brackets operator where the first element is accessed as kitchenItem[0] and arrays have a length field for determining the number of elements in the array.

    Assume we have the array of items:

    KitchenItem[] kitchenItems = soap.getKitchenItemsByLoginId(kitchenId);
    

    To print the name of the first element in the array:

    System.out.println(kitchenItems[0].getName());
    

    To print the name of the last element in the array:

    System.out.println(kitchenItems[kitchenItems.length - 1].getName());
    

    One could print all the name of each KitchenItem with this code:

    KitchenItem[] kitchenItems = soap.getKitchenItemsByLoginId(kitchenId);
    for (int i = 0; i < kitchenItems; i++) {
        KitchenItem kitchenItem = kitchenItems[i];
        System.out.println(kitchenItem.getName());
    }
    

    The array can be turned into a genericized List using

    List<KitchenItem> list = Arrays.asList(kitchenItem);
    

    However the code you have may not be working because of the extra . on the end or because you have strict checking on in Eclipse. A genericized List should be assignable to a simple List.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some resources that I allocate when my web service is created that
I have a JAX-RPC web service that I am attempting to consume using Spring.
In java i have created a JAX- web service, which is up and running,
I have a web service that was created several years ago in C++ and
i have local WSDL file. i tried to create JAX-WS Web service client which
We have created a web service using JAX-WS and ProSyst OSGi. Accessing the service
I have a web service (JAX-RS/Spring) that generates SQL queries which run against a
I have created some JQuery that will expand a div 'popup' on hover and
I have created a simple web service called TimeServerBean . It's working properly, the
I found that I was unable to return collections from my JAX-WS Web Service.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.