Validating datatypes with JAXB while unmarshalling

Hi,
is there in JAXB any method to check correct datatypes while JAXB unmarshalling
For example, I tried to unmarshall an xml file to objects and in on element of this XML file there was the data "AAAA"
<testElement>AAAA</testElement>
in the XSD Shema this element was declared as type Integer.
After unmarshalling the xml doc I've got an Object with an Attribut testElement which has the value "0" ... so can I test
type while unmarshalling an throw an exception?
Thanks a lot for your help!
with best regards
Rene
Forget it ... problem almost solved ...
Edited by: Gambler79 on Mar 10, 2008 2:48 PM

I'm having what I think is a related problem to what's mentioned in this thread. Has anyone successfully used targetNamespace with JAXB? Below is the sample schema and xml I'm trying to unmarshal via JAXB version 1.02. Any help would be greatly appreciated.
This is the schema:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://foo.com/repository/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://foo.com/repository/"
elementFormDefault="unqualified"
attributeFormDefault="unqualified">
<xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
<xsd:complexType name="PurchaseOrderType">
<xsd:sequence>
<xsd:element name="poText" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
====================================
This is the XML:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<purchaseOrder xmlns="http://foo.com/repository/">
<poText>foo</poText>
</purchaseOrder>
====================================
After calling unmarshal (with appropriate namespace), I get:
DefaultValidationEventHandler: [ERROR]: Unexpected element {http://foo.com/repository/}:poText
Location: line 3 of file:/C:/project/dev/prototype/repository/example/query.xml
javax.xml.bind.UnmarshalException: Unexpected element {http://foo.com/repository/}:poText
Can someone please let me know what I'm doing wrong here?
Thanks.
--S.

Similar Messages

  • Exception while unmarshalling UTF-8 encoded XML String, using JAXB.

    hi folks. First of all, thank you for contributing to my queries as of now.
    Problem statement.
    - This happens when i try to unmarshall a webservice response, which is nothing but a simple UTF-8 encoded XML string in an soap envelope.
    - 0xae is the register character: &reg;.
    - My next step was to ensure that my code works without this character. So I removed all occurances from my XML. It worked just fine...
    - So what do you guys suggest me to get rid of this problem?
    - Any suggestion will be treated as valuable resource.
    - Is there some kind of encoding setting with jaxb ?
    An invalid XML character (Unicode: 0xae) was found in the element content of the document.
    org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xae) was found in the element content of the document.
         at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1273)
         at weblogic.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:603)
         at weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1319)
         at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:396)
         at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:1119)
         at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
         at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:133)
         at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:139)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:129)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:166)
         at com.hp.wwopsit.econfigure.helper.JaxbUtils.xmlStringToJaxbObject(JaxbUtils.java:66)
         at com.hp.wwopsit.econfigure.core.transformation.IPCAdapterMapper.x2oLoadConfig(IPCAdapterMapper.java:376)
         at com.hp.wwopsit.econfigure.core.adapter.IPCAdapter.loadConfiguration(IPCAdapter.java:144)
         at com.hp.wwopsit.econfigure.core.adapter.IPCAdapter.main(IPCAdapter.java:291)
    --------------- linked to ------------------
    javax.xml.bind.UnmarshalException
    - with linked exception:
    [org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xae) was found in the element content of the document.]
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:284)
         at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:143)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:129)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:166)
         at com.hp.wwopsit.econfigure.helper.JaxbUtils.xmlStringToJaxbObject(JaxbUtils.java:66)
         at com.hp.wwopsit.econfigure.core.transformation.IPCAdapterMapper.x2oLoadConfig(IPCAdapterMapper.java:376)
         at com.hp.wwopsit.econfigure.core.adapter.IPCAdapter.loadConfiguration(IPCAdapter.java:144)
         at com.hp.wwopsit.econfigure.core.adapter.IPCAdapter.main(IPCAdapter.java:291)
    ***Jaxb Exception while converting xml file to object. Possible cause, Invalid schema or unrecognized elements in input XML. Actuall exception message:javax.xml.bind.UnmarshalException
    - with linked exception:
    [org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xae) was found in the element content of the document.]
    End..
    Output completed (44 sec consumed) - Normal Termination

    This is how the XML looks like ..
    <?xml version="1.0" encoding="UTF-8" ?>
    - <configresponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <csticShortText>processor</csticShortText>
    - <csticValues>
    - <csticValue id="024" selected="false">
    <desc>Pentium� 4 1.7GHz/400MHz</desc>
    </configresponse>

  • Problem with JAXB Unmarshall - javax.xml.bind.UnmarshalException

    Hi,
    I'm getting an expection while unmarshalling using JAXB. The error is as follows :
    DefaultValidationEventHandler: [ERROR]: unexpected element (uri:"http://www.etrade.com/ee/systemdomainao/search", local:"Context_Id"). Expected elements are <{}contextId>,<{}predicateInterceptor>,<{}isDefaultsearch>,<{}implicitContextSQL>,<{}contextName>,<{}searchId>,<{}implicitContextText>
    I've generated JAXB classes using xjc command from my schema. The root element is Search object which has a List of Searchcontext and Columlist object. When I'm trying to unmarshall the XML, I'm getting the above exception. What is baffling, if I comment out the <tns:SearchContext> entry from the XML, unmarshall doesn't throw any exception and populates the columnlist properly. Columnlist and Searchcontext have little difference except that columnlist contains more elements.
    Here'e the unmarshall code,
    URL metadataURL = this.getClass().getClassLoader().getResource("metadata/search/PARTICIPANT.xml");
    JAXBContext jc = JAXBContext.newInstance("com.etrade.ee.systemdomainao.search.domain");
    Unmarshaller unmarshaller = jc.createUnmarshaller();
    unmarshaller.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
    Search search = (Search)unmarshaller.unmarshal(metadataURL);
    Any pointers will be highly appreciated.
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    XSD :
    XSD :
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.etrade.com/ee/systemdomainao/search" targetNamespace="http://www.etrade.com/ee/systemdomainao/search" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <!-- Searchcontext type definition -->
         <xs:complexType name="Searchcontext">
              <xs:sequence>
                   <xs:element name="Context_Id" type="xs:int"/>
                   <xs:element name="Search_Id" type="xs:string"/>
                   <xs:element name="Context_Name" type="xs:string"/>
                   <xs:element name="Implicit_Context_SQL" nillable="true">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="500"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="Implicit_Context_Text" nillable="true">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="500"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="Is_Defaultsearch" type="xs:boolean" nillable="true"/>
                   <xs:element name="Predicate_Interceptor" type="xs:string" nillable="true"/>
              </xs:sequence>
         </xs:complexType>
         <!-- Searchlist type definition -->
         <xs:complexType name="Columnlist">
              <xs:sequence>
                   <xs:element name="Columnlist_Id" type="xs:int"/>
                   <xs:element name="Search_Id" type="xs:string"/>
                   <xs:element name="Is_Quicksearchable" type="xs:boolean" nillable="true"/>
                   <xs:element name="Is_Advancesearchable" type="xs:boolean" nillable="true"/>
                   <xs:element name="Is_Quicksearchview" type="xs:boolean" nillable="true"/>
                   <xs:element name="Is_Fullview" type="xs:boolean" nillable="true"/>
                   <xs:element name="Is_Sortable" type="xs:boolean" nillable="true"/>
                   <xs:element name="Is_Defaultsort" type="xs:boolean" nillable="true"/>
                   <xs:element name="Default_SortOrder" type="xs:string" nillable="true" minOccurs="0"/>
                   <xs:element name="Display_Order" type="xs:int" nillable="true"/>               
                   <xs:element name="Default_Value" type="xs:string" nillable="true" maxOccurs="6"/>
                   <xs:element name="Default_Operator" type="xs:string" nillable="true"/>
                   <xs:element name="Is_Closedset" type="xs:boolean"/>
                   <xs:element name="Closedset_List_Name" type="xs:string" nillable="true"/>
                   <xs:element name="Is_RelatedMenu" type="xs:boolean" minOccurs="0"/>
                   <xs:element name="Column_Name" type="xs:string"/>
                   <xs:element name="Display_Name" type="xs:string"/>
                   <xs:element name="Is_UDF" type="xs:boolean" nillable="true"/>
                   <xs:element name="Table_Name" type="xs:string"/>
                   <xs:element name="Data_Type" type="xs:string"/>
                   <xs:element name="Column_Size" type="xs:int"/>
              </xs:sequence>
         </xs:complexType>
         <!-- Search declaration -->
         <xs:element name="Search">
              <!--<choice>
         <xs:interface name="java.io.Serializable" />
         </choice>-->
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Search_Id" type="xs:string"/>
                        <xs:element name="Schema_Set">
                             <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                       <xs:maxLength value="20"/>
                                       <xs:minLength value="1"/>
                                  </xs:restriction>
                             </xs:simpleType>
                        </xs:element>
                        <xs:element name="SearchContext" type="tns:Searchcontext" maxOccurs="unbounded"/>
                        <xs:element name="ColumnList" type="tns:Columnlist" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
              <xs:key name="Search_PrimaryKey_1">
                   <xs:selector xpath="."/>
                   <xs:field xpath="tns:Search_Id"/>
              </xs:key>
              <xs:keyref name="Searchcontext_ForeignKey_1" refer="tns:Search_PrimaryKey_1">
                   <xs:selector xpath=".//tns:SearchContext"/>
                   <xs:field xpath="tns:Search_Id"/>
              </xs:keyref>
              <xs:keyref name="Columnlist_ForeignKey_2" refer="tns:Search_PrimaryKey_1">
                   <xs:selector xpath=".//tns:ColumnList"/>
                   <xs:field xpath="tns:Search_Id"/>
              </xs:keyref>
              <xs:key name="Searchcontext_PrimaryKey_1">
                   <xs:selector xpath=".//tns:SearchContext"/>
                   <xs:field xpath="tns:Context_Id"/>
              </xs:key>
              <xs:key name="Columnlist_PrimaryKey_1">
                   <xs:selector xpath=".//tns:ColumnList"/>
                   <xs:field xpath="tns:Columnlist_Id"/>
              </xs:key>
         </xs:element>
    </xs:schema>

  • Namespace error with JAXB

    Hello everyone! This is my problem:
    I am using jaxb to unmarshall a xml file. When I unmarshall, the program doesn�t work at this point:
    JAXBContext jc = JAXBContext.newInstance("com.claynet.core.clom");
    Unmarshaller u = jc.createUnmarshaller();
    u.setValidating(true);
    Clom clom =
    (Clom)u.unmarshal(
    new FileInputStream( ".." + File.separatorChar +
    "webapps"+ File.separatorChar + "claybrary" + File.separatorChar
    + "objetosCLOM" + File.separatorChar + file_name.trim()) );
    The error I get is the following one:
    javax.xml.bind.UnmarshalException: Probably namespace URI of tag "clom" is wrong (correct one is "http://www.clayformacion.com/xsd/clomv1.0")
    - with linked exception:
    [com.sun.msv.verifier.ValidityViolation: Probably namespace URI of tag "clom" is wrong (correct one is "http://www.clayformacion.com/xsd/clomv1.0")]
    The problem seems to be a conflict with the namespace, but the schema has the namespace correctly set:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:clom="http://www.clayformacion.com/xsd/clomv1.0" xmlns="http://www.clayformacion.com/xsd/clomv1.0" targetNamespace="http://www.clayformacion.com/xsd/clomv1.0" elementFormDefault="qualified">
    The validation inside the unmarshalling crash.
    Is there any errors with the code? Can Anyone help me?
    Thanks

    Looks like error is clear namespace mismatch...try changing the following url in wsdl and regen the code
    http://example.ws found http://example.ws/xsd

  • Parsing (skipping) unknown tags with JAXB...

    Does anybody know how can I skip unrecognised tags, during unmarshalling an XML document with JAXB?
    For example : the schema-compliant document is :
    <document>
    <Version>3.20</Version>
    <Account>Account</Account>
    <Password>Password</Password>
    </document>
    and a possible modification would be :
    <document>
    <Version>3.21</Version>
    <unknowntag>aaaabbbb</unknowntag>
    <Account>Account</Account>
    <Password>Password</Password>
    </document>
    (a new unknown tag was introduced).
    so : the document is well-formed anyway (not strictly valid), but the second time a new unknown tag was introduced. I couldn't map it to a Java object (of course, because my data model could not foresee it), but I would like JAXB to skip it and have the program flow behaving exactly as the first case... ignoring this new unknown tag.
    Thanks for any answer anybody could ever give me...
    Emilio.

    Finally I found a workaround to this problem :
    I used an XSL transformation from the incoming document into itself, according to the pattern matching provided by an xsl stylesheet, before giving it to JAXB. Definitely an XSL specular preprocessor (wow! sound cool!).
    That is :
    having an incoming XML document, I write an XSL stylesheet that transforms the original XML document into another XML having the same tags (that is... itself).
    In this way, I can then give to JAXB a resulting XML document that contains ONLY those tags that I was expecting it to elaborate, since all the others (the unknown ones) were discarded by the xsl preprocessor.
    And... that's it.
    In this way I finally wrote an application able to skip unrecognized tags and elaborating by JAXB only the know ones. And that's what I was looking for :-)
    Hope it could help you.
    Bye,
    emils.

  • Validation Errors with new Install of W7 x64 Ent Debug Checker On New Equipment

    I am receiving multiple Errors. I am trying to use the Windows 7 x64 Enterprise which happens to be the Debug Checker version OS as the host machine.  I have only built the machine, and tried to load the Drivers.
    I say this due to the starting issue that upon the loading of the entire driver set, (for the MB, Seagate Harddrive, and Vid Card), I would get the BSOD.  I identified that the Bluetooth driver was the issue.  I then did not load the Bluetooth
    drivers for the MB on the 5<sup>th</sup> or so install of the 7 Ent os.  (Tried Server 2k8 r2. Which is not compatible with the MB Drivers.)
    I have not received a single Update either.  The Auto update feature claims that I am up to date.  I do not believe this due to the fact that any fresh Install of any OS has about several decades of updates and reboots to go through.
    Upon trying the suggestions on the forum about turning off the IE Addons, the errors remain.  Also the results of the sfc /scannow are copied below.
    My Questions
    I am seeking assistance on solving the Errors that have refused to leave me alone , to put it humorously and am asking for your insight and wisdom.  Will you take a look??
    Do I need to go to Win 7 Ent or Ult x64 that is not a Debug Checker version.
    Are there other Microsoft download Registery file checkers besides the MGA Diag tool that are freeware that I can use to check, for corrupted registry files.
    Or do I just need to take it to the stores (Fry’s and Microcenter) that recommended the equipment and have them just reload the software and allow them the headache of solving the error issue, by paying them to install the drivers and have ALL of the
    drivers work. (including the blue tooth)
    The Goal is to turn it into a Active Directory Server using Virtual Box with Server 2k8 R2 running in the virtual box environment.
    Errors and Results.
    There are also a number of logs that show various Crit, Error, and Warning logs.  I will include those if need be.
    This is the majority of the error messages, and I have missed the opportunity to capture others.
    Internet explorer encountered Validation errors:
    Validation Error
    i.     
    Process Name: iexplorer.exe
    ii.     
    Module Name : mshtml.dll
    iii.     
    Assert offset: 0000000000B221DB
    Validation Error
    i.     
    Process Name: iexplorer.exe
    ii.     
    Module Name : comctl32.dl
    iii.     
    Assert offset: 00133A2A
    Validation Error
    i.     
    Process Name: iexplorer.exe
    ii.     
    Module Name : mshtml.dll
    iii.     
    Assert offset: 008BE823
    Validation Error
    i.     
    Process Name: iexplorer.exe
    ii.     
    Module Name : mshtml.dll
    iii.     
    Assert offset: 0040F9E8
    Validation Error
    i.     
    Process Name: iexplorer.exe
    ii.     
    Module Name : iertutil.dll
    iii.     
    Assert offset: 001DEC51
    Validation Error
    i.     
    Process Name: iexplorer.exe
    ii.     
    Module Name : KERNELBASE.dll
    iii.     
    Assert offset: 00014159
    Validation Error
    i.     
    Process Name: iexplorer.exe
    ii.     
    Module Name : mshtml.dll
    iii.     
    Assert offset: 0000000000B221DB
    Microsoft Management Console Encountered a Validation Error
    Validation Error
    i.     
    Process Name: mmc.exe
    ii.     
    Module Name : ieframe.dll
    iii.     
    Assert offset: 00000000006C9283
    Scripted Diagnostics Native Hot encountered a Validation Error
    Validation Error
    i.     
    Process Name: sdiagnhost.exe
    ii.     
    Module Name : urlmon.dll
    iii.     
    Assert offset: 00000000001A0A73
    Validation Error
    i.     
    Process Name: sdiagnhost.exe
    ii.     
    Module Name : KERNELBASE.dll
    iii.     
    Assert offset: 0000000000017f32
    Windows System Assessment Tool encountered a validation error
    Validation Error
    i.     
    Process Name: winsat.exe
    ii.     
    Module Name : KERNELBASE.dll
    iii.     
    Assert offset: 0000000000017F32
    Windows Explorer Encountered a validation Error
    Validation Error
    i.     
    Process Name: Explored.exe
    ii.     
    Module Name : thumbcache.dll
    iii.     
    Assert offset: 00000000000300BE
    AI Suite 2 encountered a validation error
    Validation Error
    i.     
    Process Name: AI Suite 2.exe
    ii.     
    Module Name : ntdll.dll
    iii.     
    Assert offset: 000686BD
    the number “2” is the substitutedfor the roman numeral 2
    I believe that this is part of the MB Suite.
    My the environment is a new equipment, and Downloaded student software. Windows 7 Enterprise SPK 1 Debug Checker, Valid Key with the software download.  Activated on 8-12-2012
    Motherboard: Asus p9x79 Deluxe, Part number: 90-mibh50-g0aay0kz
    Chip Set: bx80619i73930k
    2x Memory: cmx16gx3m2a1600c11 Corsair
    Video Card: Diamond R7870 2GB DD OC 2xDVI/HDMI/2xDisplayport memory Clock 1250 MHz
    Hard Drive: 9jb1n3-574 (leave the last two didgets off when searching in the browser) This is a Seagate 2TB
    Generic optic drive: SH-222bb/bebe Samsung
    Here is the Microsoft Fix It error code
    Assertion Failed!
    Program:…
    File: d:\w7rtm\ds\security\cryptoapi\pki\...\newstor.cpp
    Line: 2131
    Expression: pStore->dwState = = STORE_STATE_OPEN || pStore->dwState = = STORE_STATE_OPENING || pStore->dwState = = STORE_STATE_DEFER_CLOSING || pStore->dwState = = STORE_STATE_NULL
    For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts
    (Press Retry to debug the application – JIT must be enabled)
                    Abort    Retry     Ignore
    Abort
    Closes the program
    Retry
    Repeats the error
    Verbatim
    Ignore
    Closes the program
    Nothing happens
    Here is the Microsoft Genuine Advantage Diagnostic Report
    Diagnostic Report (1.9.0027.0):
    Windows Validation Data-->
    Validation Code: 0
    Cached Online Validation Code: N/A, hr = 0xc004f012
    Windows Product Key: *****-*****-*****-*****-8C7YB
    Windows Product Key Hash: cezvXJ2/mUhIEFxJfWkZ3IN8EQQ=
    Windows Product ID: 55041-146-2397786-86942
    Windows Product ID Type: 6
    Windows License Type: Volume MAK
    Windows OS version: 6.1.7601.2.00010100.1.0.004
    ID: {EBD85729-DBBB-479F-AB15-EBC0DDE0CC28}(1)
    Is Admin: Yes
    TestCab: 0x0
    LegitcheckControl ActiveX: N/A, hr = 0x80070002
    Signed By: N/A, hr = 0x80070002
    Product Name: Windows 7 Enterprise
    Architecture: 0x00000009
    Build lab: 7601.win7sp1_rtm.101119-1850
    TTS Error:
    Validation Diagnostic:
    Resolution Status: N/A
    Vista WgaER Data-->
    ThreatID(s): N/A, hr = 0x80070002
    Version: N/A, hr = 0x80070002
    Windows XP Notifications Data-->
    Cached Result: N/A, hr = 0x80070002
    File Exists: No
    Version: N/A, hr = 0x80070002
    WgaTray.exe Signed By: N/A, hr = 0x80070002
    WgaLogon.dll Signed By: N/A, hr = 0x80070002
    OGA Notifications Data-->
    Cached Result: N/A, hr = 0x80070002
    Version: N/A, hr = 0x80070002
    OGAExec.exe Signed By: N/A, hr = 0x80070002
    OGAAddin.dll Signed By: N/A, hr = 0x80070002
    OGA Data-->
    Office Status: 109 N/A
    OGA Version: N/A, 0x80070002
    Signed By: N/A, hr = 0x80070002
    Office Diagnostics: 025D1FF3-364-80041010_025D1FF3-229-80041010_025D1FF3-230-1_025D1FF3-517-80040154_025D1FF3-237-80040154_025D1FF3-238-2_025D1FF3-244-80070002_025D1FF3-258-3
    Browser Data-->
    Proxy settings: N/A
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Win32)
    Default Browser: c:\Program Files (x86)\Internet Explorer\iexplore.exe
    Download signed ActiveX controls: Prompt
    Download unsigned ActiveX controls: Disabled
    Run ActiveX controls and plug-ins: Allowed
    Initialize and script ActiveX controls not marked as safe: Disabled
    Allow scripting of Internet Explorer Webbrowser control: Disabled
    Active scripting: Allowed
    Script ActiveX controls marked as safe for scripting: Allowed
    File Scan Data-->
    File Mismatch: C:\Windows\system32\wat\watadminsvc.exe[Hr = 0x80070003]
    File Mismatch: C:\Windows\system32\wat\npwatweb.dll[Hr = 0x80070003]
    File Mismatch: C:\Windows\system32\wat\watux.exe[Hr = 0x80070003]
    File Mismatch: C:\Windows\system32\wat\watweb.dll[Hr = 0x80070003]
    Other data-->
    Office Details: <GenuineResults><MachineData><UGUID>{EBD85729-DBBB-479F-AB15-EBC0DDE0CC28}</UGUID><Version>1.9.0027.0</Version><OS>6.1.7601.2.00010100.1.0.004</OS><Architecture>x64</Architecture><PKey>*****-*****-*****-*****-BBBBB</PKey><PID>55041-146-2397786-86942</PID><PIDType>6</PIDType><SID>S-1-5-21-4234423899-2489109333-1931045272</SID><SYSTEM><Manufacturer>System
    manufacturer</Manufacturer><Model>System Product Name</Model></SYSTEM><BIOS><Manufacturer>American Megatrends Inc.</Manufacturer><Version>1103</Version><SMBIOSVersion major="2" minor="7"/><Date>20120409000000.000000+000</Date></BIOS><HWID>CFBA3607018400F2</HWID><UserLCID>0409</UserLCID><SystemLCID>0409</SystemLCID><TimeZone>Pacific
    Standard Time(GMT-08:00)</TimeZone><iJoin>0</iJoin><SBID><stat>3</stat><msppid></msppid><name></name><model></model></SBID><OEM/><GANotification/></MachineData><Software><Office><Result>109</Result><Products/><Applications/></Office></Software></GenuineResults> 
    Spsys.log Content: 0x80070002
    Licensing Data-->
    Software licensing service version: 6.1.7601.17514
    Name: Windows(R) 7, Enterprise edition
    Description: Windows Operating System - Windows(R) 7, VOLUME_MAK channel
    Activation ID: 9abf5984-9c16-46f2-ad1e-7fe15931a8dd
    Application ID: 55c92734-d682-4d71-983e-d6ec3f16059f
    Extended PID: 55041-00172-146-239778-03-1033-7601.0000-2252012
    Installation ID: 000792957432055771547065313840421702569731971164600080
    Processor Certificate URL: http://go.microsoft.com/fwlink/?LinkID=88338
    Machine Certificate URL: http://go.microsoft.com/fwlink/?LinkID=88339
    Use License URL: http://go.microsoft.com/fwlink/?LinkID=88341
    Product Key Certificate URL: http://go.microsoft.com/fwlink/?LinkID=88340
    Partial Product Key: 8C7YB
    License Status: Licensed
    Remaining Windows rearm count: 5
    Trusted time: 8/12/2012 5:47:25 PM
    Windows Activation Technologies-->
    HrOffline: 0x00000000
    HrOnline: N/A
    HealthStatus: 0x0000000000000000
    Event Time Stamp: N/A
    ActiveX: Not Registered - 0x80040154
    Admin Service: Not Registered - 0x80040154
    HealthStatus Bitmask Output:
    HWID Data-->
    HWID Hash Current: OAAAAAEAAgABAAEAAgACAAAABAABAAEAHKJu3XDSdMRkx4ieoGkwung0ipvkrmTRDIsORc6qNCE=
    OEM Activation 1.0 Data-->
    N/A
    OEM Activation 2.0 Data-->
    BIOS valid for OA 2.0: yes, but no SLIC table
    Windows marker version: N/A
    OEMID and OEMTableID Consistent: N/A
    BIOS Information:
      ACPI Table Name           OEMID Value     OEMTableID Value
      APIC                                    ALASKA                               
    A M I
      FACP                                   ALASKA                               
    A M I
      HPET                                    ALASKA                               
    A M I
      MCFG                                 ALASKA                               
    OEMMCFG.
      SSDT                                    AMICPU                              
    PROC
    Scan Now Results
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    C:\Windows\system32>sfc /scannow
    Beginning system scan.  This process will take some time.
    Beginning verification phase of system scan.
    Verification 100% complete.
    Windows Resource Protection did not find any integrity violations.
    C:\Windows\system32>

    Thank you for your valuable time.
    I have performed the Chkdsk and the memory Diagnostic tool as per the suggestions.
    The Memory Tool did not find anything amiss.
    As per another thread I am going to try flashing the bios as well with the updates.
    Following are the Chkdsk results.
    Are there any other suggestions?
    Chkdsk Results
    Checking file system on C:
    The type of the file system is NTFS.
    A disk check has been scheduled.
    Windows will now check the disk.                        
    CHKDSK is verifying files (stage 1 of 5)...
      89600 file records processed.                               
              File verification completed.
      221 large file records processed.                                     
    0 bad file records processed.                                       
    1596 EA records processed.                                             
    44 reparse records processed.                                      
    CHKDSK is verifying indexes (stage 2 of 5)...
      131874 index entries processed.                                        
    Index verification completed.
      0 unindexed files scanned.                                           0
    unindexed files recovered.                                       CHKDSK
    is verifying security descriptors (stage 3 of 5)...
      89600 file SDs/SIDs processed.                                        
    Cleaning up 36 unused index entries from index $SII of file 0x9.
    Cleaning up 36 unused index entries from index $SDH of file 0x9.
    Cleaning up 36 unused security descriptors.
    Security descriptor verification completed.
      21138 data files processed.                                           
    CHKDSK is verifying Usn Journal...
      36120296 USN bytes processed.                                            
    Usn Journal verification completed.
    CHKDSK is verifying file data (stage 4 of 5)...
      89584 files processed.                                                
    File data verification completed.
    CHKDSK is verifying free space (stage 5 of 5)...
      476262075 free clusters processed.                                        
    Free space verification is complete.
    Windows has checked the file system and found no problems.
    1953410047 KB total disk space.
      48065140 KB in 61610 files.
         43468 KB in 21139 indexes.
             0 KB in bad sectors.
        253139 KB in use by the system.
         65536 KB occupied by the log file.
    1905048300 KB available on disk.
          4096 bytes in each allocation unit.
     488352511 total allocation units on disk.
     476262075 allocation units available on disk.
    Internal Info:
    00 5e 01 00 ef 42 01 00 ef 95 02 00 00 00 00 00  .^...B..........
    e3 00 00 00 2c 00 00 00 00 00 00 00 00 00 00 00  ....,...........
    6d 00 75 00 69 00 00 00 00 00 00 00 00 00 00 00  m.u.i...........
    Windows has finished checking your disk.
    Please wait while your computer restarts.

  • Problem validating xml file - jaxb

    hi people, I'm working with jaxb to generate Java source classes from the .xsd schemas that I have. I work with 17 schemas that, a priori, I can't modify. In those schemas there are a lot of types and structures that I can use when creating an .xml file. I've read other threads with the problem of namespaces but as a solution they provide a modification on the schemas. The generation of java source is ok, I've done custoization classes and no problem, but when I try to unmarshal an input xml file I get an error of validation:
    DefaultValidationEventHandler: [ERROR]: Probably namespace URI of tag "XFFile" is wrong (correct one is "http://ww........
    A possible xml file is :
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE XFFile><XFFile xmlns:rp210Elements="http://www.smpte-ra.org/schemes/434/200X/multiplex/S377M/2004" xmlns:s377mGroups="http://www.smpte-ra.org/schemes/434/200X/groups/S377M/2004" xmlns:s377mMux="http://www.smpte-ra.org/schemes/434/200X/multiplex/S377M/2004" xmlns:s377mTypes="http://www.smpte-ra.org/schemes/434/200X/types/S377M/2004" xmlns:s380mGroups="http://www.smpte-ra.org/schemes/434/200X/groups/S380M/2004" xmlns:s381mGroups="http://www.smpte-ra.org/schemes/434/200X/groups/S381M/200X" xmlns:s382mGroups="http://www.smpte-ra.org/schemes/434/200X/groups/S382M/200X" xmlns:s385mGroups="http://www.smpte-ra.org/schemes/434/200X/groups/S385M/2004" xmlns:s422mGroups="http://www.smpte-ra.org/schemes/434/200X/groups/S422M/200X" xmlns:s422mTypes="http://www.smpte-ra.org/schemes/434/200X/types/S422M/200X" xmlns:s423mGroups="http://www.smpte-ra.org/schemes/434/200X/groups/S423M/200X">
         <s380mGroups:ClipFramework rp210Elements:InstanceID="a6.67.7a.47.19.2f.4b.10.8f.ee.1e.59.6d.4c.f1.70" rp210Elements:LinkedGenerationID="0e.10.a8.9c.96.1c.4c.11.b1.fb.0a.a9.40.22.a4.e2">
              <rp210Elements:ClipCreationDateTime>
                   <rp210Elements:Year>2006</rp210Elements:Year>
                   <rp210Elements:Month>4</rp210Elements:Month>
                   <rp210Elements:Day>18</rp210Elements:Day>
                   <rp210Elements:Hour>12</rp210Elements:Hour>
                   <rp210Elements:Minute>0</rp210Elements:Minute>
                   <rp210Elements:Second>0</rp210Elements:Second>
                   <rp210Elements:mSec4>0</rp210Elements:mSec4></rp210Elements:ClipCreationDateTime>
              <rp210Elements:FrameworkExtendedTextLanguageCode>fr</rp210Elements:FrameworkExtendedTextLanguageCode>
         </s380mGroups:ClipFramework>
    </XFFile>
    I think it's ok because someone has provided it to my company but I can't validate it because it takes elements from many schemas (am I wrong and I can?)
    i can't post the schemas because of the copyrights (damn it). I'm not asking for a solution but if someone has an idea or has had a similar problema.. I'll appreciate all comments, thanks
    Jordi
    Message was edited by:
    WuWei

    In the schema root element xs:schema add namespace declaration.
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    In the XML document root element add xmlns:xsi and xsi:noNamespaceSchemaLocation attributes.
    <root_element xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file://c:/testing.xsd">

  • Marshalling HashMap with JAXB 2.0 - empty tags & ill schema

    Hi all,
    I expected JAXB 2.0 to be capable to handle basic classes like HashMap, but it does not look so. I have two classes: SimpleNegotiationManager which has a property HashMap in which are stored the instances of SimpleInitiatedConversation:
    package xml;
    import javax.xml.bind.annotation.*;
    import java.util.HashMap;
    @XmlAccessorType(AccessType.FIELD)
    @XmlRootElement
    public class SimpleNegotiationManager {
        @XmlElement
        protected HashMap<String, SimpleInitiatedConversation> initiatedConversations;
        public SimpleNegotiationManager() {
        public HashMap<String, SimpleInitiatedConversation> getInitiatedConversations() {
            if (initiatedConversations == null) {
                initiatedConversations = new HashMap();
            return initiatedConversations;
        public void setInitiatedConversations(HashMap<String, SimpleInitiatedConversation> initiatedConversations) {
            this.initiatedConversations = initiatedConversations;
    }and
    package xml;
    import javax.xml.bind.annotation.*;
    import java.util.ArrayList;
    import java.util.List;
    @XmlAccessorType(AccessType.FIELD)
    @XmlType
    public class SimpleInitiatedConversation {
        @XmlElement
        protected List<String> messages;
        protected String conversationID;
        protected int protocolState;
        public SimpleInitiatedConversation() {
        public List<String> getMessages() {
            if (messages == null) {
                messages = new ArrayList();
            return messages;
        public void setMessages(List<String> messages) {
            this.messages = messages;
        public int getProtocolState() {
            return protocolState;
        public void setProtocolState(int protocolState) {
            this.protocolState = protocolState;
        public String getConversationID() {
            return conversationID;
        public void setConversationID(String conversationID) {
            this.conversationID = conversationID;
    }When I marshalled SimpleNegotiationManager while the HashMap was filled with several <String,SimpleInitiatedConversation> entries, in the output were empty tags initiatedConversations:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <simpleNegotiationManager>
      <initiatedConversations>
      </initiatedConversations>
    </simpleNegotiationManager>When I used schemagen to generate a schema, it produced:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:complexType name="simpleInitiatedConversation">
        <xs:sequence>
          <xs:element name="messages" type="xs:string" maxOccurs="unbounded" minOccurs="0"/>
          <xs:element name="conversationID" type="xs:string" minOccurs="0"/>
          <xs:element name="protocolState" type="xs:int"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="simpleNegotiationManager" type="simpleNegotiationManager"/>
      <xs:complexType name="simpleNegotiationManager">
        <xs:sequence>
          <xs:element name="initiatedConversations" type="hashMap" minOccurs="0"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="hashMap">
        <xs:complexContent>
          <xs:extension base="abstractMap">
            <xs:sequence/>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:complexType name="abstractMap" abstract="true"/>
    </xs:schema>Particularly the description of HashMap seems ill - there is not specified that the HashMap has keys String and values SimpleInitiatedConversation.
    Unfortunatelly, the j2s-xmlAdapter-field example available with JAXB 2.0 is more complicated than I need. I just need to store/load HashMap into/from XML and I do not care what it looks like. Is it possible to avoid extending XmlJavaTypeAdaptor for a simple storing a HashMap into XML? Perhaps I use improper annotations in the source code, but I cannot get it working. Any clue?

    Ok i figured out one way of doing this by using some classes from JAXP...
    SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Schema s = null;
    try{
        s = sf.newSchema(new File("Sources/schema/test.xsd"));                    
    }catch(Exception e){
        System.err.println("Exception e: " + e.getMessage());
    marshaller.setSchema(s);
    //MyValidationHandler class implements the ValidationEventHandler interface
    MyValidationHandler gv = new MyValidationHandler();
    marshaller.setEventHandler(gv);If anyone has something to add let me know!!

  • How to handle "xsd:anyAttributes" with jaxb

    Need help for how to handling "xsd:anyAttribute" with jaxb!
    Here is part of my xml schema.
    <xsd:attributeGroup name="DataAttributes">
    <xsd:anyAttribute namespace="##local" processContents="lax"/>
    </xsd:attributeGroup>
    <xsd:element name="Data">
    <xsd:complexType>
         <xsd:attributeGroup ref="DataAttributes"/>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="MA_Verify">
    <xsd:complexType>
         <xsd:sequence>
         <xsd:element ref="Data" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
         <xsd:attributeGroup ref="verifyAttributes"/>
    </xsd:complexType>
    </xsd:element>
    I have an application which only knows the attribute names and values at runtime. (Thest attributes are string.) Therefore, I cannot define attribute names in the schema and have to use xsd:anyAttribute.
    I was able to generate all jaxb code. However, the interfaces generated for Data and DataType are basically all empty. The impl classes are empty too, since no get or set methods exist for the attribute.
    Some thoughts for handling this case, but do not know if it will work.
    (1) write some derive classes on top of the generated jaxb classes.
    (2) write customized method to handle the 'Data' element level and its attributes. Similar to parseMethod or printMethod for the javaType.
    (if there is a way)
    Can anyone give me suggestions, directions or an laternate way to handle the situation?
    Your help will be greatly appreciated.
    Ruth

    xsd:anyAttribute is not supported by JAXB.
    http://java.sun.com/xml/jaxb/users-guide/jaxb-works.html#unsupported

  • XML (un)marshalling with JAXB and "any" blocks

    I have 2 very simple XSD schema's.
    SchemaA.xsd:
    [request]-------[element_A] is xs:string
    |__(ANY)
    SchemaB.xsd:
    [body]--------[element_B] is xs:string
    The any block says that there can follow any type of xml after the element_a.
    In the xsd it is coded as: <xs:any />
    I compiled both schema's with jaxb, using this command line:
    xjc SchemaA.xsd -p test.request
    xjc SchemaB.xsd -p test.body -use-runtime test.request.impl.runtime
    I created the following code :
    test.request.ObjectFactory of1 = new test.request.ObjectFactory();
    test.body.ObjectFactory of2 = new test.body.ObjectFactory();
    Request r = of1.createRequest();
    r.setElementA("testing, element one");
    Body b = of2.createBody();
    b.setElementB("testing, element two");
    r.setAny(b);
    Marshaller m = of1.createMarshaller();
    m.marshal(r,System.out);
    And the result is what I expected:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <request><element_a>testing, element one</element_a><body><element_b>testing, element two</element_b></body></request>
    JAXB added the xml from the second schema to the first.
    Ok, so far so good. Now I'm trying to do it the other way around, I want to unmarshall that XML to objects again:
    String xml <- contains the outputted xml from the marshall (as pasted a few lines above)
    Unmarshaller um = of1.createUnmarshaller();
    Request r2 = (Request)um.unmarshal(new ByteArrayInputStream(xml.getBytes()));
    System.err.println(r2.getElementA());
    System.err.println(r2.getAny());
    The output:
    testing, element one
    null
    now, the first message is good. The second is not however...why is the "getAny" null ? I can't figure this one out. In the best possible case it should return an object that can be cast to "Body" .
    In the worst case it should just return the "<Body> ...." xml as string. But not null ...
    Any help on this is appreciated !

    JAXB does not support xs:any

  • Failure while unmarshalling message: Failed to transform MFL content

    hi ,
    I am performing Flat to XML message transformation using OSB.
    I have made a MFL using format builder and imported that MFL into my proxy service (Request Message type).
    now when i am trying to run my proxy service.its Showing error "Failure while unmarshalling message: Failed to transform MFL content from binary to XML".
    I have tested my MFL Using format tester and it is giving desired transformed output(FLAT to XML).
    Please let me know if anybody knows the possible cause.
    Thanks in advance.

    http://biemond.blogspot.com/2008/12/flat-file-to-xml-with-oracle-service.html
    OSB: issue with MFLTransform: Error transforming CSV file to XML
    http://kr.forums.oracle.com/forums/thread.jspa?threadID=867859
    Regards,
    Anuj

  • Validation issues with form (was: Validation)

    I am having validation issues with my form.  Even after I put in a name and last name it says the entries are invalid.  Could this be a hosting problem?  www.bussmanncomputers.net/Nx

    Below is mail form from my isp, which is Godaddy:
    This is the form that I am having some problems with configuring.
    <?php
    if ( !isset($_SERVER['SPI'])) {
            die();
    if (!isset($_SERVER['DOCUMENT_ROOT'])) {
            echo("CRITICAL: we seem to be running outside of the norm.\n");
            header("Location: http://".$_SERVER["HTTP_HOST"]."/");
            die("CRITICAL: Document root unavailable.\n");
    $request_method = $_SERVER["REQUEST_METHOD"];
    if($request_method == "GET") {
            $query_vars = $_GET;
    elseif ($request_method == "POST") {
            $query_vars = $_POST;
    reset($query_vars);
    function customsort($a,$b) {
            // $a is array for form vars, $b is comma seperated case sensitive field order
            // this is case sensitive -- good idea to hrc that.
            $data = array();
            if ( strstr($b,',') == FALSE )  {
                    $b = $b.",";
            $ordering = split(',',$b);
            foreach ($ordering as $orderitem) {
                    if ( ($orderitem != null) && ($orderitem != "") ) {
                            if (isset($a[$orderitem])) {
                                    $data[$orderitem] = $a[$orderitem];
            foreach ($a as $key=>$val) {
                    $data[$key] = $a[$key];
            return $data;
    function xmlentities($string) {
            return str_replace ( array('&', '"', "'", '<', '>'), array('&amp;', '&quot;', '&apos;', '&lt;', '&gt;'), $string);
    $t = date("U");
    $formhomedir = preg_replace('/.*\/home\/content/','',$_SERVER['DOCUMENT_ROOT']);
    $formhomedir = explode('/',$formhomedir);
    if (count($formhomedir) <= 4) {
            $formhome="/home/content/".$formhomedir[1]."/".$formhomedir[2]."/data/";
    else {
            $formhome="/home/content/".$formhomedir[1]."/".$formhomedir[2]."/".$formhomedir[3]."/".$f ormhomedir[4]."/data/";
    $file_order = ".default";
    $file_format = ".text";
    $file_interval = ".15m";
    $field_order = "";
    if (isset($query_vars['form_order'])) {
            if ($query_vars['form_order'] != "alpha") {
                    $field_order=$query_vars['form_order'];
                    $file_order=".custom";
                    $query_vars = customsort($query_vars,$field_order);
            else {
                    switch ($query_vars['form_order']) {
                            case "alpha":
                                    uksort($query_vars,'strnatcasecmp');
                                    $file_order=".alpha";
                            break;
                            default:
                                    $file_order=".default";
                            break;
    if (isset($query_vars['form_format'])) {
            switch ($query_vars['form_format']) {
                    case "csv":
                            $file_format = ".csv";
                    break;
                    case "html":
                            $file_format = ".html";
                    break;
                    case "xml":
                            $file_format = ".xml";
                    break;
                    case "text":
                    case "default":
                    default:
                            $file_format = ".text";
                    break;
    if (isset($query_vars['form_delivery'])) {
            switch ($query_vars['form_delivery']) {
                    case "hourly":
                            $file_interval = ".60m";
                    break;
                    case "hourly_digest":
                            $file_interval = ".60mc";
                    break;
                    case "daily":
                            $file_interval = ".24h";
                    break;
                    case "daily_digest":
                            $file_interval = ".24hc";
                    break;
                    case "digest":
                            $file_interval = ".15mc";
                    break;
                    case "default":
                    default:
                            $file_interval = ".15m";
                    break;
    $file = $formhome."form_".$t.$file_order.$file_format.$file_interval;
    $fp = fopen($file,"w");
    reset($query_vars);
    switch ($file_format) {
            case ".csv":
                    $csvkeys = "";
                    $csvvals= "";
                    $firsttime = "";
                    while (list ($key, $val) = each ($query_vars)) {
                            if ( ($key == "form_order") ||
                                    ($key == "form_format") ||
                                    ($key == "form_delivery") ||
                                    ($key == "redirect") ) {
                            else {
                                    if ($csvkeys != "") {
                                            $firsttime=",";
                                    $tmpkey=escapeshellcmd($key);
                                    $csvkeys = $csvkeys.$firsttime."'".$tmpkey."'";
                                    $tmpval=escapeshellcmd($val);
                                    $csvvals = $csvvals.$firsttime."'".$tmpval."'";
                    fputs($fp,"$csvkeys\n");
                    fputs($fp,"$csvvals\n");
            break;
            case ".html":
                    fputs($fp,"<table border=\"1\" cellspacing=\"1\" cellpadding=\"2\">\n");
            break;
            case ".xml":
                    fputs($fp,"<form>\n");
            break;
    reset($query_vars);
    while (list ($key, $val) = each ($query_vars)) {
            if ($key == "redirect") {
                    $landing_page = $val;
            if ( ($key == "form_order") ||
                    ($key == "form_format") ||
                    ($key == "form_delivery") ||
                    ($key == "redirect") ) {
            else {
                    switch ($file_format) {
                            case ".html":
                                    fputs($fp,"\t<tr>\n");
                                    fputs($fp,"\t\t<td><b>$key</b></td>\n");
                                    fputs($fp,"\t\t<td>$val</td>\n");
                                    fputs($fp,"\t</tr>\n");
                            break;
                            case ".csv":
                                    // content is already output
                            break;
                            case ".xml":
                                    fputs($fp,"\t<field>\n");
                                    fputs($fp,"\t\t<fieldname>".xmlentities($key)."</fieldname>\n");
                                    fputs($fp,"\t\t<fieldvalue>".xmlentities($val)."</fieldvalue>\n");
                                    fputs($fp,"\t</field>\n");
                            break;
                            case ".text":
                            default:
                                    fputs($fp,$key.": ".$val."\n");
                            break;
    switch ($file_format) {
            case ".html":
                    fputs($fp,"</table>\n");
            break;
            case ".xml":
                    fputs($fp,"</form>\n");
            break;
    fclose($fp);
    if ($landing_page != "") {
            header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
    else {
            header("Location: http://".$_SERVER["HTTP_HOST"]."/");
    ?>

  • Can an arbitrary object be marshalled with JAXB?

    Is it possible to marshall an arbitrary Java object with JAXB?
    I would think this is possible if
    (i) marshalling works on non-public fields
    (ii) xml can handle all Java primitive types, including byte[]
    And, it it is possible, how would you unmarshall it?
    bw

    I don't believe it is possible for JAXB to marshal and un-marshal an arbitrary object. Your object would need to implement the MarshallableObject. Usually with JAXB you wouldn't actually create the MarshallableObject yourself, you would just create it from your binding schema and DTD.

  • Importing and Exporting Data with a Clob datatype with HTML DB

    I would like to know what to do and what to be aware of when Importing and Exporting data with a Clob Datatype with HTML DB?

    Colin - what kind of import/export operation would that be, which pages are you referring to?
    Scott

  • Issue with LCM while migrating planning application in the cluster Env.

    Hi,
    Having issues with LCM while migrating the planning application in the cluster Env. In LCM we get below error and the application is up and running. Please let me know if anyone else has faced the same issue before in cluster environment. We have done migration using LCM on the single server and it works fine. It just that the cluster environment is an issue.
    Error on Shared Service screen:
    Post execution failed for - WebPlugin.importArtifacts.doImport. Unable to connect to "ApplicationName", ensure that the application is up and running.
    Error on network:
    “java.net.SocketTimeoutException: Read timed out”
    ERROR - Zip error. The exception is -
    java.net.SocketException: Connection reset by peer: socket write error
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)

    Hi,
    First of all, if your environment for source and target are same then you will have all the users and groups in shared services, in that case you just have to provision the users for this new application so that your security will get migrated when you migrate the from the source application. If the environs are different, then you have to migrate the users and groups first and provision them before importing the security using LCM.
    Coming back to the process of importing the artifacts in the target application using LCM, you have to place the migrated file in the @admin native directory in Oracle/Middleware/epmsystem1.
    Open shared services console->File system and you will see the your file name under that.
    Select the file and you will see all your exported artifacts. Select all if you want to do complete migration to target.
    Follow the steps, select the target application to which you want to migrate and execute migration.
    Open the application and you will see all your artifacts migrated to the target.
    If you face any error during migration it will be seen in the migration report..
    Thanks,
    Sourabh

Maybe you are looking for