开发者

How to put prefix for soap xml requests?

I am making a web service call (in .Net 3.5). I want the Soap request to have namespace prefixes for the tags (the third-party web service needs them).

Current request:

<soap:Body> <GetBanksList xmlns="urn:QueryGroup"> ...

Desired request:

<soap:Body> <pfx:GetBanksList xmlns:pfx ="urn:QueryGroup"> ...

It seems I should use this attribut开发者_开发问答e:

[XmlElementAttribute(Form = XmlSchemaForm.Unqualified)]

and specify my prefix, probably like this:

XmlSerializerNamespaces _namespaces = new XmlSerializerNamespaces(
   new[] { new XmlQualifiedName("pfx", NS1) } );

What I can't find is where to put the attribute (I tried with the input params in Reference.cs) and where to specify the prefix!

Thanks for any help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜