JAXB Unmarshalling and namespace

Hi All ,
Im using jaxb to marshall and unmarshall xml messages.Every thing seems to work fine expect for one
small part ...... the namespace is removed form the xml .For example
<RECORD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Record.xsd">
becomes
<RECORD>
Any idea why this happens ?
thanks
Jim

Hi Jimmy -
Have you tried including this code at marshall time?
marshaller.setProperty( Marshaller.JAXB_SCHEMA_LOCATION, "schema_path path_to_xsd.xsd");
Good luck.
cm

Similar Messages

  • Jaxb unmarshalling and setvalidating()

    I am using jaxb 1.0 with jdk1.4 , i am trying to unmarshall the incoming request which a xml.
    It has a element called attachment list which is mandatory as per the schema. but i dont want my unmarshaller to validate request and throw error instead i just need to objects from unmarshaller. so i set the setvalidating(false).but i am still getting the validation error.Any help in this is highly appreciated.

    Check the date of the post dude - its months old and the dude who posted it hasn't been back since then (only one post, this one). If you want to help, focus on recent threads. Resurrecting old threads triggers other helpful people to unnecessarily invest time into them and creates extra work for the moderators.

  • JAXB Unmarshalling complexity

    Hello all,
    I need help on JAXB
    the situation is as below...
    i have to write a program that communicates with a server. the communication is request-response kind of communication which is to be carried out through XML.
    so everytime i have to send any request i need to create an XML and then send it to the server. i get the response in the form of XML. then i have to parse the XML to find out whats the response.
    previously i used DOM and SAX for creating XML and parsing XML respectively.
    now every response i get, i have to validate it against a DTD.
    now i'm trying out JAXB. so i first converted all the DTDs to XSD (xml schema docs). because JAXB doesn't support DTDs.
    now with JAXB, i'm creating the XML requests and sending it to the server and getting the response.
    but here is one problem.....
    as with JAXB, of i have to unmarshall the xml response i have to first create a JAXB context. and unmarshall it to that xml object that i'm expecting. but suppose i get some other response then how am i supposed to know that.
    i'll explain the above with a small example.
    suppose i have the following DTDs
    SearchRequest.dtd..............for search requests
    SearchResponse.dtd..............for search responses
    ErrorResponse.dtd.............for if the server sends any error.
    now first i convert this DTDs to XSDs and so i get
    SearchRequest.xsd, SearchResponse.xsd, ErrorResponse.xsd
    and then using the JAXB compiler i create the JAXB derived classes in the following package
    com.xyz.SearchRequest
    com.xyz.SearchResponse
    com.xyz.ErrorResponse
    now suppose i created the xml request and sent it to the server and i got the response. and i have to unmarshall it.
    (the server will send me SearchResponse.xml if everything if fine but ErrorResponse.xml it theres an error).
    now heres the problem. the server will send the SearchResponse or ErrorResponse. and ill have to determine what it is before i start to unmarshall.
    i hope i have communicated my problem....
    thankyou
    java-jones

    Not sure if this will help you or if this is what you are looking for, but from the JAXB Users' Guide:
    More About Unmarshalling
    The Unmarshaller class in the javax.xml.bind package provides the client application the ability to convert XML data into a tree of Java content objects. The unmarshal method for a schema (within a namespace) allows for any global XML element declared in the schema to be unmarshalled as the root of an instance document. The JAXBContext object allows the merging of global elements across a set of schemas (listed in the contextPath). Since each schema in the schema set can belong to distinct namespaces, the unification of schemas to an unmarshalling context should be namespace-independent. This means that a client application is able to unmarshal XML documents that are instances of any of the schemas listed in the contextPath; for example:
    JAXBContext jc = JAXBContext.newInstance( "com.acme.foo:com.acme.bar" );
    Unmarshaller u = jc.createUnmarshaller();
    FooObject fooObj = (FooObject)u.unmarshal( new File( "foo.xml" ) ); // ok
    BarObject barObj = (BarObject)u.unmarshal( new File( "bar.xml" ) ); // ok
    BazObject bazObj = (BazObject)u.unmarshal( new File( "baz.xml" ) ); // error

  • Soap sender adpater issue missing sender interface and namespace in the msg

    Hi Expert,
    I got a problem when try to using soap sender adapter.
    Here is the sceanrio:
    Http web service client call ---PI soap sender adapter -some routing data-business system inbound.
    Sytem information:
    SAP_ABA     700     0019     SAPKA70019     Cross-Application Component
    SAP_BASIS     700     0019     SAPKB70019     SAP Basis Component
    PI_BASIS     2005_1_700     0019     SAPKIPYJ7J     PI_BASIS 2005_1_700
    ST-PI     2008_1_700     0001     SAPKITLRD1     SAP Solution Tools Plug-In
    SAP_BW     700     0021     SAPKW70021     SAP NetWeaver BI 7.0
    ST-A/PI     01L_BCO700     0000          -     Servicetools for other App./Netweaver 04
    Here is my problem. I use soapui trigger a test msg to PI system. But in the sxmb_moni, only sender service is there.
    The sender interface and sender namespace is missing. And the msg has error called: :INTERFACE_REGISTRATION_ERROR.
    Which means I do not have a inbound interface to process the msg.
    But I suppose to redirect the msg to business system.
    Here is the configuration:
    reciever determination: soap sender service, soap outbound interface, soap interface namespace --> reciever business sytem.
    Interface ditermination: soap sender service, soap interface --> receiver interface, receiver namespace.
    Sender agreement: soap service, soap itnerface --- soap communication channel
    receiver agreement, soap service---> receiver sevice, receiver interface, reciever namespace  and reciever cummunication channel
    define of soap sender adapter:
    soap sernder, with use encoded header and use query string checked and qos as exactly once.
    Anyone has any idea here? Many thanks! And most strange thing is yesterday it works and today it failed.
    Please kindly help here.
    Thanks a lot,
    Leon

    Hi guys,
    thanks for the input.
    Hi Sven,
    I have input default interface and namespace.
    Hi sivasakthi,
    Regarding mistype, it may happen, I will do it again right away.
    And the URL is generated by the wsdl toolkit in the directory.
    I marked use encoded header and query string in the communication channel.
    I will generate the wsdl again and test it again.
    Regarding URL(endpoint of web service):
    http://hostname:50000/XISOAPAdapter/MessageServlet?channel=:AGSSAL_SOAP:AGSSAL_SOAP_CC&version=3.0&Sender.Service=AGSSAL_SOAP&Interface=urn:a1s_saplivelinkcontent.service.sap.com^MI_O_AS_DELIVERNOTIFY_SOAP
    Again thanks for you guys help.
    Best regards,
    Leon

  • Deleting Message Type name and namespace tag from XML payload

    Hi Gurus,
    Need help. My payload looks like this
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns1:MT_O_sss xmlns:ns1="http://sap.com/xi/tm">
    - <Job>
       <Field name="xxxx" value="" />
      <Field name="xxx" value="" />
      <Field name="xxx" value="" />
       </Job>
      </ns1:MT_O_sss>
    But The soap webservice is expecting it in
    <?xml version="1.0" encoding="utf-8" ?>
    - <Job>
       <Field name="xxxx" value="" />
      <Field name="xxx" value="" />
      <Field name="xxx" value="" />
       </Job>
    I have to remove the message type name and namespace tag.
    So how can I achieve this. I am sending this payload using a Receiver Soap Adapter. Please help. I am kind of stuck.

    hi,
    you have to simply add one module in your communication channel
    that is XMLAnonymizerBean
    you can refer below for help:
    Remove namespace prefix or change XML encoding with the XMLAnonymizerBean
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm
    hope it helps.
    regards,
    ujjwal kumar

  • Need information about interfaces and namespaces in actionscript 3.0

    Hi,
    I need information about actionscript interfaces and
    namespaces, I'm preparing for ACE for Flash CS3 and I need to learn
    about this subjects and I can not find resources or simple examples
    that make these subjects understandable.
    Anybody can help me!
    Thanks a lot.

    Interfaces (cont.)
    Perhaps the most useful feature of interfaces is that you not
    only can define the data type but also method signature of the
    class that implements this interface. In other words, interface can
    define and enforce what methods class MUST implement. This is very
    useful when classes are branching in packages and team of
    developers works on a large application among others.
    The general syntax for an Interface with method signatures is
    written the following way:
    package{
    public interface InterfaceName {
    // here we specify the methods that will heave to be
    implemented
    function method1 (var1:dataType,
    var2:datType,…):returnType;
    function method2 (var1:dataType,
    var2:datType,…):returnType;
    To the previous example:
    package{
    public interface IQualified {
    function method1 ():void;
    function method2 ():int;
    Let’s write a class that implements it.
    If I just write:
    package{
    public class ClassOne extends DisplayObject implements
    IQualified {
    public function ClassOne(){}
    I will get a compilation error that states that I did not
    implement required by the interface methods.
    Now let’s implement only one method:
    package{
    public class ClassOne extends DisplayObject implements
    IQualified {
    private function method1():void{
    return;
    public function ClassOne(){}
    I will get the error again because I implemented only one out
    of two required methods.
    Now let’s implement all of them:
    package{
    public class ClassOne extends DisplayObject implements
    IQualified {
    private function method1():void{
    return;
    private function method2():int{
    return 4;
    public function ClassOne(){}
    Now everything works OK.
    Now let’s screw with return datatypes. I attempt to
    return String instead of void in method1 in ClassOne:
    private function method1():String{
    return “blah”;
    I am getting an error again – Interface requires that
    the method1 returns void.
    Now let’s attempt to pass something into the method1:
    private function method1(obj:MovieClip):void{
    return;
    Oops! An error again. Interface specified that the function
    doesn’t accept any parameters.
    Now rewrite the interface:
    package{
    public interface IQualified {
    function method1 (obj:MovieClip):void;
    function method2 ():int;
    Now compiler stops complaining.
    But, if we revert the class back to:
    private function method1():void{
    return;
    compiler starts complaining again because we don’t pass
    any parameters into the function.
    The point is that interface is sort of a set of rules. In a
    simple language, if it is stated:
    public class ClassOne implements IQualified
    it says: “I, class ClassOne, pledge to abide by all the
    rules that IQualified has established and I will not function
    correctly if I fail to do so in any way. (IMPORTANT) I can do more,
    of course, but NOT LESS.”
    Of course the class that implements an interface can have
    more that number of methods the corresponding interface requires
    – but never less.
    MORE means that in addition to any number of functions it can
    implement as many interfaces as it is desired.
    For instance, I have three interfaces:
    package{
    public interface InterfaceOne {
    function method1 ():void;
    function method2 ():int;
    package{
    public interface InterfaceTwo {
    function method3 ():void;
    package{
    public interface InterfaceThree{
    function method4 ():void;
    If our class promises to implement all three interface it
    must have all four classes in it’s signature:
    package{
    public class ClassOne extends DisplayObject implements
    InterfaceOne, InterfaceTwi, InterfaceThree{
    private function method1():void{return;}
    private function method2():int{return 4;}
    private function method3():void{return;}
    private function method4():void{return;}
    public function ClassOne(){}
    Hope it helps.

  • Private dictionaries and Namespaces

    Private dictionaries and Namespaces
    We ran into an issue with some email templates in converting from RC2006 to RC2008.3 where Namespace values from Private service dictionaries were not populating correctly in RC2008.
    In the upgrade process from RC2006, any private dictionaries are converted to actual dictionaries. They are created in the Dictionary Group UPGD: PRIVATE DICTIONARIES and the dictionary name is based on the service name: PRIV_ServiceA.
    What I found as we were testing is that the Namespace parameters in Email templates (and, presumably, conditional statements and other places) no longer worked.
    The reason is that the Namespace Parameter for a private dictionary did not use a dictionary name, e.g. #SERVICE.DATA.Field1#. In order for the RC2008 version to work, we had to add dictionary references:  #SERVICE.DATA.PRIV_ServiceA.Field1#.

    Hey M.VAL,
    Thanks for the question. If your dictionary is not available after updating your device, you may need to redownload it:
    iOS: Dictionary isn't available after updating to the latest version of iOS
    http://support.apple.com/kb/TS5238
    Thanks,
    Matt M.

  • The system and namespace change option

    Hi Experts,
    I want to integrate a certain SAP Source System within RSA1. After submitting the correct settings for Background User and RFC connection the process leads me to the Source System where I logon with an User which has authorizations in SM59. From there on (the RFC Connection backwards is already defined) I got asked whether I want to user/check/cancel this existing RFC Connection. I click on use, wait for a while and then the error (please see below) appears.
    When proceeding with the steps mentioned in the error message (transaction SE03, Administration node, ...) I cannot find any IDOC Object ZSSA009. I think maybe it's related to some software component or somenthing like that which should be set as "modifiable" but I don't know which....
    Any Ideas on this?
    Many thanks in advance.
    Best regards
    Tobias
    Error Message:
    Message no. TO128
    Diagnosis
    The system and namespace change option set for this SAP System does not allow any changes to be made to object IDOC ZSSA009.
    System Response
    Editing is terminated, the object can only be displayed.
    Procedure
    If you want to edit the object IDOC ZSSA009 in this SAP System, have your system administator set the SAP System to "modifiable" for this object.
    This can affect the modifiability of the namespace &1 or the namespaces that correspond to the pattern &1, as well as the global setting of the system change option.
    The system change option is set using the Transport Organizer tools (Transaction SE03). Expand the Administration node and execute the program Set system change option. The options are described there.

    HI,
    Attached link may help you in configuring the source system.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/908836c3-7f97-2b10-4cb8-e6790361c152
    Thanks,
    Arun

  • Get Message ID and namespace from ABAP Mapping

    Hi XI Expert,
    Please advise how to get the message ID and namespace from ABAP Mapping.
    Thank You and best Regards
    Fernand

    Hi,
    To access the message ID, use the method GET_MESSAGE_ID of the controller object:
           1.      Fetch a protocol instance for the protocol IF_WSPROTOCOL_MESSAGE_ID.
           2.      To have the system return the message ID after the sender has sent a request message or the receiver has received a request message, use the method GET_MESSAGE_ID of this instance. This returns the ID by using the parameter MESSAGE_ID of type SXMSGUID.
    Also you could do the same by this way also:
    IF_WSPROTOCOL_XI_HEADER
    has attributes messageid and interface namespace.
    using this  you can read the XI message header

  • Add a root node and namespace declaration

    According to the requirement,I have a large appended .txt file.
    This .txt file is created by appending various xml files (without the namespace and root node).
    I need to add a root node and namespace declaration to the large appended .txt file so that it can be read as .xml.
    Please provide the pointers for the same.
    Thanks & Regards,
    Rashi

    My appended file looks like following.
    <input>
       <Store>
          <StoreHeader>
             <StoreNbr>56</StoreNbr>
             <StoreType>Retail</StoreType>
             <StoreSite>2004</StoreSite>
          </StoreHeader>
          <Transactions>
             <Transaction>
                <Item>A</Item>
                <ItemPrice>4</ItemPrice>
             </Transaction>
             <Transaction>
                <Item>C</Item>
                <ItemPrice>56</ItemPrice>
             </Transaction>
          </Transactions>
       </Store>
    </input>
    <input>
       <Store>
          <StoreHeader>
             <StoreNbr>123</StoreNbr>
             <StoreType>Retail</StoreType>
             <StoreSite>2004</StoreSite>
          </StoreHeader>
          <Transactions>
             <Transaction>
                <Item>A</Item>
                <ItemPrice>4</ItemPrice>
             </Transaction>
             <Transaction>
                <Item>B</Item>
                <ItemPrice>8</ItemPrice>
             </Transaction>
             <Transaction>
                <Item>C</Item>
                <ItemPrice>56</ItemPrice>
             </Transaction>
          </Transactions>
       </Store>
    </input>
    Now according to the requirement, I need to add namespace and root node and make it like follows:
    <ns0:output xmlns:ns0="http://xxx">
       <input>
       <Store>
          <StoreHeader>
             <StoreNbr>56</StoreNbr>
             <StoreType>Retail</StoreType>
             <StoreSite>2004</StoreSite>
          </StoreHeader>
          <Transactions>
             <Transaction>
                <Item>A</Item>
                <ItemPrice>4</ItemPrice>
             </Transaction>
             <Transaction>
                <Item>C</Item>
                <ItemPrice>56</ItemPrice>
             </Transaction>
          </Transactions>
       </Store>
    </input>
    <input>
       <Store>
          <StoreHeader>
             <StoreNbr>123</StoreNbr>
             <StoreType>Retail</StoreType>
             <StoreSite>2004</StoreSite>
          </StoreHeader>
          <Transactions>
             <Transaction>
                <Item>A</Item>
                <ItemPrice>4</ItemPrice>
             </Transaction>
             <Transaction>
                <Item>B</Item>
                <ItemPrice>8</ItemPrice>
             </Transaction>
             <Transaction>
                <Item>C</Item>
                <ItemPrice>56</ItemPrice>
             </Transaction>
          </Transactions>
       </Store>
    </input>
    </ns0:output>

  • Portal Event name and namespace (ECM)

    Hi Experts
    I want to register for the Portal Event that gets triggered when an employee is selected.
    In the Compensation Information page, there is an employee search iview. I need to know what Portal Event name and namespace is triggered when an employee is selected.
    Does somebody already know what the name and namespace is?
    thanks in advance
    Anton Kruse

    Found the solution here: Parameter Passing from WDJ iview to WDABAP Iview
    call function 'HR_ASR_WDA_GET_EMPLOYEE'
       exporting
          id = 'MSS01'   "ABAP Memory ID To get the PERNR Selected.
       importing
          pernr = gv_pernr.

  • JAXB unmarshalling error

    We are getting a JAXB unmarshalling error:
    while processing the following <condition> tag which is of type xsd:string
    <condition> x < 100 </condition>
    The error is probably happening due to "<" token as a part of string type.
    xml.bind.JAXBException: Unexpected error in Unmarshalling
    at oracle.xml.jaxb.JaxbUnmarshaller.unmarshal(JaxbUnmarshaller.java:224)
    Any ideas how to resolve this issue?
    Note
    <condition> x >100 </condition> is getting unmarshalled successfully by JAXB unmarshaller.
    Thanks

    Hi,
    Did you tried to put & lt; (without space) instead of < ?
    Best Regards,
    Paweł

  • JAXB unmarshalling error for " " token as part of xsd:string type element

    JAXB unmarshalling error for "<" token as part of xsd:string type element
    We are getting a JAXB unmarshalling error:
    while processing the following <condition> tag which is of type xsd:string
    <condition> x < 100 </condition>
    The error is probably happening due to "<" token as a part of string type.
    xml.bind.JAXBException: Unexpected error in Unmarshalling
    at oracle.xml.jaxb.JaxbUnmarshaller.unmarshal(JaxbUnmarshaller.java:224)
    Any ideas how to resolve this issue?
    Note
    <condition> x > 100 </condition> is getting unmarshalled successfully by JAXB unmarshaller.
    Thanks

    Hi,
    Did you tried to put & lt; (without space) instead of < ?
    Best Regards,
    Paweł

  • JAXB cannot unmarshall and previous posts do not seem to be related

    Hello,
    Recently, we had to change some of our XSDs, so I went and downloaded the latest Java web services pack (v1.6) and made the changes to the schema (only one new element). First, I realized we were using a 0.75 EA1 release of JAXB and that I would have to re-generate all the classes for all our current XSDs because of 0.75 is so outdated.
    I regenerated all the classes and everything seemed to be in good order. When I started my application I received the following error (this is in jdk 1.5)
    Now, the XSD and the XML have not changed in 3 years... why is it that using this new version of JAXB seems to have messed things up? This errors is received when trying to unmarshall. I have been looking at this for three days and reading all the posts, i don;t think this is a namespaces issue because it used to work.... i just don't get it. any help is GREATLY appreciated.
    Thanks
    JAVA CODE HERE ********************************************
    JAXBContext jc = com.sun.xml.bind.ContextFactory.createContext("com.testbed.common.config", new JAXBClassLoader());
    Unmarshaller u = jc.createUnmarshaller();
    EXCEPTION HERE *********************************
    ./shorg.xml.sax.SAXParseException: unexpected root element ConfigInfo
    at com.sun.xml.bind.unmarshaller.SAXUnmarshallerHandlerImpl.startElement(SAXUnmarshallerHandlerImpl.java:94)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:127)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:131)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:136)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:145)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:163)
    Here is the XML for the config file -
    XML HERE *************************************************
    <ConfigInfo>
    <LogFileConfig>logging.cfg</LogFileConfig>
    <HeartbeatTimeout>0</HeartbeatTimeout>
    <HeartbeatTopic>testTopic</HeartbeatTopic>
    <DatabaseConfig>
    <Name>TEST</Name>
    <Info>timmy/[email protected]:1521:DB1</Info>
    </DatabaseConfig>
    <JMSConfig>
    <MyName>TESTjms</MyName>
    <Connections>
    <connection id="1">
    <Address>192.168.1.2</Address>
    <Port>3035</Port>
    <Type>tcp</Type>
    <Factory>org.exolab.jms.jndi.mipc.IpcJndiInitialContextFactory</Factory>
    </connection>
    </Connections>
    </JMSConfig>
    <AgentProcessor>
    <MappingFile>test.map</MappingFile>
    <CommandFile>test.com</CommandFile>
    <EventQueueTime>15000</EventQueueTime>
    <SuppressionFile>supress.sup</SuppressionFile>
    </AgentProcessor>
    <StatusAlertTime>15000</StatusAlertTime>
    </ConfigInfo>
    And here is the XSD
    XSD HERE ***************************************************
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <xsd:annotation>
              <xsd:documentation xml:lang="en">Configuration file formats</xsd:documentation>
         </xsd:annotation>
         <xsd:element name="ConfigInfo" type="configInfoType">
              <xsd:annotation>
                   <xsd:documentation>The root element of the configuration file</xsd:documentation>
              </xsd:annotation>
         </xsd:element>
         <xsd:complexType name="configInfoType">
              <xsd:annotation>
                   <xsd:documentation>Contains the elements of a configuration file</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="LogFileConfig" type="xsd:string"/>
                   <xsd:element name="HeartbeatTimeout" type="xsd:int"/>
                   <xsd:element name="HeartbeatTopic" type="xsd:string"/>
                   <xsd:element name="DatabaseConfig" type="dbConfigType" minOccurs="0" maxOccurs="unbounded"/>
                   <xsd:element name="JMSConfig" type="jmsConfigType" minOccurs="0"/>
                   <xsd:element name="NetsaintConfig" type="netsaintConfigType" minOccurs="0"/>
                   <xsd:element name="EventProcessor" type="epConfigType" minOccurs="0"/>
                   <xsd:element name="AgentProcessor" type="agConfigType" minOccurs="0"/>
                   <xsd:element name="DatabaseAgent" type="dbAgentType" minOccurs="0"/>
                   <xsd:element name="Heartbeater" type="hbConfigType" minOccurs="0"/>
                   <xsd:element name="StatusAlertTime" type="xsd:long"/>
                   <xsd:element name="RemoteConnection" type="remoteConnConfig" minOccurs="0"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="dbConfigType">
              <xsd:annotation>
                   <xsd:documentation>The Database configuration element, with a database name and connection info</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="Name" type="dbInstanceType"/>
                   <xsd:element name="Info" type="xsd:string"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:simpleType name="dbInstanceType">
              <xsd:annotation>
                   <xsd:documentation>Limits the database connections</xsd:documentation>
              </xsd:annotation>
              <xsd:restriction base="xsd:string">
                   <xsd:pattern value="TEST|TEST2"/>
              </xsd:restriction>
         </xsd:simpleType>
         <xsd:complexType name="jmsConfigType">
              <xsd:annotation>
                   <xsd:documentation>The base of the JMS configurations</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="MyName" type="xsd:string"/>
                   <xsd:element name="Connections" type="connType"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="connType">
              <xsd:annotation>
                   <xsd:documentation>An individual JMS configuration with a priority ranked id and associated connection information</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="connection" maxOccurs="unbounded">
                        <xsd:annotation>
                             <xsd:documentation>id attribute</xsd:documentation>
                        </xsd:annotation>
                        <xsd:complexType>
                             <xsd:sequence>
                                  <xsd:element name="Address" type="xsd:string"/>
                                  <xsd:element name="Port" type="xsd:int"/>
                                  <xsd:element name="Type" type="xsd:string"/>
                                  <xsd:element name="Factory" type="xsd:string"/>
                             </xsd:sequence>
                             <xsd:attribute name="id" type="xsd:int" use="required"/>
                        </xsd:complexType>
                   </xsd:element>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="netsaintConfigType">
              <xsd:annotation>
                   <xsd:documentation>Connection info for NetSaint alerting</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="Address" type="xsd:string"/>
                   <xsd:element name="Port" type="xsd:int"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="epConfigType">
              <xsd:annotation>
                   <xsd:documentation>Event Processor base configuration</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="TimeoutWarning" type="xsd:int"/>
                   <xsd:element name="TimeoutError" type="xsd:int"/>
                   <xsd:element name="Adaptors" type="adapType"/>
                   <xsd:element name="SuppressionTimeout" type="xsd:int" default="3600000"/>
                   <xsd:element name="EmailTimeoutWarning" type="xsd:int" minOccurs="0"/>
                   <xsd:element name="EmailTimeoutError" type="xsd:int" minOccurs="0"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="adapType">
              <xsd:annotation>
                   <xsd:documentation>The definition of the available adaptors</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="EmailAdaptor" type="emailType" minOccurs="0"/>
                   <xsd:element name="DBAdaptor" type="dbType" minOccurs="0"/>
                   <xsd:element name="FrontEndAdaptor" type="feType" minOccurs="0"/>
                   <xsd:element name="MetricsAdaptor" type="metricsType" minOccurs="0"/>
                   <xsd:element name="NetsaintAdaptor" type="netsaintType" minOccurs="0"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="netsaintType">
              <xsd:sequence>
                   <xsd:element name="Enabled" type="YesNo"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="emailType">
              <xsd:annotation>
                   <xsd:documentation>Email adaptor definition</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="SMTPHost" type="xsd:string"/>
                   <xsd:element name="Sender" type="xsd:string"/>
                   <xsd:element name="Recipient" type="xsd:string" minOccurs="0"/>
                   <xsd:element name="GPGCommand" type="xsd:string" minOccurs="0"/>
                   <xsd:element name="LookupEmails" type="YesNo" minOccurs="0"/>
                   <xsd:element name="XSL" type="xsd:string"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:simpleType name="YesNo">
              <xsd:annotation>
                   <xsd:documentation>A "Y" or "N" type for use within the configuration file</xsd:documentation>
              </xsd:annotation>
              <xsd:restriction base="xsd:string">
                   <xsd:pattern value="Y|N"/>
              </xsd:restriction>
         </xsd:simpleType>
         <xsd:complexType name="dbType">
              <xsd:annotation>
                   <xsd:documentation>Database adaptor configuration</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="Threads" type="xsd:int"/>
                   <xsd:element name="XSL" type="xsd:string" minOccurs="0"/>
                   <xsd:element name="Mode" type="dbProcessingMode"/>
                   <xsd:element name="DeviceServerAddr" type="xsd:string"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:simpleType name="dbProcessingMode">
              <xsd:annotation>
                   <xsd:documentation>Defines the available Database Adaptor modes</xsd:documentation>
              </xsd:annotation>
              <xsd:restriction base="xsd:string">
                   <xsd:pattern value="NORMAL|XML"/>
              </xsd:restriction>
         </xsd:simpleType>
         <xsd:complexType name="feType">
              <xsd:annotation>
                   <xsd:documentation>FrontEnd adaptor definition</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="Publish" type="xsd:string"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="metricsType">
              <xsd:annotation>
                   <xsd:documentation>Metrics adaptor definition</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="Path" type="xsd:string"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="agConfigType">
              <xsd:annotation>
                   <xsd:documentation>AgentPeer configuration</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="MappingFile" type="xsd:string"/>
                   <xsd:element name="CommandFile" type="xsd:string"/>
                   <xsd:element name="EventQueueTime" type="xsd:int"/>
                   <xsd:element name="SuppressionFile" type="xsd:string" minOccurs="0"/>
                   <xsd:element name="FWHourlyCommand" type="xsd:string" minOccurs="0"/>
                   <xsd:element name="FWDailyCommand" type="xsd:string" minOccurs="0"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="dbAgentType">
              <xsd:annotation>
                   <xsd:documentation>Database Agent configuration</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="LowLevelAckTime" type="xsd:int"/>
                   <xsd:element name="LowLevelQueryWindow" type="xsd:int"/>
                   <xsd:element name="MessageQueryTime" type="xsd:int"/>
                   <xsd:element name="MaxMessagingRate" type="xsd:double"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="hbConfigType">
              <xsd:annotation>
                   <xsd:documentation>Heartbeater configuration</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="HeartbeatTopic" type="xsd:string"/>
                   <xsd:element name="HeartbeatPeriod" type="xsd:int"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="remoteConnConfig">
              <xsd:annotation>
                   <xsd:documentation>Remote Connection configuration info</xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="RemoteHost" type="xsd:string"/>
                   <xsd:element name="RemotePort" type="xsd:int"/>
                   <xsd:element name="MyName" type="xsd:string"/>
              </xsd:sequence>
         </xsd:complexType>
    </xsd:schema>

    have you tried it with only 1 complexType in the xsd with the element?
    I have an xsd with many complexTypes and found that the root element was not what i thought it was (ie in your case ConfigInfo) and was having to append an xml tag at the start and end.
    Don't know if it's something to do with the new version of JAXB as the one with 1.6 is the only one i have used...
    m

  • JAXB and Namespaces

    I would like to spit out an XML file using JAXB with namespace prefixes in place. I've tried but it seems like JAXB doesn't want to include the prefix "bo" in the xml file it generates. I would like JAXB generated xml file to look something like this:
    <task xmlns=http://www.bigb.com>
       <bo:metadata reference="abc" location="task1.xml" type="tracking" description="Track Inventory" />
    </task>
    Here is what my schema looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bo="http://www.bigb.com" targetNamespace="http://www.bigb.com" elementFormDefault="qualified">
      <xs:element name="task" maxOccurs="1" minOccurs="1">
        <xs:sequence>
          <xs:element name="metadata" type="bo:MetaData" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
      </xs:element>
      <xs:complexType name="MetaData">
        <xs:sequence>
          <xs:element name="metadata" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
        <xs:attribute name="reference" type="xs:string" use="required" />
        <xs:attribute name="description" type="xs:string" use="required" />
        <xs:attribute name="type" type="xs:string" use="optional" />
        <xs:attribute name="location" type="xs:string" use="required" />
      </xs:complexType>
    </xs:schema>

    I've tried the NamespacePrefixMapper class and it doesn't work in my case. I only want one element to have namespace prefix and that is the metadata element.
    Can someone perhaps post a sample xml schema where it is possible to have just a single element to have a namespace prefix?
    thanks.

Maybe you are looking for

  • TV on iPhone 3G

    Hi.. Is there anyway to watch TV on the iPhone 3G? I travel each week and I'd like to listen to my favorite soap while I'm working. Thanks.

  • Make photo more realistic

    I was just wondering if anyone might have some suggestions for how to make the hand and cards look more realistic. It's a layered document, with the picture of the croupier, the cards, and the hand all on separate layers. I want it to look a bit more

  • BC4J problems after migrating JDeveloper 9.0.3 - 9.0.4

    Hi! We have application based on BC4J+struts framework. After migrating JDeveloper from 9.0.3 to 9.0.4 we are getting following errors: JBO-27021: AttributeLoadException JBO-27022: AttributeLoadException - it seems to be a problem between datatype ma

  • C++ Runtime error on Rfc_Read_Table

    Hi, I got C++ Runtime Error on RFC_Read_Table. The following is the error message: "Program: This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information." The connec

  • Runtime error - PS Elements 10

    I continue to get the runtime error when I launch the elements editor. I've opened 3-4 cases talking with PS Elements support. So much so that I've learned how to fix the problem without support. Not sure if how I resolve the problem is universal for