Using XML schema in a Java application

Hi,
I need to parse and use an XML schema in an application, mainly for helping a user to build an XPATH.
For that, I want to use the Schema classes bundled with Oracle's parser. Is there any documentation about that ? Or are the source code available ?
Thank's
Phil.

See the JavaHelp article on my site.
I had developers saying they had to have JavaHelp for their
Java application. After discussion we established that for where
this was going to be used, webhelp was just as acceptable. Being
easier for us that won the day.

Similar Messages

  • Problem with running sample code from XML Schema Processor for Java

    Hi there,
    I downloaded the XML Schema Processor for Java and tried it out. Unfortunately, it failed at the first step. FYI, I included all xmlparserv2.jar and xmlschema.jar in my classpath.
    I compiled XSDSample.java with a warning: XSDSample.java uses a deprecated API. Recompile with "-deprecation" for details. There was no problem with compiling XSDSetSchema.java.
    When I tried to run report.xml by typing java XSDSample report.xml, I got Parsing report.xml
    NonParserException: null.
    I guess that report.xml from the sample is not valid.
    Could any one give me a hint? Any suggestion would be greatly appreciated.
    ---Denali
    null

    Please post this message at:
    Forums Home » Oracle Technology Network (OTN) » Products » Database » XML DB

  • Can't i use xml schema and oledb data connection at the same time?

    Hello to all and thanks in advance.I use xml schema and oledb data connection at the same time and the problem is that when I try to export the xml, the outcome is not what i expect.Without the oledb connection everything is ok (just the schema) and the xml complies with the schema.
    Can't i have both schema and oledb and the exported xml be as i want it?

    You can use both at the same time, but not gor Internet access if that's what you're asking.
    Now there is a thing called Link Aggregation, which combines a number of interfaces for speed/redundancy, but it really only works locally, and then only with ALL special equipment in the route, and most likely OSX Server involved.
    Sorry.

  • Configure CRS2008 to using AD and Kerberos with Java application servers.

    Hi All,
    I have configure CRS2008 to using AD and Kerberos with Java application servers. Domain Controller is installed on W2K3 Server. In addition, CRS2008 is installed on another W2k3 Server.
    I have create service account in domain controller: CMSACC
    I have create two user account: CRuser1 and CRuser2
    I have create domain group: CRSGroup
    After I had run the setspn in domain controller,I got the message at below:
    Registered ServicePrincipalNames for CN=CMSACC, OU=TEST, DC=BD, DC=com:
        BOBJCentralMS/BDMGTSRV.BD.com
    CMC Setting:
    AD Administration Name: BD\administrator
    Default AD Domain: BD.com
    Add AD Group(Domain\Group): secWinAD:CN=CRSGroup,OU=TEST,D=BD,DC=com
    Service principal name:BOBJCentralMS/CMSACCatBD.com
    I have create a WINNT folder in root directory.Moreover and save bcsLognin.conf and Krb5.ini at here.
    bscLogin.conf:
    com.businessobjects.security.jgss.initiate {
    com.sun.security.auth.module.Krb5LoginModule required;
    krb5.ini:
    [libdefaults]
    default_realm = BD.com
    dns_lookup_kdc = true
    dns_lookup_realm = true
    [realms]
    forwardable = true
    BD.com = {
    default_domain = BD.com
    kdc = BDMGTSRV.BD.com
    I have tested the Kerberos,using kinit CMSACCatBD.com password, and got error message at below:
    Exception: krb_error 41 Message stream modified (41) Message stream modified
    KrbException: Message stream modified (41)
            at sun.security.krb5.KrbKdcRep.check(KrbKdcRep.java:53)
            at sun.security.krb5.KrbAsRep.<init>(KrbAsRep.java:96)
            at sun.security.krb5.KrbAsRep.getReply(KrbAsRep.java:486)
         at sun.security.krb5.KrbAsRep.getReply(KrbAsRep.java:444)
         at sun.security.krb5.internal.tools.Kinit.sendASRequest(Kinit.java:310)
         at sun.security.krb5.internal.tools.Kinit.<init>(Kinit.java:259)
         at sun.security.krb5.internal.tools.Kinit.main(Kinit.java:106)
    My problem is failed to logon CMC and infoview and got error message at below:
    Account Information Not Recognized: Active Directory Authentication failed to log you on. Please contact your system administrator to make sure you are a member of a valid mapped group and try again. If you are not a member of the default domain, enter your user name as UserNameatDNS_DomainName, and then try again.
    Actually, I am sucessful to logon Business View manager with CRuser1. However, I fail to logon CMC and infoview and got the above error. Have you any suggestion to solve this problem?
    Ken.

    if you can logon with client tools then that should be an indication that the service account running the CMS IS working! Good news.
    So the problem is likely with the java portion (krb5/bsclogin or java options)
    If the files are in c:\winnt\ (if not copy them there) and perform c:\program files\business objects\javasdk\bin\kinit username
    then enter and password/enter again
    Probably get the same message. To note in your krb5.ini all domain info must be in CAPS (the .com appears to be in lower case)
    kinit works with just the krb5.ini, java SDK and AD (removing BO config and the service account from the picture). Once that works if your java options are specified properly you should be able to login to CMC/infoview.
    also 1 last point. Add udp_preference_limit = 1 to the krb5 lib defaults section
    libdefaults
    default_realm = BD.com
    dns_lookup_kdc = true
    dns_lookup_realm = true
    udp_preference_limit = 1
    Regards,
    Tim

  • XML data source from Java application

    Hello everyone,
    I want to use BI Publisher reports from my Java application.
    1. I have generated xml from database query in Java application.
    2. I have created BIP template sampleReport.rtf
    3. I need to generate PDF report using sampleReport.rtf and generated xml data source.
    How this (step 3) can be achieved using BI publisher web service? If someone has sample code, this would be great.
    Thanks.

    Hello everyone,
    I want to use BI Publisher reports from my Java application.
    1. I have generated xml from database query in Java application.
    2. I have created BIP template sampleReport.rtf
    3. I need to generate PDF report using sampleReport.rtf and generated xml data source.
    How this (step 3) can be achieved using BI publisher web service? If someone has sample code, this would be great.
    Thanks.

  • Generating a XML using XML Schema

    Hi,
    I have a requirement where I need to generate a XML which should follow XML Schema. If XML schema changes, i should still be able to generate XML file. Any sample code or idea will help me.

    http://java.sun.com/webservices/jaxb/users-guide/jaxb-using.html
    This tutorial is a good place to start. ideally you will use the xjc.bat file present in
    jwsdp-2.0 (thats whaty i use) to generate a package full of classes that corresponds to your
    schema.
    Use ANT-build script to generate this package then you will do some marshalling
    followed by validating against a DTD, and unmarshalling - to do get java objects out of XML

  • PL/SQL web service - how to use XML schema to define inputs/outputs?

    Hello,
    let us say I want to publish a PL/SQL web service. The package spec that I want to expose is:
    CREATE OR REPLACE PACKAGE myWebService AS
      FUNCTION loadResults(
        username   IN VARCHAR2,
        password   IN VARCHAR2,
        resultData IN XMLType)
      RETURN XMLType;
    END;When I use JDeveloper's wizard to publish my PL/SQL web service, the resulting WSDL contains this:
    <schema
        xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:tns="http://uk/co/weatherbys/aapws/AAPWS.wsdl/types/"
        targetNamespace="http://uk/co/weatherbys/aapws/AAPWS.wsdl/types/"
        elementFormDefault="qualified">
        <element name="loadresultsElement">
            <complexType>
                <sequence>
                    <element name="username" type="string" nillable="true"/>
                    <element name="password" type="string" nillable="true"/>
                    <element name="resultdata" nillable="true">
                        <complexType>
                           <sequence>
                                <any/>
                             </sequence>
                        </complexType>
                    </element>
                </sequence>
            </complexType>
        </element>
        <element name="loadresultsResponseElement">
            <complexType>
                <sequence>
                    <element name="result" nillable="true">
                       <complexType>
                            <sequence>
                                <any/>
                            </sequence>
                        </complexType>
                    </element>
                </sequence>
            </complexType>
        </element>
    </schema>It is specifying that anything at all can be passed in and out from the two XMLType arguments, which is fair enough: it has no way of knowing what I am expecting and what I shall return.
    My question is, how do I tell JDeveloper that actually I want either or both of those XMLTypes to conform to a particular XML schema?

    You cannot format the date as a string, unless you do the conversion on the PL-SQL side, before you use it in your WebService mapping. It should be handled as a string.
    The only way to convert the XML from SOAP, using this encoding, into literal XML is to apply XSLT to the payload. Not sure why you would like to do this, as the payload should be consumed by another SOAP-awared stack.
    Hope this helps,
    Eric

  • HOW TO USE KRYSALIS BARCODE AS A JAVA APPLICATION

    HI
    I HAVE DOWNLOADED THE KRYSALIS FREE BARCODE GENERATOR. IN SAMPLE CODES THEY HAVE USED THAT AS AN APPLET. BUT I WANT TO GENERATE THE BARCODES USING JAVA APPLICATION WHILE USING KRYSALIS LOG4J LIBRARY...
    SOMEONE PLEASE HELP ME OUT.
    THANKS
    PIYUSH

    You caps lock is on!

  • How to use padding scheme FIPS81 in java plz help?

    Plz refer the below code using this code I m trying to decrypt XLS file using pass phrase.
    I m using the same pass phrase which was used @ the time of encryption.
    But the problem I m facing is that the file was encrypted in DOT NET_ using padding scheme FIPS81 and there impelmentation of FIPS81 is not available in JAVA so that it gives exception at the time of decryption which is given below
    Exception : javax.crypto.BadPaddingException: Given final block not properly padded
    I urgently need the solution of this problem so somebody plz help me to find the solution of this problem.....Ur reply would be appriciated.....!!
    The File is Encrypted using below mechanism
    ALGORITHM : AES
    MODE : ECB
    PADDING SCHEME : FIPS81
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.UnsupportedEncodingException;
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    public class DecryptTest {
         public static void main(String[] s){
              String passPhrase = "passphrase";
              String encFileName = "encsample.xls";
              String decFileName = "decsample.xls";
              FileInputStream encFileIn = null;
              FileOutputStream decFileOut = null;
              File f = null;
              byte[] message;
              try {
                   f = new File(encFileName);
                   encFileIn = new FileInputStream(f);
                   decFileOut = new FileOutputStream(decFileName);
                   message = new byte[encFileIn.available()]; //Read the encrypted file in from disk
                   encFileIn.read(message);
                   SecretKeySpec spec = new SecretKeySpec(passwordToKey (passPhrase), "AES");
                   //decrypt it
                   Cipher c = Cipher.getInstance("AES/ECB/NoPadding");
                   c.init(Cipher.DECRYPT_MODE, spec);
                   System.out.println("Block Size is >-->" + c.getBlockSize());
                   String decryptedString = new String(c.doFinal(message));
                   System.out.println("Decrypted message: " + decryptedString);
                   //To write into another files
                   decFileOut.write(decryptedString.getBytes());
              }catch (Exception e) {
                   System.out.println(e);
              }finally {
                   try {
                        encFileIn.close();
                        decFileOut.close();     
                   } catch (IOException ioe) {
         }Is there any mechanism is available for FIPS81 or Is there any third party Provider available for it plz reply........????????

    I suggest you look in google http://www.google.co.uk/search?q=SWF+java

  • How to use  third party package in java application

    hi, i am a student , new to java world can any of u tell me how to import third party package in our java application.
    i want to know how CLI is done in java.
    i am going thru this link http://www.codezoo.com/pub/component/5574
    not able to get anything.
    please please help me

    There are two steps -
    1. Import the classes you need from the package(s) using the Java import statement in your classes that need access to them.
    2. include the 3rd part code (one or more .jar files and/or root directories holding the code's package tree and .class files) to your javac and java class path and optionaly to the class path found in your .jar's manifest file.

  • Using xml schema problem (SAP MDM 7.1 Syndicator)

    Good day !
    I try to syndicate directory which correspond to some xml-schema and I have a problem.
    I want to syndicate data from hierarchy table  which have one field which have a type like lookup <Flat> (multivalued).
    In XML-schema element "DEF_PRODUCT" and "DEF_PRODUCT_CODE" - attribute presents hierarchy table.
    "CREDIT_PRODUCT" and childs presents  linked flat table.
    According idea and business rules I must get the result like this: each  "DEF_PRODUCT" have N-"CREDIT_PRODUCT". One - to- many.
    But when I set up all map completely and look to xml result file I start to be disappointed.
    XML result file approximately must be like this: 
    <DEF_PRODUCT>
        <CREDIT_PRODUCT/>
        <CREDIT_PRODUCT/>
        <CREDIT_PRODUCT/>
    </DEF_PRODUCT>
    but in result I have all <CREDIT_PRODUCT>  in one node and child attributes.
    I attach 3 pics which explain my situation.
    xml-schema :[http://xmages.net/storage/10/1/0/6/3/upload/42ca6ca8.jpg]
    field mapping: [http://xmages.net/storage/10/1/0/6/a/upload/bbbc09f2.jpg]
    example: [http://xmages.net/storage/10/1/0/c/c/upload/817b0e23.jpg]
    Anybody can help me?
    About software : SAP MDM 7.1 (7.1.04.139)
    P.S: My problem can be resolved succesfully if I will use 1 <main> table and 1 <qualified flat> table.
           But in my case I must use hierarchy - structure because it  most usable for business - users

    >
    Christian Heuer wrote:
    > Hi,
    >
    > now I understood and you really have got a point here. But the question is whether you need key mapping then on the remote key level with a tuple anymore. If yes, you won
    >
    > Best regards
    > Christian
    If SAP MDM will present many opportunities to me I will be very glad.
    I repeat I must get output xml which have the pair like "RemoteKey"="RemoteSystem" in tuple subnode.
    In tuple, after your advices.
    Ideally, Syndicator must present to each user ability to choose pair "RemoteKey" = "RemoteSystem" in each subnode like <LookUp> table in root (look at my example pic).
    Imagine  you have one root table and N-linked <lookup> tables.
    Tree like this :
    <main tbl>
      <subtbl1/>
      <subtbl2/>
      <subtbl3>
         <childtbl1/>
         <childtbl2/>
      </subtbl3>
    </main tbl>
    It's dangerous to deprive SAP MDM user to select  pair "RemoteKey" = "RemoteSystem" from ROOT to ALL and LAST LEAF in abstract hierarchy. How do you think ?
    Now, I haven't abilities to solve my problem using standard resources. Really ?

  • Error downloading XML schema processor for java from OTN

    I'm getting error downloading this product from otn site. http://technet.oracle.com/tech/xml/schema_java/index.htm
    I login to OTN, go to this site, enter registration information and then I get the following error when I try to submit my info.
    Runtime error occured. Do you wish to debug?
    Line: 20
    Error :'e_mail_valid' is undefined.
    When I say 'No' for debug, it takes me to 'XML parser for java' download page instead of 'XML Schema processor'.
    please help.
    thankx
    null

    The 'e_mail_valid' is undefined" has to do with the format of or lack of the email address. The routing problem is ours and should be fixed later today or by tomorrow morning.
    Thanks,
    Oracle XML Team

  • Different languages used while uploading file from java Application

    Hi everybody,
    i have a problem with multiple languages , let me clear you the question, i were developing a java application using spring ,hibernate frame works, so i got a problem while uploading a file with chinees language or other
    it was saving with different format other than chiness in the database, can any one help me out ... i need the exact language when i upload the files,and when i get the data from DataBase which is in chinees language is '걨' going to be like as '???'
    thank you very much

    Santhosh_25 wrote:
    using utf-8 characterSet, but its not showing properly
    thank youOkay.. the problem with your browser settings.. (not sure)..
    In firefox try to set character encoding...
    go to View--->Character Encoding--->Unicode (UTF-8)..
    In IE
    go to View--->Encoding-->More-->Unicode (UTF-8)
    set this and try.

  • Using oracle personal for developing java application?

    Can I use Oracle 9i Personal Edition for developing Java applications? Does it provide a JDBC Type 4 driver?
    Thanks a lot.
    [email protected]

    SIR I WANT TO UPLOAD MY DEVELOPER FORMS BY USING ORACLE 8I SERVER?
    CAN U TELL ME THE PROCEDURE IN DETAIL?
    I WILL BE THANKFUL TO U
    MY EMAIL ADDRESS IS [email protected]

  • Xform validation by using Xml-schema

    Hello,
    I want to validate XForm by using XForm Schema. In an xform example attached below , there are two input fields zip and zip2.
    I am not getting why zip in xform attached below cannot be validated.But zip2 is working fine. I am using mozilla firefox browser.
    XForm and XMLSchema is attached below.
    XForm is
    <?xml version="1.0" encoding="UTF-8"?>
    <html
       xmlns="http://www.w3.org/1999/xhtml"
       xmlns:xf="http://www.w3.org/2002/xforms"
       xmlns:xs="http://www.w3.org/2001/XMLSchema"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:ftype="http://www.example.com/my-file-types">
       <head>
          <title>Validate Postal Codes</title>
          <style type="text/css">
             @namespace xf url("http://www.w3.org/2002/xforms");
             xf|input {
                display: table-row;
                line-height: 2em;
             xf|label {
                display: table-cell;
                text-align: right;
                font-family: Arial, Helvetica, sans-serif;;
                font-weight: bold;
                padding-right: 5px;
                width: 150px;
             *:required {
                 background-color: yellow;
             *:invalid  {
                background-color: pink;
          </style>
          <xf:model schema="schema.xsd">
             <xf:instance>
    <data xmlns="http://www.example.com/my-file-types">
    <zip/>
    <zip2/>
    </data>
    </xf:instance>
             <xf:bind id="zip" required="true()" type="ftype:zipType" nodeset="ftype:zip" />
             <xf:bind id="zip2" required="true()" type="ftype:zip2Type" nodeset="ftype:zip2" />
          </xf:model>
       </head>
       <body>
          <xf:input bind="zip" incremental="true">
             <xf:label>Zip Code: </xf:label>
             <xf:hint>Validation is not correctly specified for this field</xf:hint>
             <xf:alert>The 'Zip Code' failed to validate!</xf:alert>
          </xf:input>
          <xf:input bind="zip2" incremental="true">
             <xf:label>Zip Code 2: </xf:label>
             <xf:hint>Validation is correctly specified for this field</xf:hint>
             <xf:alert>
               <xf:output value="concat('The &quot;', name(), '&quot; failed to validate!')" />
             </xf:alert>
          </xf:input>
       </body>
    </html>--------------------------------------------------------------------------------
    And XML Schema is
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ftype="http://www.example.com/my-file-types" targetNamespace="http://www.example.com/my-file-types" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="data">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="zipType">
                             <xs:simpleType id="zipType">
                                  <xs:restriction base="xs:string">
                                       <xs:enumeration value="b"/>
                                       <xs:enumeration value="computer"/>
                                       <!-- bad pattern: matches any sequence of 5 digits, even if there are more digits or non-numeric. -->
                                  </xs:restriction>
                             </xs:simpleType>
                        </xs:element>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:simpleType name="zip2Type">
              <xs:restriction base="xs:string">
                   <xs:pattern value="^\d{2}$"/>
                   <!-- good pattern: matches only 2 digits, nothing extra -->
              </xs:restriction>
         </xs:simpleType>
    </xs:schema>Looking for some reply.
    Best Regards
    Tabbasum

    Hi Otto,
                 The form data output directly send to the PI system via Email.
    But we change the interface field names closer to PI requirement.
    Thanks for your response.
    I am closing this thread.
    Cheers
    Sam

Maybe you are looking for

  • How to view Any PDF  using Adobe

    Dear Sir, We are using the ABAP Program to view Any PDF Files.  But we are getting the Error Message as "Could not  find adobe application to view the pdf document".   We created the Screen with Custom Control , with Menu Status as PDF Viewer. Kindly

  • I can not load homepage of the website (blackboard.le.ac.uk), what can i do to fix this

    I receive 'problem loading page message: Firefox has detected that the server is redirecting the request for this address in a way that will never complete' when trying to connect to the website (below) but i used to load it before with internet expl

  • Archived log not applying

    archived logs are not apllying in DR SQL> select max(sequence#) from v$archived_log where applied='YES'; MAX(SEQUENCE#) SQL> SQL> select process,status,sequence# from v$managed_standby; PROCESS   STATUS        SEQUENCE# ARCH      CONNECTED           

  • Can I set up on multiple computers?

    Hi there, so I've used adobe products before back when I was in highschool (photoshop mostly) and I never had any problems, great stuff. But I'm contemplating getting back into the game a bit, and I ran into a bit of a snag that I don't know the answ

  • Tried to restart apple tv. Now it is frozen on the apple

    My apple TV has been running poorly. Attempted to update software but it was unsuccessful. Attempted to restart and now it is frozen on the apple screen.  Help