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

Similar Messages

  • CPU requirement for Premiere Elements 10?

    Hi there,
    Unfortunately, I think I know the answer to this already, but thought I'd toss this out there to see if anyone has gotten it to work.
    On a Windows XP sp3 PC with a 1.86ghz Core2 6300 CPU with 2gb RAM, I'm unable to install Adobe Premiere Elements 10. When I run setup.exe I get "This installation package is not supported by this processor type. Contact your product vendor."
    The system requirements for Premiere Elements 10 do list a 2ghz CPU with SSe2 support. The Core2 6300 does support SSe2, but runs at 1.86ghz not 2ghz.
    Just haven't seen a program actually refuse to install based on CPU speed before. Guess I've been lucky. But can anyone confirm that the installer actually won't install on a slower processor speed. Not sure what else the error could be than this.
    Thanks in advance,
    Sir_timbit

    I know about the min specs. The reason I'm asking if it really checks the CPU speed is I have a school that *is* running Premiere Elements 10 on the exact same hardware. Same CPU. The only difference is the new version I'm trying to install is the volume license version, part of the Adobe Digital School collection. The school that already has it running is using Premiere Elements 10 with either separate licenses or some other license setup. So it doesn't make sense why it worked but doesn't now.
    Testing today. On my test PC, a Core 2 6300 XPsp3, the setup would start up OK using the non-VL installer, but fail when I tried to use the setup.exe from the new installer. As far as I know the program is the same, but I don't think I can do the XML customizations needed to do a silent installer on the non volume licensed version of Premiere Elements 10. In short, why does one version of PE 10 install but not the other?
    Sir_Timbit

  • Decision required for sample quantity in foreground processing

    Hi,
    I'm trying to do a GR using LB11 but when I try do execute TO in background I receive this error in the log.
    "Decision required for sample quantity in foreground processing"
    Trying in foreground I have in following message: Inspection sample quantity must be greater than 0 for this processing.
    May I have a missing configuration in the strategies?
    I need to do this on background.

    I just found that the interface QM-WM was not fully configured in SPRO.
    The interface control WM-QM was not set correctly for the storage Type search sequences.

  • Payload Validation failing for EBM

    Hi,
    I have a composite which takes input based on a simple XSD.
    Inside the composite the input is mapped to Sales Order EBM and this EBM is sent as input to other composite.
    For data validation purpose, I switched on Payload Validation for this composite in Weblogic EM.
    The input data validation works fine but it's throwing follwing error while invoking composite which accepts EBM as input.
    <fault>
    <bpelFault>
    <faultType>0</faultType>
    <remoteFault>
    <part name="summary">
    <summary>oracle.fabric.common.FabricInvocationException: Schema validation failed for message part payload. Please ensure at the message sender level that the data sent is schema compliant.</summary>
    </part>
    <part name="detail">
    <detail>Element 'ProcessSalesOrderFulfillment' not expected.</detail>
    </part>
    <part name="code">
    <code>null</code>
    </part>
    </remoteFault>
    </bpelFault>
    </fault>
    The payload validation error is occuring for all composites which accepts EBM as input. It picks the attribute name just after the header and says element not expected.
    Any help is greatly appreciated.
    Thanks,
    Ravi

    Please ensure that you have created EBS properly, verify all the datatypes of the elements in input XSD & EBO schema. And also verify whether EBM header is reflecting properly.
    One more thing you should able to navigate from EBS to EBM, EBM to EBO then only you can assume you have done all things correctly. If not reconstruct EBS, EBM & EBO with valid request & response messages.

  • Using States and the includeIn-property for UI-elements inside my mxml-composide-component

    Hi,
    unfortunatly I am looking for a way to use States in a mxml-component. I’m working with the flash builder 4.6 (means as3).
    Because this did not work when I did use the normal mxml tags for the states inside my VGroup-composite-component, I added a creationComplete-Handler in the Script part of my component in which I instanciated the states and the states-Array via as3. I copied
    this of an internet- article from 2006 that was already dealing with
    as3, but at that time the States were part of the mx-namespace. How ever when I wrote: newState1: State= new State(); my development environment did not know the class State. Did I forgot to import anything or to use a namespace in my Script block ? I imported the AS3 Finite State Machine from meekgeek.com.
    But these states have no name-property insted they got a key-property, but this did not work either though I imported correct and did use the correct namespace. I did not find any State-class-description at Adobe's doku either. All I’m trying to do is to use the standard State-includeIn-properties of UI-Components inside
    my mxml-composide-componend. I’d be much obliged if You may help me in this point.
    Best regards,
    Timan Bracht

    Thanks for the answers so far.
    I can show now the correct KmLimit on the field, thanks to a javabean method, so this problem is solved - even I don't know why on hell it does not show it automatically, since I did give to it literal/expression default value in the attribute properties of the transient field; but never mind.
    The current problem: we use a task flow, that shows an input form to enter new records. This form has a LOV, from where I get a value from, which will be then saved once the submit button has been pressed.
    So far, so good.
    I enter some values in the input fields. If now I save the record, it will be saved, and all the form fields reset to null. Perfect.
    But. If I don't press the save button, instead I pick another value from the LOV list, the values of the input fields does not reset to null, instead, they remain with the last entered value.
    It does not seem there's more to change in the task flow properties that would reset the fields automatically.
    So we're stuck with this issue, the fields remain filled, even if I do set it to null. The value is really null - I set it to null with fieldName.setValue(null) and show it in the console with fieldName.getValue() - but the form still shows the old value in the field.
    Any help is greatly appreciated,
    Sergio.

  • Validation required for a GL account

    Hi Guru,
    I want to have a validation for a GL account 571006 to use WBS element for manual postings and should give error if WBS element is not entered against this GL.
    Can you please let me know how to create a validation in GGBO.
    Thanks

    Hi,
    I thought so, when i have created a new validation and try to assign to the company code in GGB4 it says object already exist as the company code got one validatation assigned to it.
    When i am trying to assign my new validation it is not getting assigned.
    Can you please help me.
    Thanks

  • REQUIREMENTS FOR PHOTOSHOP ELEMENTS 11

    WHAT BASE SCORE IS REQUIRED TO RUN PHOTOSHOP ELEMENTS 11? MY COMPUTER'S BASE SCORE IS 3.3.

    Adobe publishes minimum Tech Specs rather than using Microsoft's Windows Experience Index (base score)
    http://windows.microsoft.com/en-AU/windows-vista/What-is-the-Windows-Experience-Index
    Adobe Photoshop Elements 11 tech specs are here
    http://www.adobe.com/products/photoshop-elements/tech-specs.html
    Ensure your hardware and operating system meets or exceeds those.
    If you're still not sure, try downloading the 30 day Trial version for free for 30 days and see how it performs on your computer.
    http://www.adobe.com/go/tryphotoshop_elements/

  • Cluster Validation Requirement (for contract support)

    Can anyone give definitive information on how a newly built cluster may be validated ? We have a support contract in place but I have not found detailed information on how to meet this requirement and how it relates to support during a production-down issue.
    Thanks,
    Jim

    Thanks Tim. My rep is investigating right now.
    I was hoping there might be some detailed information on the validation service on the Oracle/Sun sites. Obviously we'd like to avoid an iterative process by knowing up front what is involved before asking for the service.
    Jim

  • How to set a new value for an element inside an XML file....

    Hi guys...!
    I'm using Java to process an XML file and I want to able to make changes to the document. For instance, let say:
    <firstName> John </firstName>
    and I want to change the content or value of the element "firstName" to "Marc"
    <firstName>Marc</firstName>
    How can I get this done?
    This is the code that I have in my java file...But it doesn't work. Nothing happens. The firstName remains "John".
    Do I need to get the owner document to do this?
    firstPersonElement.getElementsByTagName("firstName").item(0).getFirstChild().setNodeValue("Marc");
    Any suggestions will be appreciated...
    Thanks...
    --- Spirit_Away...

    IMHO, it should work the way you describe. Do you
    actually save the DOM tree to file afterwards?Good point. No, actually.
    How do you save the document in that case ???
    Any suggestions...
    Thanks...
    --- Spirit_Away

  • What are the Master Table validations required for below fields

    Hi,
    I have created a selection screen with following fields.
    Can anybody tell me what are the exact master table vaidation i can do for the same!
    <b>Order Type[VBAK-AUART],
    Order Number[VBAK-VBELN],
    Customer PO #[VBKD-BSTKD],
    Sold-to Party No[VBPA-PARVW - SP as key],
    Ship-to Party No[VBPA-PARVW - SH as key],
    Division[VBAK-SPART].</b>
    Agaist which master tables i need to vaidate above fields!
    Also please clarify what is meant by [SP as Key] & [SH as key]! Is it needs to be defaulted!
    Thanks in advance.
    Thanks,
    Prasad.

    Hi Prasad,
    For your another Query
      SH- Ship To Party,
      SP - Sold To party.
    You can set anyone of them as Default depending on ur Bsuiness requirement ie. You are Forwarding ur Invoice to ship to or sold to Party.
    Regards,
    Leo

  • Immediate Response required for Fire-and-forget OSB pattern.

    Hi,
    I have a BPEL process (fire-and-forget pattern) which runs for few minutes, but want to send an immediate response back to the caller. The important condition is to have a Proxy implemented as a WSDL-based service type.
    For this, I am calling BS (of BPEL process) in request pipeline and sending a changed $body in response pipeline; but the OSB response document us null, though in response pipeline, I do see $body getting replaced.
    Any pointers will be really helpful.
    Thnx,
    Nikhil

    like AbhishekJ said
    if you defined your operation in the wsdl for the proxy service oneway and in the testconsole you do see the body is getting replaced after the routing is executed it's mostly like because of the oneway operation on your proxyservice itself, make it synchronous and do a test again?
    or put a replace with some static xml in the response pipeline, remove the route and see if if still returns null
    then you're pretty sure it's the oneway operation in the proxy wsdl itself

  • Validation require for different business area in MRO

    Dear friends
    System is allowing posting of different business area in Miro (Line item & Header item).For disallowing I have checked Validation, I think it is not usable.Please suggest me another solution.
    regds
    sachin

    Hello,
    You can use MRM_HEADER_CHECK bAdI for this validation.
    or
    You can use Enhancement (CMOD transaction) LMR1M001 -EXIT_SAPLMRMP_010 for this validation
    Regards,
    Burak

  • System requirements for photoshop elements 13

    All versions of PSE 13 that I have seen say it is for Mac OS 8 thru OS 9.  Will it work with the new OS 10?

    There is no version of PSE that works with OS 8, which would be about 1996 or so. PSE 1 and 2 worked with OS 9.
    If you mean OS X 10.8 or 10.9 or 10.10, yes, PSE 13 works. You can download the trial and check it out for yourself. There are problems with PSE 11 and 12 in Yosemite, but 13 should be fine.

  • Hardware requirements for Premiere Elements 12

    Hello
    I am planning to buy a new computer. Will the Premiere Elements 12 work well on Pentium G2030 or does it need the I3 or the I5? Does it need any special screen card?
    Yael

    Hi yaelbrahms
    Please find the tech specs below : http://www.adobe.com/in/products/premiere-elements/tech-specs.html

  • Wrong results for context search on empty element tags

    I'm using Oracle DBMS 11.1 and 11.2 and created a context index on an XML column (section group: PATH_SECTION_GROUP).
    When entering a query like
    SELECT count(*) FROM my_table t WHERE contains (t.co_xml,'hasPath(/tag1/tag2)') > 0
    I get wrong results if tag2 is an empty element tag (<tag2/>) that appears somewhere within the
    XML instance, but NOT directly under tag1.
    E.g., the following XML instance is found (but shouldn't!):
    <a>
    <tag1>bla<tag3>bla</tag3></tag1>
    <tag4>bla<tag2/></tag4>
    </a>
    This seems to happen only for empty element tags. Is this a known bug and does anybody know a workaround?
    Thanks in advance for your help!
    Roman

    I am unable to reproduce the problem. Can you provide a copy and paste of an actual run, including create table, insert data, create index, and select, as I have done below?
    SCOTT@orcl_11g> select * from v$version
      2  /
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE     11.1.0.6.0     Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    SCOTT@orcl_11g> create table my_table
      2    (co_xml     xmltype)
      3  /
    Table created.
    SCOTT@orcl_11g> insert into my_table values (
      2  xmltype ('<?xml version="1.0"?>
      3  <tag5>
      4    <tag1>bla<tag3>bla</tag3></tag1>
      5    <tag4>bla<tag2/></tag4>
      6  </tag5>'))
      7  /
    1 row created.
    SCOTT@orcl_11g> create index my_idx
      2  on my_table (co_xml)
      3  indextype is ctxsys.context
      4  parameters ('section group ctxsys.path_section_group')
      5  /
    Index created.
    SCOTT@orcl_11g> SELECT count(*)
      2  FROM   my_table t
      3  WHERE  contains (t.co_xml, 'hasPath (//tag1/tag2)') > 0
      4  /
      COUNT(*)
             0
    SCOTT@orcl_11g> SELECT count(*)
      2  FROM   my_table t
      3  WHERE  contains (t.co_xml, 'hasPath (//tag1/tag3)') > 0
      4  /
      COUNT(*)
             1
    SCOTT@orcl_11g>

Maybe you are looking for

  • How to get the first month of the year inputed by user manually

    Hi Expert, Just like the subject, I 'd like to get the first month of the year inputed by user manually, but don't know how to set the variable, please help. For example, user execute a query and input the value of variable Year = 2010, and what I wa

  • Beginner ABAPer asking Doubts in BDC

    Hi Guyz, I am a beginner in ABAP. Here i am sending some doubts on BDC . Any Kind of help will be highly Appreciated. Thanks, SAM 1>How do we handle all the scrolling funcions(page ups, page downs atc), and values entered into table controls in BDC ?

  • Dependent LOV throws Exception

    Hello, I want to implement a dependent LOV: I have a LOV Competency and a dependent Proficiency LOV. e.g. in Competence LOV I search for Oracle DBA then I only want the Proficiency level concering to Oracle DBA e.g. certified, not certified. The lead

  • Workflow/BADI   ? ?

    Please read the following process/requirement. Whenever there is a new hire/rehire/termination ( Looking for any change/update/event in IT 0000). The requirement is to extract information from ITs 0000,0001 and 0002 and send it across to the applicat

  • ISync deleted a calendar from iCal

    I'm very new to the Mac world. My PC died at Thanksgiving and I'm still getting used to my new iMac. I am using iSync to sync between my new iMac and my very old Handspring Visor Prism. Things are going remarkably well except now that I have moved al