AnsweredAssumed Answered

Put content of variable into XOG message

Question asked by martin.snizek on Jan 28, 2013
Latest reply on Apr 25, 2013 by vitor.sakaguti
Hello,
I have got a problem with my GEL script. I have got data in variable segments and I need to get the content of this variable into XOG message.
For example:
Content of segments:
<segment finish="2013-01-14T00:00:00" isDefaultSegment="false" start="2013-01-14T00:00:00" value="1000.0"/> <segment finish="2013-01-15T00:00:00" isDefaultSegment="false" start="2013-01-15T00:00:00" value="2000.0"/>
XOG Message:
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_customObjectInstance.xsd">






<Header action="write" externalSource="NIKU" objectType="customObjectInstance" version="12.1.2.1260"/>






<customObjectInstances objectCode="i_pfpp">







<instance instanceCode="${pfpp_code}" objectCode="i_pfpp"







parentInstanceCode="${fpp_code}" parentObjectCode="i_fpp">








<CustomInformation>









<ColumnValue name="i_pfpp_skt">










<tsvData default="0.0" finish="2013-01-21T00:00:00"










start="2013-01-01T00:00:00" type="value">











${segments}











<segment finish="${datum}"











isDefaultSegment="false"











start="${datum}" value="${castka}"/>










</tsvData>









</ColumnValue>








</CustomInformation>







</instance>






</customObjectInstances>





</NikuDataBus>
But it's not working and I get back error message:
[XOG]result:FAILURE, result_desc:<XOGOutput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/status.xsd"> <Object type="customObjectInstance"/> <Status state="FAILURE"/> <Statistics failureRecords="0" insertedRecords="0" totalNumberOfRecords="0" updatedRecords="0"/> <ErrorInformation> <Severity>FATAL</Severity> <Description>[Error] :0:0: unexpected character literal </Description> <Exception type="java.lang.Exception"><![CDATA[ java.lang.Exception: Invalid xml data at com.niku.xog.service.ObjectHandler.processRequest(ObjectHandler.java:115) at com.niku.xog.service.ObjectHandler.process(ObjectHandler.java:90) at com.niku.xog.service.XOGDispatch.processMessage(XOGDispatch.java:113) at com.niku.xog.service.XOGSOAPServlet.processMessage(XOGSOAPServlet.java:273) at com.niku.xog.service.XOGSOAPServlet.doPost(XOGSOAPServlet.java:88) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.niku.union.web.filter.CharsetFilter.doFilter(CharsetFilter.java:29) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619) ]]></Exception> </ErrorInformation> </XOGOutput>
Please have you got any idea?

Thanks,
Martin

Outcomes