XmlDocument的 - 我想&LT;项目&GT;&LT; /项目&GT;而不是&LT;项目/&GT; [英] XmlDocument - I want <Item></Item> and not <Item/>
问题描述
我要发送一个XML作为SOAP响应SAP了。
I have to send an XML as a SOAP response to a SAP WAS.
SAP是相当挑剔与你发送(特殊字符和东西),而现在我要用尽所有的可能性。
SAP is quite fussy with what you are sending (special characters and stuff), and by now I want to exhaust all possibilities.
有没有一种方式,当你犯了一个 myXMLDoc.LoadXml
指定类似的不缩短标签时,空的?
Is there a way when you make a myXMLDoc.LoadXml
to specify something like "do not shorten tags when empty"?
通常当你做出这样的:
<item>
<Trkorr>TDEK978887</Trkorr>
<Sequence>0</Sequence>
<Solicit>cggaste</Solicit>
<Type></Type><Id></Id><Number></Number><Message></Message>
</item>
据其转换为:
It transforms it to:
<item>
<Trkorr>TDEK978887</Trkorr>
<Sequence>0</Sequence>
<Solicit>cggaste</Solicit>
<Type/><Id/><Number/><Message/>
</item>
任何财产,我失踪?
Any property I'm missing?
BTW的(我不认为这是值得的另一个问题,所以......)的
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Body>
<soap-env:Fault>
<faultcode>soap-env:Server</faultcode>
<faultstring xml:lang="en">SOAP processing failure, error id = 112</faultstring>
</soap-env:Fault>
</soap-env:Body>
</soap-env:Envelope>
这是错误SAP的回归。
This is the error sap's returning.
在此先感谢!
推荐答案
没有,没有另一种方式,而不自己写的一切。
No, there isn't another way without writing everything yourself.
和即便如此做,这不是问题。 问题是后话了SAP服务器和/或SAP的参数,你那些你身边展示了发送的。
And even with that done, that's not the problem. The problem is something on the SAP Server and/or the SAP Parameters you were sending beside those you show.
这篇关于XmlDocument的 - 我想&LT;项目&GT;&LT; /项目&GT;而不是&LT;项目/&GT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!