WSDL具有属性而不是节点 [英] WSDL to have attributes instead of nodes
问题描述
嗨
i创建了一个简单的Web方法(Open),SOAP看起来如下
< s:信封 xmlns:s = http://schemas.xmlsoap.org/soap/envelope/ >
< s:标题 >
< 操作 s :mustUnderstand = 1 xmlns = http:// schemas.microsoft.com/ws/2005/05/addressing/none\"> urn:IEhelplineService / Open < / Action >
< / s:标题 >
< s:正文 >
< 打开 >
< 附件 >
< 名称 > c :1.jpg < / name >
< type > jpg < / type < span class =code-keyword>>
< encodedstring > fdsfdsfdsf3434324 $#$ $#@ $ < / encodedstring >
< / attachment >
< / open >
< / s:正文 >
< / s:Envelope >
Open是带有operationcontract属性的web方法,attachment是其参数。附件是具有datacontract属性的类。目前name,type和encodedstring是具有datamember属性的参数。
我希望它看起来如下所示。
< s:Envelope xmlns:s = http://schemas.xmlsoap.org/soap/envelope/\">
< ; s:标题 >
< 操作 s:mustUnderstand = 1 xmlns = http://schemas.microsoft.com/ws/2005/05/addressing/none > urn: IEhelplineService / Open < / Action >
< / s:标题 > ;
< s:正文 >
< 打开 >
< 附件 name = c :1.jpg type = jpg > fdsfdsfdsf3434324 $#@ $#@ $ < / attachment >
< / Open >
< / s:正文 >
< / s:信封 >
差异是名称,类型和编码字符串是xml中的属性节点而不是子节点。我该怎么做?
#@
#@
< span class =code-keyword>< / encodedstring >
< / attachment >
< / Open >
< / s:正文 > ;
< / s:Envelope >
Open是带有operationcontract属性的web方法,attachment是其参数。附件是具有datacontract属性的类。目前name,type和encodedstring是具有datamember属性的参数。
我希望它看起来如下所示。
< s:Envelope xmlns:s = http://schemas.xmlsoap.org/soap/envelope/\">
< ; s:标题 >
< 操作 s:mustUnderstand = 1 xmlns = http://schemas.microsoft.com/ws/2005/05/addressing/none > urn: IEhelplineService / Open < / Action >
< / s:标题 > ;
< s:正文 >
< 打开 >
< 附件 name = c :1.jpg type = jpg > fdsfdsfdsf3434324
Hi
i have created a simple web method("Open") and the SOAP is looking like below
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">urn:IEhelplineService/Open</Action>
</s:Header>
<s:Body>
<Open>
<attachment>
<name>c:1.jpg</name>
<type>jpg</type>
<encodedstring>fdsfdsfdsf3434324$#@$#@$</encodedstring>
</attachment>
</Open>
</s:Body>
</s:Envelope>
Open is the web method with operationcontract attribute and attachment is its parameter. Attachment is the class with datacontract attribute. Currently name,type and encodedstring are parameters with datamember attributes.
I want it to look like below.
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">urn:IEhelplineService/Open</Action>
</s:Header>
<s:Body>
<Open>
<attachment name="c:1.jpg" type="jpg">fdsfdsfdsf3434324$#@$#@$</attachment>
</Open>
</s:Body>
</s:Envelope>
Difference is the name,type and encoded strings are attribute nodes in the xml than childnodes. how do i do it?
#@
#@
</encodedstring> </attachment> </Open> </s:Body> </s:Envelope>
Open is the web method with operationcontract attribute and attachment is its parameter. Attachment is the class with datacontract attribute. Currently name,type and encodedstring are parameters with datamember attributes.
I want it to look like below.
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Header> <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">urn:IEhelplineService/Open</Action> </s:Header> <s:Body> <Open> <attachment name="c:1.jpg" type="jpg">fdsfdsfdsf3434324
这篇关于WSDL具有属性而不是节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!