or else initilize the success variable to default value;
String success = "";
So that you can get </Success>
Thanks
Kant
On Fri, Oct 10, 2008 at 3:03 PM, Bhupesh K. Chowdary
<[EMAIL PROTECTED]>wrote:
> since you are using
>
> <structure name="Success" field="success" usage="optional"/>
>
> By default it'll come as <Success/> ,
>
> It's not required to use Custom unmarshaller,
>
> Thanks
> Kant
>
>
>
> On Fri, Oct 10, 2008 at 2:31 PM, Paul Mahoney <[EMAIL PROTECTED]> wrote:
>
>> Hi
>>
>> I have the following binding:
>>
>> <mapping name="OTA_PingRS" class="uk.co.xact.ota.OTA_PingRS">
>> <value name="EchoToken" field="echoToken" usage="optional"/>
>>
>> <value name="TimeStamp" field="timeStamp" usage="optional"/>
>> <value name="Target" field="target"
>> deserializer="uk.co.xact.ota.commonType.Target.get" usage="optional"/>
>>
>> <value name="Version" field="version"/>
>> <value name="TransactionIdentifier" field="transactionIdentifier"
>> usage="optional"/>
>> <value name="SequenceNmbr" field="sequenceNmbr" usage="optional"/>
>>
>> <value name="TransactionStatusCode" field="transactionStatusCode"
>> deserializer="uk.co.xact.ota.commonType.TransactionStatusCode.get"
>> usage="optional"/>
>> <value name="RetransmissionIndicator" field="retransmissionIndicator"
>> usage="optional"/>
>>
>> <value name="PrimaryLangID" field="primaryLangID" usage="optional"/>
>> <value name="AltLangID" field="altLangID" usage="optional"/>
>> <structure ordered="false" choice="true">
>>
>> <structure name="Errors" field="errors" usage="optional"/>
>> <structure usage="optional">
>> <structure name="Success" field="success" usage="optional"/>
>>
>> <structure name="Warnings" field="warnings" usage="optional"/>
>> <value name="EchoData" field="echoData" style="element"
>> usage="optional"/>
>>
>> </structure>
>> </structure>
>> </mapping>
>>
>> When jibx (1.1.5) unmarshals the message:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <OTA_PingRS xmlns="http://www.opentravel.org/OTA/2003/05"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05
>>
>> OTA_PingRS.xsd" TimeStamp="2003-03-17T11:09:49-05:00" Target="Production"
>> Version="1.001" SequenceNmbr="1">
>> <Success/>
>> <EchoData>Are you There</EchoData>
>>
>> </OTA_PingRS>
>>
>> The object for the <Success/> element is not created, so if I immediately
>> marshal the object tree I get:
>>
>> <OTA_PingRS xmlns="http://www.opentravel.org/OTA/2003/05"
>> TimeStamp="2003-03-17T11:09:49-05:00" Target="Production" Version="1.001"
>> SequenceNmbr="1">
>> <EchoData>Are you There</EchoData>
>> </OTA_PingRS>
>>
>> As you can see, the <Success/> element is missing.
>>
>> Is there a way to tell the unmarshaller to create the object mapped to the
>> <Success/> element? Obviously I don't want it if the element is not in the
>> XML, but I do if it is... even though it's empty.
>>
>> Regards
>> Paul
>> *----*
>> *Paul Mahoney, Director, X-Act Solutions Limited*
>> *smail: 71 South Cliff, Bexhill-on-Sea, East Sussex, TN39 3EE*
>> *phone: +44 (0) 1424 731240*
>> *email: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> jibx-users mailing list
>> jibx-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jibx-users
>>
>>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users