ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cwik, Jan" <Jan.C...@sabre-holdings.com>
Subject Unable to access wsdl part from the variable defined by wsdl
Date Mon, 08 Oct 2007 14:14:52 GMT
Hi,

I'm working with ODE 1.0. I have a problem with getting the WSDL part
from variable associtated with WSDL's message. Please find below
extracts from WSDL, BPEL script and Service Mix logs associated with
initilazing the $SabreCommandRequest variable. 

The SabreCommandRequest variable is created by copying the XSL output to
the body part of the SabreCommandRequest variable (see Bpel Script). You
may see from the logs that xsl returns the following xml :

<?xml version="1.0" encoding="UTF-8"?>
<SabreCommandLLSRQ xmlns="http://webservices.sabre.com/sabreXML/2003/07"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   Version="2003A.TsabreXML1.5.1">
   <Request Output="SCREEN">
      <HostCommand>N*(TEST)(SABRE_END_ITEM)NM</HostCommand>
   </Request>
</SabreCommandLLSRQ>

However, when the above xml is copied to SabreCommandRequest ( <bpel:to
variable="SabreCommandRequest" part="body"/> ) the variable gets the
following form :

<?xmlversion="1.0" encoding="UTF-8"?>
<message><body><SabreCommandLLSRQ Version="2003A.TsabreXML1.5.1"
xmlns="http://webservices.sabre.com/sabreXML/2003/07"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <Request Output="SCREEN">
      <HostCommand>N*(TEST)(SABRE_END_ITEM)NM</HostCommand>
   </Request>
</SabreCommandLLSRQ></body></message>'

Now, I want to verify that $SabreCommandRequest is created successfully,
simply I'm trying to check if SabreCommandLLSRQ node exists. When I
create XPath "$SabreCommandRequest.body/xsd1:SabreCommandLLSRQ" I see
the XPath expression returns false. I tried with xsd1 namespace and
without namespace, and all the time it's false.

DEBUG - XPath20ExpressionRuntime       - Expression {OXPath10Expression
boolean($SabreCommandRequest
.body/xsd1:SabreCommandLLSRQ)} generated result false -
type=java.lang.Boolean


What I'm doing wrong ? I see that afer performing copy the variables is
encapsuleted by <message> and <body>. In case of a similar variable that
I'm getting from the <receive> activity the variable does not contain
the <message> and <body> and $Variable.body works well.



best regards
jan


WSDL for SabreCommandLLS
------------------------
<message name="SabreCommandLLSInput">
  <part name="body" element="xsd1:SabreCommandLLSRQ"/>
</message>
<message name="SabreCommandLLSOutput">
  <part name="body" element="xsd1:SabreCommandLLSRS"/>
</message>

<portType name="SabreCommandLLSPortType">
    <operation name="SabreCommandLLSRQ">
        <input message="tns:SabreCommandLLSInput"/>
        <output message="tns:SabreCommandLLSOutput"/>
    </operation>
</portType>


Bpel Script
-----------
    <bpel:process 
    name="TravelItineraryCreateProcess" 
    targetNamespace="https://webservices.sabre.com/websvc" 
    xmlns:tns="https://webservices.sabre.com/websvc" 
    xmlns:xsd1="http://webservices.sabre.com/sabreXML/2003/07" 
    suppressJoinFailure="yes" 
    exitOnStandardFault="yes" 
    expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" 
 
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"    
    xmlns:xs="http://www.w3.org/2001/XMLSchema">

...

<bpel:variables>
    <bpel:variable name="PassengerDetailsRequest"
messageType="tns:PassengerDetailsInput"/>
    <bpel:variable name="PassengerDetailsResponse"
messageType="tns:PassengerDetailsOutput"/>

    <bpel:variable name="SabreCommandRequest"
messageType="tns:SabreCommandLLSInput"/>
    <bpel:variable name="SabreCommandResponse"
messageType="tns:SabreCommandLLSOutput"/> 
</bpel:variables>

...

<bpel:assign name="SabreCommandLLSRQ-Assign" validate="no">
    <bpel:copy>
 
<bpel:from>bpel:doXslTransform("PassengerDetailsRQ2SabreCommandRQ.xsl",
$PassengerDetailsRequest.body)</bpel:from>
        <bpel:to variable="SabreCommandRequest" part="body"/>
    </bpel:copy>
</bpel:assign>

....

<bpel:condition
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">bool
ean($SabreCommandRequest.body/SabreCommandLLSRQ)</bpel:condition>

    <bpel:sequence name="SabreCommand-Sequence">    
    
    ....    
    
    </bpel:sequence>
</bpel:if>                       



Logs Output
-----------
DEBUG - JaxpFunctionResolver           - Returned by XSL Sheet: <?xml
version="1.0" encoding="UTF-8"
?>
<SabreCommandLLSRQ xmlns="http://webservices.sabre.com/sabreXML/2003/07"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   Version="2003A.TsabreXML1.5.1">
   <Request Output="SCREEN">
      <HostCommand>N*(TEST)(SABRE_END_ITEM)NM</HostCommand>
   </Request>
</SabreCommandLLSRQ>

DEBUG - XPath20ExpressionRuntime       - Expression {OXPath10Expression
bpel:doXslTransform("Passeng
erDetailsRQ2SabreCommandRQ.xsl", $PassengerDetailsRequest.body)}
generated result net.sf.saxon.dom.D
OMNodeList@1f9f538 - type=net.sf.saxon.dom.DOMNodeList

DEBUG - XPath20ExpressionRuntime       - Returned node list of size 1

DEBUG - ASSIGN                         - lvalue after eval [message:
null]

DEBUG - ASSIGN                         - content <?xml version="1.0"
encoding="UTF-8"?>
<message><body><SabreCommandLLSRQ
xmlns="http://webservices.sabre.com/sabreXML/2003/07"/></body></me
ssage>

DEBUG - ASSIGN                         - ASSIGN Writing variable
'SabreCommandRequest' value '<?xml
version="1.0" encoding="UTF-8"?>
<message><body><SabreCommandLLSRQ Version="2003A.TsabreXML1.5.1"
xmlns="http://webservices.sabre.com/sabreXML/2003/07"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <Request Output="SCREEN">
      <HostCommand>N*(TEST)(SABRE_END_ITEM)NM</HostCommand>
   </Request>
</SabreCommandLLSRQ></body></message>'

DEBUG - JaxpVariableResolver           - Resolving variable
SabreCommandRequest.body

DEBUG - XPath20ExpressionRuntime       - Expression {OXPath10Expression
boolean($SabreCommandRequest
.body/xsd1:SabreCommandLLSRQ)} generated result false -
type=java.lang.Boolean


( ... same without "xsd1" namespace ...
DEBUG - XPath20ExpressionRuntime       - Expression {OXPath10Expression
bo
.body/SabreCommandLLSRQ)} generated result false -
type=java.lang.Boolean
)

Mime
View raw message