vico
vico

Reputation: 18171

Detect web server type

Trying to understand what kind of binding is used in following web service request.

- <s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
- <s:Header>
  <a:Action s:mustUnderstand="1">http://tempuri.org/IService1/GetData</a:Action> 
  <a:MessageID>urn:uuid:e9a57d19-db08-4566-92c7-c3a340ce9dc5</a:MessageID> 
  <a:To s:mustUnderstand="1">http://10.1.2.222:8733/Design_Time_Addresses/WcfServiceLibrary1/Service1/mex</a:To> 
  </s:Header>
- <s:Body>
- <GetData xmlns="http://tempuri.org/">
  <value>4</value> 
  </GetData>
  </s:Body>
  </s:Envelope>

I suppose this is not SOAP request. But what is that?

UPD

WSDL:

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Service1" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <xsd:schema targetNamespace="http://tempuri.org/Imports">
      <xsd:import schemaLocation="" namespace="http://tempuri.org/" />
      <xsd:import schemaLocation="" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="IService1_GetData_InputMessage">
    <wsdl:part name="parameters" element="tns:GetData" />
  </wsdl:message>
  <wsdl:message name="IService1_GetData_OutputMessage">
    <wsdl:part name="parameters" element="tns:GetDataResponse" />
  </wsdl:message>
  <wsdl:portType name="IService1">
    <wsdl:operation name="GetData">
      <wsdl:input wsaw:Action="http://tempuri.org/IService1/GetData" message="tns:IService1_GetData_InputMessage" />
      <wsdl:output wsaw:Action="http://tempuri.org/IService1/GetDataResponse" message="tns:IService1_GetData_OutputMessage" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="BasicHttpBinding_IService1" type="tns:IService1">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="GetData">
      <soap:operation soapAction="http://tempuri.org/IService1/GetData" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="Service1">
    <wsdl:port name="BasicHttpBinding_IService1" binding="tns:BasicHttpBinding_IService1">
      <soap:address location="http://localhost:8733/Design_Time_Addresses/WcfServiceLibrary1/Service1/" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

According WSDL it is should be SOAP. But which one 1.1 or 1.2?

How to detect request type when I have sniffed request text?

Upvotes: 0

Views: 83

Answers (1)

Zubair Ashraf
Zubair Ashraf

Reputation: 279

Above is a valid SOAP request. Its header shows that It is using WS-Adressing (http://en.wikipedia.org/wiki/WS-Addressing)

As you can check in WSDL file Binding is HTTP based.

Upvotes: 1

Related Questions