jilani2423 [
http://community.jboss.org/people/jilani2423] created the discussion
"web service response modification when authentication failed."
To view the discussion, visit:
http://community.jboss.org/message/643068#643068
--------------------------------------------------------------
Hi,
I have a jax ws based webservice with handler in place for user authentication.
I am returning false in handleMessage when the user is not authorised. So it si not
calling the web service implementation method, but it is returning the reponse as request
not the custome response. How to write the custoom response when authentication failed
using handler.
My wsdl request format:
<soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/
http://schemas.xmlsoap.org/soap/envelope/" xmlns:n1="
http://www.n1.com
http://www.n1.com">
<soapenv:Header/>
<soapenv:Body>
<n1:getData>
<authenticationKey>
<n1:userID>userID</n1:userID>
<n1:password>password</n1:password>
</authenticationKey>
<SearchCriteria>
......
My wsdl response, when the authentication failed
<soapenv:Envelope xmlns:n1='
http://www.n1.com http://www.n1.com'
xmlns:soapenv='
http://schemas.xmlsoap.org/soap/envelope/
http://schemas.xmlsoap.org/soap/envelope/'><soapenv:Header>&...
<n1:getData>
<authenticationKey>
<n1:userID xmlns:n1='
http://www.n1.com
http://www.n1.com'>invaliduserid</n1:userID>
<n1:password xmlns:n1='
http://www.n1.com
http://www.n1.com'>password</n1:password>
</authenticationKey>
<SearchCriteria>
.....
What I need in response is
<soapenv:Envelope xmlns:n1='
http://www.n1.com http://www.n1.com'
xmlns:soapenv='
http://schemas.xmlsoap.org/soap/envelope/
http://schemas.xmlsoap.org/soap/envelope/'><soapenv:Header>&...
<n1:getData>
<n1:userID xmlns:n1='
http://www.n1.com
http://www.n1.com'>authentication failed</n1:userID>
.....
Please suggest me the approach to get the required response.
Thank You,
Jilani
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/643068#643068]
Start a new discussion in JBoss Web Services Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]