Handling xsd:import in XSLT

I'm trying to generate an input form from an XML schema using XSL.
Unfortunatly, the schema is spread out over several files and uses xsd:import to piece the whole thing together. So, when I try to parse it, all I get is the elements declared in the first file, and none of the includes.
How can I get around that?
The file looks like:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:include schemaLocation="restOfSchema.xsd"/>
   <xs:element ref="rootElement"/>
</xs:schema>And I get:
<html>
<body>
   <form method="post" action="next.html">
     <h1>rootElement:</h1>
     <p></p>
   </form>
</body>
</html>There should be several sub elements and such, but as you can see, they don't make it.

Compared to what alternative?That was part of my question :)
I hope there is one because now I'm getting stack overflow errors when I try to transform my latest stylesheet.
I was trying to solve an issue with this little bit of code:
<xsl:for-each select="//xsd:include[$count]">$count is a template parameter. I have to call the template recursively because looping results in too many templates being applied.
The problem (I think) is that it only selects includes in the document I've selected searching for element definitions (which gets opened because my root document has many includes and references to elements in those documents) so, I have to use select="document($doc)/xsd:schema/... where $doc is a reference to a value picked from the schemaLocation attribute of an include.
So what is happening (I think) is that while I'm still in the document I had selected to search for definitions (and found them), //xsd:include only matches nodes in that document. So I tried this to search for includes:
<xsl:for-each select="document($root)/xsd:schema/xsd:include[$count]"> so that I could go back and select those include nodes from the root document (fortunately they aren�t anywhere else). Unfortunately, that gets me a stack overflow.

Similar Messages

  • XSLT Editor in Imported Archives (XSLT)

    Hi,
    The SAP Library Content found at this Link:
    http://help.sap.com/saphelp_nw70/helpdata/EN/4c/b2ad3de2d76b3be10000000a114084/frameset.htm
    says:
    "Changes the selected XSLT program. In an Integration Builder editor you can either change lines or import another XSLT program."
    Does this mean, the default Integration Builder editor can be changed to an editor I prefer?
    My aim is to edit the XSLT-Mapping out of the ntegration Builder with the editor I like.
    In our  Integration Builder  the prefered editor is used when I press button "Open in Client Browser", but I whould like it in "Change Program".
    Many thanks for your ideas!
    Brigitte

    Hi,
    Unfortunatley this is not possible yet because editor choice not configurable or in other term since IR is using simple text editor (which can be simple multiline text box).
    But it is good suggestion and you can forward it to SAP XI design team.
    Regards,
    Gourav

  • Problem Import WSDL with XSD import Schema

    Hi SCN, i have problem
    I have a WSDL that references an xsd, but the structure is not visible in PI.
       <wsdl:types>
          <xsd:schema targetNamespace="http://tempuri.org/Imports">
             <xsd:import schemaLocation="http://bilbolab****.net/ServiceItemHO.svc?xsd=xsd0" namespace="http://tempuri.org/" />
             <xsd:import schemaLocation="http://bilbolab.****.net/ServiceItemHO.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
             <xsd:import schemaLocation="http://bilbolab.*****.net/ServiceItemHO.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/ItemHO.BO" />
          </xsd:schema>
       </wsdl:types>
       <wsdl:message name="iVistaHO_AddItemHO_InputMessage">
          <wsdl:part name="parameters" element="tns:AddItemHO" />
       </wsdl:message>
    WSDL works well using SoapUI.
    When imported to PI parameters is not displayed
    I Need Help
    Thank you.

    Hi, Dihiansan. I don't understand your proposal
    I need you see the structure in PI how in SoapUI.
    It is possible?
    Regards

  • HUGE PROBLEM: xsd:import generates invalid WSDL during deploy (11.1.1.3.0)

    Hi,
    I have a big problem:
    if I create a bpel/mediator based on XSDs that use xsd:import, like this:
    <xsd:import schemaLocation="./Generic.xsd" namespace="http://test.mydomain.com/test/Generic"/>
    when i deploy, I get an error trying to test the service using oracle EM.
    THe error looks like:
    Either the WSDL URL is invalid or the WSDL file is not valid or incorrect. - java.io.IOException: WSDLException: faultCode=OTHER_ERROR: Lettura di WSDL da http://dev-oraclevmmac:8001/soa-infra/services/default/TestSOAProject/bpelprocess2_client_ep?XSD=./xsd/Test.xsd non riuscita: WSDL non trovato
    What can I do ?

    Yes, of course XSD and WSDL are valid inside JDev. I validated them also using XMLSpy.
    The problem is that the WSDL becomes invalid through deployment.
    But, after some hour of investigation, I've come to a solution: I have to puth the ABSOLUTE PATH ('relative' to the .bpel file) inside each xsd:import and inside wsdls.
    So, my example is now:
    <xsd:import schemaLocation="../xsd/Generic.xsd" namespace="http://test.mydomain.com/test/Generic"/>

  • Best way to handle optional elements in XSLT

    Hi All,
    I'v wondering if there are any better ways to handle optional fields in XSLT.
    For example if my Person Type has 5 fields and 3 of them are optional:
    <xs:complexType name="PersonType">
    <xs:element name="PersonID" min="1"/>
    <xs:element name="PIN" min="1"/>
    <xs:element name="FirstName" min="0"/>
    <xs:element name="MiddleName" min="0"/>
    <xs:element name="LastName" min="0"/>
    </xs:complexType>
    In my xslt file, if I do somthing like:
    <Person>
    <FirstName>
    <xsl:value-of select="PersonType/FirstName"/>
    </FirstName>
    </Person>
    I might get an empty FirstName element in my output xml file. (like <FirstName/>) This has caused some very weired behavour with Oracle v2 parser because optional means the node may not be present in the xml not the node is there but empty.
    The only way I can think of solving this is to put <xsl:if test> around every single optional element to test if it exist in the source file. If it does then generate the element in the destination file. But in this way, if the source file is very complicated, then you would have to wrap each element with a <xsl:test> which is very ugly to me.
    Do anyone know if there is a more generic way that we can solve this issue?
    Thanks,
    Larry

    Dharmendra,
    The answer you gave is very very helpful. The only thing that I can think of here is that it might accidentally delete the fields that have been set empty deliberately.
    Maybe, this is one of the grey areas in XML Schema that I do not understand very well yet. In xml, if you define an element to be a string type and mandatory (minOccurs="1"), for exampe the following xml
    <Name></Name>
    will be valid against the schema because the Name element is present in the xml payload. However, it has no value or has a valud of empty string. I know that this is only a problem with string type. If it is boolean, then it has to be either true of false, being empty won't satisfy the schema validator. But with String it is a bit trickier, because String can be empty. Maybe this issue should be stopped when designing your xml schema by specifying the mininum length (>0) in the schema. Any suggestions would be welcomed.
    Cheers,
    Larry

  • How to handle "xsd:anyAttributes" with jaxb

    Need help for how to handling "xsd:anyAttribute" with jaxb!
    Here is part of my xml schema.
    <xsd:attributeGroup name="DataAttributes">
    <xsd:anyAttribute namespace="##local" processContents="lax"/>
    </xsd:attributeGroup>
    <xsd:element name="Data">
    <xsd:complexType>
         <xsd:attributeGroup ref="DataAttributes"/>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="MA_Verify">
    <xsd:complexType>
         <xsd:sequence>
         <xsd:element ref="Data" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
         <xsd:attributeGroup ref="verifyAttributes"/>
    </xsd:complexType>
    </xsd:element>
    I have an application which only knows the attribute names and values at runtime. (Thest attributes are string.) Therefore, I cannot define attribute names in the schema and have to use xsd:anyAttribute.
    I was able to generate all jaxb code. However, the interfaces generated for Data and DataType are basically all empty. The impl classes are empty too, since no get or set methods exist for the attribute.
    Some thoughts for handling this case, but do not know if it will work.
    (1) write some derive classes on top of the generated jaxb classes.
    (2) write customized method to handle the 'Data' element level and its attributes. Similar to parseMethod or printMethod for the javaType.
    (if there is a way)
    Can anyone give me suggestions, directions or an laternate way to handle the situation?
    Your help will be greatly appreciated.
    Ruth

    xsd:anyAttribute is not supported by JAXB.
    http://java.sun.com/xml/jaxb/users-guide/jaxb-works.html#unsupported

  • JAX-WS generated WSDL uses xsd:import and no option to inline schemas

    Is it possible to configure JAX-WS 2.0/2.1 so that when generating WSDL at runtime it will inline the schema definitions instead of using the <xsd:import> method? Unfortunately, some clients (Adobe Flex, for example) do NOT know how to process schema imports. I realize that Adobe (and others) should fix the problem on their end and become fully spec compliant, but the cold reality is that they are not.
    Any advice, suggestions, or solutions would be greatly appreciated.
    Regards,
    Todd

    You should post this question either to the JAXB 2.0 and JAX-WS 2.0 forum (http://forums.java.net/jive/forum.jspa?forumID=46) or the JAX-WS dev mailing list ([email protected]) so that the team is aware of the issue.
    That functionality currently does not exist. The only work around that I am aware of is to generate the WSDL before deployment and rearrange it as necessary.

  • Can BPEL handle xsd:group tags?

    As far as I heard BPEL cannot handle xsd:group tags in XSD schema files.
    E.g. when validating XML documents.
    Is this true? Or do I have to enable an option to use xsd:group tags as well?
    Peter

    Has anyone got it working yet?
    In my case, I have the following sequence:
    FileAdapter -> Mediator1 -> Mediator2->DB Adapter
    I am deliberately introducing validation error in File. Isn't it correct to assume Fault framework would get triggered at Mediator1 level since we are invoking FileAdapter service?
    I am getting a strange behaviour. If I enable XSD validation at Mediator1 level, process is Faulted with no re-try option. However, if I enable XSD validation ONLY at Mediator2 level, I get Recoverable fault. There seems to be some disconnect between documentation and reality. I am using JDeveloper 11.1.1.3.0 version and SOA Suite 11g.
    Thanks,
    Amjad.

  • Autotype support for xsd import and xsd include statement

    Hi,
    I am using Weblogic 7.0.1. While using autotype for a Schema, I get the error unable to resolve element ref: "qb:WireCenterCLLI. This element exists in an xsd imported in the main XSD which in turn includes a few XSD's. I saw few posts which indicated there were issues with autotype recognising xsd:import and xsd:include statements. Were these issues fixed? If so, what SP were they fixed in?
    My XSD:
    <?xml version = "1.0" encoding = "UTF-8"?>
    <xsd:schema xmlns = "http://www.qwest.com/XMLSchema"
    targetNamespace = "http://www.qwest.com/XMLSchema"
    xmlns:qb = "http://www.qwest.com/XMLSchema/BIM"
    xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
    elementFormDefault = "qualified">
    <xsd:import namespace = "http://www.qwest.com/XMLSchema/BIM" schemaLocation = "/u/skarani/sia_code/xsd/ProjectSpecific/SIA/BIM/AddressValidationInclude_v01_00.xsd"/>
    <xsd:include schemaLocation = "/u/skarani/sia_code/xsd/ProjectSpecific/SIA/Common/AddressValidationCommon_v01_00.xsd"/>
    <xsd:include schemaLocation = "/u/skarani/sia_code/xsd/ProjectSpecific/SIA/Common/RequestMessage_v02_01.xsd"/>
    <xsd:element name = "AddressValidationByServiceIdRequest">
    <xsd:complexType>
    <xsd:complexContent>
    <xsd:extension base = "WebServiceRequestT">
    <xsd:sequence>
    <xsd:element name = "InputData" type = "AddressValidationByServiceIdInputDataT">
    </xsd:element>
    </xsd:sequence>
    </xsd:extension>
    </xsd:complexContent>
    </xsd:complexType>
    </xsd:element>
    <xsd:complexType name = "AddressValidationByServiceIdInputDataT">
    <xsd:sequence>
    <xsd:element ref = "qb:WireCenterCLLI" minOccurs = "0"/>
    <xsd:element ref = "qb:WireCenterPrimaryNPANXX" minOccurs = "0"/>
    <xsd:element ref = "AdministrativeArea" minOccurs = "0"/>
    <xsd:element ref = "qb:PostalCode" minOccurs = "0"/>
    <xsd:element ref = "qb:BTN"/>
    <xsd:element name = "ParsedAddressFlag" type = "xsd:boolean" minOccurs = "0">
    </xsd:element>
    <xsd:element ref = "qb:CCNA" minOccurs = "0"/>
    <xsd:element name = "CompanyCode" type = "xsd:string" minOccurs = "0">
    </xsd:element>
    <xsd:element ref = "AssignedHouseNumberFlag" minOccurs = "0"/>
    <xsd:element ref = "GSGRqmtFlag" minOccurs = "0"/>
    <xsd:element ref = "TNStatus" minOccurs = "0"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    Thanks
    Shekhar

    Hmmmm.... No answers!!!
    Has anyone had success using autotype with an xsd having include and import statements???
    Thanks
    Shekhar

  • Handling charges Imports

    Dear All,
    Here my client want the handlich charges only for calculation purpose only.
    So i made that condn type in pricing procedure as statistical, removed acc key & accrual key.
    And in condn type i removed condn category B-delivery cost.
    But after MIRO(customs) and J1IEX, when i post MIGO, this handling charges of 1% is posting to Material cost.
    I removed vendor also from condn type in PO.
    Regds,
    CB

    Hi,
    Create/Change your condition type as follows  go to M/06
    Condition Type - ZHCI ( Handling charges Imports)
    Access seq. - Blank
    Plus/minus - Blank
    Under Control data 1;
    Cond. class   A (Discount or Surcharge)
    Calculat.type B (Fixed amount) or A (Percentage)
    Cond.category Blank
    Mark as "Item Condition" or "header" as per requirement
    And save.
    Use it in MM calculation schema (in M/08) and mark it as "Statistical"
    Now try to create a PO

  • Guidelines on handling Argentina imported trading goods

    Hi,
    I need information on how to handle Argentina imported trading goods with detailed information listed below using SAP System.
    - port of import
    - supplier documentation number
    - date of custom release
    and this information has to be printed on outgoing sales invoices again.
    Hope to get inputs immediately.
    Regards and thank you,
    Earl

    Dear,
    If your question about general procedure, hope this link will help you.
    http://fedex.com/us/international/irc/profiles/irc_ar_profile.html?gtmcc=us#C03
    http://www.emporikitrade.com/uk/countries-trading-profiles/argentina/market-access
    Regards,
    Syed Hussain.

  • Standard PML Message XSD Import in PI Gives Error ::AII -PI-ECC Integration

    Hi Experts,
    We are currently integrating the AII system with ECC using  PI as a middleware. We are trying to post one type of message in AII which will check the tag event in that message and do the required action in AII.
    Now point is AII team is expecting a PML mesage as below -
      <?xml version="1.0" encoding="utf-8" ?>
    - <pmlcore:Sensor xmlns:pmlcore="urn:autoid:specification:interchange:PMLCore:xml:schema:1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:autoid:specification:interchange:PMLCore:xml:schema:1 ./PML/SchemaFiles/Interchange/PMLCore.xsd">
      <pmluid:ID xmlns:pmluid="urn:autoid:specification:universal:Identifier:xml:schema:1" />
    - <pmlcore:Observation>
      <pmlcore:DateTime>2012-02-08T16:41:26.760</pmlcore:DateTime>
      <pmlcore:Command>TAG_DECOM_BATCH</pmlcore:Command>
    - <pmlcore:Data>
    - <pmlcore:XML>
      <PRODUCT>TRN_PROD_13</PRODUCT>
      <BATCH_ID>ATRN_PROD13B</BATCH_ID>
      <LogicalDeviceID>DG_AMBOISE_LINE_1</LogicalDeviceID>
      </pmlcore:XML>
      </pmlcore:Data>
      </pmlcore:Observation>
      </pmlcore:Sensor>
    And they have also provided the standard PML message xsd to us but when we are importing it in to XI it is giving the below error -
    Change list activated; note the following information
    Check result for External Definition: PML | urn:sugata_PI_LFTP: Document check found errors
    Cause: Loaded document contains incorrect XSD definition
    Name of '/schema/element("XML")' starts with 'xml'
    as we can see in the above XML there is a tag called  <pmlcore:XML> if we change this to something like <pmlcore:ABC>
    it is imported successfully and we can see the message structure  in the XSD also.
    As PML XSDs are standard so the AII team is also not changing the same as mentioned above.
    Please advise how can we import this XSD in PI with tag name XML?
    Another question, which is very confusing to us -  is PI able to send PML message as mentioned above? or PI will send a simple XML as below -
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_Batch_DECOMM xmlns:ns0="http://pfizer.com/serialization/batch_expiration">
    - <Observation>
      <DateTime>2012/02/08</DateTime>
      <Command>TAG_DECOM_BATCH</Command>
    - <Data>
    - <XML>
      <PRODUCT>F000000211</PRODUCT>
      <BATCH_ID>00000TESTAII001</BATCH_ID>
      <DOCUMENT_NO>0000000004811027</DOCUMENT_NO>
      <LogicalDeviceID>DG_GLOBAL</LogicalDeviceID>
      </XML>
      </Data>
      </Observation>
      </ns0:MT_Batch_DECOMM>
    and AII will convert it to PML message using some PML engine or PML converter in AII?
    Request your urgent help in this regard. Any help will be appreciated and rewarded.
    The standard XSDs we are using are - PMLCore.xsd and Identifier.xsd , first one is referring the second one.
    Thanks
    Sugata B Majumder

    Hi Mark,
    Thanks for the input. I have also thought the same using XSLT or JAVA as in PI7.1 the tag XML is not allowed in xsd. But I got surprise when I have created a data type having a field name as XML and xsd for this has been successfully generated.
    Any ways I have handled the entire structure target payload creation in XSLT. here is the XSLT code I have written-
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="/">
       <xsl:comment>
       This XSLT Mapping is designed to handle the PML structure required by SAP AII system.This XSL Transformation will create PML Standard Message in SAP PI.
       Author: majums15
    </xsl:comment>
      <pmlcore:Sensor xmlns:pmlcore="urn:autoid:specification:interchange:PMLCore:xml:schema:1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:autoid:specification:interchange:PMLCore:xml:schema:1 ./PML/SchemaFiles/Interchange/PMLCore.xsd">
      <pmluid:ID xmlns:pmluid="urn:autoid:specification:universal:Identifier:xml:schema:1" />
          <pmlcore:Observation>
          <pmlcore:DateTime>
         <xsl:value-of select="substring(//EDI_DC40/CREDAT,1,4 )" />
      <xsl:text>-</xsl:text>
      <xsl:value-of select="substring(//EDI_DC40/CREDAT,5,2 )" />
      <xsl:text>-</xsl:text>
      <xsl:value-of select="substring(//EDI_DC40/CREDAT,7,2 )" />
      <xsl:text>T</xsl:text>
      <xsl:value-of select="substring(//EDI_DC40/CRETIM,1,2)" />
      <xsl:text>:</xsl:text>
      <xsl:value-of select="substring(//EDI_DC40/CRETIM,3,2)" />
      <xsl:text>:</xsl:text>
      <xsl:value-of select="substring(//EDI_DC40/CRETIM,5,2)" />
      </pmlcore:DateTime>
            <pmlcore:Command>TAG_DECOM_BATCH</pmlcore:Command>
            <pmlcore:Data>
              <pmlcore:XML>
               <xsl:element name="PRODUCT">
               <xsl:value-of select="//ZBATMAS/IDOC/ZE1BATMAS/MATNR" />
                </xsl:element>
                 <xsl:element name="BATCH_ID">
                 <xsl:value-of select="//ZBATMAS/IDOC/ZE1BATMAS/LICHA" />
                  </xsl:element>
                <xsl:element name="LogicalDeviceID">
                 <xsl:text>DG_GLOBAL</xsl:text>
                  </xsl:element>
                 <xsl:element name="DOCUMENT_NO">
                 <xsl:value-of select="//ZBATMAS/IDOC/EDI_DC40/DOCNUM" />
                  </xsl:element>
                </pmlcore:XML>
            </pmlcore:Data>
          </pmlcore:Observation>
        </pmlcore:Sensor>
      </xsl:template>
    </xsl:stylesheet>
    Thanks
    Sugata B

  • Can SOA 11g fault policy handle XSD Validation errors from the Mediator?

    I would like all errors in my SOA process to go through the fault-policies.xml. But I don't seem to be able to catch any mediator error caused by an XSD validation failure. A sample of the sort of error I am trying to 'catch' is:
    Nonrecoverable System Fault          oracle.tip.mediator.infra.exception.MediatorException: ORAMED-01303:[Payload default schema validation error]XSD schema validation fails with error Invalid text 'A' in element: 'TermCode'Possible Fix:Fix payload and resubmit.
    My fault-policies.xml file is as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <faultPolicy version="2.0.1"
         id="NewStudentRegistrationFaults"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults" name="medns:1303">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:rjm="http://schemas.oracle.com/sca/rejectedmessages" name="rjm:GetNewStudentRegistrationFile">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults" name="medns:TYPE_ALL">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:mediatorException">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:bindingFault">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="java-fault-handler">
    <javaAction className="edu.villanova.soa.handlers.FaultNotificationHandler"
    defaultAction="ora-human-intervention" propertySet="faultNotificationProps">
    <returnValue value="OK" ref="ora-human-intervention"/>
    </javaAction>
    </Action>
    <!-- Human Intervention -->
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    <!-- Terminate -->
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    <!-- Property sets used by custom Java actions -->
    <Properties>
    <!-- Property set for FaultNotificationHandler customer java action -->
    <propertySet name="faultNotificationProps">
    <property name="from">[email protected]</property>
    <property name="to">[email protected]</property>
    <property name="subject">Reporting a SOA fault</property>
    </propertySet>
    </Properties>
    </faultPolicy>
    <faultPolicy version="2.0.1"
         id="MediatorFaults"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults" name="medns:1303">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="java-fault-handler">
    <javaAction className="edu.villanova.soa.handlers.FaultNotificationHandler"
    defaultAction="ora-human-intervention" propertySet="faultNotificationProps">
    <returnValue value="OK" ref="ora-human-intervention"/>
    </javaAction>
    </Action>
    <!-- Human Intervention -->
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    <!-- Terminate -->
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    <!-- Property sets used by custom Java actions -->
    <Properties>
    <!-- Property set for FaultNotificationHandler customer java action -->
    <propertySet name="faultNotificationProps">
    <property name="from">[email protected]</property>
    <property name="to">[email protected]</property>
    <property name="subject">Reporting a SOA rejected msg. fault</property>
    </propertySet>
    </Properties>
    </faultPolicy>
    </faultPolicies>
    My fault-bindings.xml file is as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    <faultPolicyBindings version="2.0.1"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <composite faultPolicy="NewStudentRegistrationFaults"/>
    <component faultPolicy="MediatorFaults">
    <name>NewStudentRegistrationMediator</name>
    </component>
    <service faultPolicy="NewStudentRegistrationFaults">
    <name>GetNewStudentRegistrationFile</name>
    </service>
    </faultPolicyBindings>
    You'll notice that I've tried a number of ways (and various other combinations) to try to steer the error above into my Java fault handler but nothing has meet with success. The mplan is as follows:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!--Generated by Oracle SOA Modeler version 1.0 at [2/3/10 1:21 PM].-->
    <Mediator name="NewStudentRegistationMediator" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/sca/1.0/mediator"
    wsdlTargetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/Experiments/NewStudentRegistration/GetNewStudentRegistrationFile%2F">
    <operation name="Get" deliveryPolicy="AllOrNothing" priority="4"
    validateSchema="true">
    <switch>
    <case executionType="queued" name="RegToBanner.insert_2">
    <action>
    <transform>
    <part name="$out.NewstudentregistrationCollection"
    function="xslt(xsl/NewStudentRegistration_To_NewstudentregistrationCollection.xsl, $in.body)"/>
    </transform>
    <invoke reference="RegToBanner" operation="insert"/>
    </action>
    </case>
    </switch>
    </operation>
    </Mediator>
    I'm a newbie to Oracle SOA. So perhaps I am missing the obvious. But I haven't read much in the documentation specifically about using the XSD validation option on the mediator and have seen nothing specifically about catching this sort of exception in the fault policy (apart from the faults I already have in my policy). Can anyone suggest what I am doing incorrectly here or perhaps whether what I am attempting to do is not possible? Thanks.
    - Cris

    Has anyone got it working yet?
    In my case, I have the following sequence:
    FileAdapter -> Mediator1 -> Mediator2->DB Adapter
    I am deliberately introducing validation error in File. Isn't it correct to assume Fault framework would get triggered at Mediator1 level since we are invoking FileAdapter service?
    I am getting a strange behaviour. If I enable XSD validation at Mediator1 level, process is Faulted with no re-try option. However, if I enable XSD validation ONLY at Mediator2 level, I get Recoverable fault. There seems to be some disconnect between documentation and reality. I am using JDeveloper 11.1.1.3.0 version and SOA Suite 11g.
    Thanks,
    Amjad.

  • Free Goods handling in Import Scenario

    Hello All,
    1)We have a scenario of imports/foreign vendor providing the materials free of cost.
    2)Here the requirement is that the materials are free of cost(From Vendor), but customs duty has to be paid to the customs office for that material.
    3)How best can we map this scenario in SAP.
    Kindly suggest steps involved in the above scenario.
    Regards
    Mahesh

    Hi
    You need to create the customs department as Vendor in SAP .
    If you  are  getting the material free of cost then SAP provides you to create PO with"Free Item" indicator or
    create PO with Invoice reciept as unticked in Invoice tab as we dont recieve Invoice from vendor.
    But we need to pay to customs as this is Imported item.
    When we use the  "Free Item" indicator  or Invoice reciept as unticked in Invoice tab  then the condition tab where we mention the conditions  disappears so we need to handle by FI module

  • JAXB compiler problem in handling xsd:any and nillble = "true"

    Dear all,
    i am using jdeveloper 10.1.3.1 production release version.
    i am designing a xml schema that contain element of attribute nillable="true", for extensible, contain tag <xsd:any>.
    but i encounter 2 problem:
    1. for xml schema element with attribute nillable="true", no corresponding isNil(), setNil
    method is generated (refer to jaxb 1.0 spec. 5.7.1)
    2. cannot handle tag <xs:any> that generate incorrect java source code (cannot compile) [refer to jaxb 1.0 spec 5.9.5)
    *** i have add jaxb customization tag inside the <xs:any> tag
    ***   <xs:annotation><xs:appinfo>
    ***               <jaxb:property name="Extension"/>
    ***</xs:appinfo></xs:annotation>
    Does oracle's JAXB implementation conform to the JAXB 1.0 spec?
    Is it a known bug?
    Could anybody help me?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Refer to section
    E.2 Not Required XML Schema
    concepts
    "A JAXB implementation is not required to support the following XML Schema
    concepts for this version of the specification. A JAXB implementation may
    choose to support these features in an implementation dependent manner."
    E.2.2 Not supported while manipulating the XML
    content
    Schema component: wildcard
    (any)
    how can i know if an xml element with xsi:nil="true" (unmarshal)
    and set xsi:nil="true" for an element (marshal) ?
    According to the JAXB 1.0 specification:
    If {nillable} is "true", the methods setNil() and isNil() are
    generated.

Maybe you are looking for