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

RE: [soapbuilders] Q: VB6/Web-service/SOAP?

Expand Messages
  • pprussak@econium.com
    You don t really need the Soap toolkit. The minimum you d need would be and HTTP component, and something that could create/parse XML. The simplest thng to use
    Message 1 of 8 , Sep 5, 2002
    • 0 Attachment
      You don't really need the Soap toolkit. The minimum you'd need would be
      and HTTP component, and something that could create/parse XML.

      The simplest thng to use is MSXML, and with a "known" soap
      implementation you can hand craft your SOAP messages, and then, parse
      them back.

      Your basic SOAP package looks like:
      <?xml version='1.0' encoding='UTF-8'?>
      <Envelope xmlns='http://schemas.xmlsoap.org/soap/envelope/'>
      <Body>soap message goes here</Body>
      </Envelope>

      Your message is whatever your SOAP.WSDL would tell you it is. For
      example, a UDDI message which would go in the "soap message goes here"
      above...:
      <find_service generic='2.0' xmlns='urn:uddi-org:api_v2'>
      <tModelBag>
      <tModelKey>uuid:e731da8b-bd96-4511-9b42-becac0fd2ad4</tModelKey>
      </tModelBag>
      </find_service>

      You'll need to tweak the headers in your request...
      ----
      Set objHTTP = CreateObject("Microsoft.XMLHTTP")
      objHTTP.Open "POST", address, False
      If Err.Number <> 0 Then
      ' handle connection error
      Else
      objHTTP.setRequestHeader "Accept", "text/xml"
      objHTTP.setRequestHeader "Cache-Control", "no-cache"
      objHTTP.setRequestHeader "Content-Type", "text/xml; charset=""utf-8"""
      objHTTP.setRequestHeader "SOAPAction", """"""
      objHTTP.send msg
      ----

      And then, if there are no SOAP/HTTP specific errors, the web service
      would return:
      Set objDOC = New MSXML2.DOMDocument30
      objDOC.loadXML (objHTTP.responseText)

      Where the response text, after stripping out all of the nice soap stuff
      would be something like (just look at the objDoc and use Xpath to select
      appropriate "xml element" you're expecting, in this case "//serviceList"
      node):
      <serviceList generic="2.0" operator="Blah" truncated="false"
      xmlns="urn:uddi-org:api_v2">
      <serviceInfos>
      <serviceInfo serviceKey="fb9ed6be-0a4c-42ec-bd0c-eb60227565cb"
      businessKey="9431dade-f700-439e-8c02-953f850c6ae2">
      <name xml:lang="en">Test</name>
      </serviceInfo>
      </serviceInfos>
      </serviceList>

      SOAP toolkit is better though, because it allows you to get rid of this
      extra processing. It is also fairly easy to install with your VB
      installation (documentation is on the MSDN site, but don't use the .msi
      package).

      Piotr

      -----Original Message-----
      From: ihadtohaveanid [mailto:marcus_halb@...]
      Sent: Thursday, September 05, 2002 9:34 AM
      To: soapbuilders@yahoogroups.com
      Subject: [soapbuilders] Q: VB6/Web-service/SOAP?


      I'm kind of stuck again it seems!

      I just realized that i can't rely on SOAP toolkit in my VB6- application
      as it makes an impact on other users (they too need the
      toolkit on their machines or so i guess anyway).

      Is it possible to develop an application in VB6 (not .net) that
      construct it's own soap request and responses and just 'fires away'
      against a webservice (with standard components and without no
      involvment whatsoever from the SOAP toolkit)?

      I found an interesting article on this matter
      (http://www.devarticles.com/content.php?articleId=186&page=3)

      Couln't i just replace the .asp-file with the actual webservice and
      make it run ok?

      Thanx & Best regards,

      Paddy



      -----------------------------------------------------------------
      This group is a forum for builders of SOAP implementations to discuss
      implementation and interoperability issues. Please stay on-topic.

      To unsubscribe from this group, send an email to:
      soapbuilders-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to
      http://docs.yahoo.com/info/terms/
    Your message has been successfully submitted and would be delivered to recipients shortly.