Hi,

 

I'm new to Castor and I'm trying to extract the objects from input xml
message. My input xml message uses a schema file but the data section is
defined as <any>, so the data can come in any format. Please see the
attached xml file and let me know how I can write mapping file to
extract the objects 

 

1)       CitiECMContact

2)       CitiECMBusinessActivityHistory

3)       ECMBUSINESSACTHIST

4)       ECMCONTACT

 

I have java objects for each above nodes. I came to know from Castor
document, we cannot map to non-root node to a java object i.e. root node
should be mapped to java object and other elements can be mapped to java
objects but they should be an elements in the root java object.

 

Please find the CitiECMBusinessActivityHistory is repeated twice. I want
to extract each object and call different methods. I can do it using
general xml parsing but interested to do using Castor. I tried to create
a java object which maps to root node <envelope> and adding each object
as get/set methods. But I cannot say the input message is always in this
format. Let me know if you need more details. Please provide a solution
for my issue. 

 

Thanks & Regards,

Sridhar Tida

Citi NAIT Shared Technology Services

Ph: 513.979.9494

Email: [EMAIL PROTECTED]

 

 

<Envelope xmlns = "http://www.w3.org/2003/05/soap-envelope";>
	<Header>
		<Transaction xmlns = "http://www.citi.com/gcgna/all/ecs/endpoint/request.xsd";> 
			<connection/> 
			<endpoint/> 
			<host/> 
			<process/> 
			<transaction-id/> 
		</Transaction>
	</Header>
	<Body>
		<Request>			
			<service>
				<serviceName>ECMSharedService</serviceName>
				<packageName>com.ecm.sharedservice</packageName>
				<actions>
					<action>saveContact</action>
				</actions>
			</service>
			<data>
				<CitiECMContact>
					<UserFullName>John Miller</UserFullName>
					<CitiECMBusinessActivityHistory>
						<duration>4</duration>
						<callerName>John Dougles</callerName>
						<callerRelationship>Customer</callerRelationship>					
						<ECMBUSINESSACTHIST>
							<STARTTIME>04/10/2008 10:23:00</STARTTIME>
							<ENDTIME>04/10/2008 10:55:00</ENDTIME>
							<ACTUALDURATION>32</ACTUALDURATION>
							<COMPLETIONSTATUS>Closed</COMPLETIONSTATUS>
							<APPLICATIONSTATUS>Pending</APPLICATIONSTATUS>
							<DESCRIPTION>Customer asked to submit the required document</DESCRIPTION>	
						</ECMBUSINESSACTHIST>
					</CitiECMBusinessActivityHistory>
					<CitiECMBusinessActivityHistory>
						<duration>10</duration>
						<callerName>Kate Winslet</callerName>
						<callerRelationship>Customer</callerRelationship>					
						<ECMBUSINESSACTHIST>
							<STARTTIME>12/10/2008 10:23:00</STARTTIME>
							<ENDTIME>12/10/2008 10:55:00</ENDTIME>
							<ACTUALDURATION>10</ACTUALDURATION>
							<COMPLETIONSTATUS>Closed</COMPLETIONSTATUS>
							<APPLICATIONSTATUS>Pending</APPLICATIONSTATUS>
						</ECMBUSINESSACTHIST>
					</CitiECMBusinessActivityHistory>
					<ECMCONTACT>
						<CREATEDATE>04/10/2008</CREATEDATE>
						<STARTTIME>10:23:00</STARTTIME>
						<ENDTIME>10:55:00</ENDTIME>
						<CONTACTUSERTYPE>Customer</CONTACTUSERTYPE>
						<LOCATION>BLue Ash, OH</LOCATION>
					</ECMCONTACT>
				</CitiECMContact>
			</data>	
		</Request>
	</Body>
</Envelope>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to