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 Damien Sauvageot <da...@sauvageot.org> on 2007/05/14 17:07:35 UTC

[Axis2] Mapping qname not fond for the package

Hi,

Could someone explain me the meaning of this error message.
It happens on the server side. I catched this error with tcpmon.
I firstly thought it was not able to load the return class type but this 
class is in the classpath.
here is the client code which does not crash but result is null.

            EndpointReference targetEPR = new EndpointReference("http://192.168.6.202:8182/josso/services/okauth/getUserById");
            Object[] Args = new Object[] { new String("toto") };
            Class[] returnTypes = new Class[] { OkUser.class };
            QName qname = new QName("http://impl.service.okauth.products.ok.com/xsd", "getUserById");
            RPCServiceClient serviceClient = this.getRPCServiceClient(targetEPR);
            Object[] response2 = serviceClient.invokeBlocking(qname, Args, returnTypes);
            OkUser result = (OkUser) response2[0];
            if (result == null) {
                System.err.println("getUserById didn't initialize!");
            }
            System.err.println("result : " + result.getEmail());


OkUser class is a pojo class linked to others classes like OkUnit.
All classes are available in the classpath.

Thanks for helping me understanding what this mapping not found means.

Damien Sauvageot




HTTP/1.1 500 Internal Server Error
Date: Mon, 14 May 2007 12:03:12 GMT
Server: Apache/2.0.54 (Debian GNU/Linux) mod_jk2/2.0.4 PHP/4.3.10-16 
mod_ssl/2.0.54 OpenSSL/0.9.7e
Content-Type: 
application/xml;action="http://www.w3.org/2005/08/addressing/soap/fault";;charset=UTF-8
Connection: close
Transfer-Encoding: chunked

ec3
<Exception>org.apache.axis2.AxisFault: Exception occurred while trying 
to invoke service method getUserById
    at 
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:157)
    at 
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
    at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:279)
    at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:116)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.josso.tc55.agent.SSOAgentValve.invoke(SSOAgentValve.java:356)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
    at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
    at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
    at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:534)
Caused by: org.apache.axiom.om.OMException: java.lang.RuntimeException: 
org.apache.axis2.AxisFault: Mapping qname not fond for the package: 
com.ok.products.okauth.pojo
    at 
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:211)
    at org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:315)
    at 
org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:608)
    at 
org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:577)
    at 
org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:114)
    at 
org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:236)
    at 
org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:192)
    at 
org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:105)
    at 
org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:251)
    at 
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:134)
    ... 22 more
Caused by: java.lang.RuntimeException: org.apache.axis2.AxisFault: 
Mapping qname not fond for the package: com.ok.products.okauth.pojo
    at 
org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:288)
    at 
org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.processProperties(ADBXMLStreamReaderImpl.java:926)
    at 
org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXMLStreamReaderImpl.java:799)
    at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:68)
    at 
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:125)
    ... 31 more
Caused by: org.apache.axis2.AxisFault: Mapping qname not fond for the 
package: com.ok.products.okauth.pojo
    at 
org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:102)
    ... 35 more
</Exception>
0


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


RE: issues with https?

Posted by Mi...@servicecanada.gc.ca.
Done - AXIS-2944. I figured that the component is 'transports'.

cheers,
md
 

> -----Original Message-----
> From: Davanum Srinivas [mailto:davanum@gmail.com]
> Sent: Wednesday, July 11, 2007 10:02 AM
> To: axis-user@ws.apache.org
> Subject: Re: issues with https?
> 
> 
> Michael,
> 
> Good candidate for an enhancement request. Can you please 
> create a JIRA?
> 
> thanks,
> dims
> 
> On 7/11/07, Michael.Davis@servicecanada.gc.ca
> <Mi...@servicecanada.gc.ca> wrote:
> > Thanks!
> >
> > In our case, I can be certain that it will not be a well 
> known certificate. Is there any way to enable the connection 
> without having a keystore in the file system, for example 
> having the certificate bytes available in a class or something?
> >
> > The issue is this: the organization hosting the client 
> application doesn't allow me access to their server, and 
> coordinating with them to set up a keystore and a system 
> property is problematic.
> >
> > cheers,
> > md
> >
> >
> > > -----Original Message-----
> > > From: Dimuthu [mailto:muthulee@apache.org]
> > > Sent: Wednesday, July 11, 2007 12:48 AM
> > > To: axis-user@ws.apache.org
> > > Subject: Re: issues with https?
> > >
> > >
> > > Hi,
> > >
> > > When you give the HTTPS url and it should work.
> > >
> > > If it is doesn't work, most probably it is not a well known root
> > > certificate. In this case add the following properties to the
> > > System in
> > > client code.
> > > System.setProperty("javax.net.ssl.trustStore","path to keystore" )
> > > System.setProperty("javax.net.ssl.trustStorePassword","apache")
> > >
> > >
> > > Cheers,
> > > Dimuthu
> > >
> > > On Tue, 2007-07-10 at 14:38 -0400, 
> Michael.Davis@servicecanada.gc.ca
> > > wrote:
> > > > Hi,
> > > >
> > > > If I deploy a service using https, then is there anything
> > > special I need to do on the client side, or does the built-in
> > > http library take care of the certificate stuff?
> > > >
> > > > thanks
> > > > Michael Davis
> > > >
> > > >
> > > 
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > >
> > >
> > > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> 
> -- 
> Davanum Srinivas :: http://davanum.wordpress.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 

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


Re: issues with https?

Posted by Davanum Srinivas <da...@gmail.com>.
Michael,

Good candidate for an enhancement request. Can you please create a JIRA?

thanks,
dims

On 7/11/07, Michael.Davis@servicecanada.gc.ca
<Mi...@servicecanada.gc.ca> wrote:
> Thanks!
>
> In our case, I can be certain that it will not be a well known certificate. Is there any way to enable the connection without having a keystore in the file system, for example having the certificate bytes available in a class or something?
>
> The issue is this: the organization hosting the client application doesn't allow me access to their server, and coordinating with them to set up a keystore and a system property is problematic.
>
> cheers,
> md
>
>
> > -----Original Message-----
> > From: Dimuthu [mailto:muthulee@apache.org]
> > Sent: Wednesday, July 11, 2007 12:48 AM
> > To: axis-user@ws.apache.org
> > Subject: Re: issues with https?
> >
> >
> > Hi,
> >
> > When you give the HTTPS url and it should work.
> >
> > If it is doesn't work, most probably it is not a well known root
> > certificate. In this case add the following properties to the
> > System in
> > client code.
> > System.setProperty("javax.net.ssl.trustStore","path to keystore" )
> > System.setProperty("javax.net.ssl.trustStorePassword","apache")
> >
> >
> > Cheers,
> > Dimuthu
> >
> > On Tue, 2007-07-10 at 14:38 -0400, Michael.Davis@servicecanada.gc.ca
> > wrote:
> > > Hi,
> > >
> > > If I deploy a service using https, then is there anything
> > special I need to do on the client side, or does the built-in
> > http library take care of the certificate stuff?
> > >
> > > thanks
> > > Michael Davis
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

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


RE: issues with https?

Posted by Mi...@servicecanada.gc.ca.
Thanks very much!

cheers,
md
 

> -----Original Message-----
> From: Todd Allen [mailto:tballen@copart.com]
> Sent: Wednesday, July 11, 2007 10:14 AM
> To: axis-user@ws.apache.org; axis-user@ws.apache.org
> Subject: RE: issues with https?
> 
> 
> There is a way to trust any CA in the Java client code.  See below.
> 
> First, create inner class:
> 
>      /*
>       * TrustManager inner class to allow access to all web sites
>       */
>      public class TrustingManager implements 
> javax.net.ssl.X509TrustManager
>      {
> 
>          public java.security.cert.X509Certificate[] 
> getAcceptedIssuers()
>          {
>              return null;
>          }
> 
>          public void 
> checkClientTrusted(java.security.cert.X509Certificate[] c,
>              String authType) throws CertificateException
>          {
>          // do nothing, accept by default
>          }
> 
>          public void 
> checkServerTrusted(java.security.cert.X509Certificate[] c,
>              String authType) throws CertificateException
>          {
>          // do nothing, accept by default
>          }
>      } // TrustingManager inner class
> 
> Then call method to disable SSL checking:
> 
>      private void disableSSLChecking() throws IOException {
> 
>          // Inspired by John Cho
>          try {
>              javax.net.ssl.TrustManager[] trusty = new 
> javax.net.ssl.TrustManager[] { new TrustingManager() };
> 
>              javax.net.ssl.SSLContext sc = 
> javax.net.ssl.SSLContext.getInstance("SSL");
> 
>              sc.init(null, trusty, new java.security.SecureRandom());
>              SSLSocketFactory sslFactory = (SSLSocketFactory) 
> sc.getSocketFactory();
>              
> HttpsURLConnection.setDefaultSSLSocketFactory(sslFactory);
>          }
>          catch (Exception e) {
>              throw (new IOException("SSLFactory: " + e.getMessage()));
>          }
>      } // disableSSLChecking()
> 
> I hope that helps.  Try that and let me know if it works for you.
> 
> T
> 
> 
> At 09:27 AM 7/11/2007, Michael.Davis@servicecanada.gc.ca wrote:
> >Thanks!
> >
> >In our case, I can be certain that it will not be a well known 
> >certificate. Is there any way to enable the connection without 
> >having a keystore in the file system, for example having the 
> >certificate bytes available in a class or something?
> >
> >The issue is this: the organization hosting the client application 
> >doesn't allow me access to their server, and coordinating with them 
> >to set up a keystore and a system property is problematic.
> >
> >cheers,
> >md
> >
> >
> > > -----Original Message-----
> > > From: Dimuthu [mailto:muthulee@apache.org]
> > > Sent: Wednesday, July 11, 2007 12:48 AM
> > > To: axis-user@ws.apache.org
> > > Subject: Re: issues with https?
> > >
> > >
> > > Hi,
> > >
> > > When you give the HTTPS url and it should work.
> > >
> > > If it is doesn't work, most probably it is not a well known root
> > > certificate. In this case add the following properties to the
> > > System in
> > > client code.
> > > System.setProperty("javax.net.ssl.trustStore","path to keystore" )
> > > System.setProperty("javax.net.ssl.trustStorePassword","apache")
> > >
> > >
> > > Cheers,
> > > Dimuthu
> > >
> > > On Tue, 2007-07-10 at 14:38 -0400, 
> Michael.Davis@servicecanada.gc.ca
> > > wrote:
> > > > Hi,
> > > >
> > > > If I deploy a service using https, then is there anything
> > > special I need to do on the client side, or does the built-in
> > > http library take care of the certificate stuff?
> > > >
> > > > thanks
> > > > Michael Davis
> > > >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 

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


RE: issues with https?

Posted by Todd Allen <tb...@copart.com>.
There is a way to trust any CA in the Java client code.  See below.

First, create inner class:

     /*
      * TrustManager inner class to allow access to all web sites
      */
     public class TrustingManager implements javax.net.ssl.X509TrustManager
     {

         public java.security.cert.X509Certificate[] getAcceptedIssuers()
         {
             return null;
         }

         public void checkClientTrusted(java.security.cert.X509Certificate[] c,
             String authType) throws CertificateException
         {
         // do nothing, accept by default
         }

         public void checkServerTrusted(java.security.cert.X509Certificate[] c,
             String authType) throws CertificateException
         {
         // do nothing, accept by default
         }
     } // TrustingManager inner class

Then call method to disable SSL checking:

     private void disableSSLChecking() throws IOException {

         // Inspired by John Cho
         try {
             javax.net.ssl.TrustManager[] trusty = new 
javax.net.ssl.TrustManager[] { new TrustingManager() };

             javax.net.ssl.SSLContext sc = 
javax.net.ssl.SSLContext.getInstance("SSL");

             sc.init(null, trusty, new java.security.SecureRandom());
             SSLSocketFactory sslFactory = (SSLSocketFactory) 
sc.getSocketFactory();
             HttpsURLConnection.setDefaultSSLSocketFactory(sslFactory);
         }
         catch (Exception e) {
             throw (new IOException("SSLFactory: " + e.getMessage()));
         }
     } // disableSSLChecking()

I hope that helps.  Try that and let me know if it works for you.

T


At 09:27 AM 7/11/2007, Michael.Davis@servicecanada.gc.ca wrote:
>Thanks!
>
>In our case, I can be certain that it will not be a well known 
>certificate. Is there any way to enable the connection without 
>having a keystore in the file system, for example having the 
>certificate bytes available in a class or something?
>
>The issue is this: the organization hosting the client application 
>doesn't allow me access to their server, and coordinating with them 
>to set up a keystore and a system property is problematic.
>
>cheers,
>md
>
>
> > -----Original Message-----
> > From: Dimuthu [mailto:muthulee@apache.org]
> > Sent: Wednesday, July 11, 2007 12:48 AM
> > To: axis-user@ws.apache.org
> > Subject: Re: issues with https?
> >
> >
> > Hi,
> >
> > When you give the HTTPS url and it should work.
> >
> > If it is doesn't work, most probably it is not a well known root
> > certificate. In this case add the following properties to the
> > System in
> > client code.
> > System.setProperty("javax.net.ssl.trustStore","path to keystore" )
> > System.setProperty("javax.net.ssl.trustStorePassword","apache")
> >
> >
> > Cheers,
> > Dimuthu
> >
> > On Tue, 2007-07-10 at 14:38 -0400, Michael.Davis@servicecanada.gc.ca
> > wrote:
> > > Hi,
> > >
> > > If I deploy a service using https, then is there anything
> > special I need to do on the client side, or does the built-in
> > http library take care of the certificate stuff?
> > >
> > > thanks
> > > Michael Davis
> > >


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


RE: issues with https?

Posted by Mi...@servicecanada.gc.ca.
Thanks!

In our case, I can be certain that it will not be a well known certificate. Is there any way to enable the connection without having a keystore in the file system, for example having the certificate bytes available in a class or something?

The issue is this: the organization hosting the client application doesn't allow me access to their server, and coordinating with them to set up a keystore and a system property is problematic.

cheers,
md
 

> -----Original Message-----
> From: Dimuthu [mailto:muthulee@apache.org]
> Sent: Wednesday, July 11, 2007 12:48 AM
> To: axis-user@ws.apache.org
> Subject: Re: issues with https?
> 
> 
> Hi,
> 
> When you give the HTTPS url and it should work.
> 
> If it is doesn't work, most probably it is not a well known root
> certificate. In this case add the following properties to the 
> System in
> client code.
> System.setProperty("javax.net.ssl.trustStore","path to keystore" )
> System.setProperty("javax.net.ssl.trustStorePassword","apache")
> 
> 
> Cheers,
> Dimuthu
> 
> On Tue, 2007-07-10 at 14:38 -0400, Michael.Davis@servicecanada.gc.ca
> wrote:
> > Hi,
> > 
> > If I deploy a service using https, then is there anything 
> special I need to do on the client side, or does the built-in 
> http library take care of the certificate stuff?
> > 
> > thanks
> > Michael Davis
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 

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


Re: issues with https?

Posted by Dimuthu <mu...@apache.org>.
Hi,

When you give the HTTPS url and it should work.

If it is doesn't work, most probably it is not a well known root
certificate. In this case add the following properties to the System in
client code.
System.setProperty("javax.net.ssl.trustStore","path to keystore" )
System.setProperty("javax.net.ssl.trustStorePassword","apache")


Cheers,
Dimuthu

On Tue, 2007-07-10 at 14:38 -0400, Michael.Davis@servicecanada.gc.ca
wrote:
> Hi,
> 
> If I deploy a service using https, then is there anything special I need to do on the client side, or does the built-in http library take care of the certificate stuff?
> 
> thanks
> Michael Davis
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 


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


issues with https?

Posted by Mi...@servicecanada.gc.ca.
Hi,

If I deploy a service using https, then is there anything special I need to do on the client side, or does the built-in http library take care of the certificate stuff?

thanks
Michael Davis

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


Re: [Axis2] Mapping qname not fond for the package

Posted by Damien Sauvageot <da...@sauvageot.org>.
Thanks a lot Bob. I will try this for the List problem.

about my problem when sending back OkUser which contains other POJO 
classes as OkService,
I found where it comes from.
Those object come from DB through Hibernate which proxy them.
Apparently the problem comes from the hibernate proxy and is then not 
relative to axis2.

In order to find this, I did :
OkUser user1 = hibernatedao.getokuser();
OkUser user2 = new OkUser();
user2.setname(user1.getname());
....
OkService service2 = new OkService();
service2.setName(user1.getService().getName());
...
user2.setService(service2);
return user2;

With this, there is no problem retrieving those object trough axis2.

If anyone know how to 'unproxy' Hibernate object, I will be happy to know.
I was willing to clone() all hibernate class but as user is in a service 
which
contains a collection of user, I will get in trouble.
This is not relative to axis2 but I will post if I find a solution as I 
guess people
might have a similar situation.


Bob Rhodes wrote:
> I had the exact same problem when returning a List of my HistoryItem
> objects. I changed the code to return an HistoryItem[] instead of the
> List and now it works fine. You might want to try that.
>
> Bob 
>
> -----Original Message-----
> From: Damien Sauvageot [mailto:damien@sauvageot.org] 
> Sent: Tuesday, May 15, 2007 4:19 AM
> To: axis-user@ws.apache.org
> Subject: Re: [Axis2] Mapping qname not fond for the package
>
> I made another test by removing all other services from okauth and
> sending back a simple okuser.
> It works fine.
> If I try to send back a List of OkUser, I get the mapping problem again.
> So I guess my problem is linked to the bug 2148.
> Does that mean it is impossible to send back complex type or even a List
> of sinple POJO?
>
> The problem might come from the WSDL generation as when I send back a
> List, I do not have any more reference to OkUser.
>
> Damien
>
>
> Damien Sauvageot wrote:
>   
>> Hi Martin and thanks for your help,
>>
>> I tried changing the endpoint and the result is the same.
>> I am surprised as the result is always the same using different 
>> endpointreference as :
>> http://192.168.6.202:8182/josso/services/okauth/
>> http://192.168.6.202:8182/josso/services/okauth/getUserById
>> http://192.168.6.202:8182/josso/services/okauth/xxxx
>>
>> The web services is always called as I can see the logs of the 
>> getUserById function on the server side.
>> The problem is apparently in axis2 after calling the service when 
>> generating the SOAP answer.
>> I suppose this means the problem is on the server side and not on the 
>> client side.
>>
>>
>> The only relevant information I found on google is this one :
>> https://issues.apache.org/jira/browse/AXIS2-2148?page=com.atlassian.ji
>> ra.plugin.system.issuetabpanels:all-tabpanel
>>
>> In order to be sure that my case is different, I modified OkUser in 
>> order to be a simple pojo. see code below.
>>
>> I also looked at org.apache.ws.java2wsdl.utils.TypeTable which does 
>> not return any Qname when called through getQNamefortheType I guess 
>> OkUser should be on the complex schema type.
>> I did not find where it should be added and how.
>>
>> Thanks,
>>
>> Damien
>>
>>
>>
>> package com.ok.products.okauth.pojo;
>>
>>
>> public class OkBaseUser {
>>    private Long id;
>>    private String username;
>>    private String password;
>>    private String firstName;
>>    private String lastName;
>>    private String phoneNumber;
>>    private String email;
>>
>>    public OkBaseUser() {
>>        super();
>>    }
>>      public OkBaseUser(Long id, String username, String password,
>>            String firstName, String lastName, String phoneNumber, 
>> String email) {
>>        super();
>>        this.id = id;
>>        this.username = username;
>>        this.password = password;
>>        this.firstName = firstName;
>>        this.lastName = lastName;
>>        this.phoneNumber = phoneNumber;
>>        this.email = email;
>>    }
>>
>>    public boolean equals(Object value) {
>>        return super.equals(value);
>>    }
>>
>>    public int hashCode() {
>>        return super.hashCode();
>>    }
>>
>>    public String toString() {          return super.toString();
>>    }
>>
>>    public Long getId() {
>>        return this.id;
>>    }
>>
>>    public void setId(Long value) {
>>        this.id = value;
>>    }
>>
>>    public String getUsername() {
>>        return this.username;
>>    }
>>
>>    public void setUsername(String value) {
>>        this.username = value;
>>    }
>>
>>    public String getPassword() {
>>        return this.password;
>>    }
>>
>>    public void setPassword(String value) {
>>        this.password = value;
>>    }
>>
>>    public String getFirstName() {
>>        return this.firstName;
>>    }
>>
>>    public void setFirstName(String value) {
>>        this.firstName = value;
>>    }
>>
>>    public String getLastName() {
>>        return this.lastName;
>>    }
>>
>>    public void setLastName(String value) {
>>        this.lastName = value;
>>    }
>>
>>    public String getPhoneNumber() {
>>        return this.phoneNumber;
>>    }
>>
>>    public void setPhoneNumber(String value) {
>>        this.phoneNumber = value;
>>    }
>>
>>    public String getEmail() {
>>        return this.email;
>>    }
>>
>>    public void setEmail(String value) {
>>        this.email = value;
>>    }
>> }
>>
>>
>> Martin Gainty wrote:
>>     
>>> Good Morning Damien--
>>>
>>> Assuming you have OkUser class defined/compiled and on CLASSPATH and 
>>> okauth has getUserByID method which will return "toto" is 
>>> defined/compiled and is on CLASSPATH
>>>
>>> The only item I see which may cause null return result is your 
>>> endpointReference declaration which is the name of the service e.g.
>>> EndpointReference targetEPR = new EndpointReference(
>>>                
>>> "http://127.0.0.1:8080/axis2/services/AddressBookService");
>>> AddressBookService is the name of the WS you are referencing
>>>
>>> so in your situation
>>> EndpointReference targetEPR = new
>>> EndpointReference("http://192.168.6.202:8182/josso/services/okauth/ge
>>> tUserById");
>>>
>>>
>>> change to the actual name of the deployed service (assuming that 
>>> okauth is the name of the deployed service) EndpointReference 
>>> targetEPR = new 
>>> EndpointReference(http://192.168.6.202:8182/josso/services/okauth);
>>>
>>> Martin--
>>> This email message and any files transmitted with it contain 
>>> confidential information intended only for the person(s) to whom this
>>>       
>
>   
>>> email message is addressed.  If you have received this email message 
>>> in error, please notify the sender immediately by telephone or email 
>>> and destroy the original message without making a copy.  Thank you.
>>>
>>> ----- Original Message ----- From: "Damien Sauvageot" 
>>> <da...@sauvageot.org>
>>> To: <ax...@ws.apache.org>
>>> Sent: Monday, May 14, 2007 11:07 AM
>>> Subject: [Axis2] Mapping qname not fond for the package
>>>
>>>
>>>       
>>>> Hi,
>>>>
>>>> Could someone explain me the meaning of this error message.
>>>> It happens on the server side. I catched this error with tcpmon.
>>>> I firstly thought it was not able to load the return class type but 
>>>> this class is in the classpath.
>>>> here is the client code which does not crash but result is null.
>>>>
>>>>            EndpointReference targetEPR = new 
>>>> EndpointReference("http://192.168.6.202:8182/josso/services/okauth/g
>>>> etUserById");
>>>>
>>>>            Object[] Args = new Object[] { new String("toto") };
>>>>            Class[] returnTypes = new Class[] { OkUser.class };
>>>>            QName qname = new
>>>> QName("http://impl.service.okauth.products.ok.com/xsd",
>>>>         
> "getUserById");
>   
>>>>            RPCServiceClient serviceClient = 
>>>> this.getRPCServiceClient(targetEPR);
>>>>            Object[] response2 = serviceClient.invokeBlocking(qname,
>>>> Args, returnTypes);
>>>>            OkUser result = (OkUser) response2[0];
>>>>            if (result == null) {
>>>>                System.err.println("getUserById didn't initialize!");
>>>>            }
>>>>            System.err.println("result : " + result.getEmail());
>>>>
>>>>
>>>> OkUser class is a pojo class linked to others classes like OkUnit.
>>>> All classes are available in the classpath.
>>>>
>>>> Thanks for helping me understanding what this mapping not found
>>>>         
> means.
>   
>>>> Damien Sauvageot
>>>>
>>>>
>>>>
>>>>
>>>> HTTP/1.1 500 Internal Server Error
>>>> Date: Mon, 14 May 2007 12:03:12 GMT
>>>> Server: Apache/2.0.54 (Debian GNU/Linux) mod_jk2/2.0.4 PHP/4.3.10-16
>>>> mod_ssl/2.0.54 OpenSSL/0.9.7e
>>>> Content-Type: 
>>>> application/xml;action="http://www.w3.org/2005/08/addressing/soap/fa
>>>> ult";;charset=UTF-8
>>>>
>>>> Connection: close
>>>> Transfer-Encoding: chunked
>>>>
>>>> ec3
>>>> <Exception>org.apache.axis2.AxisFault: Exception occurred while 
>>>> trying to invoke service method getUserById
>>>>    at
>>>> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogi
>>>> c(RPCMessageReceiver.java:157)
>>>>
>>>>    at
>>>> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(
>>>> AbstractInOutSyncMessageReceiver.java:39)
>>>>
>>>>    at
>>>>         
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
>   
>>>>    at
>>>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRe
>>>> quest(HTTPTransportUtils.java:279)
>>>>
>>>>    at
>>>> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:
>>>> 116)
>>>>
>>>>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>>>>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>>>    at
>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App
>>>> licationFilterChain.java:252)
>>>>
>>>>    at
>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(Application
>>>> FilterChain.java:173)
>>>>
>>>>    at
>>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapper
>>>> Valve.java:213)
>>>>
>>>>    at
>>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContext
>>>> Valve.java:178)
>>>>
>>>>    at
>>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.
>>>> java:126)
>>>>
>>>>    at
>>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.
>>>> java:105)
>>>>
>>>>    at
>>>>         
> org.josso.tc55.agent.SSOAgentValve.invoke(SSOAgentValve.java:356)
>   
>>>>    at
>>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVa
>>>> lve.java:107)
>>>>
>>>>    at
>>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.ja
>>>> va:148)
>>>>
>>>>    at
>>>>
>>>>         
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
>   
>>>>    at
>>>> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
>>>>    at
>>>>         
> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
>   
>>>>    at
>>>> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.j
>>>> ava:678)
>>>>
>>>>    at
>>>> org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
>>>>    at
>>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thread
>>>> Pool.java:684)
>>>>
>>>>    at java.lang.Thread.run(Thread.java:534)
>>>> Caused by: org.apache.axiom.om.OMException: 
>>>> java.lang.RuntimeException: org.apache.axis2.AxisFault: Mapping 
>>>> qname not fond for the package: com.ok.products.okauth.pojo
>>>>    at
>>>> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.ja
>>>> va:211)
>>>>
>>>>    at
>>>> org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:315)
>>>>    at
>>>> org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java
>>>> :608)
>>>>
>>>>    at
>>>> org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.jav
>>>> a:577)
>>>>
>>>>    at
>>>>
>>>>         
> org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:114)
>   
>>>>    at
>>>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.j
>>>> ava:236)
>>>>
>>>>    at
>>>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.j
>>>> ava:192)
>>>>
>>>>    at
>>>> org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:
>>>> 105)
>>>>
>>>>    at
>>>> org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:
>>>> 251)
>>>>
>>>>    at
>>>> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogi
>>>> c(RPCMessageReceiver.java:134)
>>>>
>>>>    ... 22 more
>>>> Caused by: java.lang.RuntimeException: org.apache.axis2.AxisFault: 
>>>> Mapping qname not fond for the package: com.ok.products.okauth.pojo
>>>>    at
>>>> org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.j
>>>> ava:288)
>>>>
>>>>    at
>>>> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.pro
>>>> cessProperties(ADBXMLStreamReaderImpl.java:926)
>>>>
>>>>    at
>>>> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.nex
>>>> t(ADBXMLStreamReaderImpl.java:799)
>>>>
>>>>    at
>>>>         
> org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:68)
>   
>>>>    at
>>>> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.ja
>>>> va:125)
>>>>
>>>>    ... 31 more
>>>> Caused by: org.apache.axis2.AxisFault: Mapping qname not fond for 
>>>> the package: com.ok.products.okauth.pojo
>>>>    at
>>>> org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.j
>>>> ava:102)
>>>>
>>>>    ... 35 more
>>>> </Exception>
>>>> 0
>>>>
>>>>
>>>> --------------------------------------------------------------------
>>>> - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>
>>>>
>>>>         
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
> -----------------------------------------
> The information contained in this e-mail message is intended only
> for the personal and confidential use of the recipient(s) named
> above. This message may be an attorney-client communication and/or
> work product and as such is privileged and confidential. If the
> reader of this message is not the intended recipient or an agent
> responsible for delivering it to the intended recipient, you are
> hereby notified that you have received this document in error and
> that any review, dissemination, distribution, or copying of this
> message is strictly prohibited. If you have received this
> communication in error, please notify us immediately by e-mail, and
> delete the original message.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>   


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


RE: [Axis2] Mapping qname not fond for the package

Posted by Bob Rhodes <Bo...@choicepoint.com>.
I had the exact same problem when returning a List of my HistoryItem
objects. I changed the code to return an HistoryItem[] instead of the
List and now it works fine. You might want to try that.

Bob 

-----Original Message-----
From: Damien Sauvageot [mailto:damien@sauvageot.org] 
Sent: Tuesday, May 15, 2007 4:19 AM
To: axis-user@ws.apache.org
Subject: Re: [Axis2] Mapping qname not fond for the package

I made another test by removing all other services from okauth and
sending back a simple okuser.
It works fine.
If I try to send back a List of OkUser, I get the mapping problem again.
So I guess my problem is linked to the bug 2148.
Does that mean it is impossible to send back complex type or even a List
of sinple POJO?

The problem might come from the WSDL generation as when I send back a
List, I do not have any more reference to OkUser.

Damien


Damien Sauvageot wrote:
> Hi Martin and thanks for your help,
>
> I tried changing the endpoint and the result is the same.
> I am surprised as the result is always the same using different 
> endpointreference as :
> http://192.168.6.202:8182/josso/services/okauth/
> http://192.168.6.202:8182/josso/services/okauth/getUserById
> http://192.168.6.202:8182/josso/services/okauth/xxxx
>
> The web services is always called as I can see the logs of the 
> getUserById function on the server side.
> The problem is apparently in axis2 after calling the service when 
> generating the SOAP answer.
> I suppose this means the problem is on the server side and not on the 
> client side.
>
>
> The only relevant information I found on google is this one :
> https://issues.apache.org/jira/browse/AXIS2-2148?page=com.atlassian.ji
> ra.plugin.system.issuetabpanels:all-tabpanel
>
> In order to be sure that my case is different, I modified OkUser in 
> order to be a simple pojo. see code below.
>
> I also looked at org.apache.ws.java2wsdl.utils.TypeTable which does 
> not return any Qname when called through getQNamefortheType I guess 
> OkUser should be on the complex schema type.
> I did not find where it should be added and how.
>
> Thanks,
>
> Damien
>
>
>
> package com.ok.products.okauth.pojo;
>
>
> public class OkBaseUser {
>    private Long id;
>    private String username;
>    private String password;
>    private String firstName;
>    private String lastName;
>    private String phoneNumber;
>    private String email;
>
>    public OkBaseUser() {
>        super();
>    }
>      public OkBaseUser(Long id, String username, String password,
>            String firstName, String lastName, String phoneNumber, 
> String email) {
>        super();
>        this.id = id;
>        this.username = username;
>        this.password = password;
>        this.firstName = firstName;
>        this.lastName = lastName;
>        this.phoneNumber = phoneNumber;
>        this.email = email;
>    }
>
>    public boolean equals(Object value) {
>        return super.equals(value);
>    }
>
>    public int hashCode() {
>        return super.hashCode();
>    }
>
>    public String toString() {          return super.toString();
>    }
>
>    public Long getId() {
>        return this.id;
>    }
>
>    public void setId(Long value) {
>        this.id = value;
>    }
>
>    public String getUsername() {
>        return this.username;
>    }
>
>    public void setUsername(String value) {
>        this.username = value;
>    }
>
>    public String getPassword() {
>        return this.password;
>    }
>
>    public void setPassword(String value) {
>        this.password = value;
>    }
>
>    public String getFirstName() {
>        return this.firstName;
>    }
>
>    public void setFirstName(String value) {
>        this.firstName = value;
>    }
>
>    public String getLastName() {
>        return this.lastName;
>    }
>
>    public void setLastName(String value) {
>        this.lastName = value;
>    }
>
>    public String getPhoneNumber() {
>        return this.phoneNumber;
>    }
>
>    public void setPhoneNumber(String value) {
>        this.phoneNumber = value;
>    }
>
>    public String getEmail() {
>        return this.email;
>    }
>
>    public void setEmail(String value) {
>        this.email = value;
>    }
> }
>
>
> Martin Gainty wrote:
>> Good Morning Damien--
>>
>> Assuming you have OkUser class defined/compiled and on CLASSPATH and 
>> okauth has getUserByID method which will return "toto" is 
>> defined/compiled and is on CLASSPATH
>>
>> The only item I see which may cause null return result is your 
>> endpointReference declaration which is the name of the service e.g.
>> EndpointReference targetEPR = new EndpointReference(
>>                
>> "http://127.0.0.1:8080/axis2/services/AddressBookService");
>> AddressBookService is the name of the WS you are referencing
>>
>> so in your situation
>> EndpointReference targetEPR = new
>> EndpointReference("http://192.168.6.202:8182/josso/services/okauth/ge
>> tUserById");
>>
>>
>> change to the actual name of the deployed service (assuming that 
>> okauth is the name of the deployed service) EndpointReference 
>> targetEPR = new 
>> EndpointReference(http://192.168.6.202:8182/josso/services/okauth);
>>
>> Martin--
>> This email message and any files transmitted with it contain 
>> confidential information intended only for the person(s) to whom this

>> email message is addressed.  If you have received this email message 
>> in error, please notify the sender immediately by telephone or email 
>> and destroy the original message without making a copy.  Thank you.
>>
>> ----- Original Message ----- From: "Damien Sauvageot" 
>> <da...@sauvageot.org>
>> To: <ax...@ws.apache.org>
>> Sent: Monday, May 14, 2007 11:07 AM
>> Subject: [Axis2] Mapping qname not fond for the package
>>
>>
>>> Hi,
>>>
>>> Could someone explain me the meaning of this error message.
>>> It happens on the server side. I catched this error with tcpmon.
>>> I firstly thought it was not able to load the return class type but 
>>> this class is in the classpath.
>>> here is the client code which does not crash but result is null.
>>>
>>>            EndpointReference targetEPR = new 
>>> EndpointReference("http://192.168.6.202:8182/josso/services/okauth/g
>>> etUserById");
>>>
>>>            Object[] Args = new Object[] { new String("toto") };
>>>            Class[] returnTypes = new Class[] { OkUser.class };
>>>            QName qname = new
>>> QName("http://impl.service.okauth.products.ok.com/xsd",
"getUserById");
>>>            RPCServiceClient serviceClient = 
>>> this.getRPCServiceClient(targetEPR);
>>>            Object[] response2 = serviceClient.invokeBlocking(qname,
>>> Args, returnTypes);
>>>            OkUser result = (OkUser) response2[0];
>>>            if (result == null) {
>>>                System.err.println("getUserById didn't initialize!");
>>>            }
>>>            System.err.println("result : " + result.getEmail());
>>>
>>>
>>> OkUser class is a pojo class linked to others classes like OkUnit.
>>> All classes are available in the classpath.
>>>
>>> Thanks for helping me understanding what this mapping not found
means.
>>>
>>> Damien Sauvageot
>>>
>>>
>>>
>>>
>>> HTTP/1.1 500 Internal Server Error
>>> Date: Mon, 14 May 2007 12:03:12 GMT
>>> Server: Apache/2.0.54 (Debian GNU/Linux) mod_jk2/2.0.4 PHP/4.3.10-16
>>> mod_ssl/2.0.54 OpenSSL/0.9.7e
>>> Content-Type: 
>>> application/xml;action="http://www.w3.org/2005/08/addressing/soap/fa
>>> ult";;charset=UTF-8
>>>
>>> Connection: close
>>> Transfer-Encoding: chunked
>>>
>>> ec3
>>> <Exception>org.apache.axis2.AxisFault: Exception occurred while 
>>> trying to invoke service method getUserById
>>>    at
>>> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogi
>>> c(RPCMessageReceiver.java:157)
>>>
>>>    at
>>> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(
>>> AbstractInOutSyncMessageReceiver.java:39)
>>>
>>>    at
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
>>>    at
>>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRe
>>> quest(HTTPTransportUtils.java:279)
>>>
>>>    at
>>> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:
>>> 116)
>>>
>>>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>>>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>>    at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App
>>> licationFilterChain.java:252)
>>>
>>>    at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(Application
>>> FilterChain.java:173)
>>>
>>>    at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapper
>>> Valve.java:213)
>>>
>>>    at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContext
>>> Valve.java:178)
>>>
>>>    at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.
>>> java:126)
>>>
>>>    at
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.
>>> java:105)
>>>
>>>    at
org.josso.tc55.agent.SSOAgentValve.invoke(SSOAgentValve.java:356)
>>>    at
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVa
>>> lve.java:107)
>>>
>>>    at
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.ja
>>> va:148)
>>>
>>>    at
>>>
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
>>>    at
>>> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
>>>    at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
>>>    at
>>> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.j
>>> ava:678)
>>>
>>>    at
>>> org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
>>>    at
>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thread
>>> Pool.java:684)
>>>
>>>    at java.lang.Thread.run(Thread.java:534)
>>> Caused by: org.apache.axiom.om.OMException: 
>>> java.lang.RuntimeException: org.apache.axis2.AxisFault: Mapping 
>>> qname not fond for the package: com.ok.products.okauth.pojo
>>>    at
>>> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.ja
>>> va:211)
>>>
>>>    at
>>> org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:315)
>>>    at
>>> org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java
>>> :608)
>>>
>>>    at
>>> org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.jav
>>> a:577)
>>>
>>>    at
>>>
org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:114)
>>>    at
>>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.j
>>> ava:236)
>>>
>>>    at
>>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.j
>>> ava:192)
>>>
>>>    at
>>> org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:
>>> 105)
>>>
>>>    at
>>> org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:
>>> 251)
>>>
>>>    at
>>> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogi
>>> c(RPCMessageReceiver.java:134)
>>>
>>>    ... 22 more
>>> Caused by: java.lang.RuntimeException: org.apache.axis2.AxisFault: 
>>> Mapping qname not fond for the package: com.ok.products.okauth.pojo
>>>    at
>>> org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.j
>>> ava:288)
>>>
>>>    at
>>> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.pro
>>> cessProperties(ADBXMLStreamReaderImpl.java:926)
>>>
>>>    at
>>> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.nex
>>> t(ADBXMLStreamReaderImpl.java:799)
>>>
>>>    at
org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:68)
>>>    at
>>> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.ja
>>> va:125)
>>>
>>>    ... 31 more
>>> Caused by: org.apache.axis2.AxisFault: Mapping qname not fond for 
>>> the package: com.ok.products.okauth.pojo
>>>    at
>>> org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.j
>>> ava:102)
>>>
>>>    ... 35 more
>>> </Exception>
>>> 0
>>>
>>>
>>> --------------------------------------------------------------------
>>> - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>


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

-----------------------------------------
The information contained in this e-mail message is intended only
for the personal and confidential use of the recipient(s) named
above. This message may be an attorney-client communication and/or
work product and as such is privileged and confidential. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are
hereby notified that you have received this document in error and
that any review, dissemination, distribution, or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by e-mail, and
delete the original message.

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


Re: [Axis2] Mapping qname not fond for the package

Posted by Damien Sauvageot <da...@sauvageot.org>.
I made another test by removing all other services from okauth and 
sending back a simple okuser.
It works fine.
If I try to send back a List of OkUser, I get the mapping problem again.
So I guess my problem is linked to the bug 2148.
Does that mean it is impossible to send back complex type or even a List 
of sinple POJO?

The problem might come from the WSDL generation as when I send back a 
List, I do not
have any more reference to OkUser.

Damien


Damien Sauvageot wrote:
> Hi Martin and thanks for your help,
>
> I tried changing the endpoint and the result is the same.
> I am surprised as the result is always the same using different 
> endpointreference as :
> http://192.168.6.202:8182/josso/services/okauth/
> http://192.168.6.202:8182/josso/services/okauth/getUserById
> http://192.168.6.202:8182/josso/services/okauth/xxxx
>
> The web services is always called as I can see the logs of the 
> getUserById function on the server side.
> The problem is apparently in axis2 after calling the service when 
> generating the SOAP answer.
> I suppose this means the problem is on the server side and not on the 
> client side.
>
>
> The only relevant information I found on google is this one :
> https://issues.apache.org/jira/browse/AXIS2-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel 
>
> In order to be sure that my case is different, I modified OkUser in 
> order to be a simple pojo. see code below.
>
> I also looked at org.apache.ws.java2wsdl.utils.TypeTable which does 
> not return any Qname when called through getQNamefortheType
> I guess OkUser should be on the complex schema type.
> I did not find where it should be added and how.
>
> Thanks,
>
> Damien
>
>
>
> package com.ok.products.okauth.pojo;
>
>
> public class OkBaseUser {
>    private Long id;
>    private String username;
>    private String password;
>    private String firstName;
>    private String lastName;
>    private String phoneNumber;
>    private String email;
>
>    public OkBaseUser() {
>        super();
>    }
>      public OkBaseUser(Long id, String username, String password,
>            String firstName, String lastName, String phoneNumber, 
> String email) {
>        super();
>        this.id = id;
>        this.username = username;
>        this.password = password;
>        this.firstName = firstName;
>        this.lastName = lastName;
>        this.phoneNumber = phoneNumber;
>        this.email = email;
>    }
>
>    public boolean equals(Object value) {
>        return super.equals(value);
>    }
>
>    public int hashCode() {
>        return super.hashCode();
>    }
>
>    public String toString() {          return super.toString();
>    }
>
>    public Long getId() {
>        return this.id;
>    }
>
>    public void setId(Long value) {
>        this.id = value;
>    }
>
>    public String getUsername() {
>        return this.username;
>    }
>
>    public void setUsername(String value) {
>        this.username = value;
>    }
>
>    public String getPassword() {
>        return this.password;
>    }
>
>    public void setPassword(String value) {
>        this.password = value;
>    }
>
>    public String getFirstName() {
>        return this.firstName;
>    }
>
>    public void setFirstName(String value) {
>        this.firstName = value;
>    }
>
>    public String getLastName() {
>        return this.lastName;
>    }
>
>    public void setLastName(String value) {
>        this.lastName = value;
>    }
>
>    public String getPhoneNumber() {
>        return this.phoneNumber;
>    }
>
>    public void setPhoneNumber(String value) {
>        this.phoneNumber = value;
>    }
>
>    public String getEmail() {
>        return this.email;
>    }
>
>    public void setEmail(String value) {
>        this.email = value;
>    }
> }
>
>
> Martin Gainty wrote:
>> Good Morning Damien--
>>
>> Assuming you have OkUser class defined/compiled and on CLASSPATH and
>> okauth has getUserByID method which will return "toto" is 
>> defined/compiled and is on CLASSPATH
>>
>> The only item I see which may cause null return result is your 
>> endpointReference declaration which is the name of the service e.g.
>> EndpointReference targetEPR = new EndpointReference(
>>                
>> "http://127.0.0.1:8080/axis2/services/AddressBookService");
>> AddressBookService is the name of the WS you are referencing
>>
>> so in your situation
>> EndpointReference targetEPR = new 
>> EndpointReference("http://192.168.6.202:8182/josso/services/okauth/getUserById"); 
>>
>>
>> change to the actual name of the deployed service (assuming that 
>> okauth is the name of the deployed service)
>> EndpointReference targetEPR = new 
>> EndpointReference(http://192.168.6.202:8182/josso/services/okauth);
>>
>> Martin--
>> This email message and any files transmitted with it contain 
>> confidential
>> information intended only for the person(s) to whom this email 
>> message is
>> addressed.  If you have received this email message in error, please 
>> notify
>> the sender immediately by telephone or email and destroy the original
>> message without making a copy.  Thank you.
>>
>> ----- Original Message ----- From: "Damien Sauvageot" 
>> <da...@sauvageot.org>
>> To: <ax...@ws.apache.org>
>> Sent: Monday, May 14, 2007 11:07 AM
>> Subject: [Axis2] Mapping qname not fond for the package
>>
>>
>>> Hi,
>>>
>>> Could someone explain me the meaning of this error message.
>>> It happens on the server side. I catched this error with tcpmon.
>>> I firstly thought it was not able to load the return class type but 
>>> this class is in the classpath.
>>> here is the client code which does not crash but result is null.
>>>
>>>            EndpointReference targetEPR = new 
>>> EndpointReference("http://192.168.6.202:8182/josso/services/okauth/getUserById"); 
>>>
>>>            Object[] Args = new Object[] { new String("toto") };
>>>            Class[] returnTypes = new Class[] { OkUser.class };
>>>            QName qname = new 
>>> QName("http://impl.service.okauth.products.ok.com/xsd", "getUserById");
>>>            RPCServiceClient serviceClient = 
>>> this.getRPCServiceClient(targetEPR);
>>>            Object[] response2 = serviceClient.invokeBlocking(qname, 
>>> Args, returnTypes);
>>>            OkUser result = (OkUser) response2[0];
>>>            if (result == null) {
>>>                System.err.println("getUserById didn't initialize!");
>>>            }
>>>            System.err.println("result : " + result.getEmail());
>>>
>>>
>>> OkUser class is a pojo class linked to others classes like OkUnit.
>>> All classes are available in the classpath.
>>>
>>> Thanks for helping me understanding what this mapping not found means.
>>>
>>> Damien Sauvageot
>>>
>>>
>>>
>>>
>>> HTTP/1.1 500 Internal Server Error
>>> Date: Mon, 14 May 2007 12:03:12 GMT
>>> Server: Apache/2.0.54 (Debian GNU/Linux) mod_jk2/2.0.4 PHP/4.3.10-16 
>>> mod_ssl/2.0.54 OpenSSL/0.9.7e
>>> Content-Type: 
>>> application/xml;action="http://www.w3.org/2005/08/addressing/soap/fault";;charset=UTF-8 
>>>
>>> Connection: close
>>> Transfer-Encoding: chunked
>>>
>>> ec3
>>> <Exception>org.apache.axis2.AxisFault: Exception occurred while 
>>> trying to invoke service method getUserById
>>>    at 
>>> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:157) 
>>>
>>>    at 
>>> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39) 
>>>
>>>    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
>>>    at 
>>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:279) 
>>>
>>>    at 
>>> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:116) 
>>>
>>>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>>>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>>    at 
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) 
>>>
>>>    at 
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) 
>>>
>>>    at 
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
>>>
>>>    at 
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) 
>>>
>>>    at 
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) 
>>>
>>>    at 
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) 
>>>
>>>    at org.josso.tc55.agent.SSOAgentValve.invoke(SSOAgentValve.java:356)
>>>    at 
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) 
>>>
>>>    at 
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) 
>>>
>>>    at 
>>> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
>>>    at 
>>> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
>>>    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
>>>    at 
>>> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678) 
>>>
>>>    at 
>>> org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
>>>    at 
>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) 
>>>
>>>    at java.lang.Thread.run(Thread.java:534)
>>> Caused by: org.apache.axiom.om.OMException: 
>>> java.lang.RuntimeException: org.apache.axis2.AxisFault: Mapping 
>>> qname not fond for the package: com.ok.products.okauth.pojo
>>>    at 
>>> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:211) 
>>>
>>>    at 
>>> org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:315)
>>>    at 
>>> org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:608) 
>>>
>>>    at 
>>> org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:577) 
>>>
>>>    at 
>>> org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:114)
>>>    at 
>>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:236) 
>>>
>>>    at 
>>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:192) 
>>>
>>>    at 
>>> org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:105) 
>>>
>>>    at 
>>> org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:251) 
>>>
>>>    at 
>>> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:134) 
>>>
>>>    ... 22 more
>>> Caused by: java.lang.RuntimeException: org.apache.axis2.AxisFault: 
>>> Mapping qname not fond for the package: com.ok.products.okauth.pojo
>>>    at 
>>> org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:288) 
>>>
>>>    at 
>>> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.processProperties(ADBXMLStreamReaderImpl.java:926) 
>>>
>>>    at 
>>> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXMLStreamReaderImpl.java:799) 
>>>
>>>    at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:68)
>>>    at 
>>> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:125) 
>>>
>>>    ... 31 more
>>> Caused by: org.apache.axis2.AxisFault: Mapping qname not fond for 
>>> the package: com.ok.products.okauth.pojo
>>>    at 
>>> org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:102) 
>>>
>>>    ... 35 more
>>> </Exception>
>>> 0
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>


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


Re: [Axis2] Mapping qname not fond for the package

Posted by Damien Sauvageot <da...@sauvageot.org>.
Hi Martin and thanks for your help,

I tried changing the endpoint and the result is the same.
I am surprised as the result is always the same using different 
endpointreference as :
http://192.168.6.202:8182/josso/services/okauth/
http://192.168.6.202:8182/josso/services/okauth/getUserById
http://192.168.6.202:8182/josso/services/okauth/xxxx

The web services is always called as I can see the logs of the 
getUserById function on the server side.
The problem is apparently in axis2 after calling the service when 
generating the SOAP answer.
I suppose this means the problem is on the server side and not on the 
client side.


The only relevant information I found on google is this one :
https://issues.apache.org/jira/browse/AXIS2-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
In order to be sure that my case is different, I modified OkUser in 
order to be a simple pojo. see code below.

I also looked at org.apache.ws.java2wsdl.utils.TypeTable which does not 
return any Qname when called through getQNamefortheType
I guess OkUser should be on the complex schema type.
I did not find where it should be added and how.

Thanks,

Damien



package com.ok.products.okauth.pojo;


public class OkBaseUser {
    private Long id;
    private String username;
    private String password;
    private String firstName;
    private String lastName;
    private String phoneNumber;
    private String email;

    public OkBaseUser() {
        super();
    }
   
    public OkBaseUser(Long id, String username, String password,
            String firstName, String lastName, String phoneNumber, 
String email) {
        super();
        this.id = id;
        this.username = username;
        this.password = password;
        this.firstName = firstName;
        this.lastName = lastName;
        this.phoneNumber = phoneNumber;
        this.email = email;
    }

    public boolean equals(Object value) {
        return super.equals(value);
    }

    public int hashCode() {
        return super.hashCode();
    }

    public String toString() {   
        return super.toString();
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long value) {
        this.id = value;
    }

    public String getUsername() {
        return this.username;
    }

    public void setUsername(String value) {
        this.username = value;
    }

    public String getPassword() {
        return this.password;
    }

    public void setPassword(String value) {
        this.password = value;
    }

    public String getFirstName() {
        return this.firstName;
    }

    public void setFirstName(String value) {
        this.firstName = value;
    }

    public String getLastName() {
        return this.lastName;
    }

    public void setLastName(String value) {
        this.lastName = value;
    }

    public String getPhoneNumber() {
        return this.phoneNumber;
    }

    public void setPhoneNumber(String value) {
        this.phoneNumber = value;
    }

    public String getEmail() {
        return this.email;
    }

    public void setEmail(String value) {
        this.email = value;
    }
}


Martin Gainty wrote:
> Good Morning Damien--
>
> Assuming you have OkUser class defined/compiled and on CLASSPATH and
> okauth has getUserByID method which will return "toto" is 
> defined/compiled and is on CLASSPATH
>
> The only item I see which may cause null return result is your 
> endpointReference declaration which is the name of the service e.g.
> EndpointReference targetEPR = new EndpointReference(
>                
> "http://127.0.0.1:8080/axis2/services/AddressBookService");
> AddressBookService is the name of the WS you are referencing
>
> so in your situation
> EndpointReference targetEPR = new 
> EndpointReference("http://192.168.6.202:8182/josso/services/okauth/getUserById"); 
>
>
> change to the actual name of the deployed service (assuming that 
> okauth is the name of the deployed service)
> EndpointReference targetEPR = new 
> EndpointReference(http://192.168.6.202:8182/josso/services/okauth);
>
> Martin--
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please 
> notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
> ----- Original Message ----- From: "Damien Sauvageot" 
> <da...@sauvageot.org>
> To: <ax...@ws.apache.org>
> Sent: Monday, May 14, 2007 11:07 AM
> Subject: [Axis2] Mapping qname not fond for the package
>
>
>> Hi,
>>
>> Could someone explain me the meaning of this error message.
>> It happens on the server side. I catched this error with tcpmon.
>> I firstly thought it was not able to load the return class type but 
>> this class is in the classpath.
>> here is the client code which does not crash but result is null.
>>
>>            EndpointReference targetEPR = new 
>> EndpointReference("http://192.168.6.202:8182/josso/services/okauth/getUserById"); 
>>
>>            Object[] Args = new Object[] { new String("toto") };
>>            Class[] returnTypes = new Class[] { OkUser.class };
>>            QName qname = new 
>> QName("http://impl.service.okauth.products.ok.com/xsd", "getUserById");
>>            RPCServiceClient serviceClient = 
>> this.getRPCServiceClient(targetEPR);
>>            Object[] response2 = serviceClient.invokeBlocking(qname, 
>> Args, returnTypes);
>>            OkUser result = (OkUser) response2[0];
>>            if (result == null) {
>>                System.err.println("getUserById didn't initialize!");
>>            }
>>            System.err.println("result : " + result.getEmail());
>>
>>
>> OkUser class is a pojo class linked to others classes like OkUnit.
>> All classes are available in the classpath.
>>
>> Thanks for helping me understanding what this mapping not found means.
>>
>> Damien Sauvageot
>>
>>
>>
>>
>> HTTP/1.1 500 Internal Server Error
>> Date: Mon, 14 May 2007 12:03:12 GMT
>> Server: Apache/2.0.54 (Debian GNU/Linux) mod_jk2/2.0.4 PHP/4.3.10-16 
>> mod_ssl/2.0.54 OpenSSL/0.9.7e
>> Content-Type: 
>> application/xml;action="http://www.w3.org/2005/08/addressing/soap/fault";;charset=UTF-8 
>>
>> Connection: close
>> Transfer-Encoding: chunked
>>
>> ec3
>> <Exception>org.apache.axis2.AxisFault: Exception occurred while 
>> trying to invoke service method getUserById
>>    at 
>> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:157) 
>>
>>    at 
>> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39) 
>>
>>    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
>>    at 
>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:279) 
>>
>>    at 
>> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:116)
>>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>    at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) 
>>
>>    at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) 
>>
>>    at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
>>
>>    at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) 
>>
>>    at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) 
>>
>>    at 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) 
>>
>>    at org.josso.tc55.agent.SSOAgentValve.invoke(SSOAgentValve.java:356)
>>    at 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) 
>>
>>    at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) 
>>
>>    at 
>> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
>>    at 
>> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
>>    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
>>    at 
>> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678) 
>>
>>    at 
>> org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
>>    at 
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) 
>>
>>    at java.lang.Thread.run(Thread.java:534)
>> Caused by: org.apache.axiom.om.OMException: 
>> java.lang.RuntimeException: org.apache.axis2.AxisFault: Mapping qname 
>> not fond for the package: com.ok.products.okauth.pojo
>>    at 
>> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:211) 
>>
>>    at 
>> org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:315)
>>    at 
>> org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:608) 
>>
>>    at 
>> org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:577) 
>>
>>    at 
>> org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:114)
>>    at 
>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:236) 
>>
>>    at 
>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:192) 
>>
>>    at 
>> org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:105)
>>    at 
>> org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:251)
>>    at 
>> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:134) 
>>
>>    ... 22 more
>> Caused by: java.lang.RuntimeException: org.apache.axis2.AxisFault: 
>> Mapping qname not fond for the package: com.ok.products.okauth.pojo
>>    at 
>> org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:288) 
>>
>>    at 
>> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.processProperties(ADBXMLStreamReaderImpl.java:926) 
>>
>>    at 
>> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXMLStreamReaderImpl.java:799) 
>>
>>    at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:68)
>>    at 
>> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:125) 
>>
>>    ... 31 more
>> Caused by: org.apache.axis2.AxisFault: Mapping qname not fond for the 
>> package: com.ok.products.okauth.pojo
>>    at 
>> org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:102) 
>>
>>    ... 35 more
>> </Exception>
>> 0
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>


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


Re: [Axis2] Mapping qname not fond for the package

Posted by Martin Gainty <mg...@hotmail.com>.
Good Morning Damien--

Assuming you have OkUser class defined/compiled and on CLASSPATH and
okauth has getUserByID method which will return "toto" is defined/compiled 
and is on CLASSPATH

The only item I see which may cause null return result is your 
endpointReference declaration which is the name of the service e.g.
EndpointReference targetEPR = new EndpointReference(
                "http://127.0.0.1:8080/axis2/services/AddressBookService");
AddressBookService is the name of the WS you are referencing

so in your situation
 EndpointReference targetEPR = new 
EndpointReference("http://192.168.6.202:8182/josso/services/okauth/getUserById");

change to the actual name of the deployed service (assuming that okauth is 
the name of the deployed service)
 EndpointReference targetEPR = new 
EndpointReference(http://192.168.6.202:8182/josso/services/okauth);

Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Damien Sauvageot" <da...@sauvageot.org>
To: <ax...@ws.apache.org>
Sent: Monday, May 14, 2007 11:07 AM
Subject: [Axis2] Mapping qname not fond for the package


> Hi,
>
> Could someone explain me the meaning of this error message.
> It happens on the server side. I catched this error with tcpmon.
> I firstly thought it was not able to load the return class type but this 
> class is in the classpath.
> here is the client code which does not crash but result is null.
>
>            EndpointReference targetEPR = new 
> EndpointReference("http://192.168.6.202:8182/josso/services/okauth/getUserById");
>            Object[] Args = new Object[] { new String("toto") };
>            Class[] returnTypes = new Class[] { OkUser.class };
>            QName qname = new 
> QName("http://impl.service.okauth.products.ok.com/xsd", "getUserById");
>            RPCServiceClient serviceClient = 
> this.getRPCServiceClient(targetEPR);
>            Object[] response2 = serviceClient.invokeBlocking(qname, Args, 
> returnTypes);
>            OkUser result = (OkUser) response2[0];
>            if (result == null) {
>                System.err.println("getUserById didn't initialize!");
>            }
>            System.err.println("result : " + result.getEmail());
>
>
> OkUser class is a pojo class linked to others classes like OkUnit.
> All classes are available in the classpath.
>
> Thanks for helping me understanding what this mapping not found means.
>
> Damien Sauvageot
>
>
>
>
> HTTP/1.1 500 Internal Server Error
> Date: Mon, 14 May 2007 12:03:12 GMT
> Server: Apache/2.0.54 (Debian GNU/Linux) mod_jk2/2.0.4 PHP/4.3.10-16 
> mod_ssl/2.0.54 OpenSSL/0.9.7e
> Content-Type: 
> application/xml;action="http://www.w3.org/2005/08/addressing/soap/fault";;charset=UTF-8
> Connection: close
> Transfer-Encoding: chunked
>
> ec3
> <Exception>org.apache.axis2.AxisFault: Exception occurred while trying to 
> invoke service method getUserById
>    at 
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:157)
>    at 
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)
>    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
>    at 
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:279)
>    at 
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:116)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>    at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>    at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>    at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>    at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>    at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>    at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>    at org.josso.tc55.agent.SSOAgentValve.invoke(SSOAgentValve.java:356)
>    at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>    at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>    at 
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
>    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
>    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
>    at 
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
>    at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
>    at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>    at java.lang.Thread.run(Thread.java:534)
> Caused by: org.apache.axiom.om.OMException: java.lang.RuntimeException: 
> org.apache.axis2.AxisFault: Mapping qname not fond for the package: 
> com.ok.products.okauth.pojo
>    at 
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:211)
>    at org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:315)
>    at 
> org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:608)
>    at 
> org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:577)
>    at 
> org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:114)
>    at 
> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:236)
>    at 
> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:192)
>    at 
> org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:105)
>    at 
> org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:251)
>    at 
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:134)
>    ... 22 more
> Caused by: java.lang.RuntimeException: org.apache.axis2.AxisFault: Mapping 
> qname not fond for the package: com.ok.products.okauth.pojo
>    at 
> org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:288)
>    at 
> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.processProperties(ADBXMLStreamReaderImpl.java:926)
>    at 
> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXMLStreamReaderImpl.java:799)
>    at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:68)
>    at 
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:125)
>    ... 31 more
> Caused by: org.apache.axis2.AxisFault: Mapping qname not fond for the 
> package: com.ok.products.okauth.pojo
>    at 
> org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:102)
>    ... 35 more
> </Exception>
> 0
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
> 


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