Prezados, bom dia,
Estou tentando implementar o método de consultar eventos do empregador e estou recebendo um erro 500 com a seguinte exception Metadados não encontrado para a criação da instância do DataSource do SpedTabelas TABELA9., alguém consegue auxiliar?
Script de comunicação:
$config = [
'tpAmb' => 2,
//tipo de ambiente 1 - Produção; 2 - Produção restrita - dados reais;3 - Produção restrita - dados fictícios.
'verProc' => 'S_1.2.0',
//Versão do processo de emissão do evento. Informar a versão do aplicativo emissor do evento.
'eventoVersion' => 'S.1.2.0',
//versão do layout do evento
'serviceVersion' => '1.5.0',
//versão do webservice
'empregador' => [
'tpInsc' => 1, //1-CNPJ, 2-CPF
'nrInsc' => '99999999999999', //numero do documento
'nmRazao' => 'Razão social',
],
'transmissor' => [
'tpInsc' => 1, //1-CNPJ, 2-CPF
'nrInsc' => '99999999999999' //numero do documento
],
];
$configJson = json_encode($config, JSON_PRETTY_PRINT);
try {
$content = file_get_contents('/home/Downloads/cert.pfx');
$password = 'password';
$certificate = Certificate::readPfx($content, $password);
$soap = new SoapCurl($certificate);
$tools = new Tools($configJson, $certificate);
$tools->loadSoapClass($soap);
$tpEvt = 'S-1000';
$perapur = '2023-12'; //ou apenas o ano
$response = $tools->consultarEventosEmpregador($tpEvt, $perapur);
print_r($response); die;
echo FakePretty::prettyPrint($response, '');
} catch (\Exception $e) {
echo $e->getMessage();
}
Response XML:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">
a:InternalServiceFault</faultcode>
<faultstring xml:lang="en-US">ComponentActivator: could not instantiate
ESocial.Dwl.Cirurgico.Nucleo.Controle.ConsultaIdentificadorEventos.ControleConsultaIdentificadoresEventosEmpregador
</faultstring>
<detail>
<ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<HelpLink>groups.google.com/group/castle-project-users</HelpLink>
<InnerException>
<HelpLink i:nil="true" />
<InnerException>
<HelpLink>groups.google.com/group/castle-project-users</HelpLink>
<InnerException>
<HelpLink i:nil="true" />
<InnerException>
<HelpLink i:nil="true" />
<InnerException i:nil="true" />
<Message>Metadados não encontrado para a criação da instância do DataSource do
SpedTabelas TABELA9.</Message>
<StackTrace> at
Serpro.ESocial.RecepcaoEvento.Vep.DataSource.SpedTabelas.DataSourceSpedTabelas.InicializaInstancia(String
identificadorTabela) in
E:\Jenkins2\Slaves\workspace\DEBHE\DE604\PROD_REST\ESocial.RecepcaoEvento\src\Serpro.ESocial.RecepcaoEvento\Vep\DataSource\SpedTabelas\DataSourceSpedTabelas.cs:line
272
at
Serpro.ESocial.RecepcaoEvento.Vep.DataSource.SpedTabelas.DataSourceSpedTabelas..ctor(List`1
parametros, ConfiguracaoUtil cu, IntegradorConsultaService ics) in
E:\Jenkins2\Slaves\workspace\DEBHE\DE604\PROD_REST\ESocial.RecepcaoEvento\src\Serpro.ESocial.RecepcaoEvento\Vep\DataSource\SpedTabelas\DataSourceSpedTabelas.cs:line
141
at
ESocial.Dwl.Cirurgico.Nucleo.Dominio.DataSourceSpedTabelas.DataSourceTipoEvento..ctor(ConfiguracaoUtil
cu, IntegradorConsultaService ics) in
E:\Jenkins2\Slaves\workspace\DEBHE\DE604\ESocial.Dwl.Cirurgico.Nucleo\src\ESocial.Dwl.Cirurgico.Nucleo\Dominio\DataSourceSpedTabelas\DataSourceTipoEvento.cs:line
19</StackTrace>
<Type>Serpro.ESocial.RecepcaoEvento.ExcecaoRecepcaoEvento</Type>
</InnerException>
<Message>Exception has been thrown by the target of an invocation.</Message>
<StackTrace> at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[]
arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.FastCreateInstance(Type
implType, Object[] arguments, ConstructorCandidate constructor)
at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate
constructor, Object[] arguments, Type implType)</StackTrace>
<Type>System.Reflection.TargetInvocationException</Type>
</InnerException>
<Message>ComponentActivator: could not instantiate
ESocial.Dwl.Cirurgico.Nucleo.Dominio.DataSourceSpedTabelas.DataSourceTipoEvento
</Message>
<StackTrace> at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate
constructor, Object[] arguments, Type implType)
at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext
context, ConstructorCandidate constructor, Object[] arguments)
at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext
context)
at
Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext
context, Burden burden)
at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext
context, Boolean trackedExternally)
at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext
context, IReleasePolicy releasePolicy)
at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context,
Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean
instanceRequired)
at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext
context, ISubDependencyResolver contextHandlerResolver, ComponentModel model,
DependencyModel dependency)
at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate
constructor, CreationContext context)
at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext
context)
at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext
context)
at
Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext
context, Burden burden)
at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext
context, Boolean trackedExternally)
at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext
context, IReleasePolicy releasePolicy)
at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context,
Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean
instanceRequired)
at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service,
IDictionary additionalArguments, IReleasePolicy policy)
at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type
service, IDictionary arguments, IReleasePolicy policy)
at Castle.Windsor.WindsorContainer.Resolve[T]()
at
ESocial.Dwl.Cirurgico.Nucleo.Controle.ConsultaIdentificadorEventos.ControleConsultaIdentificadoresEventosEmpregador..ctor()
in
E:\Jenkins2\Slaves\workspace\DEBHE\DE604\ESocial.Dwl.Cirurgico.Nucleo\src\ESocial.Dwl.Cirurgico.Nucleo\Controle\ConsultaIdentificadorEventos\ControleConsultaIdentificadoresEventosEmpregador.cs:line
60</StackTrace>
<Type>Castle.MicroKernel.ComponentActivator.ComponentActivatorException</Type>
</InnerException>
<Message>Exception has been thrown by the target of an invocation.</Message>
<StackTrace> at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments,
Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr,
Binder binder, Object[] parameters, CultureInfo culture)
at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.FastCreateInstance(Type
implType, Object[] arguments, ConstructorCandidate constructor)
at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate
constructor, Object[] arguments, Type implType)</StackTrace>
<Type>System.Reflection.TargetInvocationException</Type>
</InnerException>
<Message>ComponentActivator: could not instantiate
ESocial.Dwl.Cirurgico.Nucleo.Controle.ConsultaIdentificadorEventos.ControleConsultaIdentificadoresEventosEmpregador
</Message>
<StackTrace> at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate
constructor, Object[] arguments, Type implType)
at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext
context, ConstructorCandidate constructor, Object[] arguments)
at
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext
context)
at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext
context, Burden burden)
at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context,
Boolean trackedExternally)
at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context,
IReleasePolicy releasePolicy)
at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean
requiresDecommission, Boolean instanceRequired, Burden& burden)
at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean
instanceRequired)
at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary
additionalArguments, IReleasePolicy policy)
at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service,
IDictionary arguments, IReleasePolicy policy)
at Castle.Windsor.WindsorContainer.Resolve[T]()
at
ESocial.Dwl.Cirurgico.Wcf.WsConsultarIdentificadoresEventos.ConsultarIdentificadoresEventosEmpregador(XmlElement
consultaEventosEmpregador)
at SyncInvokeConsultarIdentificadoresEventosEmpregador(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs,
Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&
rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&
rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace>
<Type>Castle.MicroKernel.ComponentActivator.ComponentActivatorException</Type>
</ExceptionDetail>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
Prezado colega !! sabe o que InternalServiceFault significa ??
Esse é um problema do sistema do esocial e não da sua consulta !! é um erro interno ! deles !!!
Prezados, bom dia, Estou tentando implementar o método de consultar eventos do empregador e estou recebendo um erro 500 com a seguinte exception Metadados não encontrado para a criação da instância do DataSource do SpedTabelas TABELA9., alguém consegue auxiliar?
Script de comunicação:
Response XML: