文章仅供大家参考,所有评论, 错误报告, 其他信息以及批评, 请邮寄到 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.
分享到:
相关推荐
json2.js json.parse json未定义 的解决方案!
json2.js json.parse json未定义 的解决方案!
iccavr编译putchar未定义时解决方案.pdf
iccavr编译putchar未定义时解决方案实用.pdf
AjaxPro.2未定义解决方案,多次试验,起码在XP,win7,2003,2008的iis中多次用到过。个人感觉还是可以彻底解决的。
下面小编就为大家带来一篇完美解决IE9浏览器出现的对象未定义问题。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧,祝大家游戏愉快哦
环境变量ORACLE_UNQNAME未定义问题
解决.net4.5+解决WebForm_InitCallback() 未定义问题,直接在问题页面引用即可。
sys未定义的解决方法sys未定义的解决方法
解决IE中JSON未定义的兼容问题
错误: 很多未定义标识符错误 处理:项目-->配置属性-->C/C++-->常规-->附加包含目录:添加$(ProjectDir) //VS2010默认的工作目录是$(ProjectDir)即与cpp文件同目录
Promise是es6语法里为了解决异步函数多重嵌套的问题(回调地狱) 说明: 或许你并不没有使用Promise,但是有可能你使用Axios等,其中原理也是Promise,进行了封装而已 解决办法: 步骤一: 安装 babel polyfill npm ...
html2canvas在ie下报Promise未定义错误解决方案-附件资源
引入解决IE7及以下版本JSON未定义问题
主要介绍了vue 解决无法对未定义的值,空值或基元值设置反应属性报错问题,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
IE11也支持html2canvas该插件 Promise 未定义 引用该脚本即可
.Net4.0下ASP.NET在IE10以上版本访问的时候,遇到分页或者控件回发的时候会提示doPostBack未定义,这个补丁是用来在服务器端修正这个问题,安装完需要重启。如不想在服务器修正,可以看...
我用在2008r2 上没用,后来用的App_Browsers文件夹的方式解决的,这个应该针对有一些也应该有用。 网上方法三的文件,直接放到网站根目录下就可以了。下载链接;...我是用这个方法解决好的。我用于主要是翻页控件和报表...
针对.Net4.0的网站在IE10、IE11出现“__doPostBack未定义”的解决办法