On Sun, Feb 12, 2012 at 3:52 PM, Nirmal Fernando <[email protected]> wrote:

> Hi Kasun,
>
> On Sun, Feb 12, 2012 at 3:30 PM, KasunG Gajasinghe <[email protected]>wrote:
>
>> Hi,
>>
>> I believe ResponseTimeCalculator might not be the reason for this,
>> because it isn't the root cause most of the time in cases like this. The
>> stacktrace for the real cause has been swallowed by someone.
>>
>
> Yes, exactly! AFAIS the reason is Axis2 dispatchers can't find the correct
> operation mapping (mobile -> addMobileNumber), hence there's a null in
> message context object for axis operation.
>

This mapping indeed happens inside AS standalone. Analyze the SOAP message
via SOAP Tracer or tcpmon. Could there be any stratos specific reason to
have a different behavior?

And, one more thing. Rest samples takes ages (At least 3min+ ) to deploy.
So, just wait around 5-10 minutes to let the service deploy. [3] I've faced
this issue for a REST service I wrote. And, I'm seeing this in the provided
aar as well. The issue might be that it couldn't resolve xml.xsd. This
might not relate to you anyway.



>
>
>
>>
>> Saying that, I tried the very service in AS trunk pack standalone
>> version. It worked as expected though.
>>
>
> Oh...
>
>
>> ie. [1] worked as it should, and [2] worked fine too to my surprise.
>>
>
> [2] should work fine, it's SOAP based invocation!
>

Please see my last comment.


>
>
 But the same error you posted generated for me when there was ANOTHER user
>> with the same "user" id. So, that might be the case of you. Have you tried
>> with different users and see how it behave?
>>
>
> I tried with different users, still the same issue. Anyhow if that's the
> case I should get that same error when using [2], but I didn't.
>

I see. In the wsdl, outfault MobileNumberAlreadyExistsException is there
for addMobileNumber. Can't be certain because I don't have the source, but
I did faced the said issue. Seems Exception name is misleading though; it
should be UserAlreadyExistsException.


>
>
>> Since whttp:location="mobile" is defined as the location
>> for ref="tns:addMobileNumber", [1] is the correct POST url.
>>
>
> Not really, both are correct! [1] for REST based invocations!
>


Only one binding is defined (MobileDirectoryServiceHttpBinding) in the
wsdl. And, in there, location "mobile" is set for addMobileNumber
operation. So, does the /addMobileNumber is also exposed as an API even
when a different location is set? What did I miss?

--KasunG


>
>> [1] curl --data "user=test5&mobileNumber=1234" -X POST
>> https://127.0.0.1:9443/services/MobileDirectoryService/mobile -k
>>
>> [2] curl --data "user=test10&mobileNumber=1234" -X POST
>> https://127.0.0.1:9443/services/MobileDirectoryService/addMobileNumber -k
>>
>

[3]

osgi> [Warning] XMLSchema.xsd:91:110: schema_reference.4: Failed to read
schema document 'http://www.w3.org/2001/xml.xsd', because 1) could not find
the document; 2) the document could not be read; 3) the root element of the
document is not <xsd:schema>.
[Error] XMLSchema.xsd:260:36: src-resolve: Cannot resolve the name
'xml:lang' to a(n) 'attribute declaration' component.
[Error] XMLSchema.xsd:260:36: s4s-elt-invalid-content.1: The content of
'#AnonType_schema' is invalid.  Element 'attribute' is invalid, misplaced,
or occurs too often.
[Error] XMLSchema.xsd:1277:35: s4s-elt-invalid-content.1: The content of
'#AnonType_documentation' is invalid.  Element 'attribute' is invalid,
misplaced, or occurs too often.
Woden[Warning],0:0,WSDL522,Could not parse a schema imported from URL "
http://www.w3.org/2001/XMLSchema.xsd".,org.apache.ws.commons.schema.XmlSchemaException:Could
not evaluate Schema Definition. This Schema contains Schema Imports that
were not resolved
osgi> Woden[Warning],0:0,Description-1001,The targetNamespace '
http://axis2.apache.org' is not dereferencable.
[2012-02-12 15:09:44,035] DEBUG
{org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying
service group : MobileDirectoryService {super-tenant}
[2012-02-12 15:09:44,036] DEBUG
{org.wso2.carbon.core.persistence.ServiceGroupPersistenceManager} -
 Successfully retrieved resource for MobileDirectoryService Service Group
[2012-02-12 15:09:44,055] DEBUG
{org.wso2.carbon.core.persistence.ServiceGroupPersistenceManager} -  Added
new service group - MobileDirectoryService
[2012-02-12 15:09:44,056] DEBUG
{org.wso2.carbon.core.persistence.ServicePersistenceManager} -
 Successfully retrieved resource for MobileDirectoryService Service
[2012-02-12 15:09:44,057]  INFO
{org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2
service: MobileDirectoryService {super-tenant}
[2012-02-12 15:09:44,230] DEBUG
{org.wso2.carbon.core.persistence.ServicePersistenceManager} -  Added new
service - MobileDirectoryService
[2012-02-12 15:09:44,232]  INFO
{org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service:
MobileDirectoryService.aar -
file:/home/kasun/wso2/as/wso2as-4.5.0-SNAPSHOT-222012/repository/deployment/server/axis2services/MobileDirectoryService.aar




>
>> Regards.
>> --KasunG
>>
>> On Sun, Feb 12, 2012 at 11:10 AM, Hiranya Jayathilaka 
>> <[email protected]>wrote:
>>
>>> Have you tried debugging into the  ResponseTimeCalculator? Should be
>>> pretty easy to figure out what's wrong.
>>>
>>> Thanks,
>>> Hiranya
>>>
>>> On Sun, Feb 12, 2012 at 10:21 AM, Nirmal Fernando <[email protected]>wrote:
>>>
>>>> Hi All,
>>>>
>>>> I'm having a trouble to make work a RESTfull Axis2 Service ( which is
>>>> worked a month back [1] ), in a trunk version and even in Axis2 1.6.1
>>>> binary distribution.
>>>> Related scenario is pasted at [2].
>>>>
>>>> Wonder what's wrong! Any help is highly appreciated.
>>>>
>>>> You can find the service attached at [1].
>>>>
>>>> [1] https://wso2.org/jira/browse/STRATOS-1971
>>>>
>>>> [2]
>>>>
>>>> nirmal@nirmal:/media/wso2/new-autoscaler$ curl --data
>>>> "user=nirmal&mobileNumber=1234" -X POST
>>>> https://127.0.0.1:9443/services/MobileDirectoryService/mobile -k
>>>> <html><head><title>Apache Tomcat/7.0.14 - Error
>>>> report</title><style><!--H1
>>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
>>>> H2
>>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
>>>> H3
>>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
>>>> BODY
>>>> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
>>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
>>>> P
>>>> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
>>>> {color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
>>>> </head><body><h1>HTTP Status 500 - </h1><HR size="1"
>>>> noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b>
>>>> <u></u></p><p><b>description</b> <u>The server encountered an internal
>>>> error () that prevented it from fulfilling this
>>>> request.</u></p><p><b>exception</b> <pre>java.lang.NullPointerException
>>>>
>>>> org.wso2.carbon.statistics.internal.ResponseTimeCalculator.updateCurrentInvocationStatistic(ResponseTimeCalculator.java:120)
>>>>
>>>> org.wso2.carbon.statistics.internal.ResponseTimeCalculator.calculateResponseTimes(ResponseTimeCalculator.java:61)
>>>>
>>>> org.wso2.carbon.statistics.module.FaultHandler.updateStatistics(FaultHandler.java:151)
>>>>
>>>> org.wso2.carbon.statistics.module.FaultHandler.invoke(FaultHandler.java:50)
>>>>     org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
>>>>     org.apache.axis2.engine.Phase.invoke(Phase.java:313)
>>>>     org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
>>>>     org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:516)
>>>>
>>>> org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:433)
>>>>
>>>> org.apache.axis2.transport.http.AxisServlet.processAxisFault(AxisServlet.java:398)
>>>>
>>>> org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processFault(AxisServlet.java:857)
>>>>
>>>> org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processXMLRequest(AxisServlet.java:830)
>>>>
>>>> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:227)
>>>>
>>>> org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:206)
>>>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
>>>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>>>
>>>> org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
>>>>
>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
>>>>
>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
>>>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>>>     org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:164)
>>>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>>> </pre></p><p><b>note</b> <u>The full stack trace of the root cause is
>>>> available in the Apache Tomcat/7.0.14 logs.</u></p><HR size="1"
>>>> noshade="noshade"><h3>Apache Tomcat/7.0.14</h3></body></html>
>>>>
>>>>
>>>> nirmal@nirmal:/media/wso2/new-autoscaler$ curl --data
>>>> "user=nirmal&mobileNumber=1234" -X POST
>>>> https://127.0.0.1:9443/services/MobileDirectoryService/addMobileNumber-k
>>>> <ns:addMobileNumberResponse xmlns:ns="http://axis2.apache.org
>>>> "><ns:return>
>>>> http://127.0.0.1:9763/services/MobileDirectoryService/mobile/nirmal
>>>> </ns:return></ns:addMobileNumberResponse>
>>>>
>>>>
>>>> nirmal@nirmal:/media/wso2/new-autoscaler$ curl -X GET
>>>> http://127.0.0.1:9763/services/MobileDirectoryService/mobile/nirmal -k
>>>> <html><head><title>Apache Tomcat/7.0.14 - Error
>>>> report</title><style><!--H1
>>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
>>>> H2
>>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
>>>> H3
>>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
>>>> BODY
>>>> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
>>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
>>>> P
>>>> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
>>>> {color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
>>>> </head><body><h1>HTTP Status 500 - </h1><HR size="1"
>>>> noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b>
>>>> <u></u></p><p><b>description</b> <u>The server encountered an internal
>>>> error () that prevented it from fulfilling this
>>>> request.</u></p><p><b>exception</b> <pre>org.apache.axis2.AxisFault
>>>>     org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
>>>>
>>>> org.wso2.carbon.core.transports.CarbonServlet.doGet(CarbonServlet.java:134)
>>>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
>>>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>>>
>>>> org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
>>>>
>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
>>>>
>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
>>>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>>>     org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:164)
>>>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>>> </pre></p><p><b>root cause</b> <pre>java.lang.NullPointerException
>>>>
>>>> org.wso2.carbon.statistics.internal.ResponseTimeCalculator.updateCurrentInvocationStatistic(ResponseTimeCalculator.java:120)
>>>>
>>>> org.wso2.carbon.statistics.internal.ResponseTimeCalculator.calculateResponseTimes(ResponseTimeCalculator.java:61)
>>>>
>>>> org.wso2.carbon.statistics.module.FaultHandler.updateStatistics(FaultHandler.java:151)
>>>>
>>>> org.wso2.carbon.statistics.module.FaultHandler.invoke(FaultHandler.java:50)
>>>>     org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
>>>>     org.apache.axis2.engine.Phase.invoke(Phase.java:313)
>>>>     org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
>>>>     org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:516)
>>>>
>>>> org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:433)
>>>>
>>>> org.apache.axis2.transport.http.AxisServlet.processAxisFault(AxisServlet.java:398)
>>>>
>>>> org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processFault(AxisServlet.java:857)
>>>>
>>>> org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:842)
>>>>
>>>> org.wso2.carbon.core.transports.CarbonServlet.handleRestRequest(CarbonServlet.java:233)
>>>>
>>>> org.wso2.carbon.core.transports.CarbonServlet.doGet(CarbonServlet.java:131)
>>>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
>>>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>>>
>>>> org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
>>>>
>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
>>>>
>>>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
>>>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>>>     org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:164)
>>>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>>> </pre></p><p><b>note</b> <u>The full stack trace of the root cause is
>>>> available in the Apache Tomcat/7.0.14 logs.</u></p><HR size="1"
>>>> noshade="noshade"><h3>Apache Tomcat/7.0.14</h3></body></html>
>>>>
>>>>
>>>> nirmal@nirmal:/media/wso2/new-autoscaler$ curl -X GET
>>>> http://127.0.0.1:9763/services/MobileDirectoryService/getMobileNumber?user=nirmal-k
>>>> <ns:getMobileNumberResponse xmlns:ns="http://axis2.apache.org
>>>> "><ns:return>1234</ns:return></ns:getMobileNumberResponse>
>>>>
>>>> --
>>>>
>>>> Thanks & regards,
>>>> Nirmal
>>>>
>>>> Software Engineer- Platform Technologies Team, WSO2 Inc.
>>>> Mobile: +94715779733
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>> _______________________________________________
>>>> Carbon-dev mailing list
>>>> [email protected]
>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>
>>>>
>>>
>>>
>>> --
>>> Hiranya Jayathilaka
>>> Associate Technical Lead;
>>> WSO2 Inc.;  http://wso2.org
>>> E-mail: [email protected];  Mobile: +94 77 633 3491
>>> Blog: http://techfeast-hiranya.blogspot.com
>>>
>>> _______________________________________________
>>> Carbon-dev mailing list
>>> [email protected]
>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>
>>>
>>
>>
>> --
>> *Kasun Gajasinghe*
>> Software Engineer; WSO2 Inc.; http://wso2.com
>>
>> ,
>> *email: **kasung AT spamfree wso2.com** cell: **+94 (77) 678-0813*
>> *blog: **http://blog.kasunbg.org* <http://blog.kasunbg.org>
>>
>> *
>> twitter: **http://twitter.com/kasunbg* <http://twitter.com/kasunbg>
>>
>> *
>> *
>>
>>
>> _______________________________________________
>> Carbon-dev mailing list
>> [email protected]
>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
>
> --
>
> Thanks & regards,
> Nirmal
>
> Software Engineer- Platform Technologies Team, WSO2 Inc.
> Mobile: +94715779733
> Blog: http://nirmalfdo.blogspot.com/
>
> _______________________________________________
> Carbon-dev mailing list
> [email protected]
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>


-- 
*Kasun Gajasinghe*
Software Engineer; WSO2 Inc.; http://wso2.com

,
*email: **kasung AT spamfree wso2.com** cell: **+94 (77) 678-0813*
*blog: **http://blog.kasunbg.org* <http://blog.kasunbg.org>

*
twitter: **http://twitter.com/kasunbg* <http://twitter.com/kasunbg>

*
*
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to