Hide name space of generated xml from xml bean

Hi,
how can i hide the namespace of the generated xml from xml bean, cause im having problems with jaxb parses.

The targetNamespace is for webservice and not for the user defined classes.
Sorry for the confusion
Ajay
"Ajay" <[email protected]> wrote in message
news:[email protected]..
There is a targetNamespace attribute in the autotyp ant task. But there
was a bug in 8.1. Contact the support for a patch.
The following mail explains that
This looks like a bug. There is an undocument, not officially
supported workaround: add the following java doc
to yours source code -
* @wlws:webservice targetNamespace="http://foo.bar"
public class MyService {
Details here:
http://www.manojc.com/tutorial/sample3/source2wsdd.html
Regards,
-manoj
http://manojc.com
"Mark Fine" <[email protected]> wrote in message
news:[email protected]..
The attribute targetNamespace (of the autotype task) doesn't seem to putany
information into the types file and later my deployment descriptor (viathe
source2wsdd task) contains an invalid targetNamespace attribute with a
http://tempuri.org:
eg.
<web-services>
<web-service name="IndexService"
targetNamespace="http://tempuri.org/"
uri="/IndexWebService">
I don't think this causes any problems but there should be a way tospecify
the namespace.
Has anyone else seen this is WLS8.1?
"Siva" <[email protected]> wrote in message
news:[email protected]..
By default the autotype or the servicegen ant task seem to be creating anamespace
from the java package name (like java:com.ventaso.external.common) for
xml
mapping
of user defined java classes. Is there a way to change this to name
space
I want
? Specifying the targetnamespace doesn't seem to help.
Thanks,
Siva

Similar Messages

  • Is there any util or ant build to generate xmlbeans from xml

    hi all
    is there any utility tools or ant build process that can generate xmlbeans from xml schema? thanks.

    exactly,
    here are some libraries which are open sources;
    http://java-source.net/open-source/pdf-libraries hope it's useful. :D

  • Xml name space for generated types

    By default the autotype or the servicegen ant task seem to be creating a namespace
    from the java package name (like java:com.ventaso.external.common) for xml mapping
    of user defined java classes. Is there a way to change this to name space I want
    ? Specifying the targetnamespace doesn't seem to help.
    Thanks,
    Siva

    The targetNamespace is for webservice and not for the user defined classes.
    Sorry for the confusion
    Ajay
    "Ajay" <[email protected]> wrote in message
    news:[email protected]..
    There is a targetNamespace attribute in the autotyp ant task. But there
    was a bug in 8.1. Contact the support for a patch.
    The following mail explains that
    This looks like a bug. There is an undocument, not officially
    supported workaround: add the following java doc
    to yours source code -
    * @wlws:webservice targetNamespace="http://foo.bar"
    public class MyService {
    Details here:
    http://www.manojc.com/tutorial/sample3/source2wsdd.html
    Regards,
    -manoj
    http://manojc.com
    "Mark Fine" <[email protected]> wrote in message
    news:[email protected]..
    The attribute targetNamespace (of the autotype task) doesn't seem to putany
    information into the types file and later my deployment descriptor (viathe
    source2wsdd task) contains an invalid targetNamespace attribute with a
    http://tempuri.org:
    eg.
    <web-services>
    <web-service name="IndexService"
    targetNamespace="http://tempuri.org/"
    uri="/IndexWebService">
    I don't think this causes any problems but there should be a way tospecify
    the namespace.
    Has anyone else seen this is WLS8.1?
    "Siva" <[email protected]> wrote in message
    news:[email protected]..
    By default the autotype or the servicegen ant task seem to be creating anamespace
    from the java package name (like java:com.ventaso.external.common) for
    xml
    mapping
    of user defined java classes. Is there a way to change this to name
    space
    I want
    ? Specifying the targetnamespace doesn't seem to help.
    Thanks,
    Siva

  • How to generate xhtml from xml

    Hi All
    I've an application that will generate an xml file in this way:
    FileWriter salidaxml = new FileWriter(new File("reporteHP.xml"));
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder docBuilder = dbf.newDocumentBuilder();
    Document doc = docBuilder.newDocument();
    // Some nodes and elements added here
    TransformerFactory transFact = TransformerFactory.newInstance();
    Transformer trans = transFact.newTransformer();
    trans.setOutputProperty(OutputKeys.INDENT, "yes");
    trans.setOutputProperty(OutputKeys.METHOD, "xml");
    trans.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
    trans.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
    Result result = new StreamResult(salidaxml);     
    try {               
        trans.transform(new DOMSource(doc), result);               
        transformer.transform(source, rslt);           
    } catch (TransformerException te) {               
        System.out.println(te.getMessageAndLocation());               
    throw te;           
    salidaxml.flush();           
    salidaxml.close();Code run ok but I want to know how could I add code to generate a xhtml file using a dtd and a xsl I've or at least how to add the following at the begin of the xml generated file:
    <?xml-stylesheet type="text/xsl" href="reporte.xsl"?>Thanks in advance
    <xl>

    Hi
    Thanks for your help but I really didn;t found what I'm lookin for in this page.
    This page explains how xslt transform xml in xhtml. I know this point, I want to know HOW could I make it from my application. I guess there are a transform class that could generate html from a xsl template, but I couldn't find the way to do it and couldn't find examples too.
    <xl>

  • How do I generate HTML from XML & XSL using XSL Processor ?

    I want to generate a HTML from XML & XSL using XDK for C on
    linux-8i.
    I run the XSLSample well.
    But it only generate a XML from a XML & a XSL.
    Can any one give me some advise or sample code?

    Just use HTML tags instead of xml tags in your stylesheet, and
    you'll generate HTML instead.
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="/">
        <html>
          <body>
            <xsl:for-each select="ROWSET">
              <table border="1" cellspacing="0">
                <xsl:for-each select="ROW">
                  <tr>
                    <td><xsl:value-of select="EMPNO"/></td>
                    <td><xsl:value-of select="ENAME"/></td>
                  </tr>
                </xsl:for-each>
              </table>
            </xsl:for-each>
          </body>
        </html>
      </xsl:template>
    </xsl:stylesheet>

  • Generate HTML from XML and XSLT

    Hi,
    I have asked in different forum but did not get my answer so asking here again
    i want to generate a HTML file from XML and XSLT in a temp folder and then read it into a java.lang.String, so can email it or write to a database file.
    how can i do it, is there any engine which will merger XML and XSLT and give a HTML file or a String as output
    Ashish

    Hi,
    Follow the simple steps.
    1) Create XML Document (I hope u have it)
    2) Create XSL Stylesheet for your XML document
    3) Put both files in one directory some where in your local system or web server upto u
    4) Invoke the XML document from webbrowser and you are done.
    http://localhost/test/Catalog.xml OR C:\XXXXDIR\test\Catalog.xml
    For Ex: XML File Content, Catalog.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml-stylesheet type="text/xsl" href="Catalog.xsl"?>
    <catalog>
    <cd>
    <title>Empire Burlesque</title>
    <artist>Bob Dylan</artist>
    <country>USA</country>
    <company>Columbia</company>
    <price>10.90</price>
    <year>1985</year>
    </cd>
    </catalog>
    XSL File Content: Catalog.xsl
    <?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/">
    <html>
    <body>
    <h2>My CD Collection</h2>
    <table border="1">
    <tr bgcolor="#9acd32">
    <th align="left">Title</th>
    <th align="left">Artist</th>
    </tr>
    <xsl:for-each select="catalog/cd">
    <tr>
    <td><xsl:value-of select="title"/></td>
    <td><xsl:value-of select="artist"/></td>
    </tr>
    </xsl:for-each>
    </table>
    </body>
    </html>
    </xsl:template></xsl:stylesheet>

  • How To Generate Objects From XML and DTD?

    Are there tools to generate objects from dtd's and xml files?
    If this is not possible for some reason: is there a tool to generate classes from a dtd?
    I can not find the "XML Java Class Generator" (from oracle) anymore.

    XMLBeans
    There are other solutions, but I know this one is pretty good.

  • Unable to create xml from xml schema

    JDeveloper 10.1.3 EA1
    I am unable to create a new xml file from an xml schema when the starting root element is a complex type (but it works with a simple type). It does not matter if the xml schema is registered within JDeveloper.
    Is this a bug or intended behaviour?
    Error message:
    ''XML Document from XML Schema creation could not be competed succesfully. Make sure the source schema is valid and that you have write permissions to the output directory."
    NB The xml schema is valid and I have write permissions on the specified directory.

    When I do not register this (or other) schema with JDeveloper, I can create an xml document from xml schema. However, when I register this schema and then try to generate an xml document (either from the registered xsd either from a filesystem xsd) with person as starting node it fails with the mentioned error. However, when I use city as starting node it is generated successfully.
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.amis.nl/demo/hrm"
    targetNamespace="http://www.amis.nl/demo/hrm"
    elementFormDefault="qualified">
    <xsd:element name="person">
    <xsd:annotation>
    <xsd:documentation>
    A sample complex element
    </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="name" type="xsd:string"/>
    <xsd:element name="length" type="xsd:int"/>
    <xsd:element name="weight" type="xsd:int" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="city" type="xsd:string">
    <xsd:annotation>
    <xsd:documentation>
    A sample simple element.
    </xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    </xsd:schema>

  • Create xml from xml schema in java

    If can i create a xml document framework from xml schema in java, then i can fill the value in java?
    thanks

    An XML document may be created from an XML Schema with JAXB.

  • Link to xml from xml ( mx:Button click="function({...});" )

    links.xml contains links for page1, page2
    links.xml
    |
    +-- page1.xml
    |
    +-- page2.xml
    I try:
    <mx:Button click="loadXML2({ getField( XML(
    linksItems.currentItem ), how1Link ) });" label="Link" />
    Debugger says:
    Error: Repeater is not executing.
    at mx.core::Repeater/get currentItem()
    at LinkFromXML2/___LinkButton1_click()
    <!-- File: links.xml -->
    <?xml version="1.0" encoding="UTF-8"?>
    <rdf:RDF xmlns="
    http://web.resource.org/cc/"
    xmlns:dc="
    http://purl.org/dc/elements/1.1/"
    xmlns:rdf="
    http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <item>
    <dc:title>Page 1</dc:title>
    <dc:link>page1.xml</dc:link>
    </item>
    <item>
    <dc:title>Page 2</dc:title>
    <dc:link>page2.xml</dc:link>
    </item>
    </rdf:RDF>
    <!-- File: page1.xml -->
    <?xml version="1.0" encoding="UTF-8"?>
    <rdf:RDF xmlns="
    http://web.resource.org/cc/"
    xmlns:dc="
    http://purl.org/dc/elements/1.1/"
    xmlns:rdf="
    http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <dc:Work>
    <dc:title>Page 1</dc:title>
    </dc:Work>
    </rdf:RDF>
    <!-- File: page2.xml -->
    <?xml version="1.0" encoding="UTF-8"?>
    <rdf:RDF xmlns="
    http://web.resource.org/cc/"
    xmlns:dc="
    http://purl.org/dc/elements/1.1/"
    xmlns:rdf="
    http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <dc:Work>
    <dc:title>Page 2</dc:title>
    </dc:Work>
    </rdf:RDF>
    <!-- File: LinkFromXML.mxml -->
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    creationComplete="loadXML('links.xml');">
    <mx:Script>
    <![CDATA[
    import mx.collections.XMLListCollection;
    public var pathxml:String;
    public var pathxml2:String;
    private var how:Namespace = new Namespace("
    http://web.resource.org/cc/");
    private var dc:Namespace = new Namespace("
    http://purl.org/dc/elements/1.1/");
    [Bindable]
    private var how1Title:QName = new QName(dc, "title");
    [Bindable]
    private var how1Link:QName = new QName(dc, "link");
    [Bindable]
    private var how2Title:QName = new QName(dc, "title");
    [Bindable]
    private var how1externalXML:XMLListCollection;
    [Bindable]
    private var how2externalXML:XMLListCollection;
    private function loadXML(pathxml):void {
    trace (pathxml);
    var loader:URLLoader = new URLLoader();
    var request:URLRequest = new URLRequest(pathxml);
    loader.load(request);
    loader.addEventListener(Event.COMPLETE, onComplete);
    private function loadXML2(pathxml2):void {
    var loader2:URLLoader = new URLLoader();
    var request2:URLRequest = new URLRequest(pathxml2);
    loader2.load(request2);
    loader2.addEventListener(Event.COMPLETE, onComplete2);
    private function onComplete(event:Event):void {
    var loader:URLLoader = URLLoader(event.target);
    var how1Items:QName = new QName(how, "item");
    var dataXML:XML = XML( loader.data );
    dataXML.addNamespace( dc );
    var how1base:XMLList = dataXML.descendants( how1Items
    how1externalXML = new XMLListCollection( how1base );
    private function onComplete2(event:Event):void {
    var loader2:URLLoader =
    URLLoader(event.target);
    var how2Items:QName = new QName(dc, "Work");
    var dataXML:XML = XML( loader2.data );
    dataXML.addNamespace( dc );
    var how2base:XMLList = dataXML.descendants( how2Items
    how2externalXML = new XMLListCollection( how2base );
    private function getField( itemXML:XML,
    field:QName):String {
    return itemXML.descendants( field ).toString();
    ]]>
    </mx:Script>
    <mx:Canvas id="HowView" backgroundColor="#FFFFCC"
    label="How"
    width="100%" height="100%">
    <mx:HBox width="100%" height="100%">
    <mx:VDividedBox width="400" height="100%" id="how1Box"
    backgroundColor="#B9C5A0">
    <mx:Repeater width="80%" id="linksItems"
    dataProvider="{ how1externalXML }">
    <mx:VBox width="80%" horizontalAlign="center"
    creationCompleteEffect="Fade">
    <mx:LinkButton click="loadXML2('{getField( XML(
    linksItems.currentItem ), how1Link )}')" label="{ getField( XML(
    linksItems.currentItem ), how1Title) }" />
    </mx:VBox>
    </mx:Repeater>
    </mx:VDividedBox>
    <mx:VDividedBox width="100%" height="100%" id="how2Box"
    backgroundColor="#6BA1A3">
    <mx:Repeater width="100%" id="workItems"
    dataProvider="{ how2externalXML }">
    <mx:VBox width="534" horizontalAlign="center"
    creationCompleteEffect="Fade">
    <mx:Label text="{ getField( XML(
    workItems.currentItem ), how2Title) }" color="#000000"/>
    </mx:VBox>
    </mx:Repeater>
    </mx:VDividedBox>
    </mx:HBox>
    </mx:Canvas>
    </mx:Application>

    "Cole_62" <[email protected]> wrote in
    message
    news:gd2q5r$f08$[email protected]..
    > no i dont think this will work because i need to iterate
    through each
    > <item> in
    > the XML...below is an exmaple of possible tree structure
    of the XML:
    > channel
    > -->item1
    > ----->title
    > ----->imgs
    > --------->imgUrl
    > --------->imgUrl
    > -->item2
    > ----->title
    > ----->imgs
    > ---------->imgUrl
    > -->item3
    > ------>title
    > ------>imgs
    > ----------->(no imgs)
    >
    > i thought to handle this using something like the
    ATTACHED CODE below:
    >
    > ...i need to be able to go through each <item> and
    <imgUrl> (because i
    > dont
    > know how many (if any) there are!) sorry if my PHP
    background shines
    > through!
    >
    > THANKS!
    >
    > <mx:Repeater id="feed"
    dataProvider="{XML.channel.item}">
    > <mx:HBox>
    > <mx:Text text="{feed.currentItem.title}"/>
    > <mx:Repeater id="item"
    dataProvider="{feed.currentItem.imgs}">
    > <!-- PSEUDO CODE I NEED HELP RESOLVING:
    > if ("{item.currentItem.imgURL}")
    > -->
    > <mx:Image source="{item.currentItem.imgUrl}"/>
    > </mx:Repeater>
    > </mx:HBox>
    > </mx:Repeater>
    How bout
    <mx:Repeater id="feed"
    dataProvider="{XML.channel.item}">
    <mx:HBox>
    <mx:Text text="{feed.currentItem.title}"/>
    <mx:Repeater id="item"
    dataProvider="{feed.currentItem.imgs}">
    <mx:Image
    source="{item.currentItem.imgURL.length()>0?item.currentItem.imgURL:null}"
    includeInLayout="{item.currentItem.imgURL.length()>0}"/>
    </mx:Repeater>
    </mx:HBox>
    </mx:Repeater>

  • How to generate PDF from XML output without XML publisher

    Hi,
    I am facing a problem while splitting the rdf generated XML output.
    Problem Description:
    I have a oracle invoice report which runs once every day (scheduled program). This report fetches me the invoices generated on that day and needs to be Mailed / Faxed to the customers.
    So i developed the report in such a way that it generates the output order by customers...since the output generated will be as one .out file in APPLCSF/out directory...the .out file needs to be splitted by customers, for which i have written a cursor which takes the data of the main query and submits that many requests as many as customers are there.....There is a possibility of having 1000 customers per day also. If that is the case then my main program will fire that many requests.
    Is there a different approach......any inputs are highly appreciated.
    Also, i am generating the output in XML format. Is there a way from which i can directly generate a PDF from that XML output rather using any other tool.
    Thanks & Regards,
    Lakshmi Kalyan Vara Prasad.

    Hi,
    with Reports Bursting and the defined "distributions" it's possible to have one report splittet to several parts with different receipients. Have a look at http://download-uk.oracle.com/docs/cd/B14504_01/dl/bi/B13673_01/pbr_dist.htm.
    With xsl-fo it's possible to create pdf out of xml ... that's what xml publisher is doing.
    Regards
    Rainer

  • Generating schema from XML document.

    Hi,
    I was wondering if there is any way to generate an xsd from an xml document using some neat java api?
    Thanks in advance,
    Ted Kaminski

    Use JDK 1.4.

  • Need some help how to generate xml from java bean.

    Hi,
    Can some one help me how to generate the xml format output from a java bean.
    The bean contains around 15 to 20 attribute values.
    Thanks in Advance.
    sarayu

    You can use XMLEncoder with custom persistence delegates if needed:
    http://java.sun.com/products/jfc/tsc/articles/persistence4/

  • Can Papyrus generate UML from XML or XSD?

    I'm looking for a way to model an XML schema and I thought Papyrus would be able to help me. But now I'm not so sure, or at least I haven't found a way to do it yet.
    Is there some way in Eclipse (whether using Papyrus or something else, of course preferably free) to generate a UML representation of an XML schema?
    Thanks!

    Hi,
    You can use the EMF model importer to import a model from XSD and then
    export it to UML.
    Use the "File -> New -> Other..." menu action, take "EMF Generator
    Model" in the wizard, and choose XSD as the import source. When you
    have finished, you should end up in the editor for a *.genmodel
    resource. EMF will have created an *.ecore from your schema. The
    Generator menu has an option to export the model. Choose UML in this
    wizard and see what you get. You can initialize the Papyrus diagrams
    for the resulting *.uml resource if you like.
    HTH,
    Christian
    On 2015-07-22 20:27:16 +0000, Thom DeCarlo said:
    > I'm looking for a way to model an XML schema and I thought Papyrus
    > would be able to help me. But now I'm not so sure, or at least I
    > haven't found a way to do it yet.
    >
    > Is there some way in Eclipse (whether using Papyrus or something else,
    > of course preferably free) to generate a UML representation of an XML
    > schema?
    >
    > Thanks!

  • Generate XML from XML-Schema

    What possibilities do I have to generate an XML-Instance from the XML-Schema?
    I heard of JAXB and Castor, that generate Classes for acessing XML-Information and genarating XML-files and I heard of Sun's XML-Generator, a command line tool.
    Does anybody know other possibilities?

    i use XMP Spy for converting XML schema to an instance file. it works fine.

Maybe you are looking for

  • R12: PO Print report not accepting custom layout

    Hi All, PO Print report is not picking up the custom layout in R12. We have developed a custom layour ( .rtf).It works fine when run as a concurrent program. But if we follow the standard navigations ( Inquire/View document ) generates the standard r

  • Desktop view in mobile safari

    Is there any way to force Safari to view the desktop version of a website? Any help will be appreciated! Thank you.

  • U2312HM and second monitor = Entering Power Save Mode

    So, my monitor has not been able to turn on for about a week now. It shows that it's getting power, but after 3 seconds I get the message that it is going into power save mode. I am able to press some buttons on the monitor and a message pops up that

  • Unable to clear ICloud sign in screen.

    My iPad Air requests sign in to iCloud but will not connect to wifi and the sign in message will not clear so cannot access any other apps. How can I clear this? I ave tried two button reset which also does not work

  • PI Szenarion with an existing Enterprise Service

    Hello, i will design and configure an szenario with using PI 7.1 and an Discovery System. For this i will use an existing Enterprise Service. These Service is deployed on the Discovery System. Service: Read Purchase Order Enterprise Service Operation