调用
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:DefaultNamespace" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<soapenv:Header/>
<soapenv:Body><urn:methodName soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<Body xsi:type="xsd:string"></Body>
<file xsi:type="urn:ArrayOf_soapenc_base64" soapenc:arrayType="xsd:byte[][]"> </file>
<fileName xsi:type="urn:ArrayOf_xsd_string" soapenc:arrayType="xsd:string[]">
test122.xml
</fileName>
</urn:methodName>
</soapenv:Body>
</soapenv:Envelope>
返回报错
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.generalException</faultcode>
<faultstring>org.xml.sax.SAXException: Found character data inside an array element while deserializing</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
对方接口接收文件是byte[][], 以base64方式传递,在报文字段传的是base64,超过了报文长度,报错了。
字段传递的短字符就没事。
目前不知道有什么解决方案,只能沟通以另一种方式传递附件文件