Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 不使用附件的SOAP消息_Java_Xml_Web Services_Soap_Mtom - Fatal编程技术网

Java 不使用附件的SOAP消息

Java 不使用附件的SOAP消息,java,xml,web-services,soap,mtom,Java,Xml,Web Services,Soap,Mtom,我正在使用一个带有二进制数据对象的webservice,该对象是Base64编码的。相应的xsd元素如下所示: <xs:element name="Document" maxOccurs="unbounded" xmime:expectedContentTypes="application/octet-stream"> <xs:complexType> <xs:simpleContent>

我正在使用一个带有二进制数据对象的webservice,该对象是Base64编码的。相应的xsd元素如下所示:

<xs:element name="Document" maxOccurs="unbounded"
                xmime:expectedContentTypes="application/octet-stream">
    <xs:complexType>
        <xs:simpleContent>
            <xs:extension base="xs:base64Binary">
                <xs:attribute name="id" type="xs:anyURI" use="required">
                    <xs:annotation>
                        <xs:documentation>documentation text...</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>
</xs:element>

ctx是SOAPMessageContext对象,它被放入SOAPHandler实现的handleMessage方法中。一旦执行此方法,请求中就不会有任何附件。我很好奇getter如何能够禁用整个请求的附件。有什么想法吗?

我终于找到了这种行为的原因。有一个无法修复的bug导致了它。相应的票证可在此处找到:

对于解决方法,您可以访问这篇博文,在这里我找到了有关此主题的一些信息:

<ns4:Document id="Document01">dGhpcyBpcyBzYW1wbGUgZG9jdW1lbnQgbm8uIDE=</ns4:Document>
ctx.getMessage();