Loading ...
Sorry, an error occurred while loading the content.

Getting Information from Soap:lite webservice, .NET Client...

Expand Messages
  • Hanz
    Below is the response for SOAP: ResponseCode: 200 (OK) Date:Tue, 01 Jun 2004 21:18:29 GMT Server:Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_ssl/2.8.12
    Message 1 of 1 , Jun 1, 2004
    • 0 Attachment
      Below is the response for SOAP:

      ResponseCode: 200 (OK)
      Date:Tue, 01 Jun 2004 21:18:29 GMT
      Server:Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_ssl/2.8.12
      OpenSSL/0.9.6b DAV/1.0.3 PHP/4.1.2 mod_perl/1.26
      SOAPServer:SOAP::Lite/Perl/0.55
      Content-Length:603
      Connection:close
      Content-Type:text/xml; charset=utf-8

      <?xml version="1.0" encoding="utf-16"?>
      <SOAP-ENV:Envelope xmlns:SOAP-
      ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-
      ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema">
      <SOAP-ENV:Body>
      <namesp1:createsessioncmdResponse xmlns:namesp1="urn:SMITHWS">
      <session_result xsi:type="xsd:int">0</session_result>
      <session xsi:type="xsd:string">04A90WFX7FATIX8NPXGV</session>
      </namesp1:createsessioncmdResponse>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      And below is my code for invoking the webservice

      .....some other code....

      <System.Web.Services.Protocols.SoapDocumentMethodAttribute
      ("urn:SMITHWS#createsessioncmd", RequestNamespace:="urn:SMITHWS",
      ResponseNamespace:="urn:SMITHWS#createsessioncmd/encodedTypes",
      Use:=System.Web.Services.Description.SoapBindingUse.Encoded,
      ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapp
      ed)> _
      Public Function createsessioncmd() As
      <System.Xml.Serialization.SoapElementAttribute
      ("createsessioncmdResponse")>
      UtibaResponseData '<System.Xml.Serialization.SoapElementAttribute
      ("createsessioncmdResponse")> String
      Dim results As Object() = Me.Invoke("createsessioncmd",
      New Object(-1) {})
      Return results(0)
      End Function 'createsessioncmd

      .....some other code....

      <System.Xml.Serialization.XmlTypeAttribute
      ("createsessioncmdResponse")> _
      Public Class UtibaResponseData

      '<System.Web.Services.Protocols.MatchAttribute
      ("session_result>(.*?)<")> _
      '<System.Xml.Serialization.SoapElementAttribute
      ("session_result")> _
      <System.Xml.Serialization.XmlElementAttribute
      ("session_result", GetType(String))> _
      Public session_result As Integer

      '<System.Web.Services.Protocols.MatchAttribute("session>(.*?)
      <")> _
      '<System.Xml.Serialization.SoapElementAttribute("session")> _
      <System.Xml.Serialization.XmlElementAttribute("session",
      GetType(Integer))> _
      Public session As String

      End Class

      The problem is that I can't get session and session_result of the
      soap response stuff into 1 class UtibaResponseData. Can anyone do
      this?

      Normaly , a soap body has this:
      <soap:Body
      soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <types:IOP xsi:type="types:IOP">
      <p xsi:type="xsd:int">int</p>
      <o xsi:type="xsd:string">string</o>
      </types:IOP>
      </soap:Body>

      However in this case it has no <types> tag and I can't change the web
      service.
    Your message has been successfully submitted and would be delivered to recipients shortly.