在编排中使用原始类型调用 Web 服务 - 无法映射请求消息
当我尝试从 Biztalk 编排中调用 SOAP Web 服务时,我遇到了这个问题。 Web 服务是 SAP 作为 SOAP Web 服务公开的 abapi,我想要调用的 Web 方法的签名如下所示:
Operation(param1 as System.String, param2 as System.String, param3 ArrayOfSomeClass)
当我看到生成的模式时,我注意到只生成了 'ArrayOfSomeClass' 和 'SomeClass' 。但我没有看到任何代表整个请求的模式。 我还注意到生成了一个 Web 端口类型,并且请求消息表示为多部分消息。该消息的各部分包含所有标量参数(param1、param2)以及数组。
我知道我可以只使用分配形状并通过代码填充消息,但这不是我想要的,因为我想将另一条消息映射到 Web 服务请求。
这可能吗?有人遇到过类似的问题吗?
提前致谢!
I'm running into this problem when trying to call a SOAP Web Service from within a Biztalk orchestration.
The Web Service is an abapi exposed by SAP as a SOAP Web Service, and the signature of the web method I want to call is something like this:
Operation(param1 as System.String, param2 as System.String, param3 ArrayOfSomeClass)
When I see the schemas generated I noticed that only 'ArrayOfSomeClass' and 'SomeClass' were generated. But I don't see any schema that represents the whole request.
I also noticed that a web port type was generated, and the request message is represented as a multi-part message. The parts of this message contains all the scalar parameters (param1, param2) and also the array.
I know I can just use the assignment shape and fill the message by code, but this is not what I want because I would like to map another message to the web service request.
Is this possible? Any one had a similar issue?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的观察是正确的,不会为简单类型生成模式,并且此处清楚地记录了它并解释了您应该如何使用此类类型。
http://msdn.microsoft.com/en-us /library/aa561724(BTS.20).aspx
XSD 将不包含简单参数类型的节点
当您添加 Web 引用并且 Web 方法具有简单类型的参数时,生成的 XSD 将不包含该参数的节点。相反,生成的多部分消息将包含简单类型的部分。编排应适当处理此消息部分。如果它是对 Web 服务的请求的一部分,请使用消息分配形状手动将值分配给该部分。如果它是来自 Web 服务的响应的一部分,请手动访问表达式形状中的该部分以查看该值。
我没明白你的第二点
You observation is correct, schemas won't be generated for simple types and its clearly documented here and explains how you should work with such types.
http://msdn.microsoft.com/en-us/library/aa561724(BTS.20).aspx
XSD will not contain nodes for simple parameter types
When you add a Web reference and the Web method has a parameter that is a simple type, the generated XSD will not contain nodes for that parameter. Instead, the multipart message that is generated will contain a part that is of the simple type. The orchestration should handle this message part appropriately. If it is a part of the request to the Web service, manually assign the value to that part with a message assignment shape. If it is a part of the response from the Web service, manually access that part in an expression shape to see the value.
I didn't get your second point