调用java web服务时SOAP响应中出错

调用java web服务时SOAP响应中出错,java,web-services,soap,Java,Web Services,Soap,我有一个Java web服务,它返回存储在Alfresco CMS中的文档列表 这个web服务正常运行,当我调用它时,响应正常。但有时情况并非如此,SOAP响应中会出现以下错误: 2014-10-24 12:58:17,047 ERROR [com.company.ws.Exceptions.HrwsException] : WSDoAllSender: cannot get SOAP envlope from messageorg.xml.sax.SAXException: Fatal Err

我有一个Java web服务,它返回存储在Alfresco CMS中的文档列表

这个web服务正常运行,当我调用它时,响应正常。但有时情况并非如此,SOAP响应中会出现以下错误:

2014-10-24 12:58:17,047 ERROR [com.company.ws.Exceptions.HrwsException] : WSDoAllSender: cannot get SOAP envlope from messageorg.xml.sax.SAXException: Fatal Error: URI=null Line=1: Attribute "actor" bound to namespace "http://schemas.xmlsoap.org/soap/envelope/" was already specified for element "ns7:QueryHeader". AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException faultSubcode: faultString: WSDoAllSender: cannot get SOAP envlope from messageorg.xml.sax.SAXException: Fatal Error: URI=null Line=1: Attribute "actor" bound to namespace "http://schemas.xmlsoap.org/soap/envelope/" was already specified for element "ns7:QueryHeader". faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:WSDoAllSender: cannot get SOAP envlope from messageorg.xml.sax.SAXException: Fatal Error: URI=null Line=1: Attribute "actor" bound to namespace "http://schemas.xmlsoap.org/soap/envelope/" was already specified for element "ns7:QueryHeader". at org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:161) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:127) 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) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.alfresco.webservice.repository.RepositoryServiceSoapBindingStub.query(RepositoryServiceSoapBindingStub.java:753) ... {http://xml.apache.org/axis/}hostname: WSDoAllSender: cannot get SOAP envlope from messageorg.xml.sax.SAXException: Fatal Error: URI=null Line=1: Attribute "actor" bound to namespace "http://schemas.xmlsoap.org/soap/envelope/" was already specified for element "ns7:QueryHeader". at org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:161) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:127) 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) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.alfresco.webservice.repository.RepositoryServiceSoapBindingStub.query(RepositoryServiceSoapBindingStub.java:753) 这是我从客户端发送的SOAP请求:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://<hostname>/webServices/schema">
  <soapenv:Header/>
     <soapenv:Body>
     <sch:listDocumentsRequest username="*****" password="*****">
     <sch:tipo>F</sch:tipo>
     <sch:cod>1</sch:cod>
     <!--Optional:-->
     <sch:abono>0</sch:abono>
     <!--Optional:-->
     <sch:codDivision>01</sch:codDivision>
  </sch:listDocumentsRequestt>
有什么想法吗?发生了什么事? 谢谢

更新:

我附上了wsdl:

<wsdl:definitions targetNamespace="http://hostname/webServices/definitions">
<wsdl:types>
    <xsd:schema elementFormDefault="qualified" targetNamespace="http://hostname/webServices/schema" version="2.2">
        <xsd:element name="listDocumentsRequest">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element name="tipo" type="docType"/>
                    <xsd:element minOccurs="1" name="cod" type="codType"/>
                    <xsd:element minOccurs="0" name="abono" type="xsd:boolean"/>
                    <xsd:element minOccurs="0" name="codDivision" type="codDivisionType"/>
                </xsd:sequence>
                <xsd:attributeGroup ref="identificacion"/>
            </xsd:complexType>
        </xsd:element><!-- listarDocumentosResponse -->
        <xsd:element name="listarDocumentosResponse">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="listarDocumentosResponseItem"/>
                    <xsd:element minOccurs="0" name="excepcion" type="wsException"/>
                </xsd:sequence>
                <xsd:attribute name="fechaConsulta" type="xsd:dateTime"/>
            </xsd:complexType>
        </xsd:element>
        <xsd:element name="listarDocumentosResponseItem">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element minOccurs="1" name="documentoID" type="UUID"/>
                    <xsd:element minOccurs="1" name="rutaHttp" type="xsd:anyURI"/>
                    <xsd:element minOccurs="1" name="abono" type="xsd:boolean"/>
                    <xsd:element maxOccurs="1" name="prov" type="xsd:string"/>
                    <xsd:element minOccurs="1" name="codDivision" type="codDivisionType"/>
                    <xsd:element minOccurs="0" name="num" type="numType"/>
                    <xsd:element minOccurs="1" name="fecha" type="xsd:date"/>
                    <xsd:element minOccurs="0" name="cos" type="cosType"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="codDivisa" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:elment>
    </xsd:schema>
</wsdl:types>
<wsdl:message name="listDocumentsRequest">
    <wsdl:part element="sch:listDocumentsRequest" name="listDocumentsRequest"/>
</wsdl:message>
<wsdl:message name="listarDocumentosResponse">
    <wsdl:part element="sch:listarDocumentosResponse" name="listarDocumentosResponse"/>
</wsdl:message>
<wsdl:portType name="GestorDocumWs">
    <wsdl:operation name="listarDocumentos">
        <wsdl:input message="tns:listDocumentsRequest" name="listDocumentsRequest"/>
        <wsdl:output message="tns:listarDocumentosResponse" name="listarDocumentosResponse"/>
    </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="GestorDocumWsSoap11" type="tns:GestorDocumWs">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="listarDocumentos">
        <soap:operation soapAction=""/>
        <wsdl:input name="listDocumentsRequest">
            <soap:body use="literal"/>
        </wsdl:input>
        <wsdl:output name="listarDocumentosResponse">
            <soap:body use="literal"/>
        </wsdl:output>
    </wsdl:operation>
</wsdl:binding>
<wsdl:service name="miServicio">
    <wsdl:port binding="tns:GestorDocumWsSoap11" name="GestorDocumWsSoap11">
        <soap:address location="http://hostname/webServices/miServicio/snap"/>
    </wsdl:port>
</wsdl:service>

您可以共享您的WSDL文件吗?这将有助于识别问题您能显示定义了ns7:QueryHeader的XSD文件吗?我用wsdl文件更新了这个案例