Keeping entities as entities

I use a DOM builder to parse an xml file, in order to write out the contents in another (non-xml) file. (I could have used xslt as well, I guess.)
My problem is that when I write the data out again, all entities are converted to their "real" meaning - i.e. > in the xml input file becomes > in the output file. That may be nice in some cases, but I don't want it in this case.
So: How can I keep the entities as entities in a DOM application?

That is the responsibility of whatever you are using to write the data. (If you had used XSLT you would not have this question.)

Similar Messages

  • Dom parser replacing entities?

    Hi all,
    If I have a html file with an entity in it, and read it in using the xercies parser, the entity gets replaced with the actual character the entity represents.
    If I then write it out again, it doesn't save the character as an entity.
    Is there any settings so it doesn't replace entities? Am I doing anything wrong?
    thanks,
    Justin

    The entities are just there for the convenience of people creating XML, and XML parsers are required to expand them. The output without entities is exactly equivalent to the input with entities, so there is actually no problem. You aren't doing anything wrong.
    If you absolutely have to preserve the entities (e.g. you have managers who don't understand this XML rule and think that people need to be able to read XML) then you'll have to build your own more detailed tree that keeps track of entities. You can do that by using an XMLReader with a LexicalHandler attached to it; then instead of an ordinary text node, you'll have a complex structure consisting of a list of things that are either text or entities.

  • Update Entities from updated tables URGENT!

    I have just been assigned to clear the mess on a project, where the following happened:
    Tables retrofitted into designer (container 1)
    E-R Diagrams created from retrofitted entities, and then (entities and diagrams) updated
    Entities copied (not completely, just Edit-> Copy) into a new container (container 2), therefore keep relationships with entities in container 1, NO E-R Diagrams on container 2
    Tables created (container 2)
    Tables updated (container 2) (Tables, not entities)And I need to update the entities on container 2 with the changes made to the tables and then update the E-R diagrams (still container 1) to show all the changes that happened.
    First problem: How can I update the entities based on modified tables? Haven't been able to find a way.
    Second problem: Do I have to recreate all the E-R diagrams or someone has an idea that will help me avoid spending the coming weekends solving the mess someone else left?
    Thanks,
    Carlos

    When I was faced with a similar project, I created a single "Entity" (basically a table) that contained my questions and answers:
    LightSwitch Survey: Handling
    Complex Business Logic Using WCF RIA Services
    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
    http://LightSwitchHelpWebsite.com

  • How do I switch from external datasource to LS datasource and keep the same data entities? Need to edit design.

    Hi all,
    I have a LightSwitch desk top application that I wrote back in 2011 right after LightSwitch was available using VS2010 and the necessary extensions.  I am now in the process of trying to upgrade that application using Visual Studio 2013 Version 12.0.30501.00
    Update 2.  The first thing that I do to make my life easier so that I am not re-inventing the wheel is connect to a copy of the original database.  This makes things a bit easier in that I now don't have to re-create my data entities.  However it
    appears that even though this is a copy I cannot edit the design. Are there any flags or properties that I can flip to make the entities editable?
    I need to change the database design.
    Thanks, -ja

    I think you answered your question here. You can edit any part of the database with your SQL skills once you are familiar with Microsoft SQL Server. AND Lightswitch is a Rapid Application Developer tool specially tailored to people who want a simple
    way to visually create some basic databases. That's why I first asked what you wanted to change in your original Database to focus your question on the tool Yann Duram books says you can use to make further edits if you have access to the server. As Dave says
    you can reverse engineer it all I mean its just text files and folders but its a lot of work as well and you have to reprogram each part of the file structure including the .lsml's which hold the basic Entity framework it looks like an XML indented format
    like the following. I only mess with it when I know what to add were because it is a native code to lightswitch.
    <?xml version="1.0" encoding="utf-8"?>
    <ModelFragment xmlns="http://schemas.microsoft.com/LightSwitch/2010/xaml/model">
    <ServiceApplication
    Name="LightSwitchServiceApplication"
    Version="1.0.0.0">
    <ServiceApplication.Attributes>
    <ModuleNamespace
    Namespace="LightSwitchApplication" />
    </ServiceApplication.Attributes>
    </ServiceApplication>
    <DataService
    DataProvider="EntityFrameworkDataProvider"
    EntityContainer="LightSwitchCommonModule:ApplicationData"
    Name="ApplicationDataMapping">
    <EntitySetMapping
    EntitySet="LabPart" />
    <EntitySetMapping
    EntitySet="LabRBCDetail" />
    <EntitySetMapping
    EntitySet="LabOrderDetailsSet">
    <EntitySetMapping.Attributes>
    <SsdlForeignKeyProperty
    Name="LabOrderDetails_LabNames"
    Nullable="False"
    Type="int" />
    <SsdlForeignKeyProperty
    Name="LabOrderDetails_PPIsheet"
    Nullable="False"
    Type="int" />
    <SsdlForeignKeyProperty
    Name="LabOrderDetails_DiagnosisItem"
    Nullable="False"

  • Help with SOAP

    Hi there,
    Hoping to get some help here with an issue I'm stuck on.
    I'm trying to use the Bing Ads Web service in Python (SUDS) and also just using curl.
    I'm able to read in the WSDL file and generate the XML/SOAP output. 
    I feel like there is something minor wrong, just not too sure or familiar with what it might be. 
    Trying to call the following action:  DownloadCampaignsByAccountIds
    I tried to mimic the documentation as much as possible: http://msdn.microsoft.com/en-US/library/jj885755.aspx#request_soap
    Even copying and pasting the XML from the link above and adding my own values in after to make sure.
    I have the XML generated in SUDS but I keep getting a 400 Error: HTTP failed - 400 - Bad Request
    If I use curl and use the example provide as a template I get a slightly different error:
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body><s:Fault>
    <faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</faultcode>
    <faultstring xml:lang="en-US">The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. 
    This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a 
    binding/security mismatch between the sender and the receiver.  
    Check that sender and receiver have the same contract and the same binding 
    (including security requirements, e.g. Message, Transport, None).
    </faultstring></s:Fault></s:Body></s:Envelope> 
    Here is my full XML I am trying to pass to the service:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:ns0="http://schemas.microsoft.com/2003/10/Serialization/Arrays" 
    xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:ns2="https://bingads.microsoft.com/CampaignManagement/v9" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Header>
          <Action mustUnderstand="1">DownloadCampaignsByAccountIds</Action>
          <ApplicationToken i:nil="false"></ApplicationToken>
          <AuthenticationToken i:nil="false"></AuthenticationToken>
          <CustomerAccountId i:nil="false">xxxx</CustomerAccountId>
          <CustomerId i:nil="false">xxxxx</CustomerId>
          <DeveloperToken i:nil="false">xxxxxxxx</DeveloperToken>
          <Password i:nil="false">xxxx</Password>
          <UserName i:nil="false">xxxxxxx</UserName>
       </SOAP-ENV:Header>
       <ns1:Body>
          <ns2:DownloadCampaignsByAccountIdsRequest>
             <ns2:AccountIds>
                <ns0:long>xxxxxxx</ns0:long>
             </ns2:AccountIds>
             <ns2:DataScope>EntityData</ns2:DataScope>
             <ns2:DataScope>EntityPerformanceData</ns2:DataScope>
             <ns2:DataScope>QualityScoreData</ns2:DataScope>
             <ns2:DownloadFileType>Csv</ns2:DownloadFileType>
             <ns2:Entities>Ads</ns2:Entities>
             <ns2:Entities>SiteLinksAdExtensions</ns2:Entities>
             <ns2:Entities>Keywords</ns2:Entities>
             <ns2:Entities>AdGroups</ns2:Entities>
             <ns2:Entities>Campaigns</ns2:Entities>
             <ns2:FormatVersion>2.0</ns2:FormatVersion>
             <ns2:LastSyncTimeInUTC></ns2:LastSyncTimeInUTC>
             <ns2:LocationTargetVersion></ns2:LocationTargetVersion>
             <ns2:PerformanceStatsDateRange>
    <CustomDateRangeEnd i:nil="false">
     <Day></Day>
     <Month></Month>
     <Year></Year>
    </CustomDateRangeEnd>
    <CustomDateRangeStart i:nil="false">
     <Day></Day>
     <Month></Month>
     <Year></Year>
    </CustomDateRangeStart>
                <ns2:PredefinedTime>Yesterday</ns2:PredefinedTime>
             </ns2:PerformanceStatsDateRange>
          </ns2:DownloadCampaignsByAccountIdsRequest>
       </ns1:Body>
    </SOAP-ENV:Envelope>
    Any thoughts or ideas here? I feel like I am close...

    Hello.
    I made the following changes to your SOAP request to get it working. The final working request is pasted below.
    1. Change i:nil to xsi:nil
    2. Use 'ns2' or equivalent for the header elements e.g. ns2:UserName.
    3. Specifiy DataScope as a space delimited list
    4. Specify Entities as a space delimited list
    5. Set last sync time to null, e.g. <ns2:LastSyncTimeInUTC xsi:nil="true" />
    6. Remove custom date range, since you are requesting instead a Predefined time of Yesterday.
    By the way, please also set LocationTargetVersion to Latest and use FormatVersion 3.0 which is the latest version.
    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:ns0="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ns2="https://bingads.microsoft.com/CampaignManagement/v9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <SOAP-ENV:Header>
        <ns2:Action mustUnderstand="1">DownloadCampaignsByAccountIds</ns2:Action>
        <ns2:ApplicationToken xsi:nil="false"></ns2:ApplicationToken>
        <ns2:AuthenticationToken xsi:nil="false"></ns2:AuthenticationToken>
        <ns2:CustomerAccountId xsi:nil="false">***</ns2:CustomerAccountId>
        <ns2:CustomerId xsi:nil="false">***</ns2:CustomerId>
        <ns2:DeveloperToken xsi:nil="false">***</ns2:DeveloperToken>
        <ns2:Password xsi:nil="false">***</ns2:Password>
        <ns2:UserName xsi:nil="false">***</ns2:UserName>
      </SOAP-ENV:Header>
      <ns1:Body>
        <ns2:DownloadCampaignsByAccountIdsRequest>
          <ns2:AccountIds>
            <ns0:long>***</ns0:long>
          </ns2:AccountIds>
          <ns2:DataScope>EntityData EntityPerformanceData QualityScoreData</ns2:DataScope>
          <ns2:DownloadFileType>Csv</ns2:DownloadFileType>
          <ns2:Entities>Ads SiteLinksAdExtensions Keywords AdGroups Campaigns</ns2:Entities>
          <ns2:FormatVersion>3.0</ns2:FormatVersion>
          <ns2:LastSyncTimeInUTC xsi:nil="true" />
          <ns2:LocationTargetVersion>Latest</ns2:LocationTargetVersion>
          <ns2:PerformanceStatsDateRange>
            <ns2:PredefinedTime>Yesterday</ns2:PredefinedTime>
          </ns2:PerformanceStatsDateRange>
        </ns2:DownloadCampaignsByAccountIdsRequest>
      </ns1:Body>
    </SOAP-ENV:Envelope>
    I hope this helps!
    Eric

  • Catching DML Exception in onCommit method, how to revert /rollback?

    Hi,
    JDev 10.1.2, ADF/Struts
    Flow: Registrate -> Confirm -> Message Registrated
    I need to catch Exception/Errors when the problems occur during the commit.
    I added a try catch block but the Exception isn't caught
    so I check to see if there are errors after the doIt gets called.
    Am I missing something?
    Other question, I tried to use the following code to keep the created row after rollback:
    AM.getTransaction().setClearCacheOnRollback(false); // to keep the created entities
    AM.getTransaction().rollback();
    but it seems that the created row is not maintained after a duplicate index exception is caught?
    I added a onCommit method in my ConfirmAction:
    public void onCommit(DataActionContext ctx)
    try {
    if (ctx != null)
    if (ctx.getEventActionBinding() != null)
    ctx.getEventActionBinding().doIt();
    if (this.hasErrors(ctx))
    System.out.println(getClass().getName()+".onCommit after doIt => hasErrors");
    // get application module
    // rollback
    // forward to registrate
    catch (Exception ex) {
    System.out.println(getClass().getName()+".onCommit Exception caught ex: "+ex.toString());
    ex.printStackTrace();
    // No exception caught if problem in Commit
    Thanks for your help
    Fred

    Hi,
    JDev 10.1.2, ADF/Struts
    Flow: Registrate -> Confirm -> Message Registrated
    I need to catch Exception/Errors when the problems occur during the commit.
    I added a try catch block but the Exception isn't caught
    so I check to see if there are errors after the doIt gets called.
    Am I missing something?
    Other question, I tried to use the following code to keep the created row after rollback:
    AM.getTransaction().setClearCacheOnRollback(false); // to keep the created entities
    AM.getTransaction().rollback();
    but it seems that the created row is not maintained after a duplicate index exception is caught?
    I added a onCommit method in my ConfirmAction:
    public void onCommit(DataActionContext ctx)
    try {
    if (ctx != null)
    if (ctx.getEventActionBinding() != null)
    ctx.getEventActionBinding().doIt();
    if (this.hasErrors(ctx))
    System.out.println(getClass().getName()+".onCommit after doIt => hasErrors");
    // get application module
    // rollback
    // forward to registrate
    catch (Exception ex) {
    System.out.println(getClass().getName()+".onCommit Exception caught ex: "+ex.toString());
    ex.printStackTrace();
    // No exception caught if problem in Commit
    Thanks for your help
    Fred

  • Large Report Model SMDL files

    Hello! I am generating and modifying the report model programmatically and it comes out as big
    as 260MB - for over 500 entities with hundreds of attributes in each of them.
    When the report model is being uploaded into Report Manager, the ReportingServicesService.exe spikes up to 4GB in memory usage.
    Of course, sometimes such an amount of memory is not available and the upload fails with OutOfMemory exception
    Also, I cannot open the report model in the BIDS - I get Insufficient Memory exception.
    Why would a 260MB model require 4GB of memory?
    How can I reduce the size of my model and keep all my entities?
    Thanks a lot!!

    Hi aedna,
    Generally, we always see the Insufficient Memory exception when Visual Studio truly runs out of memory. And if we upload 260MB file to Report Manager, the ReportingServicesService.exe spikes up to 4GB in memory usage is a normal phenomenon.  Microsoft
    ASP.NET imposes a maximum size for items that are posted to the server. By default, this limit is 4 megabytes (MB). If you upload or publish a file that exceeds this limit to a report server, you receive an HTTP exception. In this case, you can modify the
    default by increasing the value of the maxRequestLength element in the Machine.config file.
    Besides, a report model is a collection of entities and their relationships that reflects the real-world relationships between business functions and processes. If we want to keep all entities, I think we cannot reduce the model size.
    Thank you for your understanding.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Can I link from Interactive report Page 1 to Master Detail page 2?

    Hi folks-
    I know how to create a Page as an Interactive Report; it creates 2 pages automatically (primary page with the great interactive bar) and a 2nd page that's a single record.
    I know how to create a Page as Master Detail, whereby I get a tabular list without the super interactive bar, and I can select a record, and get transported to a nice page with 2 regions (master on top, detail on bottom).
    I want to have the First page from the Interactive Report, select the record, and go to the 2nd page of a MasterDetail.
    Do I create the Interactive Report, and customize the 2nd page, to add a region?
    Or, do I create both page types, and redirect from the 1st page of the Interactive Report to the DML Form from the MD report? I tried that, re-assigning the link from the Interactive Report to be a Link to Custom Target, and specify the page # of the Master-Detail page. And it is taking me to the right page, but the data from the selected row is not coming with me, and the detail in the bottom region is not appearing at all.
    Can someone please give me a nudge as to the sequence I should be doing?
    (As you can tell, I'm new to Apex.... I'm trying to use it to create a prototype or proof-of-concept for a database driven web application)
    Thank you
    Marion

    Yes, I tried that after I wrote to you - and it's fine, but not what I'm after; it's only based on 1 table and I'm working with 2 tables.
    Perhaps I can explain in better.
    I want one page as an interactive tabular report (of the master records)
    I want to select a row, and transfer to a page that has the corresponding row on top (as a form), and a tabular region below of records from a related detail table.
    ie, I want page 1 from the Interactive Report, and page 2 of the Master Detail report.
    OK - I just took the form page, and added a region below in a tabular report. And I'm getting the data, but I'm getting all the records (not just the ones associated with the single record on top. I figure I need to edit the Region Definition->Source (to specify that the id numbers need to match), but the code is not editable.....
    So I am in Structured Query Attributes, and I've Modified the Join Conditions - but I still get all the detail records in the bottom region. I''m trying to add in the ( + ) qualifier, but it doesn't affect anything...
    I'm soo close to what i'm trying to do!
    Thank you for your continued patience and assistance
    Marion
    here's the Source I have for the region..... (I'm including the excess ID columns just for learning purposes)
    SELECT
    "PHONENUMBERS"."PHONE_ENTITY_ID" "PHONE_ENTITY_ID",
    "ENTITIES"."ENTITY_ID" "ENTITY_ID",
    "ENTITIES"."FIRSTNAME" "FIRSTNAME",
    "ENTITIES"."LASTNAME" "LASTNAME",
    "ENTITIES"."COMPANY" "COMPANY",
    "PHONENUMBERS"."PHONE_ID" "PHONE_ID",
    "PHONENUMBERS"."PHONETYPE" "PHONETYPE",
    "PHONENUMBERS"."PHONENUMBER" "PHONENUMBER",
    "PHONENUMBERS"."PHONECOMMENT" "PHONECOMMENT"
    FROM
    "PHONENUMBERS",
    "ENTITIES"
    WHERE ENTITIES.ENTITY_ID = PHONENUMBERS.PHONE_ENTITY_ID
    Edited by: mtpaper on Oct 12, 2009 1:30 PM
    Edited by: mtpaper on Oct 12, 2009 1:32 PM

  • VARIABLE IN MDX FORMULA

    Hello,
    I have a package which only rund a logic,
    this package enables to select an entity on which the logic will run
    so in my package assign parameters component , i have my prompt
    PROMPT(SELECTINPUT,%MY_ENTITY%,"Enter the entity",,"%ENTITY_DIM%")
    and then
    TASK(Execute formulas,USER,%USER%)
    TASK(Execute formulas,APPSET,%APPSET%)
    TASK(Execute formulas,APP,%APP%)
    TASK(Execute formulas,SELECTION,%SELECTIONFILE%)
    TASK(Execute formulas,FORMULASCRIPT,"*FUNCTION MYENTIY=%MY_ENTITY%")
    TASK(EXECUTE FORMULAS,LOGICFILE,TEST.LGF)
    in my logic, i want to use the entity put in the package in a mdx formula,
    *MEMBERSET(%Ent_R%,"DESCENDANTS(FILTER([ENTITE].MEMBERS,[ENTITE].CURRENTMEMBER.PROPERTIES("ENTITE_REF")=MYENTITY),99,LEAVES)")
    the variable MYENTITY isn't working, so my variable %Ent_R% is corrupted too
    how can i change the syntax in order to include MYENTITY parameter please
    i have tried so many things, i'm stuck
    thanks in advance
    regards
    CL

    Hello,
    First of all, most sincere thanks for replying, i'm stuck and blocked and beginner in logic and have no collegue around me to advice me or help me, and i've tried so many things that i end up mixing them
    the problem is that the follwing syntax
    *MEMBERSET(%Ent_R%,"DESCENDANTS(FILTER([ENTITE].MEMBERS,[ENTITE].CURRENTMEMBER.PROPERTIES("ENTITE_REF")=%ENTITY_SET%),99,LEAVES)")
    isn't validated when i do a "validate and process logic" it rejects me by giving this message
    error in step 1 of QueryCubeAndDebug:-2147217900 Formula error - syntax error - token is not valid: "{DESCENDANTS(FILTER([ENTITE].MEMBERS,[ENTITE].CURRENTMEMBER.PROPERTIES("ENTITE_REF")=^%^ENTITY_SET%),99,LEAVES)}"
    when i put the variable name around commas like ' ' or " "
    this way  for instance
    *MEMBERSET(%Ent_R%,"DESCENDANTS(FILTER([ENTITE].MEMBERS,[ENTITE].CURRENTMEMBER.PROPERTIES("ENTITE_REF")="%ENTITY_SET%"),99,LEAVES)")
    the logic validates, the package runs but no data are written
    in the debuglogicfile, it seems that it doens't recongnize the fact that it is a variable, and put it as string
    i really don't know how to put it

  • Named Query (JOIN query) runs in Toplink JPA but not in EclipseLink

    I have a namedquery in JPA entities like (Entities do not include JOIN colums specifically.. no many-to-many or one-to-many relation in entities)
    select a from table1 a, table2 b where a.id=b.id
    This named query runs on Toplink Essentials without any problem.
    When I run this query using EclipseLink
    EclipseLink generates the query below and gives an error.
    select table1.id, table1.name, table1.surname from table1 t0, table2 t1 where t0.id=t1.id
    There are error _"*table1.surname*"_ is invalid identifier. Because; table1 is not define as an alias, must be "t0.surname".
    How can I solce this problem.
    The code runs on Toplink Essential but not in EclipseLink

    I have a namedquery in JPA entities like (Entities do not include JOIN colums specifically.. no many-to-many or one-to-many relation in entities)
    select a from table1 a, table2 b where a.id=b.id
    This named query runs on Toplink Essentials without any problem.
    When I run this query using EclipseLink
    EclipseLink generates the query below and gives an error.
    select table1.id, table1.name, table1.surname from table1 t0, table2 t1 where t0.id=t1.id
    There are error _"*table1.surname*"_ is invalid identifier. Because; table1 is not define as an alias, must be "t0.surname".
    How can I solce this problem.
    The code runs on Toplink Essential but not in EclipseLink

  • ADF BC naming convention suggestions

    Ok, I havent found too many topics on this matter, but here is a list of naming conventions our team is debating over. I would also like to hear the rest of the community's thoughts.
    Entity: Use underlying table's name and postfix with Eo. If the table is a W view, it should prefix with W.
    eg. EmployeeEo, WEmployeeEo
    View Object (Single entity based): Use the Entity's name postfix with Vo.
    eg. EmployeeVo, WEmployeeVo
    View Object (Multiple entity based): Use the primary entity's name followed by a "busniess task" name.
    eg. DepartmentEmployeeSearchVo (employee search being the task).
    View Object (Non-entity based): Use the primary query table name followed by a "busniess task" name.
    eg.EmployeeCountVo
    View Link & Association: Combine the master entity name and child entity name postfix with Vl/Ao.
    eg. DepartmentEmployeeVl, DepartmentEmployeeAo
    (The issue with this is our legacy tables are not that intuitivly named, so its hard to distinguish the master/child tables. I was thinking of splitting it with lets say 2, like Department2EmployeeVl)
    Application Module: Apply a "busniess process" name and suffix with AppModule.
    eg. AcmeAccountingAppModule.
    If anyone has any suggestions or see any conventions left out please post them.
    Thanks,
    Z

    Without discounting your object name conventions, don't forget the Java package they are placed in helps gives context for the object. This is what I tend to do:
    com.acme.appmodules
    com.acme.entities (all entities)
    com.acme.entities.associations
    com.acme.views (common VOs)
    com.acme.views.links (common VO links)
    com.acme.views.reference (common read only VO lookups)
    com.acme.views.<business task> (to group logical business VOs together)
    com.acme.views.<business task>.links
    ...the last 2 are repeated for each business task area (eg. HR, accounts, etc)
    My ideas partially based on the SRDemo from the JDev team.
    Hope this helps.
    CM.

  • JAXB  I realy need you help

    JAXB I realy need you help
    Dear friend
    We have next structure of XML file
    <order>
    <entities>
    <entity>1</entity>
    <entity>2</entity>
    <entity>3</entity>
    </entities>
    </order>
    according to xml we generate XSD
    after that use xjc.exe for generate JAXB Objects
    Class Order
    Entities entities
    Class Entities
    List<Entity> entity
    but I would like to be like that
    Class Order
    List<Entity> entity
    Class Entities make transient or use JAXB Custome mapping or other decision
    Thanks

    that is the standard way jaxb generates the model classes. i believe there is some sort of experimental "use simple mappings" switch (probably a vendor extension) which makes the xml files cleaner (similar to your desired implementation), but i don't have much experience with it.

  • Bpelz.html trapped at 312:'gZoomSlider' is null or not an object

    I've installed Oracle BPEL Manager 2.1.1 and the designer (2.2) on Windows 2000, and I followed the steps in the orabpel-Tutorial1 (HellowWorldTutorial.pdf) that I downloaded from the OTN page.
    I added a new activity called "getReturnStr", populated the 'to' expression with:
    concat( "Hello ", bpws:getVariableData( 'input', 'payload',
    '/SyncHelloWorld2Request/input' ))
    and populated 'to' with:
    $output/payload/tns:SyncHelloWorld2Response/tns:result
    I clicked on 'Validate BPEL project' and got the above-mentioned error.
    Here's part of the stack trace on the console:
    bpelc> reading partner client's WSDL at c:\eclipse_sdk\bpelz_install\bin\workspa
    ce\SyncHelloWorld2\SyncHelloWorld2.wsdl
    bpelc> done reading wsdl for partner: client
    bpelc> validating "file:/c:/eclipse_sdk/bpelz_install/bin/workspace/SyncHelloWor
    ld2/SyncHelloWorld2.wsdl" ...
    bpelc> validating "c:\eclipse_sdk\bpelz_install\bin\workspace\SyncHelloWorld2\Sy
    ncHelloWorld2.bpel" ...
    bpelc> java.lang.NumberFormatException: For input string: "xA"
    java.lang.NumberFormatException: For input string: "xA"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.
    java:48)
    at java.lang.Integer.parseInt(Integer.java:468)
    at java.lang.Integer.parseInt(Integer.java:518)
    at org.apache.commons.lang.Entities.unescape(Entities.java:683)
    at org.apache.commons.lang.StringEscapeUtils.unescapeXml(StringEscapeUti
    ls.java:523)
    at com.collaxa.cube.xml.xpath.XPathExpressionFactory.create(XPathExpress
    ionFactory.java:60)
    at com.collaxa.cube.lang.compiler.bpel.AssignValidator.assertGeneralExpr
    ession(AssignValidator.java:115)
    at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseFrom(BpelParser.j
    ava:1601)
    at com.collaxa.cube.lang.compiler.bpel.BpelParser.startElement(BpelParse
    r.java:439)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn
    own Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
    Dispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
    known Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at com.collaxa.cube.lang.compiler.bpel.BpelParser.parse(BpelParser.java:
    294)
    at com.collaxa.cube.lang.compiler.bpel.BPELValidator.validate(BPELValida
    tor.java:123)
    at com.collaxa.cube.lang.compiler.bpel.BPELValidator.validateClientSide(
    BPELValidator.java:78)
    at bpelz.editors.BPELEditor.validateBPEL(BPELEditor.java:360)
    at bpelz.editors.BPELEditor$1.run(BPELEditor.java:305)
    at java.lang.Thread.run(Thread.java:534)
    Suggestions appreciated....
    Regards,
    Oswald

    Instead of this string:
    concat( "Hello ", bpws:getVariableData( 'input', 'payload',
    '/SyncHelloWorld2Request/input' ))
    use a one-line string as follows:
    concat( "Hello ", bpws:getVariableData( 'input', 'payload', '/SyncHelloWorld2Request/input' ))
    and the problem is solved...
    Regards,
    Oswald

  • Loading tree data lazily?

    I have a tree to display some ejb3 entities; the entities are
    related to each other in a tree hierarchy. I implement
    ITreeDataDescriptor to load the entities into the tree, which works
    fine. However, when I try to expand a branch node, I got an error
    "PersistenceCollection initializing", because the collections are
    marked to load lazily. So I need to do the following in sequence:
    1. Intercept the branch opening event; (I can do this by
    listening for itemOpening)
    2. Find out which item is being opened;
    3. Load the collection for that item;
    4. Wait till the collection finishes loading, then continue
    with the branch open;
    I can figure out how to do steps 1 and 3, but have no idea
    how 2 and 4 could be done. I appreciate if someone could shed a
    light on this.

    "wt.ustc" <[email protected]> wrote in
    message
    news:gmva76$2mq$[email protected]..
    >I have a tree to display some ejb3 entities; the entities
    are related to
    >each
    > other in a tree hierarchy. I implement
    ITreeDataDescriptor to load the
    > entities
    > into the tree, which works fine. However, when I try to
    expand a branch
    > node, I
    > got an error "PersistenceCollection initializing",
    because the collections
    > are
    > marked to load lazily. So I need to do the following in
    sequence:
    >
    > 1. Intercept the branch opening event; (I can do this by
    listening for
    > itemOpening)
    > 2. Find out which item is being opened;
    > 3. Load the collection for that item;
    > 4. Wait till the collection finishes loading, then
    continue with the
    > branch
    > open;
    >
    > I can figure out how to do steps 1 and 3, but have no
    idea how 2 and 4
    > could
    > be done. I appreciate if someone could shed a light on
    this.
    This might help:
    http://flexdiary.blogspot.com/2009/01/lazy-loading-tree-example-file-posted.html

  • Deserialization / readObject problem

    Hi people
    I am in the making of a simple 2D multiplayer game.
    The server and clients are communicating through ObjectOutput/ Input streams (through Sockets).
    The server contains all the game logic, and it sends a serialized GameData class to the clients
    so they can draw the graphics accordingly to the events in the game.
    The problem is, the client only reads data from its objectinputstream successfully once, then it just doesnt work.
    It seems that after the first call of objectRead() it always just gets the same object with every call of objectRead.
    It is SURE that it the objectRead gets it successfully at least ONCE, because the client draws the graphics of the game after joining, but it doesn't move,
    it's like the client captures the state of the game in the moment of joining.
    There are no exceptions thrown, there are no problems on the serverside(it always writes out different GameData instances by writeObject(GameData)).
    I write the contents of the gd class every time on console after the call of GameData gd=(GameData) In. readObject();
    and it's always the same and hence, the drawn graphics are the same.
    I also write the contents of the sent GameData class every time on console after the call of out.writeObject( GameData instance); on the server side
    and it's always updated accordingly to the logic of the game.
    Please help, the deadline is close!
    while (true) {
                        // Get the game data from the server
                        try {
                             System.out
                                       .println("client: dataupdater class : trying to read data from server");                    
                                            GameData gd = (GameData) In.readObject();               
    //at this point i write out the contents of gd to the console, and it's always the same!!
    //I spare you of that code.
                             setCurrentData(gd);
                             System.out.println("Data read .");
                        catch (SocketException s) {
                             System.out.println("Disconnected from server.");
                        catch (IOException ie) {
                             ie.printStackTrace();
                        catch (Exception e) {
                             System.out.println(e);
                        try {
                             Thread.sleep(15);
                        } catch (InterruptedException e)
                             e.printStackTrace();
              }Also the serverside code, because it cant hurt.
         GameData gd = logic.exportGameData();
              //WRITING OUT THE CONTENTS OF GD, SAME CODE AS IN THE CLIENT
                    System.out.println("Number of entities: " + gd.entities.length);
              for (int i = 0; i < gd.entities.length; i++) {
                   Entity entity = gd.entities;
                   System.out.println(entity.getClass() + " PosX: " + entity.getX()
                             + " PosY: " + entity.getY());
              // synchronized (outputStreams) {
              // For each client ...
              for (Enumeration<ObjectOutputStream> e = getOutputStreams(); e
                        .hasMoreElements();) {
                   // ... get the output stream ...
                   ObjectOutputStream out = (ObjectOutputStream) e.nextElement();
                   // ... and send the message
                   try {
                        out.writeObject(gd);
                        out.flush();
                   } catch (IOException ie) {
                        ie.printStackTrace();
              }Edited by: mostKeltem on Jun 2, 2010 9:47 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    mostKeltem wrote:
    ok, writeShared with reset works well.
    thank you very much, i owe you a beer.
    if you happen to be in Budapest, Hungary any time, come at me for your share of etanol.bummer, would love to go, but can't see it happening any time soon.

Maybe you are looking for

  • IPod is not recognized by my computer's usb port and itunes

    Remove my ipod from the computer without ejecting it and now the ipod want turn on, it is not being recognized by my computer's usb port or itune.  I have reinstalled itune and still have the same problems.

  • ITunes crashed, CD playback messed up

    Well my problem is that I was importing a CD and on the second song form the CD, iTunes froze up for a while, then crashed. Now my CDs play but its slowed down and when its playing a CD the any type of sound from my computer has that warped effect to

  • STO- How to control Over delivery with batch split?

    Dear All, In STO Scenario, how to control the over delivery? I created a PO for the Intra Company stock transfer & Delivery created in the Background with the T Code VL10B. When I am doing picking using T code VL02N, the system is allowing to add  mo

  • Collection of Fully Paid Invoices from AR to Incentive Compensation

    Hello. We have a requirement to calculate commission on fully paid invoices only. In Compensation we are able to collect invoices but there is no restriction on submitting an invoice to calculation when it is not fully paid. For example: I have an AR

  • New set for Report Writer

    Hello, I am new to the Report Writer.  My understanding is that Report Writer makes use of pre-defined sets of financial objects.  My user wants to create new report group in Report Writer and add some new data which are currently in Z-table. Is this