I can not make document over two times

Hello.
When I use the code generated by xmlclassgen_v1_0_0_2, I can not
make document over two times in same class. I modified sample
code(TestWidl.java) that I got from OTN
(xmlclassgen_v1_0_0_2.zip) to check this problem. I modified it
like below. The only modification is that I made XML data two
times. The first call was success, but the second call was
failed. The result of my test program was below:
How can I avoid this error? Would you please help me?
*** Result ****
<
?xml version = '1.0' encoding = 'ASCII'?>
<!DOCTYPE WIDL SYSTEM
"file:/D:/usrs/ikeda/java/myprojects/XML_test1/WIDL_dtd.txt">
<WIDL NAME="WIDL1" VERSION="1.0">
<SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
OUTPUT="File"/>
<BINDING NAME="Binding1" TYPE="Input">
<REGION NAME="Region1" START="Start" EN
D="End"/>
<VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
USAGE="Internal" VALUE="value"/>
<CONDITION REF="CRef1" MATCH="CMatch1" SERVICE="Ser
vice1" TYPE="Success"/>
<VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
USAGE="Header"/>
</BINDING>
<BINDING NAME="Binding2" TYPE="Output">
<CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
<VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
USAGE="Function" MASK="mask"/>
</BIN
DING>
</WIDL>
oracle.xml.parser.XMLDOMException: Node doesn't belong to the
current document
oracle.xml.parser.XMLDOMException: Node doesn't belong to the
current document
at oracle.xml.parser.XMLNode.checkDocument(Compiled
Code)
at oracle.xml.parser.XMLNode.appendChild(Compiled Code)
at oracle.xml.parser.XMLDocument.appendChild(Compiled
Code)
at oracle.xml.parser.XMLNode.appendChild(Compiled Code)
at oracle.xml.classgen.CGDocument.<init>(Compiled Code)
at XML_test1.WIDL.<init>(Compiled Code)
at XML_test1.TestWidl.test(Compiled Code)
at XML_test1.TestWidl.main(TestWidl.java:11)
The sample code that I modified was below:
import oracle.xml.classgen.*;
import oracle.xml.parser.*;
public class TestWidl
public static void main (String args[])
test(); // I modified
test(); //I modified
static void test(){
try
WIDL w1 = new WIDL();
DTD dtd = w1.getDTDNode();
w1.setNAME("WIDL1");
w1.setVERSION(WIDL.VERSION_1_0);
SERVICE s1 = new SERVICE("Service1", "Service_URL");
s1.setINPUT("File");
s1.setOUTPUT("File");
BINDING b1 = new BINDING("Binding1");
b1.setTYPE(BINDING.TYPE_INPUT);
BINDING b2 = new BINDING("Binding2");
b2.setTYPE(BINDING.TYPE_OUTPUT);
VARIABLE v1 = new VARIABLE("Variable1",
VARIABLE.NULLOK_FALSE);
v1.setTYPE(VARIABLE.TYPE_STRING);
v1.setUSAGE(VARIABLE.USAGE_INTERNAL);
v1.setVALUE("value");
VARIABLE v2 = new VARIABLE("Variable2",
VARIABLE.NULLOK_TRUE);
v2.setTYPE(VARIABLE.TYPE_STRING1);
v2.setUSAGE(VARIABLE.USAGE_HEADER);
VARIABLE v3 = new VARIABLE("Variable3",
VARIABLE.NULLOK_FALSE);
v3.setTYPE(VARIABLE.TYPE_STRING2);
v3.setUSAGE(VARIABLE.USAGE_FUNCTION);
v3.setMASK("mask");
CONDITION c1 = new CONDITION("CRef1", "CMatch1");
c1.setSERVICE("Service1");
c1.setTYPE(CONDITION.TYPE_SUCCESS);
CONDITION c2 = new CONDITION("CRef2", "CMatch2");
c2.setTYPE(CONDITION.TYPE_RETRY);
CONDITION c3 = new CONDITION("CRef3", "CMatch3");
c3.setSERVICE("Service3");
c3.setTYPE(CONDITION.TYPE_FAILURE);
REGION r1 = new REGION("Region1", "Start", "End");
b1.addNode(r1);
b1.addNode(v1);
b1.addNode(c1);
b1.addNode(v2);
b2.addNode(c2);
b2.addNode(v3);
w1.addNode(s1);
w1.addNode(b1);
w1.addNode(b2);
//w1.validateContent();
w1.print(System.out);
catch (Exception e)
System.out.println(e.toString());
e.printStackTrace();
null

Satoshi Ikeda (guest) wrote:
: Hello.
: When I use the code generated by xmlclassgen_v1_0_0_2, I can
not
: make document over two times in same class. I modified sample
: code(TestWidl.java) that I got from OTN
: (xmlclassgen_v1_0_0_2.zip) to check this problem. I modified
it
: like below. The only modification is that I made XML data two
: times. The first call was success, but the second call was
: failed. The result of my test program was below:
: How can I avoid this error? Would you please help me?
: *** Result ****
: <
: ?xml version = '1.0' encoding = 'ASCII'?>
: <!DOCTYPE WIDL SYSTEM
: "file:/D:/usrs/ikeda/java/myprojects/XML_test1/WIDL_dtd.txt">
: <WIDL NAME="WIDL1" VERSION="1.0">
: <SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
: OUTPUT="File"/>
: <BINDING NAME="Binding1" TYPE="Input">
: <REGION NAME="Region1" START="Start" EN
: D="End"/>
: <VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
: USAGE="Internal" VALUE="value"/>
: <CONDITION REF="CRef1" MATCH="CMatch1" SERVICE="Ser
: vice1" TYPE="Success"/>
: <VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
: USAGE="Header"/>
: </BINDING>
: <BINDING NAME="Binding2" TYPE="Output">
: <CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
: <VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
: USAGE="Function" MASK="mask"/>
: </BIN
: DING>
: </WIDL>
: oracle.xml.parser.XMLDOMException: Node doesn't belong to the
: current document
: oracle.xml.parser.XMLDOMException: Node doesn't belong to the
: current document
: at oracle.xml.parser.XMLNode.checkDocument(Compiled
: Code)
: at oracle.xml.parser.XMLNode.appendChild(Compiled Code)
: at oracle.xml.parser.XMLDocument.appendChild(Compiled
: Code)
: at oracle.xml.parser.XMLNode.appendChild(Compiled Code)
: at oracle.xml.classgen.CGDocument.<init>(Compiled Code)
: at XML_test1.WIDL.<init>(Compiled Code)
: at XML_test1.TestWidl.test(Compiled Code)
: at XML_test1.TestWidl.main(TestWidl.java:11)
: The sample code that I modified was below:
: import oracle.xml.classgen.*;
: import oracle.xml.parser.*;
: public class TestWidl
: public static void main (String args[])
: test(); // I modified
: test(); //I modified
: static void test(){
: try
: WIDL w1 = new WIDL();
: DTD dtd = w1.getDTDNode();
: w1.setNAME("WIDL1");
: w1.setVERSION(WIDL.VERSION_1_0);
: SERVICE s1 = new SERVICE("Service1", "Service_URL");
: s1.setINPUT("File");
: s1.setOUTPUT("File");
: BINDING b1 = new BINDING("Binding1");
: b1.setTYPE(BINDING.TYPE_INPUT);
: BINDING b2 = new BINDING("Binding2");
: b2.setTYPE(BINDING.TYPE_OUTPUT);
: VARIABLE v1 = new VARIABLE("Variable1",
: VARIABLE.NULLOK_FALSE);
: v1.setTYPE(VARIABLE.TYPE_STRING);
: v1.setUSAGE(VARIABLE.USAGE_INTERNAL);
: v1.setVALUE("value");
: VARIABLE v2 = new VARIABLE("Variable2",
: VARIABLE.NULLOK_TRUE);
: v2.setTYPE(VARIABLE.TYPE_STRING1);
: v2.setUSAGE(VARIABLE.USAGE_HEADER);
: VARIABLE v3 = new VARIABLE("Variable3",
: VARIABLE.NULLOK_FALSE);
: v3.setTYPE(VARIABLE.TYPE_STRING2);
: v3.setUSAGE(VARIABLE.USAGE_FUNCTION);
: v3.setMASK("mask");
: CONDITION c1 = new CONDITION("CRef1", "CMatch1");
: c1.setSERVICE("Service1");
: c1.setTYPE(CONDITION.TYPE_SUCCESS);
: CONDITION c2 = new CONDITION("CRef2", "CMatch2");
: c2.setTYPE(CONDITION.TYPE_RETRY);
: CONDITION c3 = new CONDITION("CRef3", "CMatch3");
: c3.setSERVICE("Service3");
: c3.setTYPE(CONDITION.TYPE_FAILURE);
: REGION r1 = new REGION("Region1", "Start", "End");
: b1.addNode(r1);
: b1.addNode(v1);
: b1.addNode(c1);
: b1.addNode(v2);
: b2.addNode(c2);
: b2.addNode(v3);
: w1.addNode(s1);
: w1.addNode(b1);
: w1.addNode(b2);
: //w1.validateContent();
: w1.print(System.out);
: catch (Exception e)
: System.out.println(e.toString());
: e.printStackTrace();
Move
WIDL w1 = new WIDL();
out of test() and modify it as
public class TestWidl
static WIDL w1 = new WIDL(); ...
and this will work.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
null

Similar Messages

  • Can not make call on face time

    Can not make call on Face time. Mac book pro with mountain lion. Camera ok, face time starts fine, validates apple id ok. Showes list of contacts. when I select one nothing happens!! Face time is on, apple id is ok wi fi is fine (verified with lion macbook pro), also can not access face time preferences, it shows grey????

    try posting in macbook pro forum. or ML

  • TS1424 I have an ipad and an iphone on two seperate itunes account and i can not make an itunes purchase on either device.  I keep getting asked for answers to the securtity question which i never answered in the first place! How do i fix this?

    I have two seperate itunes accounts on two seperate devices and i can not make an itunes purchase on either one. When signing into the account it ask for the  answer to security questions. I have NEVER answered a security question for these accounts.  Each time it is a different set of questions. This has only happend since the original devices have been replaced/upgraded. How do I fix this?   There is money in each account and both have recieved itunes giftcards for christmas that they are unable to use!

    sailsalot wrote:
    I have a new ipad and have used the community to answer questions for myself.  Your help has been great!  I don't know how you got my sailsalot name from my Skype account but I signed in with you as "gags76" and got help with my new ipad.  I discovered I used a different Apple id and password on my ipad from my computer (imac) and changed that.  My e-mail is   Could you email me if there is something I should do at my end.  I have to use itunes to sync with my ipad so I have been going back and forth between the two.  Should I sign in with my proper Apple id on my ipad?
    Yes

  • Can not make FF my default browser...When asked I get "Your computer must be restarted to complete a previous upgrade of FF". When this is done, it's the same thing all over again...

    Can not make FF my default browser...When asked to make, I get "Your computer must be restarted to complete a previous upgrade of FF". After restart, it's the same thing all over again. I have explorer & chrome installed on my PC.
    == This happened ==
    Every time Firefox opened
    == A few monts ago.

    It is probably because you are not properly closing Firefox. Restarting your system would make sure that Firefox had terminated, but you do not have to do that.
    To properly close Firefox on Windows systems, use
    :File > Exit or "Firefox:" button > Exit
    When you get the message "Firefox is already running" it is too late, and you must force termination of Firefox through the Windows Task Manager before restarting Firefox. Windows 7 has a keyboard shortcut to save you a step "Ctrl+Shift+Esc" then on "Processes" tab, select "firefox.exe" and use the "End Process" button. More thorough would be to right-click on the "firefox.exec" and choose "End Process Tree".
    You would find firefox.exe in a Mozilla folder in your program files, but y0u would not want to delete it there, you would need to use the Control Panel which you have already identified and do it from there -- but generally you would not need to do that, and there is nothing in what you have posted to indicate that you should. But if you did do that, then don't let the install start Firefox for you as you would want to use you existing desktop icon or method of starting Firefox, and should decline having Firefox install start Firefox for you. When the install starts then invoke Firefox in your normal manner. This should eliminate problems of creating a new profile rather than using your old profile.

  • I forgot to answer two security questions, and I can not make purchases in app store

    I forgot to answer two security questions, and I can not make purchases in app store

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then the steps half-way down this page should let you reset them : http://support.apple.com/kb/HT5312
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 link above to add a rescue email address for potential future use

  • Hello. I have an iphone 5s and i can not activate imessage nor facetime. I followed all the steps provided by the apple page and still i can not make it connect. The phone is connected to wifi at all times and has ios 8.

    Hello. I have an iphone 5s and i can not activate imessage nor facetime. I followed all the steps provided by the apple page and still i can not make it connect. The phone is connected to wifi at all times and has ios 8.

    Can you send SMS by using the mobile data network instead of Wi-Fi? I had the same problem setting up my 5s from a backup of my 4s. Only after I sent an SMS via mobile data network, somehow iMessage and FaceTime got activated a couple of minutes later without me doing anything else.
    I even changed my Apple ID password, because at one point I could not log into my account when iMessage asked for my account details.
    If you have difficulty activating FaceTime or iMessage - Apple Support

  • Record about my phone (bought in Verizon store and connected to Verizon for 4 years) has been corrupted and now I can not make any changes to my data plan. Several sessions with the technical support and management have not resolved this issue. Each time

    Record about my phone (bought in Verizon store and connected to Verizon for 4 years) has been corrupted and now I can not make any changes to my data plan. Several sessions with the technical support and management have not resolved this issue. Each time technical people and top managers promised that this issue will be resolve tomorrow and they will cal me. Nothing happend!! I can not even cancel my service not just to upgrade it. Completely locked. 
    Any advice?
    Thanks.
    Alex.

    Cannot figure out what your talking about since it makes no sense.
    If you are the account owner you can go to the My Verizon web portal http://www.verizonwireless.com
    You must log in with your cell number and your my Verizon portal password. Not the account pin.
    Once there you can change your plan and services. However repeated incorrect login attempts will lock you out of the site. It a fraud prevention measure.
    1-800-922-0204 call support with your cell number and or account number and account pin and they can assist you.
    If you don't have the information then there is nothing they can do.
    If you can verify who you are they may be able to reset your account access. But only if you are the account owner.
    Good Luck

  • Can not make FaceTime calls but receive face time calls

    Can not make Face Time calls but I can receive Face Time calls

    And to call the person you are trying to call, are you using his/her phone number or his/her apple id (email)?

  • In Word 2004 I can not save documents or quit. One suggestion is the recent security update. Any suggestins on how to fix?

    In Word 2004 I can not save documents or quit. One suggestion is the recent security update. Any suggestins on how to fix?

    Security Update 2012-001 Bricks Rosetta programs
    I've outlined the restore proceedure here, it covers a lot of bases and explains what is going to occur so please don't be intimidated it's a LOT easier that it appears.
    Take your time and comprehend the steps involved and you'll be backup up like before in short order.
    Restore method.
    #1 Backup your personal data off the machine.
    If you get a gray screen or some other hangup upon booting, try holding the Shift key down while booting to enter Safe Mode.
    Backup files off the computer (not to TimeMachine). If you don't have a external drive, get one and connect to the USB/Firewire port and simply drag and drop copy your User folder to the external drive, it will copy all your files. It's best to have two backups of your data off the machine when trying to restore.
    Disconnect all drives now to prevent any mistakes from occuring.
    #2 Try Restoring from a TimeMachine or hold option bootable clone
    If you have TimeMachine drive, or a hold the option key bootable clone use that to erase and restore from before the Security Update occured.
    Obviously if you didn't make a recent backup before the update, your going to have to skip to Step #3.
    Note: A TM restore can take a awfully long time, a clone restore takes under 2 hours in most cases.
    If you don't know how to restore from TM drive
    http://pondini.org/OSX/Home.html
    #3 Reinstall OS X 10.6 from disk
    If no recent TM or bootable clone then:
    Get out your 10.6 install disk and make sure it's clean and polished (very soft cloth and a bit of rubbing alcohol, no scratches) If your disk is borked, you'll have to order a new one from Apple with your serial number.
    Hold c boot off the 10.6 disk (wired keyboard, internal optical drive), use Disk Utility First Aid to >Repair Disk and Permissions of your internal drive  (do not format or erase!!), Quit DU and simply re-install 10.6.
    Note: Simply reinstalling 10.6 version from disk (without erasing the drive) only replaces 10.6.8 with 10.6.x and bundled Apple programs, won't touch your files (backup anyway)  or most programs, unless they installed a kext file into OS X itself. (only a few on average do this)
    Note: If Disk Uitlity can't repair the drive, then come back to seek further assistance and make sure you have a copy of your data off the machine.
    #4 Update to 10.6.8 without Security Update 2012-001
    Reboot and log in, update to 10.6.8 via Software Update, but EXCLUDE THE Security Update 2012-001 by checkinig the details and unchecking the blue check box.
    #5 Reinstall any non-working third party programs
    When you reboot, make sure to reinstall any programs that require kext files installed into OS X, you'll know, they won't work when you launch them or hang for some reason.
    If for some freakish reason you get gray screen at any time when booting (possible it might occur when you reinstall older programs), hold the shift key down while booting (Safe Mode, disables kext files) and update your installed third party software so it's compatible with 10.6.8.
    https://support.apple.com/kb/TS2570
    Note: For most users likley Step #3 and #4 is likley all that is needed to be done.
    That's it really.
    Further Reading:
    Learn how to have a OS X drive restore ability using TimeMachine or cloning software
    Learn how to clone your entire OS X boot here
    http://www.bombich.com/get_ready_for_lion.html
    TimeMachine  help here
    http://pondini.org/OSX/Home.html
    Make copies of your original Snow Leopard
    http://www.walterjessen.com/make-a-bootable-backup-snow-leopard-install-disc/
    Learn how to make a bootable SL USB thumb drive
    http://www.maciverse.com/install-os-x-snow-leopard-from-usb-flash-drive.html
    Deciding on upgrading to Lion?
    Learn which programs ARE NOT compatible/updated for Lion, Rosetta programs will not run on Lion.
    http://roaringapps.com/apps:table
    Unverified hacks
    Note: You may see a "hack" for this issue floating around, it has had mixed results as people's software is different.
    You may want to try it, but it's at your own risk. It has worked fast for some and not at all for others, hopefully over time it will work for all.
    The above methods I outline are Apple approved restore methods + based upon experience here and not a quick fix, but are sure to work as Apple recommends such steps themselves.
    If at any time you feel this is beyond your capability, please seek local Mac/PC professional assistance before you lose your data.
    In fact my steps above are very simple, you might want to have a family member or friend perfrom the proceedure in about a hour or two.
    If you don't have any backup, please maintain at least a TM drive, just hook up a new blank external drive and TM will ask you to make a backup, takes some time so let it work.
    If your a bit more skilled, a option bootable clone is much superior than TM drive.
    Good Luck

  • CS6 can not save files over 2GB???????

    I need to make a giant poster at 6ft wide x 5 ft tall. I created a blank document in CS6 at 200ppi. I created some text, and imported a couple of 25MB images. I am unable to save the file as a .PSD because it indicates that PS can not save files over 2GB.
    1. How did this file grow to become over 2GB?
    2. Why can PS not save a .PSD over 2GB?
    3. What do you do if you need to create a large format print such as this?
    Thanks in advance.

    Very true.
    However, Jeff knows exactly what he's doing and he's very, very good at it.  If your image were fortunate enough to end up being printed by Jeff Schewe, he'd be able to tell you exactly what kind of an image file he wants from you. 
    Always check with the printer.

  • I can not make a wireless bridge in the band 2.4 Linksys wrt1900ac

    I can not make a wireless bridge in the band 2.4 I make the same settings on band 5 and runs perfect

    I'd check to see if the 1900AC can bridge two WiFi connections at the same time. It may only beable to bridge one or the other radio at a time. I know that with the 5Ghz radio is bridged on the 1900AC, the 2.4Ghz radio is running and working as a wireless AP.

  • I updated my phone to the latest version on 4-23-2014 and it is requireing me to plug it into my computer. But I no longer have a computer and Its stuck on this screen. I can not make or recieve calls

    I updated my iPhone  device for thw 7.1.1 update that was avalibe on 4-23-2014. when I did this my phone is prompting me to connect to itunes on my computer. My computer is no longer working and I can not make or recieve calls on my phone.

    Sounds like the device is in recovery mode. You will need to restore the phone. See this support document for instructions. http://support.apple.com/kb/HT1808

  • IOS5.0.1 constant error "iPhone can not make or receive calls.  Restore from iTunes":  I get this message and the phone will no longer work (happend once while on airplain mode and now once while in wifi only area, out of cell range).  help!

    All- I get this message ("iPhone can not make or receive calls. Restore from iTunes" (happend once while on airplain mode and now once while in wifi only area, out of cell range)). iPhone 4.  Newest OS.  Never happened with old OS! Cycling phone on/off does not help.  Ignoring message causes phone to cycle off then on.  After first time this happened, I restored.  Six days later...same problem!  Clearly a new fix is necessary.  Suggestions? 

    I have not tried that...I will look up the process so that I can do it correctly (and still transfer all of my files, contacts, etc).  Any suggestions?  What is the advantage of restoring as a new device..is this more akin to a complete wipe of a hard drive?

  • How can i make calculation in two file using two parameter

    how can i make calculation in two file using two parameter
    Solved!
    Go to Solution.

    i am having two differnt file, both file having no and time , i want to make programme that when, number and tiome is same in both file give that index onle  in , i am going to attached the file
    Attachments:
    iisc11-jan2010extract.txt ‏1253 KB
    sp3.xlsx ‏12 KB

  • I have problem with concoction i can not make call or sms

    I have problem with my i phone 5 i can not make call and sms do please help me

    I think you don't understand the purpose of this forum. This is a user-to-user support forum. You're not talking to Apple. You're not talking to your cellular carrier.
    One last time and then I'm done:
    You need to call your cellular carrier and get this sorted out. No one here can help you.

Maybe you are looking for

  • How do I STOP thunderbird from being the default mail client?

    I recently upgraded my version of thunderbird and it has decided it is to be my default email program. This is really annoying. I use thunderbird for 1 email account and all other email accounts are handled by MS Outlook 2010. How do I tell thunderbi

  • Open Item ,Close Item

    Hi, Can you please tell me , What are open item ,Close Item, Line Item in general terms(so icould understand easily). Thanks, Naresh.

  • AOL always JUNKS mobile me messages

    I have a persistent problem where any and all of my AOL recipients get my messages filtered into Junk Mail. Is the me.com domain always labels JUNK? Is there anyway around this form the senders side?

  • Is there anyway for me to erase all the songs on my ipod?

    is there anyway i can erase all the songs on my ipod? the thing is, im in collage, and i just got home. but i want to delete them all. is there anyway for me to do that with out having to plug it into my computer? ERICA

  • After Effects CS6 display issues

    After Effects is giving me a lot of OpenGL errors and parts of the window and tool icons aren't displaying properly. Is anyone else having this issue? MacBook Pro Retina, Mid 2012 Intel HD Graphics 4000 / NVIDIA GeForce GT 650M