Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > getting InvocationTargetException trying to return a bean..

Reply
Thread Tools

getting InvocationTargetException trying to return a bean..

 
 
Elhanan
Guest
Posts: n/a
 
      03-15-2005
hi..

i have axis 1.1

when i try to use a web service such as this:

class BeanData{
private String messageData;
private int messageCode;
public BeanData(){};
public BeanData(int Code,String Data)
{
messageCode=Code;
messageData=Data;
}
public String getmessageData(){return messageData;}
public int getmessageCode(){return messageCode;}
public void setmessageData(String value){messageData=value;}
public void setmessageCode(int value){messageCode=value;}
}

public class TestBean {

public BeanData getBean()
{
BeanData d= new BeanData();
return d;
}
public String getString()
{
return "Me";
}
}
from this client:

Call c =(Call) new Service().createCall();
c.setTargetEndpointAddress("http://localhost:8080/axis/TestBean.jws");
c.setOperationName("getBean");
QName q= new QName("urn:BeanService","BeanData");
c.registerTypeMapping(BeanData.class,q
,new BeanSerializerFactory(BeanData.class,q)
,new BeanDeserializerFactory(BeanData.class,q));
c.setReturnClass(BeanData.class); Object b= c.invoke(new
Object[]{});

i get java.lang.reflect.InvocationTargetException

how i also use this from a dotnet client?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
tomcat application startup error java.lang.reflect.InvocationTargetException vk02720 Java 0 08-05-2005 03:18 PM
Apache Axis "java.lang.reflect.InvocationTargetException" Jeeves Java 0 02-03-2005 02:01 AM
InvocationTargetException horseface Java 0 01-13-2005 12:01 PM
Struts Validator throwing InvocationTargetException Thomas 'Skip' Hollowell Java 1 06-09-2004 07:56 PM



Advertisments