当前位置: 首页 > news >正文

未定义partnerLinkType问题的解决方案

文章仅供大家参考,所有评论 , 错误报告 , 其他信息以及批评 , 请邮寄到 Jeffery.Lee AT gmail.com 或者访问我的个人blog同我交流 ( http://ibuddie.spaces.live.com/ ) 。本文遵从 GNU 的自由文档许可证 (Free Document License) 的条款,欢迎转载,如若修改、散布,请注明文章原始出处和来源。

在做Web服务组合的时候,如果调用第三方服务,很有可能第三方服务的WSDL文件中,并没有提供相应的partnerLinkType的定义,这时候可以按照如下思路处理:
1、本地创建一个新的WSDL文件,通过import元素导入第三方的WSDL(包装的思想),然后补充partnerLinkType的定义 ;
2、在BPEL服务的WSDL中添加partnerLinkType的定义(具体可行与否,还有待测试)

主要参考以下文档:

From BPEL Specification

A <partnerLinkType> characterizes the conversational relationship between two services by defining the roles played by each of the services in the conversation and specifying the portType provided by each service to receive messages within the context of the conversation. Each <role> specifies exactly one WSDL portType. The following example illustrates the basic syntax of a <partnerLinkType> declaration:

<plnk:partnerLinkType name="BuyerSellerLink">

<plnk:role name="Buyer" portType="buy:BuyerPortType" />

<plnk:role name="Seller" portType="sell:SellerPortType" />

</plnk:partnerLinkType>

The extensibility mechanism of WSDL 1.1 is used to define <partnerLinkType> as a new definition type to be placed as an immediate child element of a <wsdl:definitions> element. This allows reuse of the WSDL target namespace specification and its import mechanism to import portType definitions. The <partnerLinkType> definition can be a separate artifact independent of either service's WSDL document. Alternatively, the <partnerLinkType> definition can be placed within the WSDL document defining the portTypes from which the different roles are defined.

The syntax for defining a <partnerLinkType> is:

<wsdl:definitions name="NCName" targetNamespace="anyURI" ...>

...

<plnk:partnerLinkType name="NCName">

<plnk:role name="NCName" portType="QName" />

<plnk:role name="NCName" portType="QName" />?

</plnk:partnerLinkType>

...

</wsdl:definitions>

This defines a <partnerLinkType> in the namespace indicated by the value of the targetNamespace attribute of the WSDL document element. The portTypes identified within <role>s are referenced by using QNames according to the rules in WSDL specifications.

Note that in some cases it can be meaningful to define a <partnerLinkType> containing exactly one <role> instead of two. That defines a partner linking scenario where one partner expresses a capability to link with any other partner, without placing any requirements on the other partner.

Examples of <partnerLinkType> declarations are found in various business process examples in this specification.

From Sun Developer Network(SDN)

(http://developers.sun.com/jsenterprise/nb_enterprise_pack/reference/techart/bpel2.html)

Incorporation in WSDL

You define partnerLinkType as a WSDL extension in the WSDL file—not in the BPEL process definition—because partnerLinkType specifies the relationship between two services.

If the partner's WSDL file does not contain a definition for partnerLinkType, we suggest that you create a wrapper WSDL file to import the original WSDL file and then add the definition in the wrapper. Afterwards, you can refer to the wrapper from your BPEL process.

From the book of “Business Process Execution Language for Web Services”

Partner link types represent the interaction between a BPEL process and the involved parties, which includes the web services the BPEL process invokes and the client that invokes the BPEL process.

In our example, there are three different partners: the client, the employee travel status service, and the airline service. Ideally, each web service should define the corresponding partner link types (in the WSDL). In real-world scenarios, this may not be the case. Then we can wrap the partner web service with a WSDL that imports the WSDL of the web service and defines the partner link types. Alternatively, we can define all partner links in the WSDL of the BPEL process. However, this is not recommended as it violates the principle of encapsulation.

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • Linux网络设备驱动基本原理,Linux网络设备驱动基本原理和框架.pdf
  • 生成可执行BPEL代码所需必要信息分析和归纳
  • 海信电视linux安装软件,海信电视无法安装软件怎么办,两种最新方法完美解决!...
  • 打造我们心中永恒的m500
  • 基于linux嵌入式开发实现曲线图,基于Linux嵌入式操作系统实现掌上娱乐系统的设计...
  • 数据库设计
  • LINUX下如何格式化namenode,HDFS【2.5.1】系列3:解密命令行 ./bin/hdfs namenode -format
  • linux基础培训下载,huimaiLinux系统基础培训.ppt
  • 超轻量级MVC框架的设计和实现 (1)
  • linux nginx discuz安装失败,discuz! and Nginx
  • 夜梦吕布,未知所指
  • 大连理工大学c语言第三次上机作业答案,第一次上机作业参考答案
  • 利用Oracle构建BI信息板
  • 九九乘法表 冒泡排序 c语言,冒泡排序--打印三角形--九九乘法表
  • c语言输出字符串改asck,stm8s的c语言编程例程.doc
  • 【Leetcode】101. 对称二叉树
  • [译]如何构建服务器端web组件,为何要构建?
  • angular组件开发
  • Electron入门介绍
  • fetch 从初识到应用
  • Git学习与使用心得(1)—— 初始化
  • IOS评论框不贴底(ios12新bug)
  • javascript数组去重/查找/插入/删除
  • Js基础知识(一) - 变量
  • ReactNative开发常用的三方模块
  • React的组件模式
  • RxJS: 简单入门
  • spring-boot List转Page
  • 彻底搞懂浏览器Event-loop
  • 视频flv转mp4最快的几种方法(就是不用格式工厂)
  • PostgreSQL 快速给指定表每个字段创建索引 - 1
  • 浅谈sql中的in与not in,exists与not exists的区别
  • ​ 全球云科技基础设施:亚马逊云科技的海外服务器网络如何演进
  • ​3ds Max插件CG MAGIC图形板块为您提升线条效率!
  • (C#)获取字符编码的类
  • (vue)el-cascader级联选择器按勾选的顺序传值,摆脱层级约束
  • (二刷)代码随想录第16天|104.二叉树的最大深度 559.n叉树的最大深度● 111.二叉树的最小深度● 222.完全二叉树的节点个数
  • (附源码)springboot炼糖厂地磅全自动控制系统 毕业设计 341357
  • (附源码)ssm学生管理系统 毕业设计 141543
  • (论文阅读笔记)Network planning with deep reinforcement learning
  • (一一四)第九章编程练习
  • (转)Linq学习笔记
  • ./configure、make、make install 命令
  • .Net 8.0 新的变化
  • .NET Compact Framework 3.5 支持 WCF 的子集
  • .net core webapi 大文件上传到wwwroot文件夹
  • .Net Core 微服务之Consul(二)-集群搭建
  • .NET 使用 XPath 来读写 XML 文件
  • .NET简谈设计模式之(单件模式)
  • .NET建议使用的大小写命名原则
  • .Net中的设计模式——Factory Method模式
  • .net中调用windows performance记录性能信息
  • //usr/lib/libgdal.so.20:对‘sqlite3_column_table_name’未定义的引用
  • /tmp目录下出现system-private文件夹解决方法
  • @Value获取值和@ConfigurationProperties获取值用法及比较(springboot)