COM + Web Service: route to XML Web Services 8 through the check box

Source: Internet
Author: User

Cao activation retains the status even when it is called through SOAP, and allows object reference to be passed back and forth through SOAP. The names and values are kept in the class instance on the server, and the reference can work correctly. Both scripts call the same C # component, but the. NET Remoting activation model is different.
In addition to using CreateObject to call cao activation, you can also use a name object with COM +, which can provide cao activation to replace WKO (type name and Assembly name object ). The following script:
'Directly create two objects
Set c1 = GetObject ("soap: typename = RefPass. Child, assembly = RefPass ")
Set c2 = GetObject ("soap: typename = RefPass. Child, assembly = RefPass ")
'Set the name of the first object and call it several times
'To increment the internal counter of the object
C1.SetName ("C1 ")
WScript. Echo c1.CountUp ()
WScript. Echo c1.CountUp ()
WScript. Echo c1.Countup ()
WScript. Echo c1.CountUp ()
WScript. Echo c1.Countup ()
'Set the name of the second object and call it several times
'To increment the internal counter of the object
C2.SetName ("C2 ")
WScript. Echo c2.CountUp ()
WScript. Echo c2.CountUp ()
WScript. Echo c2.Countup ()
WScript. Echo c2.CountUp ()
WScript. Echo c2.Countup ()
'Create parent object
Set p = GetObject ("soap: typename = RefPass. Parent, assembly = RefPass ")
'Pass the sub-object to the parent object and call the sub-object from the parent object
WScript. Echo p. SetRef (c1)
WScript. Echo p. CountUp (c2)
WScript. Echo p. CountUp (c2)
WScript. Echo p. CountUp (c2)
WScript. Echo p. CountUp (c2)
'Call the sub-objects stored in the parent object now
Dim c9
WScript. Echo p. CountUp (c9)
'Get this object from the parent object and call it directly
Set c3 = p. GetRef ()
WScript. Echo c3.CountUp ()
The following output is displayed:
C: moniker> refpassca

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.