用Web Services怎么样验证用户身份登陆?
如果你用的是Axis,可以用标准的HTTP Basic Authentication
具体这样做:
客户端:
call.setUsername("myusername");
call.setPassword("mypassword");
服务端:
部署时加入
<requestFlow>
<handler type="Authenticate"/>
</requestFlow>
<handler type="Authenticate"/>
</requestFlow>
即可。
如果验证不对,它会报出标准的HTTP验证错误。
