2017-02-13 7 views
1

xquery에서 fn : trace 함수를 호출하고 호출 메시지가 웹 로직 콘솔에서 나옵니다. 다음 예제는 fn : trace를 사용하는 방법을 보여 주지만 Jdeveloper가 나를 오류로 만듭니다. XQuery에의Soa Suit에서 xquery 내에서 추적 함수를 호출하는 방법 12 C

xquery version "1.0" encoding "utf-8"; 

(:: OracleAnnotationVersion "1.0" ::) 

declare namespace ns2="http://www.example.org/ConsultarDatosCambioPlan/"; 
(:: import schema at "../xsd/PS_SOA_OSB_PLF_CONSULTARDATOSCAMBIOPLAN.xsd" ::) 
declare namespace ns1="http://xmlns.oracle.com/pcbpel/adapter/db/top/dbAllOperations"; 
(:: import schema at "../xsd/dbAllOperations_table.xsd" ::) 

declare variable $RegistrosBaseDatos as element() (:: schema-element(ns1:DatosCollection) ::) external; 
declare variable $Codigo as xs:string external; 
declare variable $Mensaje as xs:string external; 
declare variable $Descripcion as xs:string external; 



declare function local:func($RegistrosBaseDatos as element() (:: schema-element(ns1:DatosCollection) ::), 
          $Codigo as xs:string, 
          $Mensaje as xs:string, 
          $Descripcion as xs:string) 
          as element() (:: schema-element(ns2:ConsultarDatosClienteResponse) ::){ 

    fn:trace($RegistrosBaseDatos) 

    <ns2:ConsultarDatosClienteResponse><!-- The error appears here, Syntax error. ">" is unexpected --> 
     { 
      for $Datos in $RegistrosBaseDatos/ns1:Datos 
      return 
      <Datos> 
       <idCliente>{fn:trace($RegistrosBaseDatos,"este es el valor de ")} {fn:data(xs:int($Datos/ns1:dtsCedula))}</idCliente> 
       <nomCliente>{fn:data($Datos/ns1:dtsNombre)}</nomCliente> 
       <apeCliente> </apeCliente> 
       <direccion>{fn:data($Datos/ns1:dtsDireccion)}</direccion> 
       <telefono>{fn:data($Datos/ns1:dtsCelular)}</telefono></Datos> 
     } 
     <Mensaje> 
      <Codigo>"codigo stas" + {fn:data($Codigo)}</Codigo> 
      <Mensaje>{fn:data(fn:string($Mensaje))} + "esto no es uin buen mxl" + {fn:data(($RegistrosBaseDatos))}</Mensaje> 
      <Descripcion>{fn:data($Descripcion)}</Descripcion> 
     </Mensaje> 
    </ns2:ConsultarDatosClienteResponse> 
}; 

declare function local:test($RegistrosBaseDatos as element() (:: schema-element(ns1:DatosCollection) ::)) as empty-sequence(){ 
    fn:trace($RegistrosBaseDatos,"este es el valor de ") 
}; 

local:func($RegistrosBaseDatos, $Codigo,$Mensaje,$Descripcion) 

답변

0

fn:tracetwo parameters 필요하지만, 첫 번째 전화가 하나만 가지고

fn:trace($RegistrosBaseDatos) 
+0

가 이미 함수에 두 개의 매개 변수를 추가 변경 한 있지만 여전히 동일한 참조 오류. –