473,399 Members | 3,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Getting a Proxy Class into VBA

Hi All -

I am trying to build a Web Service that can be accessed using an Excel

spreadsheet. I have been able to do this for relatively simple access to the Web

Service. But now I need to add authentication using a client certificate and

that is where I am stuck.

It seems like the web reference that is created by the Web Reference thing in

Excel is not quite what I need. I looked at some of the articles on client

authentication and it said I need a web service proxy class like the one that

can be generated with WSDL.exe. I was able to generate the proxy class using

WSDL outside of Excel VBA.

My question: How do I get the Web Service proxy class into Excel? If I just past

the code into a new module it has all kinds of compile errors. What am I doing

wrong?

I am including the code generated by WSDL for a HelloWorld example but I dont

know how to get this code into VBA.

Thanks,

Paul Hastings
Principal Computer Scientist
Jorge Scientific Corporation


- - - Web Service Proxy Class for HelloWorld example - - -

'------------------------------------------------------------------------------
' <autogenerated>
' This code was generated by a tool.
' Runtime Version: 1.1.4322.573
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </autogenerated>
'------------------------------------------------------------------------------

Option Strict Off
Option Explicit On

Imports System
Imports System.ComponentModel
Imports System.Diagnostics
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Xml.Serialization

'
'This source code was auto-generated by wsdl, Version=1.1.4322.573.
'

'<remarks/>
<System.Diagnostics.DebuggerStepThroughAttribute() , _
System.ComponentModel.DesignerCategoryAttribute("c ode"), _
System.Web.Services.WebServiceBindingAttribute(Nam e:="HelloWorldSoap",

[Namespace]:="http://PTH/HelloWorld/HelloWorld")> _
Public Class HelloWorld
Inherits System.Web.Services.Protocols.SoapHttpClientProtoc ol

'<remarks/>
Public Sub New()
MyBase.New
Me.Url = "https://pth/HelloWorld/HelloWorld.asmx"
End Sub

'<remarks/>
<System.Web.Services.Protocols.SoapDocumentMethodA ttribute("http://PTH/HelloWorl

d/HelloWorld/HelloWorld", RequestNamespace:="http://PTH/HelloWorld/HelloWorld",

ResponseNamespace:="http://PTH/HelloWorld/HelloWorld",

Use:=System.Web.Services.Description.SoapBindingUs e.Literal,

ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.Wrapped)> _
Public Function HelloWorld() As String
Dim results() As Object = Me.Invoke("HelloWorld", New Object(-1) {})
Return CType(results(0),String)
End Function

'<remarks/>
Public Function BeginHelloWorld(ByVal callback As System.AsyncCallback,

ByVal asyncState As Object) As System.IAsyncResult
Return Me.BeginInvoke("HelloWorld", New Object(-1) {}, callback,

asyncState)
End Function

'<remarks/>
Public Function EndHelloWorld(ByVal asyncResult As System.IAsyncResult) As

String
Dim results() As Object = Me.EndInvoke(asyncResult)
Return CType(results(0),String)
End Function
End Class

- - - End of Web Service Proxy Class for HelloWorld example - - -
Nov 21 '05 #1
0 4782

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: nitrogenycs | last post by:
Hello, I need a way to get a notification whenever a variable of an object changes. The approach should be non-intrusive so that I can use existing objects without modifying them. I want to be...
3
by: Chris | last post by:
I've been researching this on and off for weeks, and haven't come up with anything useful yet. If anyone knows how to do this, please let me know. From a Java applet running in IE 6.0 using the...
5
by: Benne Smith | last post by:
Hi, I have three enviroments; a development, a testing and a production enviroment. I'm making a big application (.exe), which uses alot of different webservices. I don't use the webservices...
5
by: HenrySeque | last post by:
I have a webservice and I add a web reference from my web project. I want the proxy class to implements an Interface, but I didn't find the source code of the proxy class and I don't want to...
5
by: UJ | last post by:
I had already asked how to get the network settings on the machine and was told that I should use the WMI interface. I downloaded programs that will allow me to look at the stuff but I'm not sure...
0
by: OldMacDonald | last post by:
I have a Web Service which I call ASynchronously. The problem its not getting kicked off. This is how I am calling it over HTTP and after calling the webservice I have a redirect to another page. I...
7
by: Pro1712 | last post by:
Hello, I need to write a simple proxy server. What I want to do is to use HttpListener to get requests from the browser, add some proxy information and some other stuff and send the request to...
1
by: MRamaLakshmi | last post by:
hi, I am developing an application using Java Applet which will be uploading files. Its throwing Null Pointer exception while detecting the proxy when we are trying to load the applet using Java6....
2
dmjpro
by: dmjpro | last post by:
Here is my code import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.FileOutputStream; import java.net.InetAddress; import java.net.InetSocketAddress;...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.