You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Amandeep Singh <as...@quark.com> on 2007/08/29 20:05:57 UTC

Problems with abstract data types in Axis2

Hi,

 

We have a class hierarchy exposed through web services, working fine
with Axis1. We are facing an issue while porting it to Axis2. The class
hierarchy looks like:

 

QRequest --> Abstract class

Project --> Child class deriving from QRequest with some fields

 

In the web service, I have defined a method

 

String getStringRequest(ClassParent obj)

 

Now, from the client side, when I call this method and pass an instance
of "ClassChild", it fails. The stack trace mentions
"InstantiationExceptionConstructorAccessorImpl". My guess is that axis
is trying to instantiate the abstract class here.

 

I am copying SOAP request and response below. Any help would be greatly
appreciated.

 

Thanks,

Aman

 

 

SOAP Request

-----------------------

 

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><getStringReques
t xmlns="http://webservice.manager.quark.com"><request
xmlns:q1="http://ro.clientsdk.manager.quark.com/xsd"
xsi:type="q1:Project"><q1:request xsi:nil="true" /><q1:jobJacket
xsi:nil="true" /><q1:jobTicket xsi:nil="true" /><q1:projectName
xsi:nil="true" /><q1:saveAs xsi:nil="true" /><q1:xMLVersion
xsi:nil="true"
/></request></getStringRequest></soap:Body></soap:Envelope>

 

SOAP Response

-------------------------

 

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
<soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>unknown
</faultstring><detail
/></soapenv:Fault></soapenv:Body></soapenv:Envelope>


RE: Problems with abstract data types in Axis2

Posted by Amandeep Singh <as...@quark.com>.
Can someone give a small hint on how I can try to fix this or move
forward? I am really stuck here.

 

Thanks,

Aman

 

________________________________

From: Amandeep Singh [mailto:asingh@quark.com] 
Sent: Wednesday, August 29, 2007 12:06 PM
To: axis-user@ws.apache.org
Subject: Problems with abstract data types in Axis2

 

Hi,

 

We have a class hierarchy exposed through web services, working fine
with Axis1. We are facing an issue while porting it to Axis2. The class
hierarchy looks like:

 

QRequest --> Abstract class

Project --> Child class deriving from QRequest with some fields

 

In the web service, I have defined a method

 

String getStringRequest(QRequest obj)

 

Now, from the client side, when I call this method and pass an instance
of "Project", it fails. The stack trace mentions
"InstantiationExceptionConstructorAccessorImpl". My guess is that axis
is trying to instantiate the abstract class here.

 

I am copying SOAP request and response below. Any help would be greatly
appreciated.

 

Thanks,

Aman

 

 

SOAP Request

-----------------------

 

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><getStringReques
t xmlns="http://webservice.manager.quark.com"><request
xmlns:q1="http://ro.clientsdk.manager.quark.com/xsd"
xsi:type="q1:Project"><q1:request xsi:nil="true" /><q1:jobJacket
xsi:nil="true" /><q1:jobTicket xsi:nil="true" /><q1:projectName
xsi:nil="true" /><q1:saveAs xsi:nil="true" /><q1:xMLVersion
xsi:nil="true"
/></request></getStringRequest></soap:Body></soap:Envelope>

 

SOAP Response

-------------------------

 

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
<soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>unknown
</faultstring><detail
/></soapenv:Fault></soapenv:Body></soapenv:Envelope>


RE: Problems with abstract data types in Axis2

Posted by Amandeep Singh <as...@quark.com>.
Corrected problem statement...

 

________________________________

From: Amandeep Singh [mailto:asingh@quark.com] 
Sent: Wednesday, August 29, 2007 12:06 PM
To: axis-user@ws.apache.org
Subject: Problems with abstract data types in Axis2

 

Hi,

 

We have a class hierarchy exposed through web services, working fine
with Axis1. We are facing an issue while porting it to Axis2. The class
hierarchy looks like:

 

QRequest --> Abstract class

Project --> Child class deriving from QRequest with some fields

 

In the web service, I have defined a method

 

String getStringRequest(QRequest obj)

 

Now, from the client side, when I call this method and pass an instance
of "Project", it fails. The stack trace mentions
"InstantiationExceptionConstructorAccessorImpl". My guess is that axis
is trying to instantiate the abstract class here.

 

I am copying SOAP request and response below. Any help would be greatly
appreciated.

 

Thanks,

Aman

 

 

SOAP Request

-----------------------

 

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><getStringReques
t xmlns="http://webservice.manager.quark.com"><request
xmlns:q1="http://ro.clientsdk.manager.quark.com/xsd"
xsi:type="q1:Project"><q1:request xsi:nil="true" /><q1:jobJacket
xsi:nil="true" /><q1:jobTicket xsi:nil="true" /><q1:projectName
xsi:nil="true" /><q1:saveAs xsi:nil="true" /><q1:xMLVersion
xsi:nil="true"
/></request></getStringRequest></soap:Body></soap:Envelope>

 

SOAP Response

-------------------------

 

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
<soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>unknown
</faultstring><detail
/></soapenv:Fault></soapenv:Body></soapenv:Envelope>