XML entity

This has probably been done to death but my google mojo has
deserted me!
I am creating an xslt fragment and the code is as follows:-
<?xml version="1.0" encoding="utf-8"?><!--
DWXMLSource="../xml/gt-tourlist.xml" -->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;">
<!ENTITY copy "&#169;">
<!ENTITY reg "&#174;">
<!ENTITY trade "&#8482;">
<!ENTITY mdash "&#8212;">
<!ENTITY ldquo "&#8220;">
<!ENTITY rdquo "&#8221;">
<!ENTITY pound "&#163;">
<!ENTITY yen "&#165;">
<!ENTITY euro "&#8364;">
]>
<xsl:stylesheet version="1.0"
xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template match="/">
<p><xsl:value-of
select="response/category/title"/>
<br />
<xsl:value-of
select="response/category/description"/></p>
<p>
<xsl:for-each select="response/tours/tour">
<a
href="tour-info.asp?tour={@id}&amp;tourcat={title}"><xsl:value-of
select="title"/></a><br />
<xsl:value-of select="short_description"
disable-output-escaping="yes"/>
<xsl:value-of select="thumbnail"/> <br />
<br />
<br />
</xsl:for-each>
</p>
</xsl:template>
</xsl:stylesheet>
The code validates fine and is as far as I can correct.
However it
doesn't like the part containing the entities which bugs out
the page.
If I remove this the page works fine.
My problem is I need to correctly display text in English,
French,
German and Spanish which all have the own chartacter
idiosyncracys.
Can anyone pont out what I'm missing - it's driving me nuts!
TIA!
Buzby
"There's nothing more dangerous than a resourceful idiot"

hmm not still have the same problem. It worked until I checked
it in to Version control system. so any suggestions R still
welcome. (perhaps it uses file information somehow?)
Robert Hede (guest) wrote:
: Thanks for the attention.
: I'v now solved the problem by copying the existing connection
to
: a new one. This I added to the the session control which gives
: me an new xml file for the new connection (and this time it
: worked ::-)
: regards
: rob
: Robert Hede (guest) wrote:
: : >>or you can simply re-create the workspace and project in
the
: : >>new directory
: : That is what I did. First I just tried copying and when this
: : did'n work I created a new workspace and project.
: : Then I added the projectfiles.
: : But still it keeps overwriting the old XML file each time I
: make
: : a small change like adding a new resultset. Hmmm.
: : Regards
: : Rob
: : mark tomlinson (guest) wrote:
: : : Yes, the workspace and projects contain path information.
: You
: : can
: : : try editing them to alter this or you can simply re-create
: the
: : : workspace and project in the new directory.
null

Similar Messages

  • How to create xml entity in sap

    hi,
      kindly tell me process of creating xml entity in sap.
    regrad's
    vineet

    Hi Vineet ,
    You can use function module "SDIXML_DATA_TO_DOM" to convert the data in internal table to XML form. This function module is used to create the structure for XML document.
    After this you use FM "SDIXML_DOM_TO_XML".
    Hope this helps you!!!!
    Regards,
    Nikhil

  • How to include XML Entity in XSU?

    Hi,
    I am using XSU to get XML output, I couldn't find a way to output an ENTITY in XML output.
    I hope I can get help on this.
    thanks.
    jane

    Hi Vineet ,
    You can use function module "SDIXML_DATA_TO_DOM" to convert the data in internal table to XML form. This function module is used to create the structure for XML document.
    After this you use FM "SDIXML_DOM_TO_XML".
    Hope this helps you!!!!
    Regards,
    Nikhil

  • How to create xml entity in java?????

    public Document createXml(String Error,String src,String trg)
                 DocumentBuilderFactory docBuilderFactory = null;
                DocumentBuilder docBuilder = null;
            //    src= src.replaceAll("&","I want this ");
               //  trg= trg.replaceAll("&","Yse !!!;");
                 try {
                      docBuilderFactory = DocumentBuilderFactory.newInstance();
                      docBuilder = docBuilderFactory.newDocumentBuilder();
                      xmlDoc = docBuilder.newDocument();
                     //create the root element
                     Element errorLog = xmlDoc.createElement("errorLog");
                     //all it to the xml tree
                       xmlDoc.appendChild(errorLog);
                      Entity e1=(Entity) xmlDoc.createEntityReference("amit");
                        xmlDoc.appendChild(e1);
                       Entity e2=(Entity) xmlDoc.createEntityReference("chch");
                       xmlDoc.appendChild(e2);
                          Element error = xmlDoc.createElement("error");
                             error.setAttribute("Type",Error);
                             errorLog.appendChild(error);
                             Element source = xmlDoc.createElement("source");
                             source.appendChild(xmlDoc.createTextNode(src));
                             error.appendChild(source);
                             Element target = xmlDoc.createElement("target");
                             target.appendChild(xmlDoc.createTextNode(trg));
                             error.appendChild(target);
                 } catch (Exception ex) {
                 return xmlDoc;
            }It seem to be failing in creating entities Help plzzzzzzzzzzzzzzzzzzzzzz

    I want out put like
    <?xml version="1.0"?>
    <!ENTITY amit ' xyz'>
    <errorLog>
    <error Type="Error">
    <source> this is </source>
    <target>Yes</target>
    </error></errorLog>
    bUT iT gives rest except Entity part
    Help!!!!!!!!!!!!

  • Create XML entity file

    Hi All
    I am creation the XML file using SAP XML DOM Libarary objects.
    My requirement is to create the EXTERNAL ENTITY file reference using DOCTYPE tag.
    For Example
    <;!DOCTYPE descriptSol [
    <;!ENTITY % references SYSTEM "P_899200_SD01_01.ref">;
    %references
    ]>
    I am using following method to create it
    lo_doc_type                 TYPE REF TO if_ixml_document_type,
    lo_entity_dec               TYPE REF TO if_ixml_entity_decl,
              CALL METHOD go_document->;create_document_type
                EXPORTING
                  name =  'descriptSol'
                RECEIVING
                  rval = lo_doc_type.
              CALL METHOD go_document-&gt;set_document_type
                EXPORTING
                  document_type = lo_doc_type.
              CALL METHOD lo_doc_type->create_ext_entity_decl
                EXPORTING
                  is_parameter_entity = 'X'
                  name                = 'references'
                  notation            = ''
                  public_id           = ''
                  system_id           = 'P_899200_SD01_01.ref'
                RECEIVING
                  rval                = lo_entity_dec
              CALL METHOD lo_doc_type->append_child
                EXPORTING
                  new_child = lo_entity_dec
                RECEIVING
                  rval      = lw_rval.
    The Above code is working and creating following tag
    <;!DOCTYPE descriptSol [
    <!ENTITY % references SYSTEM "P_899200_SD01_01.ref">;
    ]>;
    So % references at end of declaration is missing.
    This type of entity is called as "EXTERNAL (PARSED) PARAMETER ENTITY Declaration".
    Give your suggestions that whether i am using right method to created EXternal entity reference.
    Thanks in advance
    Vineet

    First - you need to have a valid RSS feed to submit to iTunes.
    Second - you should never have spaces in file names
    Third - Dropbox is a bad choice for a podcast host.
    http://www.podcast411.com/podcast101/
    Here is a tutorial that takes you step by step through getting a podcast put together.
    Let me know what questions you have.
    Regards,
    Rob W
    podCast411

  • Escaping standard XML entity references

    I've been trying to find a way to escape the greater than sign as well as other chars in my xsl stylesheet. I've tried several tips from the postings, but none seem to work. What I need is for my xml to the characters escaped in the same way as the &amp; & ampersand and &lt; < less than chars are. I run into problems when I try to get the ampersand in next to other characters without a separating ;
    Thanks in advance.

    Vassago (guest) wrote:
    : 1) The XML-parser for Java does not expand entity references,
    : such as &[whatever], instead all values are null. How to fix
    : this? Code example would be greatly appreciated.
    : 2) It seems you cannot have international character (such as
    : swedish characters, w) as values for internal entities, i.e.
    : <!ENTITY Ouml "Y">
    : How to solve this problem?
    1) You probably have a simple error defining/using your entities
    since we've a number of regression tests that handle entity
    references fine. A simple example is:
    <?xml version="1.0"?>
    <!DOCTYPE po [
    <!ENTITY status "beta">
    ]>
    <po foo="bar">
    <comment> Alpha, then &status </comment>
    </po>
    2) What do you set your character set encoding to be?
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Convert xml referenced entity to unicode?

    Hi,
    Anyone know how one converts all XML Referenced Entities, of the form "&#xxx;", which appear in a String object, to their unicode representation?
    For example:
    If String A contains the phrase "two letters: &#193; &#225;", I would like to get a new String which contains the phrase "two letters: � �"

    nobody71 wrote:
    I can write some code to do the conversion by parsing the string, finding each and every XML reference and then convert each to unicode... I know how to do that...Then go ahead and do it.
    but there must already be something that does this in Java's standard API/library...Actually there isn't.
    For example, when this type of XML entity reference is found in the text of an XML node, and this node is read into a java DOM object using java's API/library, there is some code somewhere which does the conversion I am inquiring about, because when I view the String representing that text, it now contains the unicode characters. So, there must be a quick and already existing way to do this.The code must exist somewhere, yes. It doesn't follow that the code must be encapsulated in a public method. It's a specialized requirement of XML parsers so there's really no need to make it available outside the parsers where it exists.
    I guess in the time it took me to write this post I could have written the converter... :-(Why do you need to do that, anyway? Why not just let an XML parser do it for you?

  • EJB 3.0 and  creating bean .xml files for DataControl

    In entity beans I haven't parameter updateble in source for column witch represent Id. I generate Id with TableGenerator strategy.
    @TableGenerator(name="TEST_SEQ", initialValue=1, allocationSize=1)
    @Column(nullable = false)
    @GeneratedValue(strategy=GenerationType.TABLE,generator="TEST_SEQ")
    @Id
    private Long id;When I create DataControl why some <entity bean>.xml files have IsUpdateable="0" parameter for attribute witch represent Id (primary key) column in entity bean?
    <Attribute Name="id" Type="java.lang.Long" IsUpdateable="0"/>In some files this parameter have default value (true), that is it does not show in source!
    If I use datacontrol (method findAll for example) with selectOneChoiche component error is:
    The selected target attribute has read-only access.Please select an updatable attributeWhen I modify files and after that refresh or create new DataControl I loss my changes in files.

    Hi Ric,
    This is the test case which describe my problem.
    Test entity:
    @Entity()
    @Table(name="TEST")
    @NamedQueries({
        @NamedQuery(name = "Test.findAll", query = "select o from Test o"),
        @NamedQuery(name = "Test.findById ", query = "select o from Testo where o.id = :id")
    public class Test extends BaseTest implements Serializable {
        @Id
        @TableGenerator(name="TEST_SEQ", initialValue=1, allocationSize=1)
        @Column(name = "ID", nullable = false)
        @GeneratedValue(strategy=GenerationType.TABLE,generator="TEST_SEQ")
        private Long id;
        private String test;
    public String getTest() {
    return test;
    public String setTest(String param) {
    this.test=param;
        public Long getId() {
            return id;
        private void setId(Long id) {
            this.id = id;
       }Base entity:
    @MappedSuperclass
    public abstract class BaseTest implements Serializable {
        @Column(name = "LASTCHANGE")
        private Timestamp lastChange;
        public MasterEntity() {
        public void setLastChange(Timestamp param) {
          this.lastChange = param;
        public Timestamp getLastChange() {
            return lastChange;
    }Main entity:
    @Entity()
    @Table(name="MAIN")
    @NamedQueries({
        @NamedQuery(name = "Test.findAll", query = "select o from Test o"),
        @NamedQuery(name = "Test.findById", query = "select o from Test o where o.id = :id")
    public class Main extends BaseTest implements Serializable {
        @Id
        @TableGenerator(name="MAIN_SEQ", initialValue=1, allocationSize=1)
        @Column(name = "ID", nullable = false)
        @GeneratedValue(strategy=GenerationType.TABLE,generator="MAIN_SEQ")
        private Long id;
        @ManyToOne
        @JoinColumn(name = "IDTEST", referencedColumnName="ID")
        private Test test;
        public Long getId() {
            return id;
        private void setId(Long id) {
            this.id = id;
        public Long getTest() {
            return test;
        private void setTest(Test test) {
            this.test = test;
       }The part code of session bean:
    public Main findById(Long id){
    return em.find(Main.class, id);
    }When I create DataControl from this sessionBean, the Test.xml(ENTITY->Test) file is generated.
    Test.xml:
    <?xml version="1.0" encoding="UTF-8" ?>
    <JavaBean xmlns=" http://xmlns.oracle.com/adfm/beanmodel" version="11.1.1.45.24"
              id="Test" Package="package.test"
              BeanClass="package.test.Test"
              isJavaBased="true">
      <Attribute Name="id" IsUpdateable="0" Type="java.lang.Long"/>
      <ConstructorMethod IsCollection="false" Type="void"
                         id="Test"/>
    </JavaBean>Questions:
    Why attribute "id" have property isUpdatable="0" ?
    I didn't specify "update=false" on my entity 'Test' for that column.
    In witch case propery isUpdateble have value "0", "1", "2", "true", "false"?

  • Error in deploying entity beans - migration from JBoss to Weblogic 10.3.4

    Hi,
    I am migrating EJB2.x code from JBoss to Weblogic 10.3.4. As a first step, I am tyring to deploy just Entity beans. I get following error when deploying to server.
    'weblogic.application.ModuleException: Exception preparing module: EJBModule(myEJB.jar)
    Unable to deploy EJB: CollMetaData from myEJB.jar:
    [EJB:011017]Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:
    There are 1 nested errors:
    java.lang.NullPointerException
         at weblogic.ejb.container.cmp.rdbms.finders.EjbqlFinder.setMethods(EjbqlFinder.java:288)
         at weblogic.ejb.container.cmp.rdbms.Deployer.processFinders(Deployer.java:744)
         at weblogic.ejb.container.cmp.rdbms.Deployer.readTypeSpecificData(Deployer.java:446)
         at weblogic.ejb.container.persistence.PersistenceType.setTypeSpecificFile(PersistenceType.java:506)
         at weblogic.ejb.container.persistence.PersistenceType.setupDeployer(PersistenceType.java:455)
         at weblogic.ejb.container.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:118)
         at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1214)
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:442)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
         at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
         at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Can someone help me fixing the issue?
    I changed schema locations of descriptor files as suggested at http://download.oracle.com/docs/cd/E17904_01/web.1111/e13706/overview.htm#i1074199 (see the third category for '*Enterprise Bean 2.1*' in the listing Table 1-1). Alternatively, you may see the schema locations for EJB2.0 directly at http://download.oracle.com/docs/cd/E17904_01/web.1111/e13719/dd_reference.htm#EJBPG481

    JRE version in JBoss is 1.6.0_16. JVM in web logic is pointing to jrockit_160_22_D1.1.1-3 which is come in the package. It doesn't seem to be related to JVM version mismatch.
    I think it is an issue with definitions in weblogic-cmp-rdbms-jar.xml file. How should be the definition of entity-descriptor appear for entity bean which has finder methods in ejb-jar.xml?
    Please see the snippets from corresponding descriptor files below.
    ejb-jar.xml
    =========
    <entity>
    <display-name>EmpBean</display-name>
    <ejb-name>EmpBean</ejb-name>
    <local-home>LocalEmpBeanHome</local-home>
    <local>LocalEmpBean</local>
    <ejb-class>EmpBeanBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>EmpBean</abstract-schema-name>
    <cmp-field>
    <field-name>firstName</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>lastName</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>phone</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>address</field-name>
    </cmp-field>
    <primkey-field>lastName</primkey-field>
    <query>
    <query-method>
              <method-name>findByPrimaryKey</method-name>
                   <method-params>
                   <method-param>java.lang.String</method-param>
                   </method-params>
              </query-method>
              <ejb-ql>SELECT Object(o) FROM EmpBean o WHERE o.lastName= ?1</ejb-ql>
         </query>
    </entity>
    weblogic-jar.xml
    ============
    <weblogic-enterprise-bean>
    <ejb-name>EmpBean</ejb-name>
    <entity-descriptor>
         <pool>
              <max-beans-in-free-pool>20</max-beans-in-free-pool>
              <initial-beans-in-free-pool>5</initial-beans-in-free-pool>
         </pool>
    <persistence>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>meta-inf/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-use>
    <finders-load-bean>true</finders-load-bean>
    </persistence>
    </entity-descriptor>
    <local-jndi-name>ejb/EmpBean</local-jndi-name>
    </weblogic-enterprise-bean>
    weblogic-cmp-rdbms-jar.xml
    ====================
    <weblogic-rdbms-bean>
    <ejb-name>EmpBean</ejb-name>
    <data-source-jndi-name>mysqlDS</data-source-jndi-name>
    <table-map>
    <table-name>emp</table-name>
    <field-map>
    <cmp-field>firstName</cmp-field>
    <dbms-column>first_namel</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>lastName</cmp-field>
    <dbms-column>last_name</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>phone</cmp-field>
    <dbms-column>phone</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>address</cmp-field>
    <dbms-column>address</dbms-column>
    </field-map>
    </table-map>
    <weblogic-rdbms-bean>
    Please ignore any typos that you may notice in above sample descriptions (because I just typed it here changing original names).
    When I try to deploy the application, I get error message as posted in my first post above in this thread. Please correct me if I am making any erros in descriptor files.
    Edited by: 839281 on Feb 25, 2011 10:55 AM
    Edited by: venkatp on Mar 1, 2011 9:31 AM

  • PDS - XML format, unable to read special characters in a string.

    Hi All,
    I've been using XML files to create my report with Oracle9i's new featue of PDS.
    Now, I'm unable to read a file if it contains '&' or '<' in the string. In fact, the xml file itself not able to crate a xml page in the browser, if these special characters are present.
    Is there any way to solve this problem ?
    I can't tell the users to remove &, < from the description data. Is there any way to workaround for this ?
    Thanks in advance,
    Satya.

    Hi Rohit and Rajesh
    Thanks for your reply.
    In fact, my problem is like this:
    I'll get data in .txt file and save that as a .xml file in the network before calling Oracle report ,which gets data from the .xml.
    The contents are like this:
    <Comapy name> Ford Motors UK & Europe</Company name>
    <Department> HR & Pensions</Depatrment>
    <Salary>Grad4 < 25000 </Salary>
    As per XML entity character representation, I need to replace '&' with '&amp;' and '<' with '<lt;'
    I'm wondering is there any other way to solve this problem as it is difficult to replace '<' and '>' generically.
    Honestly, I couldn't understand what Mr. Rajesh was trying to tell.
    'for & use & ( with semicolon at the end)'
    'for < use <'
    'for > use >'
    Can you shed some light on this ?
    Many thanks
    Satya.

  • Entity Reference embedded within colspec attribute name-table col. heading

    My team is working on a project that involves converting MS Word documents to XML. The XML is applied to a stylesheet (*.xsl) which generates a *.pdf document. Is it valid to include an xml entity reference within a colspec attribute name? For example, the xml document would contain the following code for a table:
    <t id="t1109681052">TABLE 1.0 My Favorite Restaurants</t>
    <tbl id="tbl921133606" val="1.0">
    <TblHdg num="1">Table 1.0 My Favorite Restaurants </TblHdg>
    <colspec id="colspec1148420628" name=" Restaurant Name" width="0.61875"/>
    <colspec id="colspec201089067" name="Type of Authentic Cuisine" width="1.61875"/>
    <colspec id="colspec201089069" name="Location" width="1.61875"/>
    </tbl>
    Is the following code valid in XML to produce the results in the sample table below when the XML is applied to a stylesheet (xsl)?
    <colspec id="colspec201089067" name="Type of "Authentic" Cuisine" width="1.61875"/>
    The desired table and column titles would be as follows:
    Restaurant Name ----     Type of “Authentic” Cuisine ----     Location
    Le Chantecler --------------->French     The Negresco Hotel –
    Promenade des Anglais Nice France
    La Coupola -------------------->French     The Mirabeau Hotel
    1 Princess Grace Ave
    Monte Carlo Monaco
    What is needed in the XML code to produce the table column heading with quotes embedded around the word "Authentic"?
    Please advise. Thanks so much and have a prosperous and memorable holiday.

    SOLUTION RESOLVED FOR THIS MESSAGE.

  • JDeveloper / OC4J rewriting my orion-ejb-jar.xml

    Hi All.
    Im having a play around with OC4J and CMP entity beans and struts at the moment learning some stuff for a new job, so ive started to write a little test app to get used to things.
    Ive created a CMP entity - CustomerEntityEJB, manually defined the tables etc wrote and built it using JDeveloper 10.
    Ive created all the necessary classes and descriptors in JDeveloper and the bean compiles and deploys fine, however no matter what i do, the table attribute of the <entity-deployment> elemnt is ALWAYS removed from the orion-ejb-jar.xml file before its deployed and i have no idea why.
    Here are some snippets form the xml config files im using....
    ejb-jar.xml :
    <entity>
    <description>Entity Bean ( CMP )</description>
    <display-name>CustomerEntityEJB</display-name>
    <ejb-name>CustomerEntityEJB</ejb-name>
    <local-home>com.gb.ejb.entity.customer.CustomerEntityEJBLocalHome</local-home>
    <local>com.gb.ejb.entity.customer.CustomerEntityEJBLocal</local>
    <ejb-class>com.gb.ejb.entity.customer.CustomerEntityEJBBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Long</prim-key-class>
    <reentrant>false</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>CustomerEntityEJB</abstract-schema-name>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>title</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>forename</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>surname</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>email</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>password</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>active</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params/>
    </query-method>
    <ejb-ql>SELECT OBJECT(c) FROM CustomerEntityEJB c</ejb-ql>
    </query>
    </entity>
    orion-ejb-jar.xml as in JDeveloper:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-ejb-jar-10_0.xsd" schema-major-version="10" schema-minor-version="0">
    <enterprise-beans>
    <persistence-manager name="toplink"/>
    <session-deployment name="CustomerSessionEJB" local-location="CustomerSessionEJB" />
    <entity-deployment name="CustomerEntityEJB" data-source="jdbc/PostgresDS" table="Customer" local-location="CustomerEntityEJB">
    <primkey-mapping>
    <cmp-field-mapping name="id"/>
    </primkey-mapping>
    <cmp-field-mapping name="active"/>
    <cmp-field-mapping name="email"/>
    <cmp-field-mapping name="forename"/>
    <cmp-field-mapping name="id"/>
    <cmp-field-mapping name="password"/>
    <cmp-field-mapping name="surname"/>
    <cmp-field-mapping name="title"/>
    </entity-deployment>
    </enterprise-beans>
    </orion-ejb-jar>
    orion-ejb-jar.xml as viewed in the OC4J enterprise manager.     
    <?xml version="1.0" encoding="utf-8"?>
    <orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-ejb-jar-10_0.xsd" deployment-version="10.1.3.3.0" deployment-time="1151415a0e3" schema-major-version="10" schema-minor-version="0" >
    <enterprise-beans>
    <persistence-manager name="toplink" class="oracle.toplink.internal.ejb.cmp.oc4j.Oc4jPersistenceManager" descriptor="toplink-ejb-jar.xml">
    </persistence-manager>
    <session-deployment name="CustomerSessionEJB" location="CustomerSessionEJB" local-location="CustomerSessionEJB" persistence-filename="CustomerSessionEJB">
    <ejb-ref-mapping name="ejb/local/CustomerEntityEJB" location="TWA-EJB_CustomerEntityEJBLocal" />
    </session-deployment>
    <entity-deployment name="CustomerEntityEJB" location="CustomerEntityEJB" local-location="CustomerEntityEJB" concrete-bean-class="CustomerEntityEJB_ConcreteSubClass3" data-source="jdbc/PostgresDS" local-wrapper="CustomerEntityEJBLocalHome_LocalEntityHomeWrapper5">
    </entity-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping name="<default-ejb-caller-role>" impliesAll="true" />
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    As you can see, the orion-ejb-jar.xml that been deployed on the server has had extra attributes defined in it (like concrete-bean-class) which makessense - its adding in the bits i didnt to get th bean to deploy - however the table attribue is just removed, meaning my bean cant find the table - hence my app not working.
    i just dont know how to stop this and would be extremely grateful if someone could give me a clue how to get my bean up and working properly as this is driving me insane.
    Thanks in advance..
    Gareth.

    sorted - the <persistence-manager name="toplink"/> element was automatically generated by JDeveloper and put in my orion-ejb-jar.xml appears to be un necessary and seemed to be breaking eveything - as soon as i removed it, the bean seemed to deploy ok and pick up the table name =]
    as a bit of an aside does anyone know why it was automatically put there in the first place if it breaks things?

  • Load balancing not happending but fail over is for Read only Entity beans

              The following are the configuration.
              Two NT servers with WL5.1 sp9 having only EJBs(Read only entity beans)
              One Client with WL5.1 sp9 having servlet/java application as
              EJB client.
              I am trying to make a call like findbyprimarykey in one of the
              entity bean. I could see the request is being directed only to the one of the
              server always. When I bring that server, fail over is happening to the other server.
              Here are the settings I have in the ejb-jar.xml :
                        <entity>
                             <ejb-name>device.StartHome</ejb-name>
                             <home>com.wl.api.device.StartHome</home>
                             <remote>com.wl.api.device.StartRemote</remote>
                             <ejb-class>com.wl.server.device.StartImpl</ejb-class>
                             <persistence-type>Bean</persistence-type>
                             <prim-key-class>java.lang.Long</prim-key-class>
                             <reentrant>False</reentrant>
                             <resource-ref>
                                  <res-ref-name>jdbc/wlPool</res-ref-name>
                                  <res-type>javax.sql.DataSource</res-type>
                                  <res-auth>Container</res-auth>
                             </resource-ref>
                        </entity>
              Here are the settings I have in the weblogic-ejb-jar.xml.
              <weblogic-enterprise-bean>
                        <ejb-name>device.StartHome</ejb-name>
                        <caching-descriptor>
                             <max-beans-in-cache>50</max-beans-in-cache>
                             <cache-strategy>Read-Only</cache-strategy>
                             <read-timeout-seconds>900</read-timeout-seconds>
                        </caching-descriptor>
                        <reference-descriptor>
                             <resource-description>
                                  <res-ref-name>jdbc/wlPool</res-ref-name>
                                  <jndi-name>weblogic.jdbc.pool.wlPool</jndi-name>
                             </resource-description>
                        </reference-descriptor>
                        <enable-call-by-reference>False</enable-call-by-reference>
                        <jndi-name>device.StartHome</jndi-name>
                   </weblogic-enterprise-bean>
              Am I doin any mistake in this?
              Any one's help is appreciated.
              Thanks
              Suresh
              

    we are using 5.1
              "Gene Chuang" <[email protected]> wrote in message
              news:[email protected]...
              > Colocation optimization occurs if your client resides in the same
              container (and also in the same
              > EAR for 6.0) as your ejbs.
              >
              > Gene
              >
              > "Suresh" <[email protected]> wrote in message
              news:[email protected]...
              > > Ok....the ejb-call-by-reference set to true is making the call to one
              server
              > > only. i am not sure why it is. I removed the property name and it
              works.
              > > Also I have one question, in our prduct environment, when i cache the
              ejb
              > > home it is not doing the load balancing. can any one help me for that.
              > > thanks
              > >
              > > Mike,
              > > From the sample pgm I sent, even from single client calls get load
              > > balanced.
              > >
              > > Suresh
              > >
              > >
              > > "Gene Chuang" <[email protected]> wrote in message
              > > news:[email protected]...
              > > > In WL, LoadBalancing will ONLY WORK if you reuse your EJBHome! Take
              your
              > > StartEndPointHome lookup
              > > > out of your for loop and see if this fixes your problem.
              > > >
              > > > I've seen this discussion in ejb-interest, and some other vendor
              (Borland,
              > > I believe it is), brings
              > > > up an interesting point: Clustering and LoadBalance is not in the
              J2EE
              > > specs, hence implementation
              > > > is totally up to the vendor. Weblogic loadbalances from the remote
              > > interfaces (EJBObject, EJBHome,
              > > > etc..), while Borland loadbalances from JNDI Context lookup.
              > > >
              > > > Let me suggest a third implmentation: loadbalance from BOTH Context
              > > lookup as well as stub method
              > > > invocation! Or create a smart replica-aware list manager which
              persists
              > > on the client thread
              > > > (ThreadLocal) and is aware of lookup/evocation history. Hence if I do
              the
              > > following in a client
              > > > hitting a 3 node cluster, I'll still get perfect round-robining
              regardless
              > > of what I do on the
              > > > client side:
              > > >
              > > > InitialContext ctxt = new InitialContext();
              > > > EJBHome myHome = ctxt.lookup(MY_BEAN);
              > > > myHome.findByPrimaryKey(pk); <== hits Node #1
              > > > myHome = ctxt.lookup(MY_BEAN);
              > > > myHome.findByPrimaryKey(pk); <== hits Node #2
              > > > myHome.findByPrimaryKey(pk); <== hits Node #3
              > > > myHome = ctxt.lookup(MY_BEAN);
              > > > myHome.findByPrimaryKey(pk); <== hits Node #1
              > > > ...
              > > >
              > > >
              > > > Gene
              > > >
              > > > "Suresh" <[email protected]> wrote in message
              > > news:[email protected]...
              > > > > Mike ,
              > > > >
              > > > > Do you have any reasons for the total number of machines to be 10.
              > > > >
              > > > > I tried with 7 machines.
              > > > >
              > > > >
              > > > > Here is my sample client java application running individual in the
              > > seven
              > > > > machines.
              > > > >
              > > > > StartEndPointHome =
              > > > > (StartEndPointHome)ctx.lookup("dev.StartEndPointHome");
              > > > > for(;;)
              > > > > {
              > > > > // logMsg(" --in loop "+currentTime);
              > > > > if (currentTime > nextRefereshTime)
              > > > > {
              > > > > logMsg("****- going to call");
              > > > > currentTime=getSystemTime();
              > > > > nextRefereshTime=currentTime+timeInterval;
              > > > > StartEndPointHome =
              > > > > (StartEndPointHome)ctx.lookup("dev.StartEndPointHome");
              > > > > long rndno=(long)(Math.random()*10)+range;
              > > > > logMsg(" going to call remotestub"+rndno);
              > > > > retVal =
              > > > >
              > >
              ((StartEndPointHome)getStartHome()).findByNumber("pe"+rndno+"_mportal_dsk36.
              > > > > mportal.com");
              > > > >
              > > > > logMsg("**++- called stub");
              > > > > }
              > > > >
              > > > >
              > > > >
              > > > > The range value is different for each of the machines in the
              cluster.
              > > > >
              > > > > If the first request starts at srv1, all request starts hitting the
              same
              > > > > server.
              > > > > If the first request starts at srv2, all request starts hitting the
              same
              > > > > server.
              > > > >
              > > > > I have the following for the url , user and pwd values for the
              context
              > > .
              > > > >
              > > > > public static String url="t3://10.11.12.14,10.11.12.117:8000";
              > > > > public static String user="guest";
              > > > > public static String password="guest";
              > > > >
              > > > >
              > > > >
              > > > > It would be great if you could help me.
              > > > >
              > > > > Thanks
              > > > > suresh
              > > > >
              > > > >
              > > > > "Mike Reiche" <[email protected]> wrote in message
              > > > > news:[email protected]...
              > > > > >
              > > > > > If you have only one client don't be surprised if you only hit one
              > > server.
              > > > > Try
              > > > > > running ten different clients and see if the hit the same server.
              > > > > >
              > > > > > Mike
              > > > > >
              > > > > >
              > > > > > "suresh" <[email protected]> wrote:
              > > > > > >
              > > > > > >The following are the configuration.
              > > > > > >
              > > > > > > Two NT servers with WL5.1 sp9 having only EJBs(Read only entity
              > > beans)
              > > > > > >
              > > > > > > One Client with WL5.1 sp9 having servlet/java application as
              > > > > > > EJB client.
              > > > > > >
              > > > > > >
              > > > > > >I am trying to make a call like findbyprimarykey in one of the
              > > > > > >entity bean. I could see the request is being directed only to
              the
              > > one
              > > > > > >of the
              > > > > > >server always. When I bring that server, fail over is happening
              to
              > > the
              > > > > > >other server.
              > > > > > >
              > > > > > >
              > > > > > >Here are the settings I have in the ejb-jar.xml :
              > > > > > > <entity>
              > > > > > > <ejb-name>device.StartHome</ejb-name>
              > > > > > > <home>com.wl.api.device.StartHome</home>
              > > > > > > <remote>com.wl.api.device.StartRemote</remote>
              > > > > > > <ejb-class>com.wl.server.device.StartImpl</ejb-class>
              > > > > > > <persistence-type>Bean</persistence-type>
              > > > > > > <prim-key-class>java.lang.Long</prim-key-class>
              > > > > > > <reentrant>False</reentrant>
              > > > > > > <resource-ref>
              > > > > > > <res-ref-name>jdbc/wlPool</res-ref-name>
              > > > > > > <res-type>javax.sql.DataSource</res-type>
              > > > > > > <res-auth>Container</res-auth>
              > > > > > > </resource-ref>
              > > > > > > </entity>
              > > > > > >
              > > > > > >
              > > > > > >Here are the settings I have in the weblogic-ejb-jar.xml.
              > > > > > >
              > > > > > ><weblogic-enterprise-bean>
              > > > > > > <ejb-name>device.StartHome</ejb-name>
              > > > > > >
              > > > > > > <caching-descriptor>
              > > > > > > <max-beans-in-cache>50</max-beans-in-cache>
              > > > > > > <cache-strategy>Read-Only</cache-strategy>
              > > > > > > <read-timeout-seconds>900</read-timeout-seconds>
              > > > > > > </caching-descriptor>
              > > > > > >
              > > > > > > <reference-descriptor>
              > > > > > > <resource-description>
              > > > > > > <res-ref-name>jdbc/wlPool</res-ref-name>
              > > > > > > <jndi-name>weblogic.jdbc.pool.wlPool</jndi-name>
              > > > > > > </resource-description>
              > > > > > > </reference-descriptor>
              > > > > > > <enable-call-by-reference>False</enable-call-by-reference>
              > > > > > > <jndi-name>device.StartHome</jndi-name>
              > > > > > > </weblogic-enterprise-bean>
              > > > > > >
              > > > > > >
              > > > > > >Am I doin any mistake in this?
              > > > > > >
              > > > > > >Any one's help is appreciated.
              > > > > > >Thanks
              > > > > > >Suresh
              > > > > >
              > > > >
              > > > >
              > > >
              > > >
              > >
              > >
              >
              >
              

  • Encoding Individual Strings with XML entities to replace "&", " ", etc.

    We use templates to create XML files. The tags are in the templates and just the values get substituted in. Sometimes the variable value contains an ampersand or other XML-banned character.
    1) Is there a simple method in the Java or Xerces class libraries that takes a string and returns one with the suspect characters replaced by XML entities?
    2) Sometimes, though rarely (I have no control over this!) the variables arrive with the forbidden characters already replaced by entities. Is there a method which will tell me if the string already contains entities, or at least is already a valid XML string? Otherwise I'm afraid the ampersand in an already-converted entity name will itself be converted to another entity.
    Thanks!

    I'm not aware of any built-in mechanism for doing that kind of escaping short of a full XML generator. Here's a lightweight solution that replaces ampersands only if they're not part of an XML entity. Just grab a copy of Elliott Hughes' Rewriter and implement it like this: public class Test
      /* Rewriter can be found here:
       * http://elliotth.blogspot.com/2004/07/java-implementation-of-rubys-gsub.html
      public static void main(String... args) throws Exception
        Rewriter xmlEscaper = new Rewriter("[<>'\"]|&(?!(?:lt|gt|apos|quot|amp);)")
          public String replacement()
            char ch = group(0).charAt(0);
            switch (ch)
              case '<'  : return "&#38;lt;";
              case '>'  : return "&#38;gt;";
              case '\'' : return "&#38;apos;";
              case '"'  : return "&#38quot;";
              case '&'  : return "&#38amp;";
              default :
                throw new IllegalStateException("this can't happen");
        String str = "this & that & the <other&#38gt;";
        System.out.println(xmlEscaper.rewrite(str));
    }

  • DSC with XML data type

    Hi,
    Can someone explain to me what the difference is between the xml data type and the Document data type in workbench? I would like to use the xml datatype in my DSC thinking it is most likely the best representation of an xml string. But I've heard that Document is more widely used and that it can represent an xml entity as well. Is this right?
    My ultimate goal is to write a DSC and use a type that represent an xml string. I would like the component.xml to have the type for my input variables to automatically be typed as "xml" or "document" (whatever the one i should be using is).
    I tried creating variables of both types ("xml' and "document", lower case d) and have those passed into my DSC for inspection. The object passed in are as follows:
    xml: org.apache.xerces.dom.DocumentImpl
    document: com.adobe.idp.Document
    But if I use any of those in my component.xml, workbench is typing my variables as "DocumentImpl" or "Document".
    Any ideas?
    Thanks in advance!
    Nic

    The xml variable (org.w3c.doc.Document) is a native xml data type. That means you can use xml functions and/or xPath expressions on the content of the variable.
    The document variable (com.adobe.idp.Document) is a more generic data type that can store any binary data. If you happen to store xml in that data type, you won't be able to run xml functions or xPath expression directly on the variable content since it's treated as binary data.
    If  you don't need to manipulate or access the content of the xml, then either data types will work. Otherwise, I would use the xml data type.
    In your component xml, make sure your xml data type is set to org.w3c.doc.Document and you'll see xml in Workbench.
    Jasmin

Maybe you are looking for

  • Double clicking an image in Browser view

    I see that the behavior for double clicking an image in Browser view has changed between Aperture 2 & 3. In version 2, double clicking an image would jump from Browser view to zoom in on that image in full screen mode. Now in version 3, double clicki

  • CL_GUI_ALV_TREE  Event CHECKBOX_CHANGE

    Dear Experts, i use a tree control using class cl_gui_alv_tree. All fields of my fieldcatalog are specified as fieldcat-checkbox = 'X' and fieldcat-edit = 'X'. i have a global class zcl...... where i implemeted a method as event_handler for class cl_

  • ECC 5.0 and CRM 7.0 Integration Questions

    Hello, We are on ECC 5.0 and are part of a global implementation that is putting in CRM 7.0. We have a couple of issues/questions. 1.  We want to integrate ECC Internal Orders with CRM Contracts and Orders.  However we don't see the ECC Internal Orde

  • CK24 Not picking the variant

    Hi gurus, I completed for the depot stock (finished goods) costing in without qty structure through KKPAN. For this I used the costing variant MM01. In my company code having another costing variant PPC1. But in the CK24 transaction after clicking on

  • A horrible Norton mistake

    I run my Titanium G4 Powerbook in 9.2.2 sometimes and in OS X 10.3.9 sometimes. Probably about equal time in both. My hard drive has been horribly fragmented and slow. I hadn't run any defragmentation software because, allegedly, OS X defragments the