Hi Srinivas, The problem is that you're actually including a namespace prefix in the name you set on your <mapping>. This is not explicitly forbidden since there are some case where people might want to disable namespaces in the parser and handle things directly, but it's not how you want to work with a <namespace> definition. Take off the prefixes from your element names and instead use a ns="http://www.dnb.com/IDP/Request/Match/Vers1" attribute on the <mapping> element to tell JiBX the namespace you want to use - it'll set the prefix itself when marshalling.
- 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 srinivas murthy wrote: > Hi all, > I've managed to compile my first binding and was able to get my > trivial marshaling code to give me the xml I was looking for. > However, I am unable to get unmarshalling to work for me, even with > the output I got from my marshalling in the first place. > > Here's an excerpt from my binding document. > > <binding> > <namespace > uri="http://www.dnb.com/IDP/Common/Enumeration/Types/MatchDataCriteria/Vers1 > <http://www.dnb.com/IDP/Common/Enumeration/Types/MatchDataCriteria/Vers1>" > prefix="ipd-enummtchdata" > <namespace uri="http://www.dnb.com/IDP/Request/Match/Vers1" > prefix="idp-matchreq"/> > .... > <mapping name="idp-matchreq:MatchRequest" > class="com.dnb.esbsearch.types.MatchRequestInfo"> > <structure name="idp-matchprod:MatchSpecification" field > ="matchSpec" type=" com.dnb.esbsearch.types.MatchSpecificationInfo"> > <structure field="matchDataCriteria" > type="com.dnb.esbsearch.types.MatchDataCriteriaInfo"/> > <value name="idp-com:MaxQuantity" field="maxQuantity"/> > <value name="idp-matchprod:ExactMatchIndicator" > type="boolean" field="exactMatchInd"/> > <structure > type="com.dnb.esbsearch.types.GeneralisedScopeInfo " > field="generalisedScope"/> > </structure> > .... > </structure> > </mapping> > </binding> > > As you can see, MatchRequest is the root and does have a mapping. > XML > ------ > <idp-matchreq:MatchRequest xmlns:ipd-enummtchdata=" > http://www.dnb.com/IDP/Common/Enumeration/Types/MatchDataCriteria/Vers1" > xmlns:idp-matchreq="http://www.dnb.com/IDP/Request/Match/Vers1"> > <idp-matchprod:MatchSpecification><idp-enumtype:MatchDataCriteria><com.dnb.esbsearch.types.MatchDataCriteriaType>[EMAIL > > PROTECTED]</com.dnb.esbsearch.types.MatchDataCriteriaType></idp-enumtype:MatchDataCriteria><idp-com:MaxQuantity>50</idp-com:MaxQuantity> > > > <idp-matchprod:ExactMatchIndicator>true</idp-matchprod:ExactMatchIndicator><idp-enumType:GeneralisedScope><ipd-enumgenscop:Regional/></idp-enumType:GeneralisedScope></idp-matchprod:MatchSpecification><idp-matchprod:MatchInventoryData><idp-prof:Header><idp-com:CountryIdentifier>1073</idp-com:CountryIdentifier></idp-prof:Header><idp-prod:Party><idp-ctctUS:ContactInformation><idp-com:BusinessName>Hewlett > > Packard</idp-com:BusinessName><idp-ctctUS:AddressDetails><idp-reg:AddressUS> > > <int-gcd:State>CA</int-gcd:State><int-gcd:PostalZipCode>95034</int-gcd:PostalZipCode> > <idp-com:CountryIdentifier>1073</idp-com:CountryIdentifier></idp-reg:AddressUS></idp-ctctUS:AddressDetails> > > > </idp-ctctUS:ContactInformation></idp-prod:Party></idp-matchprod:MatchInventoryData></idp-matchreq:MatchRequest> > > When I try to unmarshal, here's the error message I get.. > > org.jibx.runtime.JiBXException: No unmarshaller for element "{ > http://www.dnb.com/IDP/Request/Match/Vers1}MatchRequest > > I have gone thru some of the archives, but please pardon if I have > repeated a more often asked question. > > Srinivas > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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 > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users