Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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/Hello
World/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 - - -


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
detecting proxy settings Russell Johnson Excel Discussion (Misc queries) 0 February 26th 07 01:16 AM
Bypassing a proxy server Ben Excel Discussion (Misc queries) 0 December 13th 06 03:44 PM
XMLHTTP proxy settings. Beto[_3_] Excel Programming 0 April 12th 04 08:29 PM
XMLHTTP proxy settings. Beto[_3_] Excel Programming 0 April 2nd 04 09:52 PM
RaiseEvent from a class contained in a 2nd class collection? Andrew[_16_] Excel Programming 2 January 6th 04 04:22 PM


All times are GMT +1. The time now is 08:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"