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 <[EMAIL PROTECTED]>
To: [email protected]
Cc: [EMAIL 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
SOAPAction: "urn:echo"
User-Agent: Axis2
Host: 127.0.0.1:8888
Content-Length: 244
<?xml version='1.0' encoding='UTF-8'?>
<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<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:Policy wsu:Id="SamlTokenPolicy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SamlToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy" />
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
</service>