  | | | Rampart throws NPE | Rampart throws NPE 2007-10-03 - By Murali Krishnan
Back The services.xml file contents I had included appear wrong in the earlier message. I have attached it in this mail.
-- -- Original Message ---- From: Murali Krishnan <cme_mk@(protected)> To: rampart-dev@(protected) Cc: axis-user@(protected) Sent: Wednesday, October 3, 2007 2:19:56 PM Subject: Rampart throws NPE
I'm trying to call a simple service deployed in Axis2. I'm trying to enforce that this service requires a SamlToken whenever it is called... If I invoke this service with a soap request that doesn't have any security headers, I get the below exception at the server. If I disenagage 'rampart' for the service, there is no problem. Am I doing anything wrong in this scenario?
Thanks, Murali
java.lang.NullPointerException at org.apache.rampart.RampartEngine.process(RampartEngine.java:90) at org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver .java:85) at org.apache.axis2.engine.Phase.invoke(Phase.java:292) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132) at org.apache.axis2.transport.http.HTTPTransportUtils .processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java :120) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
The soap request is like this:
POST /axis2/services/SimpleService HTTP/1.1 Content-Type: text/xml; charset=UTF-8 (See http://UTF-8.ora-code.com) SOAPAction: "urn:echo" User-Agent: Axis2 Host: 127.0.0.1:8888 Content-Length: 244
<?xml version='1.0' encoding='UTF-8 (See http://UTF-8.ora-code.com)'?> <soapenv:Body> <name>Hello world</name> </ns1:echo> </soapenv:Body> </soapenv:Envelope>
The services.xml is like this below:
<service name="SimpleService"> <parameter name="ServiceClass" locked="false">com.softwareag.ws .SimpleService</parameter> <operation name="echo"> <messageReceiver class="org.apache.axis2.rpc.receivers .RPCMessageReceiver"/> </operation> <operation name="add"/> <module ref="rampart"/> <!-- <module ref="addressing"/>--> <wsp:ExactlyOne> <wsp:All> xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07 /securitypolicy" /> </wsp:All> </wsp:ExactlyOne> </wsp:Policy> </service>
Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ______ __ __ Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC <html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head> <body><div style="font-family:courier,monaco,monospace,sans-serif;font-size:8pt" ><div style="font-family: courier,monaco,monospace,sans-serif; font-size: 8pt;" >The services.xml file contents I had included appear wrong in the earlier message. I have attached it in this mail.<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">-- -- Original Message ---- <br>From: Murali Krishnan <cme_mk@(protected)><br>To: rampart-dev@(protected) .org<br>Cc: axis-user@(protected)<br>Sent: Wednesday, October 3, 2007 2:19:56 PM<br>Subject: Rampart throws NPE<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>I'm trying to call a simple service deployed in Axis2. I'm trying to enforce that this service requires a SamlToken whenever it is called... If I invoke this service with a soap request that doesn't have any security headers, I get the below exception at the server. If I disenagage 'rampart' for the service, there is no problem. Am I doing anything wrong in this scenario?<br><br>Thanks,<br>Murali<br><br><font style="font-family: arial ,helvetica,sans-serif;" size="2">java.lang.NullPointerException<br> at org.apache.rampart.RampartEngine.process (RampartEngine.java:90)<br> at org .apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:85)<br>  ; at org.apache.axis2.engine.Phase.invoke(Phase.java:292)<br> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine .java:212)<br> at org.apache.axis2 .engine.AxisEngine.receive(AxisEngine.java:132)<br>   ; at org.apache.axis2.transport.http.HTTPTransportUtils .processHTTPPostRequest(HTTPTransportUtils.java:275)<br> at org.apache.axis2.transport.http.AxisServlet.doPost (AxisServlet.java:120)<br> at javax .servlet.http.HttpServlet.service(HttpServlet.java:710)<br> at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)</font><br><br>The soap request is like this:<br><br><font style="font -family: courier,monaco,monospace,sans-serif;" size="1">POST /axis2/services /SimpleService HTTP/1.1<br>Content-Type: text/xml; charset=UTF-8 (See http://UTF-8.ora-code.com)<br>SOAPAction: "urn:echo"<br>User-Agent: Axis2<br>Host: 127.0.0 .1:8888<br>Content-Length: 244<br><br><?xml version='1.0' encoding='UTF-8 (See http://UTF-8.ora-code.com)'? ><br><span> </span><br> <soapenv :Body><br><span> </span><br> <name> ;Hello world</name><br> </ns1:echo><br> </soapenv:Body><br> </soapenv:Envelope></font><br><br><br>The services.xml is like this below:<br><br><font style="font-family: courier,monaco,monospace,sans -serif;" size="1"><service name="SimpleService"><br> < ;parameter name="ServiceClass" locked="false">com.softwareag.ws.SimpleService </parameter><br> <operation name="echo"><br> <messageReceiver class="org.apache.axis2.rpc.receivers .RPCMessageReceiver"/><br> </operation><br> <operation name="add"/><br> <br>  ; <module ref="rampart"/><br> <!-- <module ref="addressing"/>--><br> <br><span> </span><br> <wsp:ExactlyOne><br> <wsp:All><br><span> </span><br><span>  ; xmlns:sp="<a rel="nofollow" target= "_blank" href="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">http:/ /schemas.xmlsoap.org/ws/2005/07/securitypolicy</a>" /></span><br> </wsp:All><br> </wsp:ExactlyOne><br> </wsp:Policy><br>< /service></font><br></div></div><br> <hr size="1">Yahoo! oneSearch: Finally, <a rel="nofollow" target="_blank" href="http://us.rd.yahoo.com/evt=48252/*http://mobile.yahoo.com/mobileweb /onesearch?refer=1ONXIC"> mobile search that gives answers</a>, not web links.
</div><br></div></div><br> <hr size=1>Yahoo! oneSearch: Finally, <a href="http://us.rd.yahoo.com/evt =48252/*http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC"> mobile search that gives answers</a>, not web links.
</body></html> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: axis-user-unsubscribe@(protected) For additional commands, e-mail: axis-user-help@(protected)
|
|
 |