Web Servisleri

Katılım
23 Kasım 2007
Mesajlar
245
Excel Vers. ve Dili
2003
Arkadaşlar merhaba,

http://193.223.76.5/Service/Report.asmx web servisinden RegionAlarm kısmındaki veriyi çekmem gerekiyor,

microsoft web servislerini indirdim, http://193.223.76.5/Service/Report.asmx adrsini de sorgulatım clas modül haline getiridim,

Public Function wsm_RegionAlarm(ByVal str_UserName As String, ByVal str_PIN1 As String, ByVal str_PIN2 As String, ByVal str_StartDate As String, ByVal str_EndDate As String, ByVal str_Node As String, ByVal str_Group As String, ByVal str_Compress As String, ByVal str_MinuteDif As String, ByVal str_Language As String) As MSXML2.IXMLDOMNodeList
'*****************************************************************
'Proxy function created from http://193.223.76.5/Service/Report.asmx?wsdl.
'
'"wsm_RegionAlarm" is defined as XML. See Complex Types: XML Variables in
'Microsoft Office 2003 Web Services Toolkit Help for details on implementing XML variables.
'*****************************************************************

'Error Trap
On Error GoTo wsm_RegionAlarmTrap

Set wsm_RegionAlarm = sc_Arventox0020Reportx00.RegionAlarm(str_UserName, str_PIN1, str_PIN2, str_StartDate, str_EndDate, str_Node, str_Group, str_Compress, str_MinuteDif, str_Language)

Exit Function
wsm_RegionAlarmTrap:
Arventox0020Reportx00ErrorHandler "wsm_RegionAlarm"
End Function

bu function u nasıl çalıştıracağım verilere nasıl ulaşacağım,

yardımlarınız için teşekkürler
 
Katılım
23 Kasım 2007
Mesajlar
245
Excel Vers. ve Dili
2003
Aşağıdaki yöntemleride uygulayabiliyormuşum?

Kod:
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /Service/Report.asmx HTTP/1.1
Host: 193.223.76.5
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/RegionAlarm"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <RegionAlarm xmlns="http://tempuri.org/">
      <Username>string</Username>
      <PIN1>string</PIN1>
      <PIN2>string</PIN2>
      <StartDate>string</StartDate>
      <EndDate>string</EndDate>
      <Node>string</Node>
      <Group>string</Group>
      <Compress>string</Compress>
      <MinuteDif>string</MinuteDif>
      <Language>string</Language>
    </RegionAlarm>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <RegionAlarmResponse xmlns="http://tempuri.org/">
      <RegionAlarmResult>
        <xsd:schema>schema</xsd:schema>xml</RegionAlarmResult>
    </RegionAlarmResponse>
  </soap:Body>
</soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /Service/Report.asmx HTTP/1.1
Host: 193.223.76.5
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <RegionAlarm xmlns="http://tempuri.org/">
      <Username>string</Username>
      <PIN1>string</PIN1>
      <PIN2>string</PIN2>
      <StartDate>string</StartDate>
      <EndDate>string</EndDate>
      <Node>string</Node>
      <Group>string</Group>
      <Compress>string</Compress>
      <MinuteDif>string</MinuteDif>
      <Language>string</Language>
    </RegionAlarm>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <RegionAlarmResponse xmlns="http://tempuri.org/">
      <RegionAlarmResult>
        <xsd:schema>schema</xsd:schema>xml</RegionAlarmResult>
    </RegionAlarmResponse>
  </soap12:Body>
</soap12:Envelope>
HTTP GET
The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.

GET /Service/Report.asmx/RegionAlarm?Username=string&PIN1=string&PIN2=string&StartDate=string&EndDate=string&Node=string&Group=string&Compress=string&MinuteDif=string&Language=string HTTP/1.1
Host: 193.223.76.5

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<DataSet xmlns="http://tempuri.org/">
  <schema xmlns="http://www.w3.org/2001/XMLSchema">schema</schema>xml</DataSet>
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.

POST /Service/Report.asmx/RegionAlarm HTTP/1.1
Host: 193.223.76.5
Content-Type: application/x-www-form-urlencoded
Content-Length: length

Username=string&PIN1=string&PIN2=string&StartDate=string&EndDate=string&Node=string&Group=string&Compress=string&MinuteDif=string&Language=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<DataSet xmlns="http://tempuri.org/">
  <schema xmlns="http://www.w3.org/2001/XMLSchema">schema</schema>xml</DataSet>
 
Katılım
23 Kasım 2007
Mesajlar
245
Excel Vers. ve Dili
2003
2.1.16. RegionAlarm:
Bu metod tanımlı bölge alarmı listesini oluşturur. XML bilgisinin sütun değerleri aşağıdadır.
<xs:element name="Device_x0020_ID" type="xs:string" minOccurs="0" />
<xs:element name="License_x0020_Plate" type="xs:string" minOccurs="0" />
<xs:element name="Driver" type="xs:string" minOccurs="0" />
<xs:element name="Date_x002F_Time" type="xs:dateTime" minOccurs="0" />
<xs:element name="Status" type="xs:string" minOccurs="0" />
<xs:element name="Region" type="xs:string" minOccurs="0" />
 
Katılım
23 Kasım 2007
Mesajlar
245
Excel Vers. ve Dili
2003
Arkadaşlar vericeğiniz bilgiler benim için önemli...
 
Katılım
23 Kasım 2007
Mesajlar
245
Excel Vers. ve Dili
2003
Sn yeni54,

ilgin için teşekkür ederim,

internetten okumadığım döküman kalmadı, sonuç olumsuz, aslında yapı herkesin uyguladığı tc kimlik no sorgulamayla aynı tc kimlik no sorgulamadada eskiden web servisleri kullanılıyordu,
 
Katılım
22 Ocak 2007
Mesajlar
815
Excel Vers. ve Dili
2003
<xs:element name="Device_x0020_ID" type="xs:string" minOccurs="0" />
<xs:element name="License_x0020_Plate" type="xs:string" minOccurs="0" />
<xs:element name="Driver" type="xs:string" minOccurs="0" />
<xs:element name="Date_x002F_Time" type="xs:dateTime" minOccurs="0" />
<xs:element name="Status" type="xs:string" minOccurs="0" />
<xs:element name="Region" type="xs:string" minOccurs="0" />


bu bilgi ne girdikten sonra gliyor onu söylersen
 
Katılım
23 Kasım 2007
Mesajlar
245
Excel Vers. ve Dili
2003
Sn gulsum1,

bu bilgi gelen xml verisinin sutun değerleridir,
 
Katılım
23 Kasım 2007
Mesajlar
245
Excel Vers. ve Dili
2003
Vb bilgimle bir çözüm yolu geliştirdim, ama biraz uzun bir yol,

get metoduyla sorgulanmış xml verisini WebBrowser nesnesinde görüntülüyorum,

Private Sub WebBrowser3_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
WebBrowser3.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_DONTPROMPTUSER, "c:\blank.xml", "c:\blank.xml"
End Sub

yükleme bitince xml c ye kaydediyorum, kaydedilmiş xml satır satır okuyup verileri tabloya yazıyorum ( verileri satır satır okuyup tabloya yazma işini sn modalının import örneğinden uyarladım)

belki komik bir çözüm ama daha iyi ibr çözüm bulana kadar iş görürü sanırım :)
 
Üst