jaxb - jax-rs web service: how to hide some entity fields and use SSL -
recently asked questions here web services
how secure database using web services?
glassfish: deploy of multiple applications, of them ssl
but didn't find answers @ time try more specific hoping find help...
i created simple web service in netbeans using wizard creates web service database table. wizard creates persistence unit, entity classes , uses jpa. restful web service created using jax-rs , checked "use jersey default" caused creation of web.xml file. works in database table there fields need filtering don't want reported client: how can hide them in xml/json produced restful web service ?
how can force use ssl ?
i tried put
<transport-guarantee>confidential</transport-guarantee>
in web.xml, forces ssl response not same, not xml/json contains concatenation of values of entities ' fields. besides uri path parameters don't work @ all. missing ?
thanks filippo
update ssl
i made more checks , using firefox got valid responses using ssl, while weird results ie9. in case forcing use ssl got single long string alphanumeric characters. possible i'm going repeat test on computer.
since you're using jersey should have jackson along that. jackson helps working entity -> json , json -> entity parsing.
you're looking annotation called
@jsonignore
and you'll want put on 'getter' method of member wish obscure output.
source: http://jackson.codehaus.org/
Comments
Post a Comment