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 Holger Uhlitzsch <Ma...@gmx.net> on 2008/04/11 11:11:28 UTC

[axis2] axis2 1.3 base class return type trouble

Hi all,

i have trouble using axis2 1.3 with a POJO skeleton class und method return types.
I have a class A which is a base type for other classes (value objects). A method of my webservice POJO skeleton class has class A as return type.
Now i have a class B which is derived from base class A and is returned by this method.
But if i call the method i get the following error message:

org.apache.axis2.AxisFault: org.apache.axis2.AxisFault: Mapping qname not fond for the package: org.mypackage.vo

Both classes have there own package.

I have another method with class A as method parameter and if i call the method from client with class B as parameter it is ok.

What do i have to do to make this working?

Regards
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [axis2] axis2 1.3 base class return type trouble

Posted by Holger Uhlitzsch <Ma...@gmx.net>.
Of course i can create a jira issue, but i do not have a patch.
I just did a test and commented out the code block of the if statement.
And it does working. But i do think this may not be the right solution for the problem i do have.

If i have a POJO webservice with methods using a base class, but on runtime derived classes of the base class will be send und received, the generated WSDL file does not contain the derived classes. Because axis2 don't know about them. So do i have to register these classes in any way? So that axis2 knows them and they became available in the WSDL file?

If the derived classes are not contained in the WSDL file the clients don't know about them and can't received them.

Regards Holger


-------- Original-Nachricht --------
> Datum: Thu, 17 Apr 2008 11:29:17 +0530
> Von: Deepal jayasinghe <de...@gmail.com>
> An: axis-user@ws.apache.org
> Betreff: Re: [axis2] axis2 1.3 base class return type trouble

> Holger Uhlitzsch wrote:
> > Ok, i did some debugging and found the difference between client and
> server handling.
> > In line 90 of class org.apache.axis2.databinding.utils.BeanUtil there is
> >
> > if (typeTable != null && qualified) {
> >
> > On client typeTable is null and qualified is false and on the server the
> opposite, typeTable is valid and qualified is true.
> > Now the server is trying to get qname for type from typeTable but the
> derived class B (coming back to my example) is not in typeTable and the
> exception is thrown.
> >
> > What do i have to do now to fix this problem?
> >   
> Thank you very much for such a detailed mail. The best thing is create a 
> jira and attach your patch. Then it is just a matter of applying the 
> patch  to fix the issue.
> 
> Thank you!
> deepal
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org

-- 
Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games! 
http://games.entertainment.gmx.net/de/entertainment/games/free

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [axis2] axis2 1.3 base class return type trouble

Posted by Deepal jayasinghe <de...@gmail.com>.
Holger Uhlitzsch wrote:
> Ok, i did some debugging and found the difference between client and server handling.
> In line 90 of class org.apache.axis2.databinding.utils.BeanUtil there is
>
> if (typeTable != null && qualified) {
>
> On client typeTable is null and qualified is false and on the server the opposite, typeTable is valid and qualified is true.
> Now the server is trying to get qname for type from typeTable but the derived class B (coming back to my example) is not in typeTable and the exception is thrown.
>
> What do i have to do now to fix this problem?
>   
Thank you very much for such a detailed mail. The best thing is create a 
jira and attach your patch. Then it is just a matter of applying the 
patch  to fix the issue.

Thank you!
deepal

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [axis2] axis2 1.3 base class return type trouble

Posted by Holger Uhlitzsch <Ma...@gmx.net>.
Ok, i did some debugging and found the difference between client and server handling.
In line 90 of class org.apache.axis2.databinding.utils.BeanUtil there is

if (typeTable != null && qualified) {

On client typeTable is null and qualified is false and on the server the opposite, typeTable is valid and qualified is true.
Now the server is trying to get qname for type from typeTable but the derived class B (coming back to my example) is not in typeTable and the exception is thrown.

What do i have to do now to fix this problem?

Regards

-------- Original-Nachricht --------
> Datum: Fri, 11 Apr 2008 11:11:28 +0200
> Von: "Holger Uhlitzsch" <Ma...@gmx.net>
> An: axis-user@ws.apache.org
> Betreff: [axis2] axis2 1.3 base class return type trouble

> Hi all,
> 
> i have trouble using axis2 1.3 with a POJO skeleton class und method
> return types.
> I have a class A which is a base type for other classes (value objects). A
> method of my webservice POJO skeleton class has class A as return type.
> Now i have a class B which is derived from base class A and is returned by
> this method.
> But if i call the method i get the following error message:
> 
> org.apache.axis2.AxisFault: org.apache.axis2.AxisFault: Mapping qname not
> fond for the package: org.mypackage.vo
> 
> Both classes have there own package.
> 
> I have another method with class A as method parameter and if i call the
> method from client with class B as parameter it is ok.
> 
> What do i have to do to make this working?
> 
> Regards
> -- 
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org

-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org