Commerce Server General - Exposing Custom Resources as Web Services for FP1 style FE apps

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > July 2004 > Exposing Custom Resources as Web Services for FP1 style FE apps





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Exposing Custom Resources as Web Services for FP1 style FE apps
Ravi Shankar

2004-07-14, 7:47 am

I find the newly introduced mechanism in FP1 of providing
WinForms base FE for managing Commerce Resources very
nice and functional as opposed to the BizDesk Modules
mechanism. (the FP1 SDK provides the FE Portion)

I have written my own custom resources along the lines
specified by Commerce Server 2002 for intergrating custom
resources.

NOW... where can I find instructions on how to expose
these as Commerce Applications and Web Services at the
same time...??????

When writing the Web Service where do I pick up the site
name from ? Do I write my own IHTTPConfigurationHandler ?
OR Do I implement my own HTTPApplication Handler ? ..

I'd appreciate if someone from the FP1 Dev Team can
address these questions.
Vinayak Tadas[MSFT]

2004-07-14, 5:51 pm

You should write your configsection handler which reads the sitename from
web.config and use the SiteConfigReadOnly object to get the information
about your custom resource. In the UI you can then pass in the web service
url and connect to your web service.

--------------------
Content-Class: urn:content-classes:message
From: "Ravi Shankar" <shankar.nospam@hp.com>
Sender: "Ravi Shankar" <shankar.nospam@hp.com>
Subject: Exposing Custom Resources as Web Services for FP1 style FE apps
Date: Wed, 14 Jul 2004 03:45:59 -0700
Lines: 19
Message-ID: <2c92c01c4698f$c00a3230$a501280a@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcRpj8AKnckgSZ3wQMmBDFXQwZfe2w==
Newsgroups: microsoft.public.commerceserver.general
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.general:14250
NNTP-Posting-Host: tk2msftngxa13.phx.gbl 10.40.1.165
X-Tomcat-NG: microsoft.public.commerceserver.general

I find the newly introduced mechanism in FP1 of providing
WinForms base FE for managing Commerce Resources very
nice and functional as opposed to the BizDesk Modules
mechanism. (the FP1 SDK provides the FE Portion)

I have written my own custom resources along the lines
specified by Commerce Server 2002 for intergrating custom
resources.

NOW... where can I find instructions on how to expose
these as Commerce Applications and Web Services at the
same time...??????

When writing the Web Service where do I pick up the site
name from ? Do I write my own IHTTPConfigurationHandler ?
OR Do I implement my own HTTPApplication Handler ? ..

I'd appreciate if someone from the FP1 Dev Team can
address these questions.


Thanks
Vinayak Tadas
Microsoft
http://blogs.msdn.com/vinayakt

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Get Secure! For more info visit http://www.microsoft.com/security. Please
reply to the newsgroups only. Thanks

Ravi Shankar

2004-07-15, 2:48 am

I'll try that and get back..

Second question --
I can create an authroization policy for the application=20
as part of this and get the web service to use that.=20
Would the Agent API exposed on the FE support my policy=20
files ? or Would something else need to be done for it ?

Thanks and Regards.

>-----Original Message-----
>You should write your configsection handler which reads=20

the sitename from=20
>web.config and use the SiteConfigReadOnly object to get=20

the information=20
>about your custom resource. In the UI you can then pass=20

in the web service=20
>url and connect to your web service.=20
>
>--------------------
>Content-Class: urn:content-classes:message
>From: "Ravi Shankar" <shankar.nospam@hp.com>
>Sender: "Ravi Shankar" <shankar.nospam@hp.com>
>Subject: Exposing Custom Resources as Web Services for=20

FP1 style FE apps
>Date: Wed, 14 Jul 2004 03:45:59 -0700
>Lines: 19
>Message-ID: <2c92c01c4698f$c00a3230$a501280a@phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset=3D"iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcRpj8AKnckgSZ3wQMmBDFXQwZfe2w=3D=3D
>Newsgroups: microsoft.public.commerceserver.general
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl=20

microsoft.public.commerceserver.general:14250
>NNTP-Posting-Host: tk2msftngxa13.phx.gbl 10.40.1.165
>X-Tomcat-NG: microsoft.public.commerceserver.general
>
>I find the newly introduced mechanism in FP1 of=20

providing=20
>WinForms base FE for managing Commerce Resources very=20
>nice and functional as opposed to the BizDesk Modules=20
>mechanism. (the FP1 SDK provides the FE Portion)
>
>I have written my own custom resources along the lines=20
>specified by Commerce Server 2002 for intergrating=20

custom=20
>resources.
>
>NOW... where can I find instructions on how to expose=20
>these as Commerce Applications and Web Services at the=20
>same time...??????
>
>When writing the Web Service where do I pick up the site=20
>name from ? Do I write my own=20

IHTTPConfigurationHandler ?=20
>OR Do I implement my own HTTPApplication Handler ? ..
>
>I'd appreciate if someone from the FP1 Dev Team can=20
>address these questions.
>
>
>Thanks
>Vinayak Tadas
>Microsoft
>http://blogs.msdn.com/vinayakt
>
>This posting is provided "AS IS" with no warranties, and=20

confers no rights.
>You assume all risk for your use. =A9 2002 Microsoft=20

Corporation. All rights
>reserved.
>Use of included script samples are subject to the terms=20

specified at
>http://www.microsoft.com/info/cpyright.htm
>Get Secure! For more info visit=20

http://www.microsoft.com/security. Please
>reply to the newsgroups only. Thanks
>

Vinayak Tadas[MSFT]

2004-07-15, 5:51 pm

If this policy is for your custom application/resource then the commerce
server APIs will not understand and use it. You will have to write your own
authorization code to authorize users using your custom policy.
Basically the authorization policy consists of an application, operations
and tasks and there are APIs to perform access checks against the
authorization policy.

--------------------
Content-Class: urn:content-classes:message
From: "Ravi Shankar" <shankar.nospam@hp.com>
Sender: "Ravi Shankar" <shankar.nospam@hp.com>
References: <2c92c01c4698f$c00a3230$a501280a@phx.gbl>
<w0NDIycaEHA.2804@cpmsftngxa06.phx.gbl>
Subject: RE: Exposing Custom Resources as Web Services for FP1 style FE apps
Date: Wed, 14 Jul 2004 21:43:42 -0700
Lines: 83
Message-ID: <2d2a501c46a26$4dd80240$a401280a@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcRqJk3VqQDYFCIkQqa7Demtuxz13w==
Newsgroups: microsoft.public.commerceserver.general
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.general:14255
NNTP-Posting-Host: tk2msftngxa12.phx.gbl 10.40.1.164
X-Tomcat-NG: microsoft.public.commerceserver.general

I'll try that and get back..
Second question --
I can create an authroization policy for the application
as part of this and get the web service to use that.
Would the Agent API exposed on the FE support my policy
files ? or Would something else need to be done for it ?
Thanks and Regards.
>-----Original Message-----
>You should write your configsection handler which reads

the sitename from
>web.config and use the SiteConfigReadOnly object to get

the information
>about your custom resource. In the UI you can then pass

in the web service
>url and connect to your web service.
>
>--------------------
>Content-Class: urn:content-classes:message
>From: "Ravi Shankar" <shankar.nospam@hp.com>
>Sender: "Ravi Shankar" <shankar.nospam@hp.com>
>Subject: Exposing Custom Resources as Web Services for

FP1 style FE apps
>Date: Wed, 14 Jul 2004 03:45:59 -0700
>Lines: 19
>Message-ID: <2c92c01c4698f$c00a3230$a501280a@phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcRpj8AKnckgSZ3wQMmBDFXQwZfe2w==
>Newsgroups: microsoft.public.commerceserver.general
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl

microsoft.public.commerceserver.general:14250
>NNTP-Posting-Host: tk2msftngxa13.phx.gbl 10.40.1.165
>X-Tomcat-NG: microsoft.public.commerceserver.general
>
>I find the newly introduced mechanism in FP1 of

providing
>WinForms base FE for managing Commerce Resources very
>nice and functional as opposed to the BizDesk Modules
>mechanism. (the FP1 SDK provides the FE Portion)
>
>I have written my own custom resources along the lines
>specified by Commerce Server 2002 for intergrating

custom
>resources.
>
>NOW... where can I find instructions on how to expose
>these as Commerce Applications and Web Services at the
>same time...??????
>
>When writing the Web Service where do I pick up the site
>name from ? Do I write my own

IHTTPConfigurationHandler ?
>OR Do I implement my own HTTPApplication Handler ? ..
>
>I'd appreciate if someone from the FP1 Dev Team can
>address these questions.
>
>
>Thanks
>Vinayak Tadas
>Microsoft
>http://blogs.msdn.com/vinayakt
>
>This posting is provided "AS IS" with no warranties, and

confers no rights.
>You assume all risk for your use. © 2002 Microsoft

Corporation. All rights
>reserved.
>Use of included script samples are subject to the terms

specified at
>http://www.microsoft.com/info/cpyright.htm
>Get Secure! For more info visit

http://www.microsoft.com/security. Please
>reply to the newsgroups only. Thanks
>



Thanks
Vinayak Tadas
Microsoft
http://blogs.msdn.com/vinayakt

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Get Secure! For more info visit http://www.microsoft.com/security. Please
reply to the newsgroups only. Thanks

Ravi Shankar

2004-07-16, 2:48 am

The policy would contain all that since I created it=20
using the "Authorization Manager" in Developer mode

So the Agent API would check up OK against it, right ?

Regards.
>-----Original Message-----
>If this policy is for your custom application/resource=20

then the commerce=20
>server APIs will not understand and use it. You will=20

have to write your own=20
>authorization code to authorize users using your custom=20

policy.
>Basically the authorization policy consists of an=20

application, operations=20
>and tasks and there are APIs to perform access checks=20

against the=20
>authorization policy.
>=20
>--------------------
>Content-Class: urn:content-classes:message
>From: "Ravi Shankar" <shankar.nospam@hp.com>
>Sender: "Ravi Shankar" <shankar.nospam@hp.com>
>References: <2c92c01c4698f$c00a3230$a501280a@phx.gbl>=20
><w0NDIycaEHA.2804@cpmsftngxa06.phx.gbl>
>Subject: RE: Exposing Custom Resources as Web Services=20

for FP1 style FE apps
>Date: Wed, 14 Jul 2004 21:43:42 -0700
>Lines: 83
>Message-ID: <2d2a501c46a26$4dd80240$a401280a@phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset=3D"iso-8859-1"
>Content-Transfer-Encoding: quoted-printable
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcRqJk3VqQDYFCIkQqa7Demtuxz13w=3D=3D
>Newsgroups: microsoft.public.commerceserver.general
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl=20

microsoft.public.commerceserver.general:14255
>NNTP-Posting-Host: tk2msftngxa12.phx.gbl 10.40.1.164
>X-Tomcat-NG: microsoft.public.commerceserver.general
>
>I'll try that and get back..
>Second question --
>I can create an authroization policy for the application=20
>as part of this and get the web service to use that.=20
>Would the Agent API exposed on the FE support my policy=20
>files ? or Would something else need to be done for it ?
>Thanks and Regards.
>the sitename from=20
>the information=20
pass=20[vbcol=seagreen]
>in the web service=20
>FP1 style FE apps
>microsoft.public.commerceserver.general:14250
>providing=20
>custom=20
site=20[vbcol=seagreen]
>IHTTPConfigurationHandler ?=20
and=20[vbcol=seagreen]
>confers no rights.
>Corporation. All rights
>specified at
>http://www.microsoft.com/security. Please
>
>
>Thanks
>Vinayak Tadas
>Microsoft
>http://blogs.msdn.com/vinayakt
>
>This posting is provided "AS IS" with no warranties, and=20

confers no rights.
>You assume all risk for your use. =A9 2002 Microsoft=20

Corporation. All rights
>reserved.
>Use of included script samples are subject to the terms=20

specified at
>http://www.microsoft.com/info/cpyright.htm
>Get Secure! For more info visit=20

http://www.microsoft.com/security. Please
>reply to the newsgroups only. Thanks
>

Vinayak Tadas[MSFT]

2004-07-16, 5:50 pm

Each resource (Catalogs, Campaigns) have and understand only their
authorization policy structures. An authorization policy has an application
which contains the operations and tasks in it. When accessing the
authorization policy the Application name has to be specified. Since you
are creating your own authorization ploicy for your custom resource the
Agent API cannot use it to perform authorizations since it does not
understand/interpret its contents.
In your post if you are talking about creating an authorization policy for
the catalog resource then yes the Agent API will check against it.
Bottomline is if you create your own custom resource and an authorization
policy for that resource then you will have to write your own authorization
logic.
--------------------
Content-Class: urn:content-classes:message
From: "Ravi Shankar" <shankar.nospam@hp.com>
Sender: "Ravi Shankar" <shankar.nospam@hp.com>
References: <2c92c01c4698f$c00a3230$a501280a@phx.gbl>
<w0NDIycaEHA.2804@cpmsftngxa06.phx.gbl>
<2d2a501c46a26$4dd80240$a401280a@phx.gbl>
<WhqwyfpaEHA.2752@cpmsftngxa06.phx.gbl>
Subject: RE: Exposing Custom Resources as Web Services for FP1 style FE apps
Date: Thu, 15 Jul 2004 21:44:48 -0700
Lines: 146
Message-ID: <2e7ad01c46aef$9fe74b80$a301280a@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcRq75/n+VvAKAYQQpC3Cpnv20PtNg==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.commerceserver.general
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.general:14271
NNTP-Posting-Host: tk2msftngxa11.phx.gbl 10.40.1.163
X-Tomcat-NG: microsoft.public.commerceserver.general

The policy would contain all that since I created it
using the "Authorization Manager" in Developer mode
So the Agent API would check up OK against it, right ?
Regards.
>-----Original Message-----
>If this policy is for your custom application/resource

then the commerce
>server APIs will not understand and use it. You will

have to write your own
>authorization code to authorize users using your custom

policy.
>Basically the authorization policy consists of an

application, operations
>and tasks and there are APIs to perform access checks

against the
>authorization policy.
>
>--------------------
>Content-Class: urn:content-classes:message
>From: "Ravi Shankar" <shankar.nospam@hp.com>
>Sender: "Ravi Shankar" <shankar.nospam@hp.com>
>References: <2c92c01c4698f$c00a3230$a501280a@phx.gbl>
><w0NDIycaEHA.2804@cpmsftngxa06.phx.gbl>
>Subject: RE: Exposing Custom Resources as Web Services

for FP1 style FE apps
>Date: Wed, 14 Jul 2004 21:43:42 -0700
>Lines: 83
>Message-ID: <2d2a501c46a26$4dd80240$a401280a@phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: quoted-printable
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcRqJk3VqQDYFCIkQqa7Demtuxz13w==
>Newsgroups: microsoft.public.commerceserver.general
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl

microsoft.public.commerceserver.general:14255
>NNTP-Posting-Host: tk2msftngxa12.phx.gbl 10.40.1.164
>X-Tomcat-NG: microsoft.public.commerceserver.general
>
>I'll try that and get back..
>Second question --
>I can create an authroization policy for the application
>as part of this and get the web service to use that.
>Would the Agent API exposed on the FE support my policy
>files ? or Would something else need to be done for it ?
>Thanks and Regards.
>the sitename from
>the information
pass[vbcol=seagreen]
>in the web service
>FP1 style FE apps
>microsoft.public.commerceserver.general:14250
>providing
>custom
site[vbcol=seagreen]
>IHTTPConfigurationHandler ?
and[vbcol=seagreen]
>confers no rights.
>Corporation. All rights
>specified at
>http://www.microsoft.com/security. Please
>
>
>Thanks
>Vinayak Tadas
>Microsoft
>http://blogs.msdn.com/vinayakt
>
>This posting is provided "AS IS" with no warranties, and

confers no rights.
>You assume all risk for your use. © 2002 Microsoft

Corporation. All rights
>reserved.
>Use of included script samples are subject to the terms

specified at
>http://www.microsoft.com/info/cpyright.htm
>Get Secure! For more info visit

http://www.microsoft.com/security. Please
>reply to the newsgroups only. Thanks
>



Thanks
Vinayak Tadas
Microsoft
http://blogs.msdn.com/vinayakt

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Get Secure! For more info visit http://www.microsoft.com/security. Please
reply to the newsgroups only. Thanks

Ravi Shankar

2004-07-17, 7:48 am

Ok. Clear. Thanks Vinayak.

>-----Original Message-----
>Each resource (Catalogs, Campaigns) have and understand=20

only their=20
>authorization policy structures. An authorization policy=20

has an application=20
>which contains the operations and tasks in it. When=20

accessing the=20
>authorization policy the Application name has to be=20

specified. Since you=20
>are creating your own authorization ploicy for your=20

custom resource the=20
>Agent API cannot use it to perform authorizations since=20

it does not=20
>understand/interpret its contents.=20
>In your post if you are talking about creating an=20

authorization policy for=20
>the catalog resource then yes the Agent API will check=20

against it.=20
>Bottomline is if you create your own custom resource and=20

an authorization=20
>policy for that resource then you will have to write=20

your own authorization=20
>logic.
>--------------------
>Content-Class: urn:content-classes:message
>From: "Ravi Shankar" <shankar.nospam@hp.com>
>Sender: "Ravi Shankar" <shankar.nospam@hp.com>
>References: <2c92c01c4698f$c00a3230$a501280a@phx.gbl>=20
><w0NDIycaEHA.2804@cpmsftngxa06.phx.gbl>=20
><2d2a501c46a26$4dd80240$a401280a@phx.gbl>=20
><WhqwyfpaEHA.2752@cpmsftngxa06.phx.gbl>
>Subject: RE: Exposing Custom Resources as Web Services=20

for FP1 style FE apps
>Date: Thu, 15 Jul 2004 21:44:48 -0700
>Lines: 146
>Message-ID: <2e7ad01c46aef$9fe74b80$a301280a@phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset=3D"iso-8859-1"
>Content-Transfer-Encoding: quoted-printable
>X-Newsreader: Microsoft CDO for Windows 2000
>Thread-Index: AcRq75/n+VvAKAYQQpC3Cpnv20PtNg=3D=3D
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Newsgroups: microsoft.public.commerceserver.general
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl=20

microsoft.public.commerceserver.general:14271
>NNTP-Posting-Host: tk2msftngxa11.phx.gbl 10.40.1.163
>X-Tomcat-NG: microsoft.public.commerceserver.general
>
>The policy would contain all that since I created it=20
>using the "Authorization Manager" in Developer mode
>So the Agent API would check up OK against it, right ?
>Regards.
>then the commerce=20
>have to write your own=20
>policy.
>application, operations=20
>against the=20
>for FP1 style FE apps
>microsoft.public.commerceserver.general:14255
application=20[vbcol=seagreen]
reads=20[vbcol=seagreen]
get=20[vbcol=seagreen]
>pass=20
V5.50.4910.0300[vbcol=seagreen]
>site=20
>and=20
terms=20[vbcol=seagreen]
and=20[vbcol=seagreen]
>confers no rights.
>Corporation. All rights
>specified at
>http://www.microsoft.com/security. Please
>
>
>Thanks
>Vinayak Tadas
>Microsoft
>http://blogs.msdn.com/vinayakt
>
>This posting is provided "AS IS" with no warranties, and=20

confers no rights.
>You assume all risk for your use. =A9 2002 Microsoft=20

Corporation. All rights
>reserved.
>Use of included script samples are subject to the terms=20

specified at
>http://www.microsoft.com/info/cpyright.htm
>Get Secure! For more info visit=20

http://www.microsoft.com/security. Please
>reply to the newsgroups only. Thanks
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com