【发布时间】:2016-07-13 23:35:48
【问题描述】:
您好,我遇到了一些问题,我无法从 java 调用 webservice 并将结果发送到 flex 端。
过程
- 用户启动应用程序并登陆身份验证表单
- 用户输入登录名和密码并提交认证表单
- 在 java 端提交调用远程服务 checkUserCredetialFromLdap()
- 在这个 java 方法中,我尝试调用外部 ldap web 服务,如下所示。
-
负责 ldap ws 调用的类在自定义 jar(Maven 依赖项)中
public User checkUserCredetialFromLdap(String identifiant, String password) throws EmmBusinessException, LdapServiceException{ User myUser = null; User myCompleteUser = null; //initialization of webservice with the endpoint URL failed Axis1LdapWsAuth ws = new Axis1LdapWsAuth(Config.getProperties().getProperty("endpoint.url")); try{ //authentication using webservice String csif_sessionID =ws.login(identifiant, password); .... } }catch(LdapServiceException lse) { EmmBusinessException emmB = new EmmBusinessException(lse,this,"","Unable to get User",Level.WARNING); log(emmB); throw (emmB); } catch (Exception t) { EmmBusinessException emmB = new EmmBusinessException(t,this,"","Unable to get User",Level.WARNING); log(emmB); throw (emmB); } finally { finish(); } return myCompleteUser; }
我知道可以使用 RPC 在 flex 端调用 webservice,但我不想这样做,但由于某种原因,我需要并且必须从 java 端调用 webservice。
不可能吗?我该怎么做?
【问题讨论】:
标签: java web-services maven axis2