Hi Unmesh,

I'm not sure exactly what you want here - are the request and response 
samples the way you want the input and output to look, or is the 
response what you're currently getting from JiBX, and you want to 
instead have it match the request? Either way, it should be easy to 
handle this in JiBX - just declare the namespaces you're going to be 
using with <namespace> elements in each binding, but don't use the 
default="..." attribute on the <namespace>. That way the namespaces will 
only be applied when you specify. Then use ns="http://namespace"; on the 
element(s) where you want this namespace applied.

If you *do* want the request and response to use different XML 
representations, that's not a problem - just do a binding with 
direction="input" for the request processing, and one with 
direction="output" for the response processing.

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Unmesh Joshi wrote:
> Hi,
>  
> I am developing EAI interface to my application. Currently the 
> application is using Jaxb. I am trying to convert XML mapping layer to 
> Jibx.
> But looking at the existing messages, I am little confused about how 
> to specify namespaces in in binding xml file. The request and reply 
> attached. As you can see, namespace for BPDHeader and Header are 
> explicitly set to "" in the request. and in the response only few 
> elements are prefixed with ns0, which are not prefixed like that in 
> request.
> Current system is generating these XMLs with JIBx. I am not sure if I 
> can write binding xml for this in Jibx. Is there any workaround?
>  
> Thanks,
> Unmesh
>  
> ------------------------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <Operation xmlns="http://namespace";>
>     <BPDHeader xmlns="">
>         <TransactionId>1171946464229</TransactionId>
>         <SourceId>TDD</SourceId>
>         <DocumentId>1</DocumentId>
>         <Version>1.0</Version>
>     </BPDHeader>
>     <Header xmlns="">
>         <Source>TDD</Source>
>         <EventName>CFE</EventName>
>     </Header>
>     <Request>
>         <Request xmlns="">
>             <Request1>
>                 <SerialNumber/>
>                 <ApplianceSerialNumber/>
>                 <ContactInfo>
>                     <FirstName/>
>                     <LastName/>
>                     <Company/>
>                     <Address1/>
>                     <Address2/>
>                     <City/>
>                     <StateProvince/>
>                     <CountryCode/>
>                     <PostalCode/>
>                     <ResellerName/>
>                     <Phone/>
>                     <EmailAddress/>
>                 </ContactInfo>
>                 <NotificationEmail>[EMAIL PROTECTED]</NotificationEmail>
>                 <SendEmailFlag>false</SendEmailFlag>
>                 <Lang>EN</Lang>
>                 <EndDate>2008-02-20</EndDate>
>             </Request1>
>             <Request2>
>                 <TemplateID>10150</TemplateID>
>                 <StartDate>2007-02-20</StartDate>
>                 <EndDate>2008-02-20</EndDate>
>                 <LicOrderQty>4</LicOrderQty>
>                 <SourceSystem>TDD</SourceSystem>
>                 <SourceSystemId>123456</SourceSystemId>
>                 <SourceSystemReferenceId>1234</SourceSystemReferenceId>
>                 <OemSiteId>3472</OemSiteId>
>                 <RepeatCount>4</RepeatCount>
>             </Request2>
>         </Request>
>     </Request>
> </Operation>
>   
> ------------------------------------------------------------------------
>
>
> <ns0:Operation xmlns:ns0="http://www.veritas.com/ecc/common";>
>     <BPDHeader>
>         <TransactionId>1171946464229</TransactionId>
>         <SourceId>TDD</SourceId>
>         <DocumentId>1</DocumentId>
>         <Version>1.0</Version>
>         <Comments>ID:tusextd1_7444.F4E45A7299DA9D0:4</Comments>
>     </BPDHeader>
>     <Header xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms"; 
> xmlns:jms2="http://www.tibco.com/namespaces/tnt/plugins/jms";>
>         <Source>TDD</Source>
>         <EventName>Create Fulfill Entitlement</EventName>
>     </Header>
>     <ns0:Reply>
>         <ns0:Status>
>             <BPDHeader>
>                 <TransactionId>1171946464229</TransactionId>
>                 <SourceId>TDD</SourceId>
>                 <DocumentId>1</DocumentId>
>                 <Version>1.0</Version>
>                 <Comments>ID:tusextd1_7444.F4E45A7299DA9D0:4</Comments>
>             </BPDHeader>
>             <status>0</status>
>             <statusMessage>SUCCESS</statusMessage>
>         </ns0:Status>
>         <Reply2>
>             <ns0:Status>
>                 <BPDHeader>
>                     <TransactionId>1171946464229</TransactionId>
>                     <SourceId>Webops-RequestCreateEntitlement</SourceId>
>                     <DocumentId>1</DocumentId>
>                     <Version>1.0</Version>
>                     <Comments>ID:tusextd1_7444.F4E45A7299DA9D0:4</Comments>
>                 </BPDHeader>
>                 <status>0</status>
>                 <statusMessage>SUCCESS</statusMessage>
>             </ns0:Status>
>             <Reply>
>                 <ReplyResult>
>                     <FulfillmentId>6203874.0</FulfillmentId>
>                     <FulfillmentDate>2007-02-19</FulfillmentDate>
>                     <R1>
>                        TDD SUCCESS
>                     </R1>
>                     <SerialNumber>M3589696042</SerialNumber>
>                     <ConfigurationId>0</ConfigurationId>
>                 </ReplyResult>
>             </Reply>
>         </Reply2>
>         <Reply1>
>             <ns0:Status>
>                 <BPDHeader>
>                     <TransactionId>1171946464229</TransactionId>
>                     <SourceId>TDD</SourceId>
>                     <DocumentId>1</DocumentId>
>                     <Version>1.0</Version>
>                     <Comments>ID:tusextd1_7444.F4E45A7299DA9D0:4</Comments>
>                 </BPDHeader>
>                 <status>0</status>
>                 <statusMessage>SUCCESS</statusMessage>
>                 <EventID>M3589696042</EventID>
>             </ns0:Status>
>             <SerialNumbers>S1</SerialNumbers>
>             <SerialNumbers>S2</SerialNumbers>
>             <SerialNumbers>SW3</SerialNumbers>
>             <SerialNumbers>SW4</SerialNumbers>
>         </Reply1>
>     </ns0:Reply>
> </ns0:Operation>
>   
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ------------------------------------------------------------------------
>
> _______________________________________________
> jibx-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>   

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to