java - File split based on content -
i have huge log file, has in multiple xml files, want retrieve each of xmls , use further operation.the xml having same opening , closing string ,i trying split based on this. how should this?
org.mule.config.spring.muleartifactcontext@4044fb95: startup date [wed jun 29 04:37:43 edt 2016]; root of context hierarchy info 2016-06-29 04:37:46,560 [main] org.springframework.context.support.propertysourcesplaceholderconfigurer: loading properties file class path resource [workday-mule-presclub-bonusbase.properties] info 2016-06-29 04:37:46,560 [main] org.springframework.context.support.propertysourcesplaceholderconfigurer: loading properties file class path resource [workday-mule-presclub-bonusbase-dev.properties] info 2016-06-29 04:37:46,560 [main] org.springframework.context.support.propertysourcesplaceholderconfigurer: loading properties file class path resource [env/workday-mule-presclub-bonusbase-jz.properties] info 2016-06-29 04:37:46,560 [main] org.springframework.context.support.propertysourcesplaceholderconfigurer: loading properties file url [file:/var/wawa/properties/workday-mule-presclub-bonusbase.properties] warn 2016-06-29 04:37:46,560 [main] org.springframework.context.support.propertysourcesplaceholderconfigurer: not load properties url [file:/var/wawa/properties/workday-mule-presclub-bonusbase.properties]: \var\wawa\properties\workday-mule-presclub-bonusbase.properties (the system cannot find path specified) info 2016-06-29 04:37:46,561 [main] org.springframework.context.support.propertysourcesplaceholderconfigurer: loading properties file class path resource [workday-mule-presclub-bonusbase.properties] info 2016-06-29 04:37:46,581 [main] org.springframework.context.support.propertysourcesplaceholderconfigurer: loading properties file class path resource [workday-mule-presclub-bonusbase-dev.properties] info 2016-06-29 04:37:46,581 [main] org.springframework.context.support.propertysourcesplaceholderconfigurer: loading properties file class path resource [env/workday-mule-presclub-bonusbase-jz.properties] info 2016-06-29 04:37:46,581 [main] org.springframework.context.support.propertysourcesplaceholderconfigurer: loading properties file url [file:/var/wawa/properties/workday-mule-presclub-bonusbase.properties] warn 2016-06-29 04:37:46,581 [main] org.springframework.context.support.propertysourcesplaceholderconfigurer: not load properties url [file:/var/wawa/properties/workday-mule-presclub-bonusbase.properties]: \var\wawa\properties\workday-mule-presclub-bonusbase.properties (the system cannot find path specified) info 2016-06-29 04:37:46,610 [main] org.mule.config.spring.processors.nodevkitinjectorprocessor: jsr-330 'javax.inject.inject' annotation found , supported autowiring warn 2016-06-29 04:37:48,217 [main] org.mule.module.ognl.expression.ognlexpressionevaluator: ognl module deprecated , removed in mule 4.0. use mel expressions instead. info 2016-06-29 04:37:48,805 [main] org.mule.lifecycle.abstractlifecyclemanager: initialising connector: connector.file.mule.default info 2016-06-29 04:37:49,022 [main] org.mule.lifecycle.abstractlifecyclemanager: initialising model: _mulesystemmodel info 2016-06-29 04:37:49,042 [main] org.mule.construct.flowconstructlifecyclemanager: initialising flow: sap-to-databaseflow info 2016-06-29 04:37:49,042 [main] org.mule.exception.defaultmessagingexceptionstrategy: initialising exception listener: org.mule.exception.defaultmessagingexceptionstrategy@24c8d8be info 2016-06-29 04:37:49,066 [main] org.mule.processor.sedastagelifecyclemanager: initialising service: sap-to-databaseflow.stage1 info 2016-06-29 04:37:49,080 [main] org.mule.construct.flowconstructlifecyclemanager: initialising flow: storpositionflow info 2016-06-29 04:37:49,080 [main] org.mule.exception.defaultmessagingexceptionstrategy: initialising exception listener: org.mule.exception.defaultmessagingexceptionstrategy@28e0e464 info 2016-06-29 04:37:49,114 [main] org.mule.processor.sedastagelifecyclemanager: initialising service: storpositionflow.stage1 info 2016-06-29 04:37:49,858 [main] org.mule.module.apikit.configuration: building resource uri cache... info 2016-06-29 04:37:49,858 [main] org.mule.construct.flowconstructlifecyclemanager: initialising flow: bonus_base_president_club-main info 2016-06-29 04:37:49,858 [main] org.mule.module.apikit.mappingexceptionlistener: initialising exception listener: mappingexceptionlistener{statuscode=404, exceptions=[class org.mule.module.apikit.exception.notfoundexception]} info 2016-06-29 04:37:49,858 [main] org.mule.module.apikit.mappingexceptionlistener: initialising exception listener: mappingexceptionlistener{statuscode=405, exceptions=[class org.mule.module.apikit.exception.methodnotallowedexception]} info 2016-06-29 04:37:49,858 [main] org.mule.module.apikit.mappingexceptionlistener: initialising exception listener: mappingexceptionlistener{statuscode=415, exceptions=[class org.mule.module.apikit.exception.unsupportedmediatypeexception]} info 2016-06-29 04:37:49,858 [main] org.mule.module.apikit.mappingexceptionlistener: initialising exception listener: mappingexceptionlistener{statuscode=406, exceptions=[class org.mule.module.apikit.exception.notacceptableexception]} info 2016-06-29 04:37:49,858 [main] org.mule.module.apikit.mappingexceptionlistener: initialising exception listener: mappingexceptionlistener{statuscode=400, exceptions=[class org.mule.module.apikit.exception.badrequestexception]} info 2016-06-29 04:37:49,859 [main] org.mule.processor.sedastagelifecyclemanager: initialising service: bonus_base_president_club-main.stage1 info 2016-06-29 04:37:49,859 [main] org.mule.construct.flowconstructlifecyclemanager: initialising flow: post:/bonusbasepresidentclub:bonus_base_president_club-config info 2016-06-29 04:37:49,869 [main] org.mule.exception.defaultmessagingexceptionstrategy: initialising exception listener: org.mule.exception.defaultmessagingexceptionstrategy@113ee1ce info 2016-06-29 04:37:49,879 [main] org.mule.processor.sedastagelifecyclemanager: initialising service: post:/bonusbasepresidentclub:bonus_base_president_club-config.stage1 info 2016-06-29 04:37:49,879 [main] org.mule.construct.flowconstructlifecyclemanager: initialising flow: request_bonus_payment info 2016-06-29 04:37:49,879 [main] org.mule.exception.defaultmessagingexceptionstrategy: initialising exception listener: org.mule.exception.defaultmessagingexceptionstrategy@34d480b9 info 2016-06-29 04:37:49,889 [main] org.mule.processor.sedastagelifecyclemanager: initialising service: request_bonus_payment.stage1 info 2016-06-29 04:37:49,889 [main] org.mule.construct.flowconstructlifecyclemanager: initialising flow: submit_to_payroll info 2016-06-29 04:37:49,889 [main] org.mule.exception.defaultmessagingexceptionstrategy: initialising exception listener: org.mule.exception.defaultmessagingexceptionstrategy@b0f2d91 info 2016-06-29 04:37:49,899 [main] org.mule.processor.sedastagelifecyclemanager: initialising service: submit_to_payroll.stage1 info 2016-06-29 04:37:49,899 [main] org.mule.construct.flowconstructlifecyclemanager: initialising flow: active-period-flow info 2016-06-29 04:37:49,899 [main] org.mule.exception.defaultmessagingexceptionstrategy: initialising exception listener: org.mule.exception.defaultmessagingexceptionstrategy@794eeaf8 info 2016-06-29 04:37:49,909 [main] org.mule.processor.sedastagelifecyclemanager: initialising service: active-period-flow.stage1 info 2016-06-29 04:37:49,954 [main] org.mule.util.journal.transactionjournal: using files tx logs c:\users\zafarj1\documents\workspace_workday\.mule\.\.mule\workday-mule-presclub-bonusbase\queue-tx-log\tx1.log , c:\users\zafarj1\documents\workspace_workday\.mule\.\.mule\workday-mule-presclub-bonusbase\queue-tx-log\tx2.log info 2016-06-29 04:37:49,967 [main] org.mule.util.journal.transactionjournal: using files tx logs c:\users\zafarj1\documents\workspace_workday\.mule\.\.mule\workday-mule-presclub-bonusbase\queue-xa-tx-log\tx1.log , c:\users\zafarj1\documents\workspace_workday\.mule\.\.mule\workday-mule-presclub-bonusbase\queue-xa-tx-log\tx2.log info 2016-06-29 04:37:50,143 [main] org.mule.config.spring.springxmlconfigurationbuilder: configured mule using "org.mule.config.spring.springxmlconfigurationbuilder" configuration resource(s): "[configresource{resourcename='c:\users\zafarj1\documents\workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\sap-to-database.xml'}, configresource{resourcename='c:\users\zafarj1\documents\workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\mule-config.xml'}, configresource{resourcename='c:\users\zafarj1\documents\workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\location-store.xml'}, configresource{resourcename='c:\users\zafarj1\documents\workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\bonus_base_president_club.xml'}, configresource{resourcename='c:\users\zafarj1\documents\workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\bonus-base-to-workday.xml'}, configresource{resourcename='c:\users\zafarj1\documents\workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\bonus-base-presclub-common.xml'}, configresource{resourcename='c:\users\zafarj1\documents\workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\active-period-flow.xml'}]" info 2016-06-29 04:37:50,143 [main] org.mule.config.builders.autoconfigurationbuilder: configured mule using "org.mule.config.builders.autoconfigurationbuilder" configuration resource(s): "[configresource{resourcename='c:\users\zafarj1\documents\workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\sap-to-database.xml'}, configresource{resourcename='c:\users\zafarj1\documents\workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\mule-config.xml'}, configresource{resourcename='c:\users\zafarj1\documents\workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\location-store.xml'}, configresource{resourcename='c:\users\zafarj1\documents\workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\bonus_base_president_club.xml'}, configresource{resourcename='c:\users\zafarj1\documents\workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\bonus-base-to-workday.xml'}, configresource{resourcename='c:\users\zafarj1\documents\workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\bonus-base-presclub-common.xml'}, configresource{resourcename='c:\users\zafarj1\documents\workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\active-period-flow.xml'}]" info 2016-06-29 04:37:50,143 [main] org.mule.module.launcher.application.defaultmuleapplication: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + starting app 'workday-mule-presclub-bonusbase' + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ info 2016-06-29 04:37:50,153 [main] org.mule.util.queue.queuexaresourcemanager: starting resourcemanager info 2016-06-29 04:37:50,153 [main] org.mule.util.queue.queuexaresourcemanager: started resourcemanager info 2016-06-29 04:37:50,205 [main] org.mule.module.http.internal.listener.defaulthttplistenerconfig: listening requests on http://0.0.0.0:9504 info 2016-06-29 04:37:50,215 [main] org.mule.transport.file.fileconnector: connected: fileconnector { name=connector.file.mule.default lifecycle=initialise this=485caa8f numberofconcurrenttransactedreceivers=4 createmultipletransactedreceivers=true connected=true supportedprotocols=[file] serviceoverrides=<none> } info 2016-06-29 04:37:50,215 [main] org.mule.transport.file.fileconnector: starting: fileconnector { name=connector.file.mule.default lifecycle=initialise this=485caa8f numberofconcurrenttransactedreceivers=4 createmultipletransactedreceivers=true connected=true supportedprotocols=[file] serviceoverrides=<none> } info 2016-06-29 04:37:50,215 [main] org.mule.lifecycle.abstractlifecyclemanager: starting connector: connector.file.mule.default info 2016-06-29 04:37:50,225 [main] org.mule.modules.workday.generated.agents.defaultsplashscreenagent: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + devkit extensions (0) used in application + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ info 2016-06-29 04:37:50,225 [main] org.mule.lifecycle.abstractlifecyclemanager: starting model: _mulesystemmodel info 2016-06-29 04:37:50,225 [main] org.mule.construct.flowconstructlifecyclemanager: starting flow: sap-to-databaseflow info 2016-06-29 04:37:50,225 [main] org.mule.construct.flowconstructlifecyclemanager: stopping flow: sap-to-databaseflow info 2016-06-29 04:37:50,225 [main] org.mule.construct.flow: flow sap-to-databaseflow has not been started (initial state = 'stopped') info 2016-06-29 04:37:50,225 [main] org.mule.construct.flowconstructlifecyclemanager: starting flow: storpositionflow info 2016-06-29 04:37:50,225 [main] org.mule.processor.sedastagelifecyclemanager: starting service: storpositionflow.stage1 info 2016-06-29 04:37:50,235 [main] org.mule.construct.flowconstructlifecyclemanager: starting flow: bonus_base_president_club-main info 2016-06-29 04:37:50,235 [main] org.mule.processor.sedastagelifecyclemanager: starting service: bonus_base_president_club-main.stage1 info 2016-06-29 04:37:50,255 [main] org.mule.module.apikit.configuration: ******************************************************************************** * apikit console url: http://127.0.0.1:9504/api/console * ******************************************************************************** info 2016-06-29 04:37:50,255 [main] org.mule.construct.flowconstructlifecyclemanager: starting flow: post:/bonusbasepresidentclub:bonus_base_president_club-config info 2016-06-29 04:37:50,255 [main] org.mule.processor.sedastagelifecyclemanager: starting service: post:/bonusbasepresidentclub:bonus_base_president_club-config.stage1 info 2016-06-29 04:37:50,265 [main] org.mule.construct.flowconstructlifecyclemanager: starting flow: request_bonus_payment info 2016-06-29 04:37:50,265 [main] org.mule.processor.sedastagelifecyclemanager: starting service: request_bonus_payment.stage1 info 2016-06-29 04:37:50,275 [main] org.mule.construct.flowconstructlifecyclemanager: starting flow: submit_to_payroll info 2016-06-29 04:37:50,275 [main] org.mule.construct.flowconstructlifecyclemanager: stopping flow: submit_to_payroll info 2016-06-29 04:37:50,275 [main] org.mule.construct.flow: flow submit_to_payroll has not been started (initial state = 'stopped') info 2016-06-29 04:37:50,275 [main] org.mule.construct.flowconstructlifecyclemanager: starting flow: active-period-flow info 2016-06-29 04:37:50,275 [main] org.mule.processor.sedastagelifecyclemanager: starting service: active-period-flow.stage1 info 2016-06-29 04:37:50,295 [main] org.mule.transport.file.fileconnector: registering listener: active-period-flow on endpointuri: file:///c:/users/zafarj1/desktop/activeperiod/ info 2016-06-29 04:37:50,335 [main] org.mule.lifecycle.abstractlifecyclemanager: initialising: 'null'. object is: filemessagereceiver info 2016-06-29 04:37:50,355 [main] org.mule.transport.file.filemessagereceiver: connecting clusterizable message receiver info 2016-06-29 04:37:50,365 [main] org.mule.lifecycle.abstractlifecyclemanager: starting: 'null'. object is: filemessagereceiver info 2016-06-29 04:37:50,365 [main] org.mule.transport.file.filemessagereceiver: starting clusterizable message receiver info 2016-06-29 04:37:50,407 [main] org.mule.module.management.agent.wrappermanageragent: jvm hasn't been launched wrapper, agent not run. info 2016-06-29 04:37:54,976 [main] org.mule.module.management.agent.abstractjmxagent: attempting register service name: mule.workday-mule-presclub-bonusbase:type=endpoint,service="active-period-flow",connector=connector.file.mule.default,name="endpoint..c.users.zafarj1.desktop.activeperiod" info 2016-06-29 04:37:54,976 [main] org.mule.module.management.agent.abstractjmxagent: registered endpoint service name: mule.workday-mule-presclub-bonusbase:type=endpoint,service="active-period-flow",connector=connector.file.mule.default,name="endpoint..c.users.zafarj1.desktop.activeperiod" info 2016-06-29 04:37:54,976 [main] org.mule.module.management.agent.abstractjmxagent: registered connector service name mule.workday-mule-presclub-bonusbase:type=connector,name="connector.file.mule.default.1" info 2016-06-29 04:37:54,976 [main] org.mule.defaultmulecontext: ********************************************************************** * application: workday-mule-presclub-bonusbase * * os encoding: \, mule encoding: utf-8 * * * * agents running: * * batch module default engine * * jmx agent * * devkit extension information * * wrapper manager * ********************************************************************** info 2016-06-29 04:37:54,976 [main] org.mule.module.launcher.muledeploymentservice: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + started app 'workday-mule-presclub-bonusbase' + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ info 2016-06-29 04:37:54,986 [main] org.mule.module.launcher.deploymentdirectorywatcher: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + mule , kicking (every 5000ms) + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ info 2016-06-29 04:37:55,006 [main] org.mule.module.launcher.startupsummarydeploymentlistener: ********************************************************************** * - - + domain + - - * - - + status + - - * ********************************************************************** * default * deployed * ********************************************************************** ******************************************************************************************************* * - - + application + - - * - - + domain + - - * - - + status + - - * ******************************************************************************************************* * workday-mule-presclub-bonusbase * default * deployed * ******************************************************************************************************* info 2016-06-29 04:38:00,294 [[workday-mule-presclub-bonusbase].bonus_base_president_club-httplistenerconfig.worker.01] org.mule.api.processor.loggermessageprocessor: message received http info 2016-06-29 04:38:02,101 [[workday-mule-presclub-bonusbase].bonus_base_president_club-httplistenerconfig.worker.01] org.mule.api.processor.loggermessageprocessor: <?xml version='1.0' encoding='utf-8'?> <ns0:request_bonus_payment_request xmlns:ns0="urn:com.workday/bsvc"> <ns0:request_bonus_payment_data> <ns0:employee_reference> <employee_id>96</employee_id> <employee_id>118</employee_id> </ns0:employee_reference> <ns0:effective_date> <effective_date>2016-06-12t00:00:00</effective_date> <effective_date>2016-06-12t00:00:00</effective_date> </ns0:effective_date> <ns0:bonus_payment_data> <ns0:bonus_plan_reference> <compensation_plan_id>bonus_plan_store_operations_bonus_-_general_manager</compensation_plan_id> <compensation_plan_id>bonus_plan_store_operations_bonus_-_general_manager</compensation_plan_id> </ns0:bonus_plan_reference> <ns0:amount> <amount>3146.7700</amount> <amount>1939.7200</amount> </ns0:amount> <ns0:currency_reference> <currency_id>usd</currency_id> <currency_id>usd</currency_id> </ns0:currency_reference> <ns0:comment> <comment>sbb-3-2016</comment> <comment>sbb-3-2016</comment> </ns0:comment> </ns0:bonus_payment_data> <ns0:ignore_plan_assignment>true</ns0:ignore_plan_assignment> </ns0:request_bonus_payment_data> </ns0:request_bonus_payment_request> retrieving document @ 'jar:file:/c:/users/zafarj1/documents/workspace_workday/.mule/tmp/workday-mule-presclub-bonusbase/plugins/workday-connector-8.0.0/lib/workday-connector-8.0.0.jar!/wsdl/compensation.wsdl'. error 2016-06-29 04:38:08,802 [[workday-mule-presclub-bonusbase].bonus_base_president_club-httplistenerconfig.worker.01] org.mule.exception.defaultmessagingexceptionstrategy: ******************************************************************************** message : validation error occurred. . message payload of type: elementnsimpl type : org.mule.module.ws.consumer.soapfaultexception code : mule_error--2 javadoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/module/ws/consumer/soapfaultexception.html payload : [detail: null] ******************************************************************************** exception stack is: 1. validation error occurred. . message payload of type: elementnsimpl (org.mule.module.ws.consumer.soapfaultexception) org.mule.module.ws.consumer.wsconsumer$1:196 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/module/ws/consumer/soapfaultexception.html) ******************************************************************************** root exception stack trace: org.mule.module.ws.consumer.soapfaultexception: validation error occurred. . message payload of type: elementnsimpl @ org.mule.module.ws.consumer.wsconsumer$1.processnext(wsconsumer.java:196) @ org.mule.processor.abstractrequestresponsemessageprocessor.processblocking(abstractrequestresponsemessageprocessor.java:56) @ org.mule.processor.abstractrequestresponsemessageprocessor.process(abstractrequestresponsemessageprocessor.java:47) @ org.mule.execution.exceptiontomessagingexceptionexecutioninterceptor.execute(exceptiontomessagingexceptionexecutioninterceptor.java:24) @ org.mule.execution.messageprocessornotificationexecutioninterceptor.execute(messageprocessornotificationexecutioninterceptor.java:107) @ org.mule.execution.messageprocessorexecutiontemplate.execute(messageprocessorexecutiontemplate.java:44) @ org.mule.processor.blockingprocessorexecutor.executenext(blockingprocessorexecutor.java:85) @ org.mule.processor.blockingprocessorexecutor.execute(blockingprocessorexecutor.java:56) @ org.mule.execution.exceptiontomessagingexceptionexecutioninterceptor.execute(exceptiontomessagingexceptionexecutioninterceptor.java:24) @ org.mule.execution.messageprocessornotificationexecutioninterceptor.execute(messageprocessornotificationexecutioninterceptor.java:107) @ org.mule.execution.messageprocessorexecutiontemplate.execute(messageprocessorexecutiontemplate.java:44) @ org.mule.module.ws.consumer.wsconsumer.process(wsconsumer.java:107) @ org.mule.devkit.3.8.2.internal.ws.model.invokesoapmessageprocessor$1.process(invokesoapmessageprocessor.java:89) @ org.mule.devkit.3.8.2.internal.ws.connection.defaultprocesstemplate.execute(defaultprocesstemplate.java:28) @ org.mule.devkit.3.8.2.internal.ws.model.invokesoapmessageprocessor ********************************************************************** * default * deployed * ********************************************************************** ******************************************************************************************************* * - - + application + - - * - - + domain + - - * - - + status + - - * ******************************************************************************************************* * workday-mule-presclub-bonusbase * default * deployed * ******************************************************************************************************* info 2016-06-29 04:38:00,294 [[workday-mule-presclub-bonusbase].bonus_base_president_club-httplistenerconfig.worker.01] org.mule.api.processor.loggermessageprocessor: message received http info 2016-06-29 04:38:02,101 [[workday-mule-presclub-bonusbase].bonus_base_president_club-httplistenerconfig.worker.01] org.mule.api.processor.loggermessageprocessor: <?xml version='1.0' encoding='utf-8'?> <ns0:request_bonus_payment_request xmlns:ns0="urn:com.workday/bsvc"> <ns0:request_bonus_payment_data> <ns0:employee_reference> <employee_id>96</employee_id> <employee_id>118</employee_id> </ns0:employee_reference> <ns0:effective_date> <effective_date>2016-06-12t00:00:00</effective_date> <effective_date>2016-06-12t00:00:00</effective_date> </ns0:effective_date> <ns0:bonus_payment_data> <ns0:bonus_plan_reference> <compensation_plan_id>bonus_plan_store_operations_bonus_-_general_manager</compensation_plan_id> <compensation_plan_id>bonus_plan_store_operations_bonus_-_general_manager</compensation_plan_id> </ns0:bonus_plan_reference> <ns0:amount> <amount>3146.7700</amount> <amount>1939.7200</amount> </ns0:amount> <ns0:currency_reference> <currency_id>usd</currency_id> <currency_id>usd</currency_id> </ns0:currency_reference> <ns0:comment> <comment>sbb-3-2016</comment> <comment>sbb-3-2016</comment> </ns0:comment> </ns0:bonus_payment_data> <ns0:ignore_plan_assignment>true</ns0:ignore_plan_assignment> </ns0:request_bonus_payment_data> </ns0:request_bonus_payment_request> retrieving document @ 'jar:file:/c:/users/zafarj1/documents/workspace_workday/.mule/tmp/workday-mule-presclub-bonusbase/plugins/workday-connector-8.0.0/lib/workday-connector-8.0.0.jar!/wsdl/compensation.wsdl'. error 2016-06-29 04:38:08,802 [[workday-mule-presclub-bonusbase].bonus_base_president_club-httplistenerconfig.worker.01] org.mule.exception.defaultmessagingexceptionstrategy: ******************************************************************************** message : validation error occurred. . message payload of type: elementnsimpl
i need such individual xmls out of log.
<?xml version='1.0' encoding='utf-8'?> <ns0:request_bonus_payment_request xmlns:ns0="urn:com.workday/bsvc"> <ns0:request_bonus_payment_data> <ns0:employee_reference> <employee_id>96</employee_id> <employee_id>118</employee_id> </ns0:employee_reference> <ns0:effective_date> <effective_date>2016-06-12t00:00:00</effective_date> <effective_date>2016-06-12t00:00:00</effective_date> </ns0:effective_date> <ns0:bonus_payment_data> <ns0:bonus_plan_reference> <compensation_plan_id>bonus_plan_store_operations_bonus_-_general_manager</compensation_plan_id> <compensation_plan_id>bonus_plan_store_operations_bonus_-_general_manager</compensation_plan_id> </ns0:bonus_plan_reference> <ns0:amount> <amount>3146.7700</amount> <amount>1939.7200</amount> </ns0:amount> <ns0:currency_reference> <currency_id>usd</currency_id> <currency_id>usd</currency_id> </ns0:currency_reference> <ns0:comment> <comment>sbb-3-2016</comment> <comment>sbb-3-2016</comment> </ns0:comment> </ns0:bonus_payment_data> <ns0:ignore_plan_assignment>true</ns0:ignore_plan_assignment> </ns0:request_bonus_payment_data> </ns0:request_bonus_payment_request>
this way...
public class test { public static final string start_tag = "<ns0:request_bonus_payment_request xmlns:ns0=\"urn:com.workday/bsvc\">"; public static final string end_tag = "</ns0:request_bonus_payment_request>"; public static void main(string[] args) throws exception { list<string> xmls = new arraylist<string>(); filereader fr = new filereader(new file("example.txt")); bufferedreader br = new bufferedreader(fr); string temp = null; while ((temp=br.readline()) !=null) { if (temp.contains(start_tag)) { stringbuffer xml = new stringbuffer(); while (!temp.contains(end_tag)) { xml.append(temp); temp = br.readline(); } xml.append(temp); xmls.add(xml.tostring()); } } system.out.println("xmls "+xmls); }
the list holds xmls.
note holding xmls in memory. if file big and/or heap memory small may run outofmemory
.
Comments
Post a Comment