我自己拼装好了报文,在向平台发送soap时,报了这样的错误:
Element type soapenv:Envelope must be followed by either attribute specifications+ >+ or />+ . Nested exce
而报文日志显示为
<soapenv:Envelope xmlns:soapenv=xxxxx>
...
</soapenv:Envelope>
在网上查到:
![](https://img-blog.csdn.net/20170122150719872?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcXFfMjc2MTM3ODk=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
原因是报文内容太长,我分成好几行用ostringstream对象拼接的,我把它们改成一行以后就可以了。