axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Callahan <call...@gmail.com>
Subject Re: AW: Axis webservices and Visual Basic
Date Wed, 08 Sep 2004 12:59:07 GMT
Peter,

You can also just use the WinHttpRequest to send and receive raw SOAP.
 I use this with a doc/literal style service I developed in Axis 1.1.

Here is some sample code:

Private Function SendRequest() As IXMLDOMNodeList

    Dim httpReq As New WinHttpRequest
    Dim responseDoc As New DOMDocument40

    soapMessageBegin = "<?xml version=""1.0""
encoding=""utf-8""?><soap:Envelope
xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/""
xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
xmlns:xsd=""http://www.w3.org/2001/XMLSchema""><soap:Body><YourRequest
xmlns=""http://tempuri.org"">"
    soapMessageEnd = "</YourRequest></soap:Body></soap:Envelope>"
    
    On Error GoTo ErrTrap
    
    ' make the call to service
    httpReq.SetTimeouts 100000, 100000, 100000, 100000
    httpReq.Open "POST", "http://" & server & ":" & port &
"/yourserviceendpoint"
    httpReq.SetRequestHeader "Content-Type", "text/xml"
    httpReq.SetRequestHeader "SOAPAction", "http://" & server & ":" &
port & "/yourserviceendpoint"
    httpReq.Send soapMessageBegin & "<more xml>" & soapMessageEnd
    
    ' get a DOM of the response
    responseDoc.loadXML httpReq.ResponseText
    Set sendRequest =
responseDoc.getElementsByTagName("ns1:NameOfResponseElementYouExpect")
    
    Set httpReq = Nothing
    Set responseDoc = Nothing

    Exit Function

ErrTrap:
    MsgBox "Error occured."

End Function

Hope this helps--good luck,
pc

On Wed, 8 Sep 2004 10:21:03 +0200, Thiele, Michael (LDS)
<michael.thiele@lds.nrw.de> wrote:
> Peter,
> 
> we have some clients here running successfully Visual Basic 6.0 (with PocketSOAP
> and/or MS SOAP Toolkit 3.0) and Visual Basic .NET against our Axis 1.1 Server.
> We are using RPC/encoded.
> 
> Try to build a Web Service with a simple methods first. E.g.:
> 
> - public void getString()
> 
> deploy the service to Axis, build a VB client, and test it.
> 
> Expand you Web Service step by step public with
> 
> - public int getInt()
> - public Integer getInteger()
> - public String getString()
> - public String getString (String in)
> - public String[] getStringArray()
> - public MyClass getClass()
> - public MyClass[] getClassArray()
> ...etc.
> 
> to locate your interoperability problems.
> 
> Beware of collections, exceptions, null-values in VB and some more pitfalls.
> 
> HTH
> 
> Best regards
> 
> Michael Thiele
> Senior Consultant
> Integrated Business Consulting
> 
> Neue Weyerstr. 6
> D-50676 Koln
> 
> Tel: +49 221 92404-6130
> Fax: +49 221 92404-6199
> Mob: +49 178 6612185
> Mailto: Michael.Thiele@mummert.de
> http://www.mummert-consulting.de
> 
> LDS-NRW
> Mauerstr. 51, Raum 9.27
> 40476 Dusseldorf
> Mailto:Michael.Thiele@lds.nrw.de
> Durchwahl: +49 211 9449-2455
> 
> -----Ursprungliche Nachricht-----
> Von: peter maas [mailto:peter@noterik.nl]
> Gesendet: Mittwoch, 8. September 2004 09:25
> An: axis-user@ws.apache.org
> Cc: cees@noterik.nl
> Betreff: Axis webservices and Visual Basic
> 
> Hi all,
> 
> we are experimenting with accessing our Axis based webservices with a
> Visual Basic client. Alltough we have manage to use the VB client on
> non-axis webservices it doesn't work with any of the axis webservices.
> 
> We have tried a some of the different (rpc/document/wrapped)* *encoding
> styles, but this doesn't seem to change anything.
> 
> anyone got any pointers to documentation related to what the cause of
> this problem might be?
> 
> regards,
> 
> Peter Maas
> Application Architect / Streaming
> 
> Noterik Multimedia BV
> Prins Hendrikkade 120
> 1011 AM Amsterdam
> The Netherlands
> 
> Tel: +31 (0)205929966
> Fax: +31 (0)204688405
> Gsm: +31 (0)624687952
> 
> Web: www.noterik.nl
> --------------------------------------
> 
> Take a look at our streaming solutions: http://www.streamedit.com/demo.html
> Recent project: http://www.managenergy.tv
> ---------------------------------------
> 
> :wq!
> 
>

Mime
View raw message