none
CustomBinding erro RRS feed

  • Pergunta

  • Estou aqui trabalhando com um Web Service, quando entro na função para fazer a buscar está me retornando este erro :

    Não foi possível encontrar a extensão da associação de configuração 'system.serviceModel/bindings/custombinding'.

    Verifique se a extensão da associação está corretamente registrada em

    system.serviceModel/extensions/bindingExtensions e se sua ortografia está correta.

    Para mim está correto tudo correto no web config, mas o erro persiste não sei o que pode ser.

            private static tipoProcessoJudicial buscarProcesso(string num)
            {
                tipoProcessoJudicial processo = new tipoProcessoJudicial();
    
                try
                {
                    servicointercomunicacao222Client ws = new servicointercomunicacao222Client();
                    Integrar.MNI.consultarProcessoRequest inValue = new Integrar.MNI.consultarProcessoRequest();
                    inValue.numeroProcesso = num;
    
                    string mensagem = "";
                    Integrar.MNI.tipoProcessoJudicial tipoProcesso = new tipoProcessoJudicial();
                    Integrar.MNI.consultarProcessoResponse retVal = new consultarProcessoResponse();
                    mensagem = retVal.mensagem;
                    tipoProcesso = retVal.processo;
                    string[] documento = inValue.documento;
    
                    bool passa = ws.consultarProcesso("teste", "teste", inValue.numeroProcesso, "", true, true, true, null, out mensagem, out tipoProcesso);
    
                    return processo;
    
                }
                catch (Exception ex)
                {
                    throw new Exception("Ocorreu algum erro na integração com o ts.");
                }
            }

    xml version="1.0"?>
    <!--
      For more information on how to configure your ASP.NET application, please visit
      http://go.microsoft.com/fwlink/?LinkId=169433
      -->
    <configuration>
      <!--<location path="Paginas/ProcessoJudicial.aspx">
        <system.web>
          <httpRuntime requestValidationMode="2.0"/>
          <customErrors mode="RemoteOnly" defaultRedirect="~/CarregarProcessoJud.aspx"/>
        </system.web>
      </location>-->
      <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
      </startup>
      <appSettings>
        <add key="ValorCorteRetencaoRPV" value="1710,86"/>
        <!--Servidor FTP-->
        <add key="caminhoServidorArquivos" value="\\pge-srv-015\TESTE\PJ\"/>
        <add key="FTP" value="ftp://pge-srv-015/TESTE/PJ/"/>
        <add key="idUsuarioSetorVladmir" value="206"/>
        <add key="NucleoSetorCivel" value="18"/>
        <add key="idSetorSolicitarPagamentoRPV" value="68"/>
        <add key="IdSetorCentraldeDistirbuicao" value="32"/>
        <add key="IdSetorSub" value="29"/>
        <add key="IdSetorGabinete" value="31"/>
        <add key="IdSetorNupad" value="70"/>
      </appSettings>
      <system.web>
        <pages validateRequest="false" controlRenderingCompatibilityVersion="4.5.2"/>
        <httpRuntime maxRequestLength="99999"/>
        <compilation debug="true" targetFramework="4.5.2">
          <assemblies>
            <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          </assemblies>
        </compilation>
        <customErrors mode="On">
          <error statusCode="403" redirect="~/Erro.aspx"/>
          <error statusCode="404" redirect="~/Erro.aspx"/>
          <error statusCode="500" redirect="~/Erro.aspx"/>
        </customErrors>
      </system.web>
      <connectionStrings>
        <add name="DBSGPConnectionString" connectionString="Data Source=pge-srv-019;Initial Catalog=DBSGP_AUX;User ID=DBSGP;Password=DBSGP" providerName="System.Data.SqlClient"/>
        <add name="DBSGPPRODConnectionString" connectionString="Data Source=pge-srv-019;Initial Catalog=DBSGPPROD;User ID=DBSGP;Password=DBSGP" providerName="System.Data.SqlClient"/>
        <add name="sgpConnectionString" connectionString="Data Source=pge-srv-019;Initial Catalog=sgp;User ID=DBSGP;Password=DBSGP" providerName="System.Data.SqlClient"/>
      </connectionStrings>
      <system.serviceModel>
        <bindings>
          <customBinding>
            <binding name="ServicoIntercomunicacao222ImplPortBinding">
              <mtomMessageEncoding messageVersion="Soap12" maxBufferSize="99999"/>
              <httpTransport manualAddressing="false" maxBufferPoolSize="524288" maxReceivedMessageSize="999999999" allowCookies="false" authenticationScheme="Anonymous" bypassProxyOnLocal="false" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard" keepAliveEnabled="true" maxBufferSize="999999999" proxyAuthenticationScheme="Anonymous" realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false" useDefaultWebProxy="true"/>
            </binding>
          </customBinding>
          <basicHttpBinding>
            <binding name="IntegracaoSegurancaSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="99999999" maxBufferPoolSize="524288" maxReceivedMessageSize="2000000000" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
              <readerQuotas maxDepth="32" maxStringContentLength="99999999" maxArrayLength="99999999" maxBytesPerRead="99999999" maxNameTableCharCount="99999999"/>
              <security mode="None">
                <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
                <message clientCredentialType="UserName" algorithmSuite="Default"/>
              </security>
            </binding>
            <binding name="IntegracaoPASoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="99999999" maxBufferPoolSize="524288" maxReceivedMessageSize="2000000000" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
              <readerQuotas maxDepth="32" maxStringContentLength="99999999" maxArrayLength="99999999" maxBytesPerRead="99999999" maxNameTableCharCount="99999999"/>
              <security mode="None">
                <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
                <message clientCredentialType="UserName" algorithmSuite="Default"/>
              </security>
            </binding>
            <binding name="IntegracaoParteSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="99999999" maxBufferPoolSize="524288" maxReceivedMessageSize="2000000000" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
              <readerQuotas maxDepth="32" maxStringContentLength="99999999" maxArrayLength="99999999" maxBytesPerRead="99999999" maxNameTableCharCount="99999999"/>
              <security mode="None">
                <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
                <message clientCredentialType="UserName" algorithmSuite="Default"/>
              </security>
            </binding>
            <binding name="AcessoPJSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="99999999" maxBufferPoolSize="524288" maxReceivedMessageSize="2000000000" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
              <readerQuotas maxDepth="32" maxStringContentLength="99999999" maxArrayLength="99999999" maxBytesPerRead="99999999" maxNameTableCharCount="99999999"/>
              <security mode="None">
                <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
                <message clientCredentialType="UserName" algorithmSuite="Default"/>
              </security>
            </binding>
          </basicHttpBinding>
        </bindings>
        <client>
          <endpoint address="http://homologacao.teste.com.br:8080/ServicoIntercomunicacao/servicointercomunicacao?wsdl" binding="customBinding" bindingConfiguration="ServicoIntercomunicacao222ImplPortBinding" contract="MNI.servicointercomunicacao222" name="ServicoIntercomunicacao222ImplPort"/>
          <endpoint address="http://200.223.90.10:8080/integracaopge/wservice?wsdl" binding="custombinding" bindingConfiguration="integracaopgeportbinding" contract="wstj.integracaopge" name="integracaopgeport"/>
          <!--<endpoint address="http://www.tjse.jus.br:80/IntegracaoPGE/wservice"
               binding="customBinding" bindingConfiguration="IntegracaoPGEPortBinding"
               contract="WSTJ.IntegracaoPGE" name="IntegracaoPGEPort" /> -->
          <endpoint address="http://pge-srv-019/sgpintegracao/integracaoseguranca.asmx" binding="basicHttpBinding" bindingConfiguration="IntegracaoSegurancaSoap" contract="Integracao.IntegracaoSegurancaSoap" name="IntegracaoSegurancaSoap"/>
          <endpoint address="http://pge-srv-019/sgpintegracao/integracaopa.asmx" binding="basicHttpBinding" bindingConfiguration="IntegracaoPASoap" contract="IntegracaoPA.IntegracaoPASoap" name="IntegracaoPASoap"/>
          <endpoint address="http://pge-srv-019/sgpintegracao/integracaoparte.asmx" binding="basicHttpBinding" bindingConfiguration="IntegracaoParteSoap" contract="IntegracaoParte.IntegracaoParteSoap" name="IntegracaoParteSoap"/>
          <!--<endpoint address="http://pge-srv-019/sgpintegracaowstj/acessopj.asmx"
            binding="basicHttpBinding" bindingConfiguration="AcessoPJSoap"
            contract="IntegracaoPJ.AcessoPJSoap" name="AcessoPJSoap" />-->
        </client>
      </system.serviceModel>
    </configuration>




    segunda-feira, 10 de abril de 2017 10:57