Discussion:
Web service with spring security
Harshajith Halgaswatta
2012-02-14 08:00:18 UTC
Permalink
Hi Devs,



I was trying to access mule web service with spring security as I need
method level authorization.



<!-- publish webservice -->

<flow name="managerPublishService">

<inbound-endpoint
address="http://localhost:65089/services/managerService"
exchange-pattern="request-response">

<cxf:jaxws-service
serviceClass="com.gs.nisystem.ws.ManagerService" />

</inbound-endpoint>

<component>

<custom-interceptor
class="com.gs.crm.security.CustomInterceptor" />

<spring-object bean="managerWsService" />

</component>

</flow>



But when I intercept mule flow to set Authentication object to the
securitycontext I am having following exception.



WARN 2012-02-14 10:14:22,611 [main]
org.apache.cxf.phase.PhaseInterceptorChain: Interceptor for
{http://ws.nisystem.gs.com/}ManagerServiceService#{http://ws.nisystem.gs.com
/}getManager has thrown exception, unwinding now

org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.



Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog

at [row,col {unknown-source}]: [1,0]





If I remove the interceptor I am getting following exception :
authentication object is not found in the securityContext.



Could you give me any insight to this problem.



Thanks

Harsha


----------------------
CONFIDENTIALITY NOTICE

This e-mail (including any attachments) may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please inform the sender immediately and delete this e-mail (including any attachments) from your computer, and you must not use, disclose to anyone else or copy this e-mail (including any attachments), whether in whole or in part.

This e-mail and any reply to it may be monitored for security, legal, regulatory compliance and/or other appropriate reasons.
Loading...