Hi I create a application in netbeans, and in one web service method it return a List.

 @WebMethod
    public List searchByAuthor(String author) {
        return bookBean.listByAuthor(author);
    }

above is the code. When i right click the web service and click 'Test Web Service' and test the ListByAuthor it gives me an exception

Service invocation threw an exception with message : null; Refer to the server log for more details

Exceptions details : java.lang.reflect.InvocationTargetException

how do i solve this
thanks appreciate help

Member Avatar for LastMitch

Exceptions details : java.lang.reflect.InvocationTargetException

It means your argument list wasn't valid.

Where is your <List>?

Hi LastMich

the list is the values that return from bookBean.listByAuthor(author) method.
the fields are bookID,title,ISBN, description etc

how would i solve it

thanks
appreciate a reply

but i would i display the result?

Member Avatar for LastMitch

but i would i display the result?

If you resolve the InvocationTargetException{} issue, then on your JSP page will display the results.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.