Web services 如何从bpel布尔变量获取返回值?

Web services 如何从bpel布尔变量获取返回值?,web-services,bpel,Web Services,Bpel,我是BPEL新手。我正在调用web服务来填充BPEL变量: <bpel:variable name="hasASkillOutput" messageType="ns2:personHasSkillResponse"></bpel:variable> .... <bpel:invoke name="call_personHasASkill" partnerLink="SkillPossessionService" operation="personHasSkil

我是BPEL新手。我正在调用web服务来填充BPEL变量:

<bpel:variable name="hasASkillOutput" messageType="ns2:personHasSkillResponse"></bpel:variable>
....
<bpel:invoke name="call_personHasASkill"  partnerLink="SkillPossessionService"  operation="personHasSkill"  portType="ns2:SkillPossessionServicePortType"
                inputVariable="hasASkillInput" outputVariable="hasASkillOutput"></bpel:invoke>

....
我调用的服务返回一个布尔值。如何作为条件表达式的一部分访问该值

        <bpel:if name="DoesPersonHaveTheSkill">
                <bpel:condition><hasASkillOutput is true></bpel:condition>
        </bpel:if>

消息类型
personHasSkillResponse
的结构在WSDL中定义,该WSDL由您的partnerLink
SkillPositionService
链接。您必须在那里查找该结构,然后可以在
条件中使用普通的XPath 1.0表达式,并引用变量
hasASkillOutput

例如,如果您的消息类型定义如下所示:

<message name="personHasSkillResponse">
    <part name="skillResponse" element="xsd:boolean"/>
</message>
    <bpel:if name="DoesPersonHaveTheSkill">
            <bpel:condition>$hasASkillOutput.skillResponse</bpel:condition>
    </bpel:if>

您的情况必须如下所示:

<message name="personHasSkillResponse">
    <part name="skillResponse" element="xsd:boolean"/>
</message>
    <bpel:if name="DoesPersonHaveTheSkill">
            <bpel:condition>$hasASkillOutput.skillResponse</bpel:condition>
    </bpel:if>

$hasASkillOutput.skillResponse

消息类型
personHasSkillResponse
的结构在WSDL中定义,该WSDL由您的partnerLink
SkillPositionService
链接。您必须在那里查找该结构,然后可以在
条件中使用普通的XPath 1.0表达式,并引用变量
hasASkillOutput

例如,如果您的消息类型定义如下所示:

<message name="personHasSkillResponse">
    <part name="skillResponse" element="xsd:boolean"/>
</message>
    <bpel:if name="DoesPersonHaveTheSkill">
            <bpel:condition>$hasASkillOutput.skillResponse</bpel:condition>
    </bpel:if>

您的情况必须如下所示:

<message name="personHasSkillResponse">
    <part name="skillResponse" element="xsd:boolean"/>
</message>
    <bpel:if name="DoesPersonHaveTheSkill">
            <bpel:condition>$hasASkillOutput.skillResponse</bpel:condition>
    </bpel:if>

$hasASkillOutput.skillResponse