Hi all,

I have secured Version service on AS with UT

AS responds with proper response when client sends proper sec credentials.

HTTP/1.1 200 OK
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 20 Mar 2012 06:40:45 GMT
Server: WSO2 Carbon Server

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header><wsse:Security
xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
soapenv:mustUnderstand="1"><wsu:Timestamp xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
wsu:Id="Timestamp-1"><wsu:Created>2012-03-20T06:40:45.252Z</wsu:Created><wsu:Expires>2012-03-20T06:45:45.252Z</wsu:Expires></wsu:Timestamp></wsse:Security></soapenv:Header><soapenv:Body><ns:getVersionResponse
xmlns:ns="http://version.services.core.carbon.wso2.org";><return>WSO2
Application
Server-4.5.0-SNAPSHOT</return></ns:getVersionResponse></soapenv:Body></soapenv:Envelope>


However, when client sends wrong credentials, AS sends HTML response.

HTTP/1.1 500 Internal Server Error
Content-Type: text/html;charset=utf-8
Content-Length: 2706
Vary: Accept-Encoding
Date: Tue, 20 Mar 2012 06:42:23 GMT
Connection: close
Server: WSO2 Carbon Server

<html><head><title>Apache Tomcat/7.0.26 - 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.doPost(AxisServlet.java:188)

org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:205)
    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.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:46)
</pre></p><p><b>note</b> <u>The full stack trace of the root cause is
available in the Apache Tomcat/7.0.26 logs.</u></p><HR size="1"
noshade="noshade"><h3>Apache Tomcat/7.0.26</h3></body></html>


in ESB (with nhttp transport):

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml
Date: Tue, 20 Mar 2012 06:44:33 GMT
Server: Synapse-HttpComponents-NIO
Transfer-Encoding: chunked

<html><body><h1>Failed to process the request</h1><p>Error processing POST
request </p><p>The security token could not be authenticated or authorized;
nested exception is:
    javax.security.auth.callback.UnsupportedCallbackException: Check failed
: System error</p></body></html><p>null</p></body></html>


Same kind of behavior can be seen for most scenarios where modules throws
exceptions ( invalid WSA action....).

Any idea what is going wrong?
I feel something to do with tomcat migration.

-- 
Thanks,
Miyuru
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to