OSB Validate action

As I have just started working in OSB, so my query is whether I can get a proper error message from OSB validate action against the particular attribute in an XML which is having the wrong input.
Example : Suppose in my XSD i have defined student's id as integer but in below XML it is coming with a string. So can I get the exact error message stating like attribute 'id' is having a wrong value and so validation failed.
<Class>
<student id="123"/>
</Class>
Please help.

The attribute level validation was done through java call out. Had to use sax parser for this..
here is the code :
public class XMLValidator {
static boolean success = true;
static private String errorMsg = "";
static String msg = "";
* @param xsdPath
* @param payload
* @return
public static String XMLValidator(String xsdPath, String payload) {
String status = "";
try {
System.out.println("XSD Path: " + xsdPath);
System.out.println("Payload: " + payload);
status = ValidateXML(new URL(xsdPath), payload);
} catch (MalformedURLException e) {
return (e.getMessage());
return (status);
public static String ValidateXML(URL xsdUrl, String xmlFile) {
success = true;
errorMsg = "";
SAXParser saxParser = new SAXParser();
saxParser.setValidationMode(XMLParser.SCHEMA_VALIDATION);
String xmlFilePayload = xmlFile;
XSDBuilder builder;
try {
builder = new XSDBuilder();
URL url = xsdUrl;
//System.out.println(url.getPath());
XMLSchema schemadoc = (XMLSchema)builder.build(url);
saxParser.setXMLSchema(schemadoc);
Validator handler = new Validator();
saxParser.setErrorHandler(handler);
// saxParser.parse(new FileInputStream(new File(xmlFilePayload)));
InputStream inputStream =
new ByteArrayInputStream(xmlFilePayload.getBytes("UTF-8"));
saxParser.parse(inputStream);
if (success) {
msg = "Successfully Validated";
} else {
/* writeLogFile(logFileName,
"[" + counter + "]. " + xmlFileName + "\n" +
"------------------------------------------------------------------------------------------------------\n" +
errorMsg + "\n\n\n", true);*/
msg = errorMsg;
} catch (XSDException f) {
System.out.println("XSDException : " + f.getMessage());
//System.out.println("XSDException : " + f.getMessage());
} catch (FileNotFoundException f) {
System.out.println("FileNotFoundException : " + f.getMessage());
} catch (SAXException f) {
System.out.println("SAXException : " + f.getMessage());
} catch (IOException f) {
System.out.println("IOException : " + f.getMessage());
catch (Exception f) {
System.out.println("IOException : " + f.getMessage());
return (msg);
public static class Validator implements ErrorHandler {
public void error(SAXParseException exception) {
success = false;
int separator = exception.getMessage().indexOf(")");
System.out.println("index "+separator);
String st = exception.getMessage().substring(separator+1);
errorMsg = errorMsg + "Error : " + st + "\n";
//System.out.println("error: " + exception.getMessage());
public void fatalError(SAXParseException exception) {
success = false;
errorMsg =
errorMsg + "Fatal Error : " + exception.getMessage() + "\n";
// System.out.println("fatalError: " + exception.getMessage());
public void warning(SAXParseException exception) {
success = false;
errorMsg = errorMsg + "Warning : " + exception.getMessage() + "\n";
//System.out.println("warning: " + exception.getMessage());
}

Similar Messages

  • OSB Validate action problem with xs:short datatype

    Hi,
    In the XSD, intPayment is defined as xs:short.
    We have the validate action in OSB proxy.
    If we pass below, everything is fine : (correct)
    <intPayment>96</intPayment>
    If we pass below, OSB is throwing a validate error indicating fractional digits after decimal point. (correct)
    <intPayment>96.01</intPayment>
    But if we pass below, OSB validate action is not catching :
    <intPayment>96.00</intPayment>
    I am assuming that OSB validate action should throw an error that 96.00 is not a valid value. (xs:short restricts any fractional digits after decimal point).
    Can you pl help me?
    Thanks,
    S
    Edited by: user13058197 on Jan 13, 2011 10:29 AM
    Edited by: user13058197 on Jan 13, 2011 12:16 PM

    I am assuming that OSB validate action should throw an error that 96.00 is not a valid value. (xs:short restricts any fractional digits after decimal point). Your assumption is incorrect and OSB is working as designed (actually as per XML standard). Actually short datatype is derived from int, int is derived from long, long is derived from integer and integer is derived from decimal.
    Definition of Integer (http://www.w3.org/TR/xmlschema-2/#integer) says -
    [Definition:] integer is ·derived· from decimal by fixing the value of ·fractionDigits· to be 0and disallowing the trailing decimal point. This results in the standard mathematical concept of the integer numbers. The ·value space· of integer is the infinite set {...,-2,-1,0,1,2,...}. The ·base type· of integer is decimal. And hence xs:short accepts 96.00 but does not accept 96.01
    Regards,
    Anuj

  • OSB Validate action failed validation

    Hi All,
    I'm trying to convert non-xml to xml by using XqueryTransformation source as an HL7 and target as an CCD schema.When validating the against the schema I got the following exception.
    Please provide any suggestions.
    <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-382505</con:errorCode>
    <con:reason>OSB Validate action failed validation</con:reason>
    <con:details>
    <con1:ValidationFailureDetail xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">
    <con1:message>
    string value '' does not match pattern for cs in namespace urn:hl7-org:v3
    </con1:message>
    <con1:xmlLocation>
    <ns0:title xmlns:ns0="urn:hl7-org:v3">XXX</ns0:title>
    </con1:xmlLocation>
    <con1:message>
    Element 'title@urn:hl7-org:v3' with empty content type cannot have text or element content.
    </con1:message>
    <con1:xmlLocation>
    <ns0:title xmlns:ns0="urn:hl7-org:v3">XXX</ns0:title>
    </con1:xmlLocation>
    <con1:message>
    Element 'title@urn:hl7-org:v3' with empty content type cannot have text or element content.
    </con1:message>
    <con1:xmlLocation>
    <ns0:title xmlns:ns0="urn:hl7-org:v3">XXX</ns0:title>
    </con1:xmlLocation>
    <con1:message>
    Element 'title@urn:hl7-org:v3' with empty content type cannot have text or element content.
    </con1:message>
    <con1:xmlLocation>
    <ns0:title xmlns:ns0="urn:hl7-org:v3">XXX</ns0:title>
    </con1:xmlLocation>
    <con1:message>
    Element 'title@urn:hl7-org:v3' with empty content type cannot have text or element content.
    </con1:message>
    <con1:xmlLocation>
    <ns0:title xmlns:ns0="urn:hl7-org:v3">XXX</ns0:title>
    </con1:xmlLocation>
    <con1:message>
    Element 'title@urn:hl7-org:v3' with empty content type cannot have text or element content.
    </con1:message>
    <con1:xmlLocation>
    <ns0:title xmlns:ns0="urn:hl7-org:v3">XXX</ns0:title>
    </con1:xmlLocation>
    <con1:message>
    Element 'title@urn:hl7-org:v3' with empty content type cannot have text or element content.
    </con1:message>
    <con1:xmlLocation>
    <ns0:title xmlns:ns0="urn:hl7-org:v3">XXX</ns0:title>
    </con1:xmlLocation>
    <con1:message>
    Element 'title@urn:hl7-org:v3' with empty content type cannot have text or element content.
    </con1:message>
    <con1:xmlLocation>
    <ns0:title xmlns:ns0="urn:hl7-org:v3">XXX</ns0:title>
    </con1:xmlLocation>
    <con1:message>
    Element 'title@urn:hl7-org:v3' with empty content type cannot have text or element content.
    </con1:message>
    <con1:xmlLocation>
    <ns0:title xmlns:ns0="urn:hl7-org:v3">XXX</ns0:title>
    </con1:xmlLocation>
    </con1:ValidationFailureDetail>
    </con:details>
    Thanks
    Mani

    Hi Anuj,
    I tried doing that but in Response, it is echoing back the request after the statement:
    The invocation resulted in an error: .
    And now it shows:
    Stage Error Handler
    $fault: <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-382505</con:errorCode>
    <con:reason>OSB Validate action failed validation</con:reason>
    <con:details>
    <con1:ValidationFailureDetail xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">
    <con1:message>
    string value '2' is not a valid enumeration value for VersionType in namespace http://www.example.org/abcd_Request_Schema
    </con1:message>
    <con1:xmlLocation>
    <abcd:Version xmlns:abcd="http://www.example.org/abcd_Request_Schema">2</abcd:Version>
    </con1:xmlLocation>
    </con1:ValidationFailureDetail>
    </con:details>
    <con:location>
    <con:node>PipelinePairNode1</con:node>
    <con:pipeline>PipelinePairNode1_request</con:pipeline>
    <con:stage>request xml validation</con:stage>
    <con:path>request-pipeline</con:path>
    </con:location>
    </con:fault>
    System Error Handler
    $fault: <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>402</con:errorCode>
    <con:reason>
    Validation Failed. Please enter proper values.
    </con:reason>
    <con:details>
    <con1:ValidationFailureDetail xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">
    <con1:message>
    string value '2' is not a valid enumeration value for VersionType in namespace http://www.example.org/abcd_Request_Schema
    </con1:message>
    <con1:xmlLocation>
    <abcd:Version xmlns:abcd="http://www.example.org/abcd_Request_Schema">2</abcd:Version>
    </con1:xmlLocation>
    </con1:ValidationFailureDetail>
    </con:details>
    <con:location>
    <con:node>PipelinePairNode1</con:node>
    <con:pipeline>PipelinePairNode1_request</con:pipeline>
    <con:stage>request xml validation</con:stage>
    <con:path>request-pipeline</con:path>
    </con:location>
    </con:fault>
    Is there any way by which only the customized error can be seen & not the OSB errors?

  • OSB Validate action fails even an element is nillable="true"

    Hi,
    I have declared two elements in my inline schema nillable="true":
    <xsd:element name="Skip_CreditChk" nillable="true" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="Observation_End_Date" nillable="true" type="xsd:date" minOccurs="0" maxOccurs="1"/>
    In my OSB message flow, my first action is a Validate action.
    When I test the proxy service in the OSB Console and input the following elements I encounter an OSB validate action failed error even when those fields below are declared as nillable in the schema. Anyone got an idea regarding this issue?
    <Skip_CreditChk/>
    <Observation_End_Date/>

    Please check W3C recommendation -
    http://www.w3.org/TR/xmlschema-0/ (section 2.9 Nil Values)
    Your input should be like -
    <Skip_CreditChk xsi:nil="true"></Skip_CreditChk>
    <Observation_End_Date xsi:nil="true"></Observation_End_Date>
    Regards,
    Anuj

  • MQ:OSB Assign action failed updating variable "ServiceRequest"

    Hi
    We have a problem with the MQ adapters in Oracle Service Bus.
    If we (by accident/break testing) put messages on the queue that are invalid XML (such as "Banana" as plain text), the OSB goes into an infinte loop with this message, as it can never be dequeued due to:
    <BEA-381901> <Exception in MQ Inbound Request: TransportException EndPoint: T20230_GoodsEvent/ProxyServices/T20230_G
    oodsEvent, com.bea.wli.sb.transports.TransportException: OSB Assign action failed updating variable "ServiceRequest": com.bea.wli.common.xquery.XQueryException: Error parsing XML: {err}FORG0
    005: expected exactly one item, got 0 items
    com.bea.wli.sb.transports.TransportException: OSB Assign action failed updating variable "ServiceRequest": com.bea.wli.common.xquery.XQueryException: Error parsing XML: {err}FORG0005: expect
    ed exactly one item, got 0 itemsThis even prevents the message from being put on the dead letter queue.
    Any hints?

    Correct, but we have tried switching to Text to no avail.

  • OSB replace action failed..

    very urgent help needed.
    Scenario:
    1. My proxy service (new wsdl based) calls business (legacy wsdl based).
    2. I want to transform input format from new format schema to legacy format schema.
    3. I write a Xquery and Replace ./* in variable body with Xquery. Binding variable is accepted as $body.
    4. Individually tested, works like a charm; but when proxy is exected-throws following error:
    BEA-382513: OSB Replace action failed updating variable "body": line 29, column 1: {err}XP0006: "element {http://schemas.xmlsoap.org/soap/envelope/}Body { {http://www.w3.org/2004/07/xpath-datatypes}untypedAny }": bad value for type element {http://myURL}SwapnilRequest { {http://www.w3.org/2001/XMLSchema}anyType }
    here myURL is namespace defined for input format "SwapnilRequest".
    In short, the content of variable "body" are not changed even after transformation.
    Please help.
    Thanks and Regards,
    Swapnil Kharwadkar.

    Dear Eric,
    Following is Xquery:
    (:: pragma bea:global-element-parameter parameter="$aMA_UpdateRQ1" element="ns0:AMA_UpdateRQ" location="AMA_UpdateRQ.xsd" ::)
    (:: pragma bea:schema-type-return type="ns1:ListOfAyLoyMemberPortalProspectTopElmt" location="AY%20LOY%20Member%20Portal%20Prospect_blore.wsdl" ::)
    declare namespace ay = "http://www.siebel.com/xml/AYRES%20Member%20Information%20–%20Long%20Portal";
    declare namespace com = "http://com.finnair";
    declare namespace asi = "http://siebel.com/asi/";
    declare namespace xf = "http://tempuri.org/GetNewCard_WithSiebel_XQuery/A_getProfile_Xquery/newResponse/";
    declare namespace pros="http://com.finnair/prospectProcessing/";
    declare function xf:A_blore_QueryByExample_Request($AMA_UpdateRQ as element(com:AMA_UpdateRQ))
    as element(asi:ListOfAyLoyMemberPortalProspectTopElmt) {
    let $AMA_UpdateRQ := $AMA_UpdateRQ
    return
    <asi:ListOfAyLoyMemberPortalProspectTopElmt>
    <ay:ListOfAyLoyMemberPortalProspect>
    <ay:Contact>
    <ay:Id>{ data($AMA_UpdateRQ/com:UniqueID/@ID) }</ay:Id>
    <ay:ContactId>{ data($AMA_UpdateRQ/com:UniqueID/@ID) }</ay:ContactId>
    </ay:Contact>
    </ay:ListOfAyLoyMemberPortalProspect>
    </asi:ListOfAyLoyMemberPortalProspectTopElmt>
    declare variable $AMA_UpdateRQ as element() external;
    xf:A_blore_QueryByExample_Request($AMA_UpdateRQ)

  • OSB : BEA-382510: OSB Assign action failed updating variable

    Hi all,
    I just started learning OSB and created a simple process .
    This is my request :
    <soapenv:Envelope      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <soap:Header      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
         </soap:Header>
         <soapenv:Body>
         <hel:getGreeting      xmlns:hel="http://hello.alsb.com/">
         <!--Optional:-->
         <arg0>string</arg0>
         </hel:getGreeting>
         </soapenv:Body>
         </soapenv:Envelope>
    im getting a error response in Assign:
    <soapenv:Envelope      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <soapenv:Body>
         <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>
         BEA-382510: OSB Assign action failed updating variable "Test": weblogic.xml.query.exceptions.XQueryTypeException: {err}XP0006: "element return { {http://www.w3.org/2004/07/xpath-datatypes}untypedAny }": bad value for type {http://www.w3.org/2001/XMLSchema}string
         </faultstring>
         <detail>
         <con:fault      xmlns:con="http://www.bea.com/wli/sb/context">
         <con:errorCode>BEA-382510</con:errorCode>
         <con:reason>
         OSB Assign action failed updating variable "Test": weblogic.xml.query.exceptions.XQueryTypeException: {err}XP0006: "element return { {http://www.w3.org/2004/07/xpath-datatypes}untypedAny }": bad value for type {http://www.w3.org/2001/XMLSchema}string
         </con:reason>
         <con:location>
         <con:node>RouteTo_HelloWorldBiz</con:node>
         <con:path>response-pipeline</con:path>
         </con:location>
         </con:fault>
         </detail>
         </soapenv:Fault>
         </soapenv:Body>
         </soapenv:Envelope>
    This is my Xquery:
    xquery version "1.0" encoding "Cp1252";
    declare namespace xf = "http://tempuri.org/GoodbyeWorld_SB/XQuery/Hello_to_GoodBye/";
    declare function xf:Hello_to_GoodBye($helloStr as xs:string)
    as xs:string {
    replace($helloStr, 'HELLO', 'Goodbye')
    declare variable $helloStr as xs:string external;
    xf:Hello_to_GoodBye($helloStr)
    in my message response pipeln of the proxy service:
    i have added the assign and given the expression : $body/hel:getGreetingResponse/return
    var :Test
    After the assign: i have given a replace activity:
    xpath: ./hel:getGreetingResponse/return
    varabile : body
    Expression : string($Test)
    when i test in OSB console:
    im getting this error:
    <soapenv:Envelope      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <soapenv:Body>
         <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>
         BEA-382510: OSB Assign action failed updating variable "Test": weblogic.xml.query.exceptions.XQueryTypeException: {err}XP0006: "element return { {http://www.w3.org/2004/07/xpath-datatypes}untypedAny }": bad value for type {http://www.w3.org/2001/XMLSchema}string
         </faultstring>
         <detail>
         <con:fault      xmlns:con="http://www.bea.com/wli/sb/context">
         <con:errorCode>BEA-382510</con:errorCode>
         <con:reason>
         OSB Assign action failed updating variable "Test": weblogic.xml.query.exceptions.XQueryTypeException: {err}XP0006: "element return { {http://www.w3.org/2004/07/xpath-datatypes}untypedAny }": bad value for type {http://www.w3.org/2001/XMLSchema}string
         </con:reason>
         <con:location>
         <con:node>RouteTo_HelloWorldBiz</con:node>
         <con:path>response-pipeline</con:path>
         </con:location>
         </con:fault>
         </detail>
         </soapenv:Fault>
         </soapenv:Body>
         </soapenv:Envelope>
    aany suggestions on where the issue is.
    im totaly stuck here:
    TIA,
    karthik

    it is not clear at which point you are invoking Hello_to_GoodBye, and using which argument
    anyway it's likely that you are passing an Xml element (a node, something like <hello>Charlie</hello>) instead of a simple type (a string, like "Charlie")
    you should use the function data($body/bla) or text ($body/bla/text() ) to extract the value (Charlie) of your element

  • ALSB 2.5 Validate action problem

    My problem is that when I issue a "Validate" step in my ALSB Console using a given schema, and I post a test message (using the ALSB console) I receive a "Failed to perform validation" error.
    The problem is not with the test message nor with the schema.I performed a "Schema Validation" on XML Spy and both the test message and XML Schema validated successfully.
    Is there a logged problem with ALSB25 regarding the use of the "Validate" action?
    Below is a snapshot of the error message I receive when I post the test message
    &lt;con:fault xmlns:con="<a href="http://www.bea.com/wli/sb/context">http://www.bea.com/wli/sb/context</a>"&gt;
    &lt;con:errorCode&gt;BEA-382000&lt;/con:errorCode&gt;
    &lt;con:reason&gt;Failed to perform validation&lt;/con:reason&gt;
    &lt;con:location&gt;
    &lt;con:node&gt;OgsAtomMessageRouter&lt;/con:node&gt;
    &lt;con:pipeline&gt;OgsAtomMessageRouter_request&lt;/con:pipeline&gt;
    &lt;con:stage&gt;Validate Schema&lt;/con:stage&gt;
    &lt;/con:location&gt;
    &lt;/con:fault&gt;
    Thanks,
    Carlos

    It sounds like you are not routing or passing the right soap message to the EJB business service. To have the exact shape of the expected XML, use the test console, and look at the complete request document. This is what you need to pass if the proxy service is anyXml.

  • BEA-382513: OSB Replace action failed: bad value for type element anyType

    Hello, in OSB I get this strange error message on my XQUERY TRANSFORMATION.
    *<faultstring>BEA-382513: OSB Replace action failed updating variable "response":*
    com.bea.wli.common.xquery.XQueryException:
    *Error parsing XML: {err}XP0006: "*
    *element {http://xmlns.oracle.com/pcbpel/adapter/db/top/CS2AdapterSelectOffenePosten_v0_5}Cs2DebitorOpVieCollection*
    *{ {http://www.w3.org/2004/07/xpath-datatypes}untypedAny }":*
    bad value for type element
    *{http://xmlns.oracle.com/pcbpel/adapter/db/top/CS2AdapterSelectOffenePosten_v0_5}cs2RechungungenResponse*
    *{ {http://www.w3.org/2001/XMLSchema}anyType }*
    *</faultstring>*
    I'm a pl/sql developer and I have no idea what this error message is telling me.
    In this forum I'v read someting about a wrong namespace declaration. I can't see any wrong value on my xml (ok, I'm not the specialist here...)
    Maybe someone of you xquey cracks might have a look at my code?
    This is what I have:
    _1.) a XQuery variable called cs2RechnungenResponse with this content:_
    <cs2:Cs2DebitorOpVieCollection
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:cs2="http://xmlns.oracle.com/pcbpel/adapter/db/top/CS2AdapterSelectOffenePosten_v0_5">
         <cs2:Cs2DebitorOpVie>
              <cs2:f40Konto>333</cs2:f40Konto>
              <cs2:AMT_BEZEICHNUNG>Amt für Gesundheit</cs2:AMT_BEZEICHNUNG>
              <cs2:f40Belnr>555</cs2:f40Belnr>
              <cs2:f40Sohab>S</cs2:f40Sohab>
              <cs2:f40Dmbet>100</cs2:f40Dmbet>
              <cs2:f40Fadat>2011-05-05T00:00:00.000+02:00</cs2:f40Fadat>
              <cs2:f40Valut>2011-05-05T00:00:00.000+02:00</cs2:f40Valut>
              <cs2:f40Mahns/>
              <cs2:f40F40Sj>0</cs2:f40F40Sj>
         </cs2:Cs2DebitorOpVie>
    </cs2:Cs2DebitorOpVieCollection>
    _2. a xquery with this code:_
    (:: pragma bea:global-element-parameter parameter="$cs2RechnungenResponse" element="ns2:cs2RechnungenResponse" location="../adapters/cs2_adapters/xsd/CS2AdapterSelectOffenePosten_v0_5_table.xsd" ::)
    (:: pragma bea:global-element-return element="ns0:getDebitorRechnungResponse" location="../../interfaces/RechnungServiceTypes_v0_6.xsd" ::)
    declare namespace ns3 = "http://www.llv.li/common/types/v1";
    declare namespace ns2 = "http://xmlns.oracle.com/pcbpel/adapter/db/top/CS2AdapterSelectOffenePosten_v0_5";
    declare namespace ns1 = "http://www.llv.li/fin/types/v1";
    declare namespace ns0 = "http://www.llv.li/fin/services/rechnungService/v1";
    declare namespace xf = "http://tempuri.org/fin_sb/RechnungsService/transformations/CARI_CS_2DBAdpter_to_RechnungsServiceGetOffenePosten_v0_5/";
    declare function xf:CARI_CS_2DBAdpter_to_RechnungsServiceGetOffenePosten_v1_0($cs2RechnungenResponse as element(ns2:cs2RechnungenResponse))
    as element(ns0:getDebitorRechnungenResponse) {
    <ns0:getDebitorRechnungenResponse schemaVersion="0.6">
              if ($cs2RechnungenResponse/ns2:Cs2DebitorOpVie) then
              <ns0:debitorRechnungList>
         for $Cs2DebitorOpVie in $cs2RechnungenResponse/ns2:Cs2DebitorOpVie
         return
         <ns0:debitorRechnung>
              <ns1:peid>0</ns1:peid>
              <ns1:rechnungsnummer>{ data($Cs2DebitorOpVie/ns2:f40Belnr) }</ns1:rechnungsnummer>
              <ns1:rechnungsdatum>{ xs:date(fn-bea:remove-timezone-from-dateTime(data($Cs2DebitorOpVie/ns2:f40Fadat))) }</ns1:rechnungsdatum>
              <ns1:faelligAm>{ xs:date(fn-bea:remove-timezone-from-dateTime(data($Cs2DebitorOpVie/ns2:f40Valut))) }</ns1:faelligAm>
         <ns1:behoerde>{ data($Cs2DebitorOpVie/ns2:AMT_BEZEICHNUNG) }</ns1:behoerde>
         <ns1:positionList>
              <ns1:position>
                   <ns1:positionsnummer>1</ns1:positionsnummer>
                                                 <ns1:betrag>{ data($Cs2DebitorOpVie/ns2:f40Dmbet) }</ns1:betrag>
                                                 <ns1:waehrung>
                                                      <ns1:isoCode>CHF</ns1:isoCode>
                                                      <ns1:bezeichnung>Schweizer Franken</ns1:bezeichnung>
                                                 </ns1:waehrung>
              </ns1:position>
              </ns1:positionList>
         <ns1:status>offen</ns1:status>
              if ($Cs2DebitorOpVie/ns2:f40Mahns/text() > "") then
                   <ns1:mahnstufe>{ xs:int(data($Cs2DebitorOpVie/ns2:f40Mahns)) }</ns1:mahnstufe>
              else ()
         </ns0:debitorRechnung>
         </ns0:debitorRechnungList>
         else ()
    <ns0:resultatStatus>
         <ns3:code>Erfolgreich</ns3:code>
         <ns3:beschreibung>Rechnungen aus MFK fehlen</ns3:beschreibung>
    </ns0:resultatStatus>     
    </ns0:getDebitorRechnungenResponse>
    declare variable $cs2RechnungenResponse as element(ns2:cs2RechnungenResponse) external;
    xf:CARI_CS_2DBAdpter_to_RechnungsServiceGetOffenePosten_v1_0($cs2RechnungenResponse)
    _3. this should result in this response, but it doesn't_
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soap-env:Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <v1:getDebitorRechnungenResponse schemaVersion="0.6" xmlns:v1="http://www.llv.li/fin/services/rechnungService/v1">
    <v1:debitorRechnungList>
    <v1:debitorRechnung>
    <v11:peid xmlns:v11="http://www.llv.li/fin/types/v1">333</v11:peid>
    <v11:rechnungsnummer xmlns:v11="http://www.llv.li/fin/types/v1">555</v11:rechnungsnummer>
    <v11:rechnungsdatum xmlns:v11="http://www.llv.li/fin/types/v1">2011-05-05</v11:rechnungsdatum>
    <v11:faelligAm xmlns:v11="http://www.llv.li/fin/types/v1">2011-05-05</v11:faelligAm>
    <v11:behoerde xmlns:v11="http://www.llv.li/fin/types/v1">Amt für Gesundheit</v11:behoerde>
    <v11:positionList xmlns:v11="http://www.llv.li/fin/types/v1">
    <v11:position>
    <v11:positionsnummer>1</v11:positionsnummer>
    <v11:betrag>100</v11:betrag>
    <v11:waehrung>
    <v11:isoCode>CHF</v11:isoCode>
    <v11:bezeichnung>Schweizer Franken</v11:bezeichnung>
    </v11:waehrung>
    </v11:position>
    </v11:positionList>
    <v11:status xmlns:v11="http://www.llv.li/fin/types/v1">offen</v11:status>
    </v1:debitorRechnung>
    </v1:debitorRechnungList>
    <v1:resultatStatus>
    <v11:code xmlns:v11="http://www.llv.li/common/types/v1">Erfolgreich</v11:code>
    <v11:beschreibung xmlns:v11="http://www.llv.li/common/types/v1">Rechnungen aus MFK fehlen</v11:beschreibung>
    </v1:resultatStatus>
    </v1:getDebitorRechnungenResponse>
    </soap-env:Body>
    </soapenv:Envelope>
    But I do not get this expectet result, all I get is the BEA-382513: OSB Replace action failed: bad value for type element anyType?
    Any help would be appreciated.
    Thanks
    Best regards
    rk

    cs2RechungungenResponse or cs2RechnungenResponse ? the error message says cs2RechungungenResponse, but the actual element is cs2RechnungenResponse (one less "u")

  • Ignoring namespace in OSB validation action

    Hi,
    I want my namespace to be ignored while doing validation of my XML against an XSD, by default OSB does not allow us to do this, is their a way around?

    Unfortunately XMLs are strongly defined with namespaces. If your schema has a nmespace then validation will also include namespace validation and without it traversing through the XML document will also not be possible even for the validation engine.
    Alternative is to define a duplicate schema without a namespace and validate against it.
    If a different namespace coming in the XML document then write a simple XQuery to remove namespace before validation, do the validation against the duplicate schema. But this approach is just a work around and heavy on performance so its not usually recommended. I suggest keeping the normal validation with namespace and asking the consumer applications to send XMLs with proper namespace. Validation are intended to keep such bad XML requests getting processed and it makes sense to have namespaces validated as well.

  • OSB - Publish action - Request action message enrich/ tranformation impact

    Hi ,
    Today I came across an analysis on how the performance of thread is impacted if we have these two scenarios.
    1. A stage containing all the pre enrichment and validation and transformation to the input message to construct the request message for Publish action(to BS)
    2. A Publish action - Request action - sub activities / actions containing the enrichment, validation and transformation to construct the request message from input message
    An expert advice is expected to see if there is any significant impact in performance and thread analysis. This cal has to be made on entire implementation which has almost 70+ services.
    Thanks for quick reply.

    Enable tracing in osb console, and for debugging try adding routing options in publish node and change the quality of service to exactky once. You will then eb able to see the error.
    Also if you do not require your ps2 to be accessed outside the jvm consider making the ps2 a local proxy service.

  • OSB publish action and error queue

    Hello there,
    where in case of poisened messages, the "publish" action, routes the messages.
    I have one proxy which, along its pipeline, publish a message to another proxy and then carry on. Well, I guess this is done some how with internal OSB queues, where in case of error these messages are moved? Is there anyway to specify a specific destination?
    Thanks in advance

    If there is an error in your proxy service and you want push the messages to the queue you have to handle it manually through error handler. In case of publish if you want to handle the messages you have use routing options and change the quality of service and then in the error handler publish the message to the required queue.
    Edited by: 988445 on Mar 18, 2013 6:20 PM

  • OSB Assign Action

    Hi:
    I have created a service in OSB, which has two Business service and a proxy service.
    One Business service uses JCA Binding which gets the value from DataBase and another Business service posts data into a queue.
    In my proxy service message flow, i am using these two business Service by means of service callout.
    Firstly the business Service with JCA binding is invoked and the output from it will be like
    <get:SampleCollection      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:get="http://xmlns.oracle.com/pcbpel/adapter/db/top/Get_Sample">
         <get:Sample>
         <get:type>Testing</get:type>
         <get:status>Success</get:status>
         <get:mailto>[email protected]</get:mailto>
         <get:cc>[email protected]</get:cc>
         <get:bcc>[email protected]</get:bcc>
         </get:Sample>
         </get:SampleCollection>
    And i have assigned it to a variable called DBOutput in ServiceCallout.
    Now to my second business service, some input need to be taken from the output of my first business service, so i am trying to use the below expression to get the values from DBOutput variable and assign to a variable called TestingDBVariable
    $DBOutput/*:SampleCollection/*:Sample/*:mailto/text()
    But after testing the proxyservice, variable "TestingDBVariable" itself is not reflecting, am i missing something here?
    OSB: 11.1.1.4
    Regards,
    RK

    You should investigate it at two levels:
    1. Check if your business service is indeed returning the "mailto" field properly. To verify this test the business service directly from sbconsole. If business service is not returning the mailto value then it may be because table metadata was changed after you created the JCA DB Adapter. Try creating it again and updating business service.
    2. If your business service is indeed returning the "mailto" field then there is some problem with mapping of the field while populating request for second business service. Try $DBOutput//*:mailto/text() once instead of whole XPath. Depending on how you have assigned the output of first BS to the variable, one of the following should be the right Xpath:
    $DBOutput/*:SampleCollection/*:Sample/*:mailto/text()
    or
    $DBOutput/*:Sample/*:mailto/text()

  • OSB: Publish action message loss

    Hi
    I have following scenario.
    OSB PS_1 and PS_2 are HTTP proxy services.
    Client-->sends request to OSB PS_1
    PS_1 "publishes" payload to PS_2
    PS_1 sends response back to Client saying request was received
    PS_2 does required processing and updates DB accordingly. Idea is client should not have to wait for processing by PS_2, as it may take time.
    I observed that, in production it happened - Client sent request to PS_1, PS_1 made publish to PS_2 (verified by log), PS_1 sent response back to client. But PS_2 did not receive the payload passed by PS_1 at all.
    Where did my message go? How could I trace the lost payload?
    Thanks
    Swapnil Kharwadkar

    Enable tracing in osb console, and for debugging try adding routing options in publish node and change the quality of service to exactky once. You will then eb able to see the error.
    Also if you do not require your ps2 to be accessed outside the jvm consider making the ps2 a local proxy service.

  • OSB: Payload validation required for empty elements inside OSB process.

    Hello
    I need to validate the payload for non-empty elements. If the payload is completely empty then OSB should throw an error that the submitted payload is empty.
    If the payload contains at least one element then it should pass through.
    As in process to test this particular one, i have tried with the following code to generally validate for an element.
    xquery version "1.0" encoding "Cp1252";
    (:: pragma bea:global-element-parameter parameter="$inputParameters1" element="ns0:InputParameters" location="../adapter/StoreProcDB/xsd/StoreProcDBService_sp.xsd" ::)
    (:: pragma bea:schema-type-return type="ns1:Validation" location="../xsd/validation.xsd" ::)
    declare namespace xf = "http://tempuri.org/StoreProc_osb/transformation/PayloadValidation/";
    declare namespace ns1 = "http://www.sigmainfo.com/validation";
    declare namespace ns0 = "http://xmlns.oracle.com/pcbpel/adapter/db/sp/StoreProcDBService";
    declare function xf:PayloadValidation($inputParameters1 as element(ns0:InputParameters))
    as element()
    <ns1:Validation>
              <ns1:Payload>{$inputParameters1/.}</ns1:Payload>
              <ns1:ValidationErrorList>
                   (: BEGIN - Required Field Validations :)
              (:     if (empty($inputParameters1/ns0:ACCOUNTNUMBER/text())) then
                        <ns1:ValidationError>
                             <ns1:code>1</ns1:code>
                             <ns1:message>ACCOUNTNUMBER: Required Field</ns1:message>
                        </ns1:ValidationError> :)
                   if (empty($inputParameters1/ns0:AUDITUSER/text())) then
                        <ns1:ValidationError>
                             <ns1:code>1</ns1:code>
                             <ns1:message>AUDITUSER: Required Field</ns1:message>
                        </ns1:ValidationError>
                   else ''
                   (: END - Required Field Validations :)
    </ns1:ValidationErrorList>
         </ns1:Validation>
    declare variable $inputParameters1 as element(ns0:InputParameters) external;
    xf:PayloadValidation($inputParameters1)
    But it throws the following error:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    REQUEST DOCUMENT:
    <soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    <soapenv:Body>
    <stor:InputParameters
    xmlns:stor="http://xmlns.oracle.com/pcbpel/adapter/db/sp/StoreProcDBService">
    <!--Optional:-->
    <stor:P_ACCOUNTNUMBER>00101</stor:P_ACCOUNTNUMBER>
    <!--Optional:-->
    <stor:P_AUDITUSER>venkat</stor:P_AUDITUSER>
    </stor:InputParameters>
    </soapenv:Body>
    </soapenv:Envelope>
    RESPONSE DOCUMENT:
    The invocation resulted in an error: . <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>BEA-382505: OSB Validate action failed validation</faultstring><detail><con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-382505</con:errorCode>
    <con:reason>OSB Validate action failed validation</con:reason>
    <con:details>
    <con1:ValidationFailureDetail xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">
    <con1:message>
    Incompatible elements: expected an XML instance of name "{http://xmlns.oracle.com/pcbpel/adapter/db/sp/StoreProcDBService}InputParameters", but found an XML instance of name "{http://schemas.xmlsoap.org/soap/envelope/}Body".
    </con1:message>
    <con1:xmlLocation/>
    </con1:ValidationFailureDetail>
    </con:details>
    <con:location>
    <con:node>PipelinePairNode1</con:node>
    <con:pipeline>PipelinePairNode1_request</con:pipeline>
    <con:stage>stage1</con:stage>
    <con:path>request-pipeline</con:path>
    </con:location>
    </con:fault>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    But this is not the way it should be done as i progress.
    Please suggest a simple way to have a pragma with sample and complete validation for the input payload.
    Appreciate your help in advance
    Regards
    Venkat

    Venkat,
    Find below url's for implementing security policies in OSB
    http://docs.oracle.com/cd/E17904_01/doc.1111/e15866/owsm.htm#CHDEEGJI
    http://docs.oracle.com/cd/E17904_01/doc.1111/e15866/owsm.htm#CHDBIJHD
    http://niallcblogs.blogspot.in/2010/07/osb-11g-and-wsm.html
    http://biemond.blogspot.in/2009/06/ws-security-in-osb.html
    Regards,
    Abhinav

Maybe you are looking for

  • Connecting optical out to soud system

    Hello, I am from Germany. I am trying to connect my MacBook Pro via a standard optical cable (I guess its called tosslink) to my Sony Sound system. All other devices I have had before (DVB-S receiver, DVD player) fit perfectly with this cable, but no

  • How does one set a password for a document or otherwise protect it?

    i need to email a pdf document. how do i set a password to protect it?

  • Iphone not ringing, clock not holding correct time and no wi-fi

    Man...I thought I had done something, but since the 2.1 update, my phone doesnt ring but for one or two random calls. The clock is also not holding time...it does if i restart the phone but within hours its back to hopping around, trying to get the r

  • Favourites boxes wont work

    Help - about a week ago I have been unable to select any thing in any of my favourites listings. When I click on the favourites tab, and then go to bookmarks then take my cursor down my list of favourite sites to select the one I want, I get like a g

  • Netweaver 04 J2EE license

    Hi, I have just installed NW04 ABAP + J2EE addon using the following method. 1) Install Was 6.40 Abap 2) License the system 3) Install J2EE 6.40 add-on for Abap 4) Applied stack 9 for Abap 5) Applied stack 9 for J2EE The ABAP engine is licensed corre