If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > JiBX out binding, ns at structure level...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-10-10, 13:04
JamesAvery22 JamesAvery22 is offline
Registered User
 
Join Date: Jan 2004
Posts: 70
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 13:43.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On