字符串作为参数 [英] String as Parameter

查看:104
本文介绍了字符串作为参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设计将从Oracle BPEL访问的.NET Web服务。

Web服务将采用XML数据,我必须在Web服务中解析XML数据。

如果我使用字符串作为Web服务的参数,我想知道是否存在是要传递给Web服务的字符串的最大长度的限制。

XML的大小范围从80到150 KB。

是否有其他方法可以将xml数据从Oracle BPEL传递到.NET Web服务。

感谢您的帮助

推荐答案

字符串参数的大小没有特别限制。

是否可以使用任何其他机制取决于Oracle BPEL,而不是.NET。例如,他们可能能够接受根据某种特定模式格式化的XML文档。在这种情况下,您可以从此模式生成.NET类,并在Web服务调用中使用这些类。即使您不能使用这些类,也可以手动生成一个WSDL文件,该文件将指示要使用的模式。这可能对像BPEL这样的RAD工具很有帮助,让工具知道XML的结构会很有用。另一方面,如果BPEL不关心结构,那么您可以使用XmlElement类型作为参数并返回Web服务的值,并发送和接收任何格式良好的XML。如果您愿意,可以自己进行架构验证。
There is no particular limit on the size of a string parameter.

Whether or not you can use any other mechanism depends on Oracle BPEL, not on .NET. For instance, they may be able to accept an XML document formatted according to some particular schema. In that case, you may be able to generate .NET classes from this schema and use those classes in the web service call. Even if you can't use those classes, you could hand-generate a WSDL file that would indicate the schema to be used. This might be helpful in a RAD tool like BPEL, where it would be useful to have the tool aware of the structure of the XML.

On the other hand, if BPEL doesn't care about the structure, then you can just use the XmlElement type for the parameter and return value of the web service, and send and receive any arbitrary well-formed XML. You could schema-validate it yourself if you wanted to.


这篇关于字符串作为参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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