Forum

Web Servis WDSL
 
Bildirimler
Hepsini Temizle

Web Servis WDSL

6 Yazılar
2 Üyeler
0 Likes
2,262 Görüntüleme
(@MustafaALBAYRAK)
Gönderiler: 43
Trusted Member
Konu başlatıcı
 

<?xml version="1.0" encoding="utf-16"?>
<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:element name="Login">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="UserName" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Lic" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="LoginResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="LoginResult" type="tns:UserInfo" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:complexType name="UserInfo">
        <s:sequence>
          <s:element minOccurs="1" maxOccurs="1" name="UserId" type="s:int" />
          <s:element minOccurs="0" maxOccurs="1" name="UserName" type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="IsActive" type="s:boolean" />
        </s:sequence>
      </s:complexType>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="LoginSoapIn">
    <wsdl:part name="parameters" element="tns:Login" />
  </wsdl:message>
  <wsdl:message name="LoginSoapOut">
    <wsdl:part name="parameters" element="tns:LoginResponse" />
  </wsdl:message>
  <wsdl:portType name="LServiceSoap">
    <wsdl:operation name="Login">
      <wsdl:input message="tns:LoginSoapIn" />
      <wsdl:output message="tns:LoginSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="LServiceSoap" type="tns:LServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="Login">
      <soap:operation soapAction="http://tempuri.org/Login" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="LServiceSoap12" type="tns:LServiceSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="Login">
      <soap12:operation soapAction="http://tempuri.org/Login" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="LService">
    <wsdl:port name="LServiceSoap" binding="tns:LServiceSoap">
      <soap:address location="http://WEBSITEADRESI/LoginServiceCokluGiris.asmx" />
    </wsdl:port>
    <wsdl:port name="LServiceSoap12" binding="tns:LServiceSoap12">
      <soap12:address location="http://WEBSITEADRESI/LoginServiceCokluGiris.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

 

Şeklinde WDSL adresi var.Bu veriyi convert ettiğimde aşağıdaki gibi çıktı vermekte.

projeye bunu eklediğimde web config hatası alıyorum.konudan pek anlamadığım için izlediğim ol konusunda şüpheliyim.

kısacası ben yukarıda vermiş olduğum wdsl adresinin  bir kopyasını kendi domainimde hizmet vermesini istiyorum.

mantık olarak mümkün müdür bu?

 

CONVERT EDILEN KODLAR

//------------------------------------------------------------------------------
// <auto-generated>
//     Bu kod araç tarafından oluşturuldu.
//     Çalışma Zamanı Sürümü:2.0.50727.8009
//
//     Bu dosyada yapılacak değişiklikler yanlış davranışa neden olabilir ve
//     kod yeniden oluşturulursa kaybolur.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;

//
// Assembly WebServiceStudio Version = 2.0.50727.8009
//

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("WebServiceStudio", "0.0.0.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="LServiceSoap", Namespace="http://tempuri.org/")]
public partial class LService : System.Web.Services.Protocols.SoapHttpClientProtocol {
   
    /// <remarks/>
    public LService() {
        this.Url = "http://asistantelekom.com/LoginServiceCokluGiris.asmx";
    }
   
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/Login", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public UserInfo Login(string UserName, string Password, string Lic) {
        object[] results = this.Invoke("Login", new object[] {
                    UserName,
                    Password,
                    Lic});
        return ((UserInfo)(results[0]));
    }
   
    /// <remarks/>
    public System.IAsyncResult BeginLogin(string UserName, string Password, string Lic, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("Login", new object[] {
                    UserName,
                    Password,
                    Lic}, callback, asyncState);
    }
   
    /// <remarks/>
    public UserInfo EndLogin(System.IAsyncResult asyncResult) {
        object[] results = this.EndInvoke(asyncResult);
        return ((UserInfo)(results[0]));
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("WebServiceStudio", "0.0.0.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
public partial class UserInfo {
   
    /// <remarks/>
    public int UserId;
   
    /// <remarks/>
    public string UserName;
   
    /// <remarks/>
    public bool IsActive;
}

 

 
Gönderildi : 05/02/2015 13:13

(@eravse)
Gönderiler: 1753
Üye
 

WSDL in kendi sisteminizde hizmet vermesi için öncelikle onu bir servis halinde tekrar programlamanız gerekir. Sizin yaptığınız işlem WSDL den sadece serialize class oluşturmak .

 izlenecek adımlar şu şekilde olabilir.

bir proje açın web servis yada WCF

daha sonra bu wsdl i web referans olarak ekleyin

bir class oluşturup bu wsdl deki methodları inject edin

örneğin

wsdlSoapClient client = new Client..... seklınde cagırın ve methodu tetıkleyın

 

daha sonra kendı sıstemınızde ıstedıgınız gıbı kullanın

 

*** yalnız burada dıkkat edılecek husus eger karsı wsdl calısmayı durdurursa sızınde servısınız durur o yuzden eger servıs buyuk degıl ve methodları bılıyorsanız akıs semasını kendınız yenı bır servıs olusturunuz

 

ProfectSoft Yazılım ve Danışmanlık Hizmetleri
LogPusher & Bifyou E-Commerce System
www.profectsoft.com

 
Gönderildi : 05/02/2015 13:31

(@MustafaALBAYRAK)
Gönderiler: 43
Trusted Member
Konu başlatıcı
 

Erdem bey oncelikle vermis oldugunuz bilgilendirme icin tesekkur ederim.

c den cok fazla anlamiyorum hele ki web servis!

benim yapmak istedigim calisan web servisin bire bir aynisini olusturmak.

fakat bu kendi domainimde hizmet versin.

boyle birseyin mumkunati icin neler tedarik edilmeli? 

 
Gönderildi : 05/02/2015 13:42

(@eravse)
Gönderiler: 1753
Üye
 

Öncelikle sizin kendi domaninizde çalışması için bu servisin ne iş yapacağını belirlemeniz gerekmektedir. Örn :

Benim servisim Active Directory Kullanıcılarını listelesin
bunu nasıl yaparım

1 mevcut ad ye baglanırım

2 - tum kullanıcıları cekerım

3 - bunu resutl set olarak gerı donerım

bu ıslemı mantık olarak kurdukdan sonra servısı yazmaya gecıp kendınıze bır servıs olusturabılırsınız

bu ıslemler ıcın Visual Studio yeterlı olacaktır . Materyal ve IDE anlamında .net 4.5 FW de yuklemenız gerekebılır yok ıse

 

ProfectSoft Yazılım ve Danışmanlık Hizmetleri
LogPusher & Bifyou E-Commerce System
www.profectsoft.com

 
Gönderildi : 05/02/2015 13:46

(@MustafaALBAYRAK)
Gönderiler: 43
Trusted Member
Konu başlatıcı
 

wdsl içeriğinde servisin ne yaptığı açık sanırım yada ben yanlış yorumluyor olabilirim.

wdsl den şunu anlıyorum.

Username, Password ve Lic kontrolü yap

<s:element minOccurs="0" maxOccurs="1" name="UserName" type="s:string"/>

<s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/>

<s:element minOccurs="0" maxOccurs="1" name="Lic" type="s:string"/>

 ve sonra IsActive de kullanıcı aktif ise true gönder

<s:element minOccurs="1" maxOccurs="1" name="UserId" type="s:int"/>

<s:element minOccurs="0" maxOccurs="1" name="UserName" type="s:string"/>

<s:element minOccurs="1" maxOccurs="1" name="IsActive" type="s:boolean"/>

 bu servis yazılabilirmiyiz? bana bu konuda yardımcı olurmusunuz? böyle bir projeyi paylaşabilirmisiniz benimle?

kısacası wdsl den yola çıkılarak bir proje hazırlamak lazım sanıyorum.

 
Gönderildi : 05/02/2015 15:14

(@eravse)
Gönderiler: 1753
Üye
 

yardımcı olabılırım evet. 

  

ProfectSoft Yazılım ve Danışmanlık Hizmetleri
LogPusher & Bifyou E-Commerce System
www.profectsoft.com

 
Gönderildi : 05/02/2015 16:30

Paylaş: