Monday, October 19, 2015

Epias webservisine C# client'dan erişim

Epias servisleri Java ile yazılmış ve bu servislere C# ile doğrudan erişirken sıkıntı yaşanıyor.
Benim yaptığım adımlar şu şekilde.

1. Epias'ın test sistemi olan  http://95.0.37.186/dgpys/services/EVDServis?wsdl adresinden WSDL dosyasını indirin. Bunu mesela EVDServis.wsdl olarak kaydedin.
2. Bu WSDL'in en sonundaki URL farklı bir yeri gösteriyor olabilir, onu düzeltin
   En son satırlar şu şekilde olmalı

  <wsdl:service name="EVDServis">
    <wsdl:port name="EVDServisSOAP11port_http" binding="dgp:EVDServisSOAP11Binding">
      <soap:address location="http://95.0.37.186/dgpys/services/EVDServis"/>
    </wsdl:port>
    <wsdl:port name="EVDServisSOAP12port_http" binding="dgp:EVDServisSOAP12Binding">
      <soap12:address location="http://95.0.37.186/dgpys/services/EVDServis"/>
    </wsdl:port>
  </wsdl:service>

3. Command prompt açıp aşağıdaki komutu çalıştırın.

    svcutil EVDServis.wsdl /wrapped

   SVCutil'i bulamazsa çalıştırmadan önce şu satırı path'e ekleyin. (Visual Studio 2013 kullandığınızı varsayıyorum, farklı bir versiyon kullanıyorsanız, svcutil'in yerini bulup PATH'i ona göre editleyin)
  set path=%path%;"c:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools"

4. EVDServis.cs isimde bir dosya oluşacak. Bu dosyayı .Net projenize ekleyin

5. EVDServis.cs dosyasını açın ve StringValue[][] şeklindeki kısımları silip StringValue[] yapın

6. Client'dan bir login çağırmayı deneyin, dönen nesne null ise, şu değişiklikleri yapın.
   EVDServis.cs dosyasını açın,
 
Aşağıdaki satırı bulun, kırmızı ile işaretli kısmı silin. Yani Namespace="" (boş string) olsun.

public partial class loginResponse
{
    
    [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://ws.dgpys.deloitte.com", Order=0)]
    public LoginReport LoginReport;
    
    public loginResponse()
    {
    }
    
    public loginResponse(LoginReport LoginReport)
    {
        this.LoginReport = LoginReport;
    }
}

7. Login'i deneyin, başarılı ise bunu kullanmak istediğiniz bütün methodların Response class'ları için yapmalısınız.

Kolay gelsin

Wednesday, May 27, 2015

Visual webgui visual studio click twice problem

When I first run a VWG application within visual studio, sometimes my first events are not fired. For example I click a button, the form tries to load itself. This happens only on first run. I disable "Just my code" debugger option in Visual Studio nad problem is fixed.

Sunday, March 15, 2015

sql server 2005 701 insufficient memory error

We receive 701 insufficient memory error every 2-3 days. Memory clerk report gives no clue. I've found the problem was related to Database Mail. Open your management studio and check for Database mail logs. If there's any problem with the configuration of one of the mail definitions like a changed SMTP ip etc, these errors are causing a memory leak. Fix the configuration and problem is solved.

Friday, October 24, 2014

String or binary data would be truncated.

When running an update in SQL Server 2005, I receive String or binary data would be truncated error. It's strange because it's a simple update and there's no varchar field involved. There's a update trigger in the table. Solution: I receive this error when I login to management studio with Windows Authentication. If I login with a sql server user, I can succesfully execute the update statement.

Friday, June 27, 2014

Friday, June 13, 2014

mscorsvw.exe High CPU and disk activity

After updating Visual Studio 2013, I observed high disk and cpu activity on process mscorsvw.exe The folder under c:\windows\temp has many log files like MSIc4905.LOG, MSIc0dff.LOG totaling a few gigabytes. When I checked those log files I've seen the following line ******* Product: {9C593464-7F2F-37B3-89F8-7E894E3B09EA} Reinstalling VS 2013 is recommended but it didn't work for me. This is a key for a component of Visual Studio which I don't need. I've searched the registry for {9C593464-7F2F-37B3-89F8-7E894E3B09EA} Deleted every key matching and CPU restored back to normal, Visual Studio is running fine.

Thursday, June 5, 2014

sql5005n: Unable to init API env

When I try to import a DB2 catalog to Toad for db2 4.7, I got sql5005n: Unable to init API env error. Database alias combo is not populated. This happens with 64 bit toad whereas 32 bit version is working fine. I had this problem under windows 8.1. Solution: Forget catalog import on toad. Run all below steps with administrator right 1. Install db2 64 bit client to windows. 2. Install Toad 64 bit 3. Edit registry , change HKLM\Software\Wow6432Node\QuestSoftware\Toad For DB2\4.7\DB2COPY key to DB2COPY1 (initial repository for IBM client) 4. Run IBM DB2 configuration assistant 5. Import catalog by using configuration assistant 6. Run toad, database alias combo is populated.