2016-06-29 27 views
0

私は巨大なログファイルを持っています。このファイルには複数のxmlファイルがあります。これらのxmlをそれぞれ取り出し、それをさらに操作に使用したいと思います。xmlは同じ開閉ストリング、私はこれに基づいて分割しようとしていた。これをどうすればいいのですか?内容に基づいて分割されたファイル

[email protected]: 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 from 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 from 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 from 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 from URL [file:/var/wawa/properties/workday-mule-presclub-bonusbase.properties] 
WARN 2016-06-29 04:37:46,560 [main] org.springframework.context.support.PropertySourcesPlaceholderConfigurer: Could not load properties from URL [file:/var/wawa/properties/workday-mule-presclub-bonusbase.properties]: \var\wawa\properties\workday-mule-presclub-bonusbase.properties (The system cannot find the path specified) 
INFO 2016-06-29 04:37:46,561 [main] org.springframework.context.support.PropertySourcesPlaceholderConfigurer: Loading properties file from 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 from 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 from 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 from URL [file:/var/wawa/properties/workday-mule-presclub-bonusbase.properties] 
WARN 2016-06-29 04:37:46,581 [main] org.springframework.context.support.PropertySourcesPlaceholderConfigurer: Could not load properties from URL [file:/var/wawa/properties/workday-mule-presclub-bonusbase.properties]: \var\wawa\properties\workday-mule-presclub-bonusbase.properties (The system cannot find the path specified) 
INFO 2016-06-29 04:37:46,610 [main] org.mule.config.spring.processors.NoDevkitInjectorProcessor: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring 
WARN 2016-06-29 04:37:48,217 [main] org.mule.module.ognl.expression.OgnlExpressionEvaluator: OGNL module is deprecated and will be 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: [email protected] 
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: [email protected] 
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: [email protected] 
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: [email protected] 
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: [email protected] 
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: [email protected] 
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 for tx logs C:\Users\zafarj1\Documents\Workspace_workday\.mule\.\.mule\workday-mule-presclub-bonusbase\queue-tx-log\tx1.log and 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 for tx logs C:\Users\zafarj1\Documents\Workspace_workday\.mule\.\.mule\workday-mule-presclub-bonusbase\queue-xa-tx-log\tx1.log and 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" with 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" with 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 for 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 this 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: This JVM hasn't been launched by the wrapper, the agent will not run. 
INFO 2016-06-29 04:37:54,976 [main] org.mule.module.management.agent.AbstractJmxAgent: Attempting to register service with 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 with 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 with 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 is up and 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 from 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 at '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 is 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 is 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 is of type: ElementNSImpl 
at org.mule.module.ws.consumer.WSConsumer$1.processNext(WSConsumer.java:196) 
at org.mule.processor.AbstractRequestResponseMessageProcessor.processBlocking(AbstractRequestResponseMessageProcessor.java:56) 
at org.mule.processor.AbstractRequestResponseMessageProcessor.process(AbstractRequestResponseMessageProcessor.java:47) 
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) 
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) 
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) 
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:85) 
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:56) 
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) 
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) 
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) 
at org.mule.module.ws.consumer.WSConsumer.process(WSConsumer.java:107) 
at org.mule.devkit.3.8.2.internal.ws.model.InvokeSoapMessageProcessor$1.process(InvokeSoapMessageProcessor.java:89) 
at org.mule.devkit.3.8.2.internal.ws.connection.DefaultProcessTemplate.execute(DefaultProcessTemplate.java:28) 
at 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 from 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 at '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 is of type: ElementNSImpl 

このログからこのような個別のxmlを取得する必要があります。

<?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> 
+1

に書き込みますあなたの試したコード –

+0

とあなたのログファイルの構造の例を共有してください – DaveH

+0

私はこれを分割する方法を見つけられませんでした。終了文字列。 @DaveH – scorpion

答えて

1

こう...

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 are "+xmls); 

    } 

リストは、すべてのXMLSを保持しています。

メモすべてのxmlをメモリに保持しています。ファイルが大きすぎる、ヒープメモリが小さい場合は、OutOfMemoryに実行される可能性があります。

+0

これは役に立ちますが、ログファイルは常に50MB以上になります。私は今どのような選択肢を持っていますか? – scorpion

+0

ヒープは何ですか?リストに格納する代わりに、準備が整ったら各xmlを処理し始める必要があります。 –

+0

私はマップの形ですべてを欲しいので、順番にESBアプリケーションで使いたいと思います。 – scorpion

-1
org.codehaus.stax2.XMLStreamReader2 might help you. 

使用法:

  1. XMLStreamReader2への入力ファイルを渡します。

    ((XMLInputFactory2)XMLInputFactory.newInstance())。createXMLStreamReader(xmlFile); hasNext()方法最後に使用しjavax.xml.transform.TransformerFactoryでXML

  2. の開始タグを見つけるためにxmlStreamReader.getEventType() == XMLEvent.START_ELEMENT

  3. メイクの使用によってリーダーによる

  4. 反復は、新しいファイル

+0

入力はログファイルであり、XMLではありません! –

関連する問題