将XML数据作为Web服务的参数传递 [英] Passing XML data as parameter of web service

查看:74
本文介绍了将XML数据作为Web服务的参数传递的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将xml数据传递给Web服务的最佳方法是什么:作为XmlDocument,

或作为字符串,还是......? (xml数据由XSD构成)


谢谢,

亲切的问候,


-

Ludwig
http://www.coders-lab.be

What''s the best way to pass xml data to a web service: as XmlDocument,
or as a string, or....? (the xml data is structured by XSD)

Thanks,
kind regards,

--
Ludwig
http://www.coders-lab.be

推荐答案

Ludwig,


XML数据是否符合架构?如果是这样,你应该能够创建一个代表架构的托管类型,然后公开它。


如果你想发送任意XML数据,然后公开

XmlDocument,它将在WSDL中公开,允许任何元素。

-

- Nicholas Paldino [ .NET / C#MVP]

- mv*@spam.guard.caspershouse.com

" Ludwig" < ludwig.stuyck(删除)@ telenet.bewrote留言

新闻:bh ************************* ******* @ 4ax.com ...
Ludwig,

Does the XML data conform to a schema? If so, you should be able to
create a managed type which represents the schema and then expose that.

If you are looking to send any arbitrary XML data, then expose the
XmlDocument, and it will be exposed in the WSDL as allowing any element.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Ludwig" <ludwig.stuyck(remove)@telenet.bewrote in message
news:bh********************************@4ax.com...

将xml数据传递给Web服务的最佳方法是:作为XmlDocument,

或作为字符串,还是......? (xml数据由XSD构成)


谢谢,

亲切的问候,


-

Ludwig
http://www.coders-lab.be



On Fri,2007年5月11日10:02:45 -0400,Nicholas Paldino [.NET / C#MVP]"

< mv*@spam.guard.caspershouse.comwrote:
On Fri, 11 May 2007 10:02:45 -0400, "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard.caspershouse.comwrote:

> Ludwig,


XML数据是否符合模式?如果是这样,你应该能够创建一个代表架构的托管类型,然后公开它。


如果你想发送任意XML数据,那么暴露
XmlDocument,它将在WSDL中公开为允许任何元素。
>Ludwig,

Does the XML data conform to a schema? If so, you should be able to
create a managed type which represents the schema and then expose that.

If you are looking to send any arbitrary XML data, then expose the
XmlDocument, and it will be exposed in the WSDL as allowing any element.






是的,它符合XSD。 创建一个管理的

类型是什么意思? (从公司到另一家公司的沟通)


谢谢,

路德维希


-

Ludwig
http://www.coders-lab.be


Ludwig,


我很好奇,如果另一家公司正在公开网络服务,那么他们是/ br / >
有一个可以使用的WSDL文档吗?如果是这样,VS.NET(或wsdl.exe,如果你想要从命令行工作)应该开发适当的类型

你可以使用(而不是任意XmlDocument)。

-

- Nicholas Paldino [.NET / C#MVP]

- mv*@spam.guard.caspershouse.com


" Ludwig" < ludwig.stuyck(删除)@ telenet.bewrote留言

news:86 ************************* ******* @ 4ax.com ...
Ludwig,

I am curious, if another company is exposing the web service, do they
have a WSDL document that you can use? If so the VS.NET (or wsdl.exe if you
want to work from the command line) should develop the appropriate types
that you can use (instead of an arbitrary XmlDocument).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ludwig" <ludwig.stuyck(remove)@telenet.bewrote in message
news:86********************************@4ax.com...

星期五,2007年5月11日10:02:45 -0400,Nicholas Paldino [。 NET / C#MVP]"

< mv*@spam.guard.caspershouse.comwrote:
On Fri, 11 May 2007 10:02:45 -0400, "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard.caspershouse.comwrote:

>> Ludwig,

XML数据是否符合架构?如果是这样,您应该能够创建一个代表架构的托管类型,然后公开它。

如果您要发送任意XML数据,那么暴露
XmlDocument,它将在WSDL中公开为允许任何元素。
>>Ludwig,

Does the XML data conform to a schema? If so, you should be able to
create a managed type which represents the schema and then expose that.

If you are looking to send any arbitrary XML data, then expose the
XmlDocument, and it will be exposed in the WSDL as allowing any element.






是的,它符合XSD。 创建一个管理的

类型是什么意思? (从公司到另一家公司的沟通)


谢谢,

路德维希


-

Ludwig
http://www.coders-lab.be



这篇关于将XML数据作为Web服务的参数传递的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆