自己作了一个java调用.net WebServive,可是报一下的错,请帮忙看一下

tklyc 2005-08-31 10:47:43
(401)Access Denied

at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630)

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)

at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)

at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)

at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)

at org.apache.axis.client.Call.invokeEngine(Call.java:2564)

at org.apache.axis.client.Call.invoke(Call.java:2553)

at org.apache.axis.client.Call.invoke(Call.java:2248)

at org.apache.axis.client.Call.invoke(Call.java:2171)

at org.apache.axis.client.Call.invoke(Call.java:1691)

at org.tempuri.WebServiceForNet.ServiceForNet.ServiceForNetSoapStub.helloWorld(ServiceForNetSoapStub.java:101)

at org.tempuri.WebServiceForNet.ServiceForNet.ServiceForNetTestCase.test1ServiceForNetSoapHelloWorld(ServiceForNetTestCase.java:32)

...(Click for full stack trace)...
返回的页面上显示
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (401)Access Denied
faultActor:
faultNode:
faultDetail:
{}string: return code: 401
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html dir=ltr>
<head>
<style>
a:link {font:9pt/11pt 宋体; color:FF0000}
a:visited {font:9pt/11pt 宋体; color:#4e4e4e}
</style>
<META NAME="ROBOTS" CONTENT="NOINDEX">
<title>无权查看网页</title>
<META HTTP-EQUIV="Content-Type" Content="text-html; charset=gb2312">
</head>
<script>
function Homepage(){
<!--
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm
//For testing use DocURL = "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm"
DocURL=document.URL;

//this is where the http or https will be, as found by searching for :// but skipping the res://
protocolIndex=DocURL.indexOf("://",4);

//this finds the ending slash for the domain server
serverIndex=DocURL.indexOf("/",protocolIndex + 3);
//for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
//of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
//urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
BeginURL=DocURL.indexOf("#",1) + 1;
urlresult=DocURL.substring(BeginURL,serverIndex);

//for display, we need to skip after http://, and go to the next slash
displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
InsertElementAnchor(urlresult, displayresult);
}
function HtmlEncode(text)
{
return text.replace(/&/g, '&amp').replace(/'/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
}
function TagAttrib(name, value)
{
return ' '+name+'="'+HtmlEncode(value)+'"';
}
function PrintTag(tagName, needCloseTag, attrib, inner){
document.write( '<' + tagName + attrib + '>' + HtmlEncode(inner) );
if (needCloseTag) document.write( '</' + tagName +'>' );
}
function URI(href)
{
IEVer = window.navigator.appVersion;
IEVer = IEVer.substr( IEVer.indexOf('MSIE') + 5, 3 );
return (IEVer.charAt(1)=='.' && IEVer >= '5.5') ?
encodeURI(href) :
escape(href).replace(/%3A/g, ':').replace(/%3B/g, ';');
}
function InsertElementAnchor(href, text)
{
PrintTag('A', true, TagAttrib('HREF', URI(href)), text);
}
//-->
</script>
<body bgcolor="FFFFFF">
<table width="410" cellpadding="3" cellspacing="5">
<tr>
<td align="left" valign="middle" width="360">
<h1 style="COLOR:000000; FONT: 12pt/15pt 宋体"><!--Problem-->无权查看网页</h1>
</td>
</tr>

<tr>
<td width="400" colspan="2">
<font style="COLOR:000000; FONT: 9pt/11pt 宋体">基于所提供的凭据,您没有权限查看此目录或网页。</font></td>
</tr>

<tr>
<td width="400" colspan="2">
<font style="COLOR:000000; FONT: 9pt/11pt 宋体">
<hr color="#C0C0C0" noshade>

<p>请尝试执行下列操作:</p>

<ul>
<li>单击<a href="javascript:location.reload()">刷新</a>按钮,使用其他凭据重试。</li>
<li>如果确信能够查看此目录或网页,请与网站管理员联系,其电子邮件地址或电话号码请参阅
<script>
<!--
if (!((window.navigator.userAgent.indexOf("MSIE") > 0) && (window.navigator.appVersion.charAt(0) == "2")))
{
Homepage();
}
//-->
</script>
主页。</li>
</ul>
<h2 style="font:9pt/11pt 宋体; color:000000">HTTP 错误 401.2 - 未授权:服务器配置导致登录失败<br> Internet 信息服务</h2>
<hr color="#C0C0C0" noshade>

<p>技术信息(用于支持人员)</p>
<ul>

<li>背景:<br>通常,这是由于服务器端脚本未正确发送 WWW 身份验证头字段所致。编写 Active Server Pages 脚本时,由于使用 Response 对象的 AddHeader 方法要求客户端使用特定身份验证方法访问资源而导致了此问题。
<p>
<li>详细信息:<br><a href="http://www.microsoft.com/ContentRedirect.asp?prd=iis&sbp=&pver=5.0&pid=&ID=401.2&cat=web&os=&over=&hrd=&Opt1=&Opt2=&Opt3=" target="_blank">Microsoft 支持</a>
</li>
</p>
</ul>
</font></td>
</tr>

</table>
</body>
</html>
...全文
144 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
tklyc 2005-08-31
  • 打赏
  • 举报
回复
ws在.net里能调用,应该是发布成功了,调用ws的地址是Jbuilder自动生成的,能具体说明一下吗,谢了
yonghar 2005-08-31
  • 打赏
  • 举报
回复
问题只能有两种
1.发布的ws没有成功
2.调用ws的地址错误(或者调用错误)

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧