0

我已经使用配置了 IIS 的 servletexec 部署了一个 Web 服务,并且我可以使用匿名帐户成功访问 Web 服务。但是当我启用 Windows 集成身份验证时,我收到以下错误。

  - ntlm authentication scheme selected
- Discarding unexpected response: HTTP/1.1 100 Continue
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: org.xml.sax.SAXParseException: Premature end of file.
 faultActor: 
 faultNode: 
 faultDetail: 
    {http://xml.apache.org/axis/}hostname:akvm

org.xml.sax.SAXParseException: Premature end of file.
    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
    at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
    at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
4

2 回答 2

1

看起来 Axis 客户端不喜欢 NTLM 身份验证质询。请参阅顶部的错误消息:

Discarding unexpected response: HTTP/1.1 100 Continue

之后,Axis 就没有要解析的 XML,这就是为什么您会过早地结束文件。

为了将 NTLM 与 Axis (1.4) 一起使用,您必须使用CommonsHTTPSender而不是标准传输:

<transport name="http" pivot="java:org.apache.axis.transport.http.CommonsHTTPSender">
</transport>

在你的client-config.wsdd然后通过对象设置NTLM用户名和密码Stub

于 2011-11-18T13:14:26.943 回答
0

xerces SAX 实现中的“文件过早结束”类型错误通常表明 SAX 解析器需要数据,但没有得到(不是null,而是初始化的 empty InputSource)。从堆栈跟踪来看,轴 SOAP 处理程序似乎期望 SOAP xml 消息到达,但该消息为空。我对 ISS 及其基础设施的了解几乎为零,您能从服务器获取任何日志消息吗?

于 2009-10-08T19:19:35.933 回答