facebook

Jax-ws return list of lists

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #291531 Reply

    Daniel Ray
    Member

    Kindly point me to the thread if this has already been answered.

    I have a test class that returns a list of lists via the following snippet.

    
    public class ComplexDataType{
        
        public List<String> getItems(){
            List<String> items = new ArrayList<String>();
            for(int i=0; i<10; i++){
                items.add("" + i);
            }
            return items;
        }
        
        public List<List<String>> getListOfItems(){
            List<List<String>> listOfItems = new ArrayList<List<String>>();
            for(int i=0; i<10; i++){
                listOfItems.add(getItems());
            }
            return listOfItems;
        }
    }
    

    I am using Myeclipseide 6.5 and when I try use the ‘New Web Service Wizard’, choosing JAX-WS, bottom up with generate WSDL selected… I get the following error.

    Unable to create JAXBContext.

    What additional steps do I need to take to implement so that I can return a List of List of Strings?

    #291624 Reply

    Loyal Water
    Member

    budoray,
    I was unable to reproduce this issue at my end. Can you list the exact steps to be followed to reproduce this issue at my end.

    Also, can you try reproducing this issue with a brand new project. Does the problem persist?

    #291631 Reply

    Daniel Ray
    Member

    MyEclipse Enterprise Workbench

    Version: 6.6.0
    Build id: 6.6.0-20081015

    I followed the steps listed listed here: http://www.myeclipseide.com/documentation/quickstarts/webservices_jaxws/ and everything worked just fine.

    I repeated the steps and created the class I listed above. That’s when I get the error.

    #291946 Reply

    Daniel Ray
    Member

    Can you post the steps you took so that I can mimic them in my environment?

    #292250 Reply

    Loyal Water
    Member

    I just followed the steps mentioned in the tutorial with the class you provided. Instead of the Calculator class, I added the ComplexDataType class and the New Web Service wizard worked fine for me when I pointed it to the ComplexDataType class.

    Did I miss any step?

    #292377 Reply

    Daniel Ray
    Member

    I still get the same error.

    An internal error occured during:”Generating JAX-WS Web Services”.
    Unable to create JAXBContext.

    MyEclipse Enterprise Workbench

    Version: 6.6.0
    Build id: 6.6.0-20081015

    #292469 Reply

    Loyal Water
    Member

    budoray,
    Maybe you should upgrade to MyEclipse 7.0 GA and then test this again with a brand new project in a brand new workspace. Hope that helps.

    #293031 Reply

    gcruz.ime
    Member

    This message has not been recovered.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Jax-ws return list of lists

You must be logged in to post in the forum log in