从 Oracle PL/SQL 使用 Web 服务
我们的应用程序最近与许多网络服务交互.我们有自己的软件包,几年前有人使用 UTL_HTTP 编写了它,它通常可以工作,但需要对 SOAP 信封进行一些硬编码才能与某些系统一起使用.我想让它更通用,但缺乏经验来知道我必须处理多少场景.变化在于需要声明的命名空间和元素的格式.我们必须处理带有少量参数的简单调用和以编码字符串传递大量数据的调用.
Our application is interfacing with a lot of web services these days. We have our own package that someone wrote a few years back using UTL_HTTP and it generally works, but needs some hard-coding of the SOAP envelope to work with certain systems. I would like to make it more generic, but lack experience to know how many scenarios I would have to deal with. The variations are in what namespaces need to be declared and the format of the elements. We have to handle both simple calls with a few parameters and those that pass a large amount of data in an encoded string.
我知道 10g 有 UTL_DBWS,但在线的用例并不多.它是否足够稳定和灵活以供一般使用?文档
I know that 10g has UTL_DBWS, but there are not a huge number of use-cases on-line. Is it stable and flexible enough for general use? Documentation
推荐答案
我使用了 UTL_HTTP
,它简单有效.如果您使用自己的包面临挑战,您可能可以在网上围绕 UTL_HTTP 的众多包装包之一中找到解决方案(谷歌从 pl/sql 消费网络服务",导致您例如http://www.oracle-base.com/articles/9i/ConsumingWebServices9i.php)
I have used UTL_HTTP
which is simple and works. If you face a challenge with your own package, you can probably find a solution in one of the many wrapper packages around UTL_HTTP on the net (Google "consuming web services from pl/sql", leading you to e.g.
http://www.oracle-base.com/articles/9i/ConsumingWebServices9i.php)
没有人使用 UTL_DBWS
的原因是它在默认安装的数据库中不起作用.您需要将大量 Java 类加载到数据库中,但标准指令似乎有缺陷 - 该过程左右抛出 Java 错误并最终失败.似乎很少有人愿意花时间追踪包的依赖关系以使这种方法奏效.
The reason nobody is using UTL_DBWS
is that it is not functional in a default installed database. You need to load a ton of Java classes into the database, but the standard instructions seem to be defective - the process spews Java errors right and left and ultimately fails. It seems very few people have been willing to take the time to track down the package dependencies in order to make this approach work.
相关文章