Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Soap Late Binding

53 views
Skip to first unread message

Chris Hine

unread,
Sep 15, 2003, 7:29:04 PM9/15/03
to
Just wondering if anyone has been able to late bind to any soap objects in
the 'Microsoft Soap Type Library v3.0' using VB6 or a VBA project ?

Thanks in advance


Brian Combs

unread,
Sep 16, 2003, 5:50:50 PM9/16/03
to
Hello
The following works for me.
Dim client As Object
Set client = CreateObject("MSSOAP.SoapClient30")
client.MSSoapInit "http://server/calcsample.wsdl"
MsgBox client.Add(2, 2)

Thanks
Brian [MS]
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Chris Hine" <Nos...@microsoft.com>
| Subject: Soap Late Binding
| Date: Tue, 16 Sep 2003 09:29:04 +1000
| Lines: 6
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <OU1q6C#eDHA...@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.xml.soapsdk
| NNTP-Posting-Host: 194.026.dsl.syd.iprimus.net.au 210.50.152.194
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
phx.gbl!TK2MSFTNGP11.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.xml.soapsdk:11020
| X-Tomcat-NG: microsoft.public.xml.soapsdk

Chris Hine

unread,
Sep 16, 2003, 9:22:22 PM9/16/03
to
Thanks Brian,

However, now I'm even more confused.

This line of code works for me too: Set client =
CreateObject("MSSOAP.SoapClient30") however, It doesnt create the correct
object I dont believe.
Also, there is no SoapClient30 class, I think it should be Set client =
CreateObject("MSSOAPLib30.SoapClient30") and that causes my original
problem.

Any more ideas?

Chris


"Brian Combs" <Br...@online.microsoft.com> wrote in message
news:vCTNeyJ...@cpmsftngxa07.phx.gbl...

Brian Combs

unread,
Sep 19, 2003, 2:27:32 PM9/19/03
to
Hello
When you do CreateObject you pass the progID for the COM object that you
want to create. In this case MSSOAP.SoapClient30 is the correct ProgID for
the Soap Toolkit 3.0 SoapClient object.
If you search the registry you will see the above as the ProgID.
The MSSOAPLib30.SoapClient30 would be for early binding when you have a
reference to the typelib. Rember then you are not giving a string that is
being looked up in the registry but a value that is in the typelib you have
referenced in VB.

Why do you think that it is not the correct object?

Thanks
Brian [MS]
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Chris Hine" <Nos...@microsoft.com>

| References: <OU1q6C#eDHA...@TK2MSFTNGP11.phx.gbl>
<vCTNeyJ...@cpmsftngxa07.phx.gbl>
| Subject: Re: Soap Late Binding
| Date: Wed, 17 Sep 2003 11:22:22 +1000
| Lines: 60


| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

| Message-ID: <u74D4mLf...@TK2MSFTNGP09.phx.gbl>


| Newsgroups: microsoft.public.xml.soapsdk
| NNTP-Posting-Host: 194.026.dsl.syd.iprimus.net.au 210.50.152.194

| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.xml.soapsdk:11037
| X-Tomcat-NG: microsoft.public.xml.soapsdk

Chris Hine

unread,
Sep 22, 2003, 7:36:51 PM9/22/03
to
Brian,

Okay - Thanks for that, lets see if we can clear this one up.

This code works fine:- (Early binding, with a reference to the type library)

Dim sc As SoapClient30
Set sc = CreateObject("MSSOAP.SoapClient30")
sc.MSSoapInit2 s_WSDL_URL, str_WSML, c_SERVICE, c_PORT, c_SERVICE_NAMESPACE
sc.ConnectorProperty("ProxyServer") = "<CURRENT_USER>"
sc.ConnectorProperty("EnableAutoProxy") = True
sc.etc.....

If I change the first line to be:

Dim sc As Object

and remove the reference to the type lib, it fails on this line:
sc.MSSoapInit2 s_WSDL_URL, str_WSML, c_SERVICE, c_PORT, c_SERVICE_NAMESPACE

Giving me horrible errors about incorrect parameters and so on...
All the parameters have values and everything is fine. This tells me that
two different objects are being created here. Because Dimensioning sc as an
object, followed by the CreateObject line should in theory be creating the
same object as the early binding example...

Your thoughts?

Chris

"Brian Combs" <Br...@online.microsoft.com> wrote in message

news:9zIZsutf...@cpmsftngxa06.phx.gbl...

Brian Combs

unread,
Sep 23, 2003, 12:32:55 PM9/23/03
to
Hello
Following code works just fine for me. I just opened a new VB project and
entered the code. Ran with no errors.

Dim client As Object
Set client = CreateObject("MSSOAP.SOAPClient30")
client.MSSoapInit2 "http://MyServer/soaptests/calcsample30.wsdl",
"http://MyServer/soaptests/calcsample30.wsml", _
"CalcSample30", "CalcSoapPort", "http://tempuri.org/CalcSample30/wsdl/"

'Call the add method.
MsgBox client.Add(2, 2)

Thanks
Brian [MS]
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Chris Hine" <Nos...@microsoft.com>

| References: <OU1q6C#eDHA...@TK2MSFTNGP11.phx.gbl>
<vCTNeyJ...@cpmsftngxa07.phx.gbl>
<u74D4mLf...@TK2MSFTNGP09.phx.gbl>
<9zIZsutf...@cpmsftngxa06.phx.gbl>


| Subject: Re: Soap Late Binding

| Date: Tue, 23 Sep 2003 09:36:51 +1000
| Lines: 136


| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

| Message-ID: <OCWUuHWg...@TK2MSFTNGP10.phx.gbl>


| Newsgroups: microsoft.public.xml.soapsdk
| NNTP-Posting-Host: 194.026.dsl.syd.iprimus.net.au 210.50.152.194

| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.xml.soapsdk:11067
| X-Tomcat-NG: microsoft.public.xml.soapsdk

Chris Hine

unread,
Sep 23, 2003, 8:07:13 PM9/23/03
to
Yeah, okay - Finally got it working!

Thanks

It turned out that when I used late binding, I couldn't use an empty
variable in the second parameter of the MSSoapInit2 method, I has to put in
the empty string quotes like shown below:

myObject.MSSoapInit2 "http://....wsdl","","Something","Port","Namespace"

-- Chris

"Brian Combs" <Br...@online.microsoft.com> wrote in message

news:Dr7WgBfg...@cpmsftngxa06.phx.gbl...

0 new messages