|
-
Mar 21st, 2006, 11:15 AM
#1
Thread Starter
Member
Web Reference in Visual Basic 6?
I understand the .NET stuff has Add-> Web Reference capability built in, where you simply supply the WSDL URL to the wizard but is there any way to do create a Web Reference in Visual Basic 6?
...if not, how can I do this using another method in Visual Basic 6?
Basically, the 3rd party company we wish to interact with has given us the WSDL URL, and two methods - sendRequest() and getResponse().
What about the following with the Inet control:
VB Code:
Dim PostData As String
Dim Headers As String
Inet1.Protocol = icHTTPS
Inet1.RemoteHost = "companywebsite.com"
Inet1.RemotePort = 443
Inet1.Document = "/stspost"
Inet1.UserName = "userID"
Inet1.Password = "password"
PostData = "sendRequest=REQUEST GOES HERE (FIXED-LENGTH TEXT)"
Headers = "Content-Type: application/x-www-form-urlencoded" & vbCrLf
Inet1.Execute , "Post", PostData, Headers
Thanks for any help you guys can give!
-
Mar 21st, 2006, 11:33 AM
#2
Thread Starter
Member
Re: Web Reference in Visual Basic 6?
Well, I got that to actually submit and get some feedback, but now it's coming back in XML, apparently. Here's what dumps to the textbox:
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>parsing error: oracle.xml.parser.v2.XMLParseException: Start of root element expected.</faultstring>
<faultactor>/web-services/Auth</faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Not sure, but maybe it's time to just go ahead and jump into .NET.
Money-wise, it's no problem for me to get the company to purchase Visual Studio 2005 Standard, since it's only around $250, but how difficult is it to migrate Visual Basic 6 projects over? I've heard it's easier than with older versions of .NET, but I would like some feedback.
-
Mar 21st, 2006, 11:48 AM
#3
Thread Starter
Member
Re: Web Reference in Visual Basic 6?
I'm downloading Visual Basic 2005 Express now, just to see how it works. I'm assuming I can't compile, etc. with it.
Is there any way to purchase Visual Basic 2005 Standard by itself, as I don't need VC++, J#, etc.? I can only find Visual Studio 2005.
-
Mar 21st, 2006, 02:08 PM
#4
Thread Starter
Member
Re: Web Reference in Visual Basic 6?
Visual Basic 2005 is a whole new can of worms so...
I downloaded the SOAP Toolkit 3 and I may be getting somewhere.
VB Code:
Dim Client As SoapClient30 ' SOAP Client
Dim Results As IXMLDOMSelection ' All the results.
Dim MainNode As IXMLDOMNode ' High-level nodes.
Dim ItemList As IXMLDOMNodeList ' All the result items.
Dim ItemNode As IXMLDOMNode ' Result item nodes.
Dim DataList As IXMLDOMNodeList ' All the data items.
Dim DataNode As IXMLDOMNode ' One data item.
' Initialize the SOAP client.
Set Client = New SoapClient30
Client.MSSoapInit "https://www.company/web-services/Auth?WSDL", "auth"
strPacket = "FIXED-FIELD TEXT HERE"
' Make the request.
Set Results = Client.sendRequest(strPacket)
Looks like it's at least recognizing the "sendRequest" method and talking to the server. Howerver, I now get the following message:
No Deserializer found to deserialize a ':msgString' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'. [java.lang.IllegalArgumentException]
Any help would be appreciated!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|