getting InvocationTargetException trying to return a bean..

E

Elhanan

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top