FYI: I figured out what was going wrong.

I had not declared the namespace default.
Once I made this change it worked perfectly...
Sorry ... my first xml binding!!!

<binding>
    <namespace uri="http://www.opentravel.org/OTA/2002/11" prefix="xmlns" default="elements"/>
    <namespace uri="http://www.w3.org/2001/XMLSchema-instance" prefix="xmlns:xsi"/>
    <namespace uri="http://www.opentravel.org/OTA/2002/08" prefix="xsi:schemaLocation"/>

    <format label="booleantype" type="boolean" serializer="org.jibx.runtime.Utility.serializeBoolean"/>
    <mapping name="OTA_ProfileReadRS" class="com.mycompany.myXML.myProduct.userprofile.OTAProfileReadRS" ordered="true">
        <value style="attribute" name="AltLangID" field="altLang" usage="optional"/>
        <value style="attribute" name="PrimaryLangID" field="primLang" usage="optional"/>
        <value style="attribute" name="Target" field="target" usage="optional"/>
        <value style="attribute" name="Version" field="version" usage="optional"/>
        <value style="attribute" name="EchoToken" field="echoToken" usage="optional"/>
        <value style="attribute" name="TimeStamp" field="timeStamp" usage="optional"/>
        <value style="attribute" name="SequenceNmbr" field="seqNo" usage="optional"/>
        <structure name="Success" field="success" usage="optional"></structure>
        <structure name="Profiles" field="profiles" usage="optional">
        </structure>
    </mapping>



Colm Murphy wrote:
Hi Dennis,

I am getting the same issue as described below in a previous mail thread.
When I remove the namespaces defined as attributes of the root element in my xml 
response the unmarshalling works as desired (without error).
But obviously I need to unmarshall the xmlResponse with the namespaces included.
I have tried adding the namespaces as attributes like below but no joy! :-(

<mapping name="OTA_ProfileReadRS" 
class="com.company.myXML.productName.userprofile.OTAProfileReadRS" ordered="true">
        <value style="attribute" name="xmlns" field="xmlNameSpace" 
usage="optional"/>
Can you clarify what you mean by:

> From: Dennis Sosnoski 

> make sure that
>  you have a <mapping> defined for the RootElement using the proper namespace.

Thanks
Colm


From: Kiran Sutrave <[EMAIL PROTECTED]>
Fwd: UnMarshalling Error 
2004-08-17 01:20

 Hi Dennis:
 
 when i try to unmarshall the message inside the SoapHeader . I receive
 the following error message.
 
 No unmarshaller for element "{http://www.abc.com/test}RootElement"
 
 My Java Code is as follows
 IBindingFactory bFactory = BindingDirectory.getFactory(TestConfiguration.class);
 IUnmarshallingContext uContext = bFactory.createUnmarshallingContext();
 TestConfiguration configurationType =
 (TestConfiguration)uContext.unmarshalDocument(inputStream, null);
 
 Please let me know if I"m missing something.
 
 Thanks
 Kiran
 

From: Dennis Sosnoski <[EMAIL PROTECTED]>
Re: Fwd: UnMarshalling Error 
2004-08-17 01:58

 Hi Kiran,
 
 The message says that JiBX did not find a <mapping> definition for the
 {...}RootElement that you"re trying to unmarshal. Check the binding
 definition that includes your TestConfiguration class and make sure that
 you have a <mapping> defined for the RootElement using the proper namespace.
 
   - Dennis
 
 Kiran Sutrave wrote:
 
 >Hi Dennis:
 >
 >when i try to unmarshall the message inside the SoapHeader . I receive
 >the following error message.
 >
 >No unmarshaller for element "{http://www.abc.com/test}RootElement"
 >
 >My Java Code is as follows
 >IBindingFactory bFactory = BindingDirectory.getFactory(TestConfiguration.class);
 >IUnmarshallingContext uContext = bFactory.createUnmarshallingContext();
 >TestConfiguration configurationType =
 >(TestConfiguration)uContext.unmarshalDocument(inputStream, null);
 >
 >Please let me know if I"m missing something.
 >
 >Thanks
 >Kiran
 >


------------------------------------------------------- This SF.Net email is 
sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! 
Get your free copy of BEA WebLogic Workshop 8.1 today. 
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click 
_______________________________________________ jibx-users mailing list 
[EMAIL PROTECTED] 
https://lists.sourceforge.net/lists/listinfo/jibx-users
  
------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to