Results 1 to 1 of 1
  1. #1
    Join Date
    Jan 2004
    Posts
    70

    Unanswered: JiBX out binding, ns at structure level...

    Trying to bind this XML:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <Response xmlns="http://www.blah.org/blah1" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    	<Struc xmlns="http://webservice.blah.com/">
    		<field1>1165337</field1>
    		<field2>2010</field2>
    		...
    	</Struc >
    	<Struc xmlns="http://webservice.blah.com/">
    		<field1>1165337</field1>
    		<field2>2010</field2>
    		...
    	</Struc >
    	...
    </Response>
    is there any way for JiBX to ignore the namespace at the structure level?

    At runtime JiBX errors out with expecting {http://www.blah.org/blah1}Response end tag but found {http://webservice.blah.com/}Struc start tag

    Binding file:
    Code:
    <binding name="outRequestDO">
    	
    	<mapping name="Response" class="org.mystuff.dos.myDO">
    	<namespace uri="http://www.blah.org/blah1" default="elements" prefix=""/>
    		
    		<collection field="Strucs" factory="org.jibx****ntime.Utility.arrayListFactory" usage="optional">
    			<structure name="Struc" type="org.mystuff.dos.myStrucDO" ordered="false" flexible="true" usage="optional">
    				<value name="field1" field="field1" usage="optional"/>
    				<value name="field2" field="field2" usage="optional"/>
    			</structure>
    		</collection>
    	</mapping>
    </binding>
    Last edited by JamesAvery22; 08-10-10 at 14:43.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •