axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damien Sauvageot <dam...@sauvageot.org>
Subject Re: [Axis2] Mapping qname not fond for the package
Date Tue, 15 May 2007 08:18:35 GMT
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" 
>> <damien@sauvageot.org>
>> To: <axis-user@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


Mime
View raw message