我正在尝试在我的mvc应用程序中使用java Web服务,但它正在抛出IOException
,InvalidOperationException
。
这是我的代码:
protected void btnLogin_Click(object sender, EventArgs e)
{
try
{
string name = txtUserName.Text + "@abc.com";
LoginService.SimpleLDAPAuthenticationClient objAuthendication = new SimpleLDAPAuthenticationClient();
var isvalid = objAuthendication.isAuthenticated(name, txtPassword.Text);
Response.Redirect(isvalid ? "/LoginSuccess.aspx" : "/error.html");
}
catch (Exception ex)
{
Response.Redirect("/error.html");
}
}
我的配置文件是:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="SimpleLDAPAuthenticationImplPortBinding" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://devserver:8080/doi/authenticate"
binding="basicHttpBinding" bindingConfiguration="SimpleLDAPAuthenticationImplPortBinding"
contract="LoginService.SimpleLDAPAuthentication" name="SimpleLDAPAuthenticationImplPort" />
</client>
</system.serviceModel>
完全例外是
Namespace="//example.com/" is not supported with rpc\literal soap. The wrapper element has to be unqualified.
请帮忙吗?