这个属性在不设置的情况下是false,但是如果要设应该只能设置为true。见下面的资料。或者说是axis实现上的问题,现在webservices有很多种实现的api包,而且每家的支持力度不太一样。因此如果遇到这种问题,就要回去看看你下载的实现api的feature说明了。http://www.w3.org/TR/soap12-part1/#soapmu5.2.3 SOAP mustUnderstand Attribute
The SOAP mustUnderstand attribute information item is used to indicate whether the processing of a SOAP header block is mandatory or optional (see 2.4 Understanding SOAP Header Blocks)The mustUnderstand attribute information item has the following XML infoset properties:A [local name] of mustUnderstand .A [namespace name] of "http://www.w3.org/2003/05/soap-envelope".A [specified] property with a value of "true".The type of the mustUnderstand attribute information item is xs:boolean.Omitting this attribute information item is defined as being semantically equivalent to including it with a value of "false".SOAP senders SHOULD NOT generate, but SOAP receivers MUST accept the SOAP mustUnderstand attribute information item with a value of "false" or "0".If generating a SOAP mustUnderstand attribute information item, a SOAP sender SHOULD use the canonical representation "true" of the attribute value (see XML Schema [XML Schema Part 2]). A SOAP receiver MUST accept any valid lexical representation of the attribute value.If relaying the message, a SOAP intermediary MAY substitute "true" for the value "1", or "false" for "0". In addition, a SOAP intermediary MAY omit a SOAP mustUnderstand attribute information item if its value is "false" (see 2.7 Relaying SOAP Messages).A SOAP sender generating a SOAP message SHOULD use the mustUnderstand attribute information item only on SOAP header blocks. A SOAP receiver MUST ignore this attribute information item if it appears on descendants of a SOAP header block or on a SOAP body child element information item (or its descendents).

解决方案 »

  1.   

    请教你一个问题,我刚用axis1.4作web services 开发。
    你部署完axis后用没用vadidate链接检验必须的组件?即查看Axis Happiness Page页面。
    一些必须的组件如:(saaj.jar;jaxrpc.jar;axis.jar;commons-discovery-0.2.jar;commons-logging-1.0.4.jar;log4j-1.2.8.jar;wsdl4j-1.5.1.jar;javax.xml.parsers.SAXParserFactory ;activation.jar)。
    我部署完之后老是提示找不到javax.xml.parsers.SAXParserFactory ,但是我已经把xercesImpl.jar;xml-apis.jar;xmlParserAPIs.jar放到了axis\WEB-INF\lib目录下了。
      

  2.   

    To: tonyzhangcn(东尼)多谢。但是我并没有设置 mustUnderstand 这个参数,那个"false" 是 axis 下层程序产生的soap 中的内容,我在应用层Java代码中 mustUnderstand (axis1.4 api 中这是一个 boolean )没有被手动设置。
    也就是说 axis 自己使 mustUnderstand 为 false ,却报告 false 是非法的 mustUnderstand 取值。
    我甚至都怀疑是 axis 1.4 的 bug 了。到现在还是搞不懂。
      

  3.   

    To: soosky() 我还没用过“vadidate链接检验必须的组件”。我也刚开始接触 axis 。
    你找不到 javax.xml.parsers.SAXParserFactory ,它是 JSDK 中的类。你可能是因为jsdk的 classpath 的问题造成的。