Serviced Components & SOAP

G

Guest

Hello,

I am creating an app using Serviced Components and I am exposing them using
the Enterprise Services SOAP service. Here is my problem:

I have one COM+ application with several serviced components. When I enable
the SOAP service, I can access a WSDL link to every component in the
application. What I would like to do is the following: Have a class A that
is exposed through the SOAP service that provides getters for instances of
classes B & C. However I do not want B & C to be directly accessed via the
SOAP Service (i.e. I want a link for A but not for B & C). Class A would be
a sort of API for the application.

So far, I've been playing with Private Component and ComVisibility and have
had no luck. Any thoughts?

Thanks in advance,

Pete
 
G

Guest

Take into account that [PrivateComponent] attribute is feature of COM+ 1.5
that are included in Windows XP/2003 and above.

[PrivateComponent] mark component to be used only from within the
application, but not from the outside. In you case if you mark components B
and C as private only component A could use them.

Could you describe you problem wide?
Hello,

I am creating an app using Serviced Components and I am exposing them using
the Enterprise Services SOAP service. Here is my problem:

I have one COM+ application with several serviced components. When I enable
the SOAP service, I can access a WSDL link to every component in the
application. What I would like to do is the following: Have a class A that
is exposed through the SOAP service that provides getters for instances of
classes B & C. However I do not want B & C to be directly accessed via the
SOAP Service (i.e. I want a link for A but not for B & C). Class A would be
a sort of API for the application.

So far, I've been playing with Private Component and ComVisibility and have
had no luck. Any thoughts?

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
G

Guest

Hello Michael,

Thank you for your response. Allow me to try and further explain my question.
Say I have three classes A, B and C. All three are serviced components.
Class A looks something like this:

namespace Demo
{
public class A : ServicedComponent
{
public A(){}

public B GetB()
{
return new B();
}

public C GetC()
{
return new C();
}
}
}

In my AssemblyInfo.cs file I have the following line (among others of course):

[assembly: ApplicationActivation(ActivationOption.Library, SoapVRoot="Demo")]

Once I build the project, I then placed the assembly which contains all
three classes into the global assembly cache and registered the dll using
regsvcs.exe.

At this point, I have a new COM+ Application called "Demo" which contains
three components (A, B and C).

Because of the SOAP attribute, I can open my browser to
http://<computername>/Demo/default.aspx and see three links:

Demo.A.soap?WSDL
Demo.B.soap?WSDL
Demo.C.soap?WSDL

What I would like is to only see Demo.A.soap?WSDL. However, I have attemped
to make B and C not visible using the ComVisible attribute without any
success. I have also tried making B and C PrivateComponents but the links
still appear. Any thoughts?

Thank you again for your reply.

Pete


Michael Nemtsev said:
Take into account that [PrivateComponent] attribute is feature of COM+ 1.5
that are included in Windows XP/2003 and above.

[PrivateComponent] mark component to be used only from within the
application, but not from the outside. In you case if you mark components B
and C as private only component A could use them.

Could you describe you problem wide?
Hello,

I am creating an app using Serviced Components and I am exposing them using
the Enterprise Services SOAP service. Here is my problem:

I have one COM+ application with several serviced components. When I enable
the SOAP service, I can access a WSDL link to every component in the
application. What I would like to do is the following: Have a class A that
is exposed through the SOAP service that provides getters for instances of
classes B & C. However I do not want B & C to be directly accessed via the
SOAP Service (i.e. I want a link for A but not for B & C). Class A would be
a sort of API for the application.

So far, I've been playing with Private Component and ComVisibility and have
had no luck. Any thoughts?

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
M

Michael Nemtsev

Hello Pete,

I'm afraid that isn't possible, there is no attribute to avoid generating
description for the private component. Although you component is private
it visible through wsdl, but u can't create instance if you click on this
in IE

To hide it, you need manually remove 2 lines in web.config in the virtualRoot
of you component C:\WINDOWS\system32\com\SOAPVRoots\<name> and remove <wellknown>
and <activated> attribute for that class that marked Private


PW> Hello Michael,
PW>
PW> Thank you for your response. Allow me to try and further explain my
PW> question. Say I have three classes A, B and C. All three are
PW> serviced components. Class A looks something like this:
PW>
PW> namespace Demo
PW> {
PW> public class A : ServicedComponent
PW> {
PW> public A(){}
PW> public B GetB()
PW> {
PW> return new B();
PW> }
PW> public C GetC()
PW> {
PW> return new C();
PW> }
PW> }
PW> }
PW> In my AssemblyInfo.cs file I have the following line (among others
PW> of course):
PW>
PW> [assembly: ApplicationActivation(ActivationOption.Library,
PW> SoapVRoot="Demo")]
PW>
PW> Once I build the project, I then placed the assembly which contains
PW> all three classes into the global assembly cache and registered the
PW> dll using regsvcs.exe.
PW>
PW> At this point, I have a new COM+ Application called "Demo" which
PW> contains three components (A, B and C).
PW>
PW> Because of the SOAP attribute, I can open my browser to
PW> http://<computername>/Demo/default.aspx and see three links:
PW>
PW> Demo.A.soap?WSDL
PW> Demo.B.soap?WSDL
PW> Demo.C.soap?WSDL
PW> What I would like is to only see Demo.A.soap?WSDL. However, I have
PW> attemped to make B and C not visible using the ComVisible attribute
PW> without any success. I have also tried making B and C
PW> PrivateComponents but the links still appear. Any thoughts?
PW>
PW> Thank you again for your reply.
PW>
PW> Pete
PW>
PW> "Michael Nemtsev" wrote:
PW>
Take into account that [PrivateComponent] attribute is feature of
COM+ 1.5 that are included in Windows XP/2003 and above.

[PrivateComponent] mark component to be used only from within the
application, but not from the outside. In you case if you mark
components B and C as private only component A could use them.

Could you describe you problem wide?
Hello,

I am creating an app using Serviced Components and I am exposing
them using the Enterprise Services SOAP service. Here is my problem:

I have one COM+ application with several serviced components. When I
enable the SOAP service, I can access a WSDL link to every component
in the application. What I would like to do is the following: Have
a class A that is exposed through the SOAP service that provides
getters for instances of classes B & C. However I do not want B & C
to be directly accessed via the SOAP Service (i.e. I want a link
for A but not for B & C). Class A would be a sort of API for the
application.

So far, I've been playing with Private Component and ComVisibility
and have had no luck. Any thoughts?
-- WBR, Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
G

Guest

Hi Michael,

Hmm, oh well. Thanks anyways. If you have an opportunity, would you mind
looking at another post I placed today called "XSD import using WSDL.exe"
(link below)? If not, thanks for your reply.

Pete

http://msdn.microsoft.com/newsgroup...&p=1&tid=f30c6de7-30e0-47d8-976c-8227fcca3feb


Michael Nemtsev said:
Hello Pete,

I'm afraid that isn't possible, there is no attribute to avoid generating
description for the private component. Although you component is private
it visible through wsdl, but u can't create instance if you click on this
in IE

To hide it, you need manually remove 2 lines in web.config in the virtualRoot
of you component C:\WINDOWS\system32\com\SOAPVRoots\<name> and remove <wellknown>
and <activated> attribute for that class that marked Private


PW> Hello Michael,
PW>
PW> Thank you for your response. Allow me to try and further explain my
PW> question. Say I have three classes A, B and C. All three are
PW> serviced components. Class A looks something like this:
PW>
PW> namespace Demo
PW> {
PW> public class A : ServicedComponent
PW> {
PW> public A(){}
PW> public B GetB()
PW> {
PW> return new B();
PW> }
PW> public C GetC()
PW> {
PW> return new C();
PW> }
PW> }
PW> }
PW> In my AssemblyInfo.cs file I have the following line (among others
PW> of course):
PW>
PW> [assembly: ApplicationActivation(ActivationOption.Library,
PW> SoapVRoot="Demo")]
PW>
PW> Once I build the project, I then placed the assembly which contains
PW> all three classes into the global assembly cache and registered the
PW> dll using regsvcs.exe.
PW>
PW> At this point, I have a new COM+ Application called "Demo" which
PW> contains three components (A, B and C).
PW>
PW> Because of the SOAP attribute, I can open my browser to
PW> http://<computername>/Demo/default.aspx and see three links:
PW>
PW> Demo.A.soap?WSDL
PW> Demo.B.soap?WSDL
PW> Demo.C.soap?WSDL
PW> What I would like is to only see Demo.A.soap?WSDL. However, I have
PW> attemped to make B and C not visible using the ComVisible attribute
PW> without any success. I have also tried making B and C
PW> PrivateComponents but the links still appear. Any thoughts?
PW>
PW> Thank you again for your reply.
PW>
PW> Pete
PW>
PW> "Michael Nemtsev" wrote:
PW>
Take into account that [PrivateComponent] attribute is feature of
COM+ 1.5 that are included in Windows XP/2003 and above.

[PrivateComponent] mark component to be used only from within the
application, but not from the outside. In you case if you mark
components B and C as private only component A could use them.

Could you describe you problem wide?

Hello,

I am creating an app using Serviced Components and I am exposing
them using the Enterprise Services SOAP service. Here is my problem:

I have one COM+ application with several serviced components. When I
enable the SOAP service, I can access a WSDL link to every component
in the application. What I would like to do is the following: Have
a class A that is exposed through the SOAP service that provides
getters for instances of classes B & C. However I do not want B & C
to be directly accessed via the SOAP Service (i.e. I want a link
for A but not for B & C). Class A would be a sort of API for the
application.

So far, I've been playing with Private Component and ComVisibility
and have had no luck. Any thoughts?

-- WBR, Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top