BizTalk Server General - Dynamic port for Sharepoint

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > October 2004 > Dynamic port for Sharepoint





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 Dynamic port for Sharepoint
Sam

2004-10-26, 7:46 am

Hi,

In my orchestration I am trying to route an infopath form to a
Sharepoint Library using a dynamic port. I need to use the dynamic
port because I get to know the url at run time. Can some one please
suggest how to specify the destination address for a dynamic port. I
have tried following two expressions but they do not work:

DynamicSendPort(Microsoft.XLANGs.BaseTypes.Address) =
"SHAREPOINT://localhost:8080/sites/BizTalk/LibraryName";

and

DynamicSendPort(Microsoft.XLANGs.BaseTypes.Address) =
"http://localhost:8080/sites/BizTalk/LibraryName";


Is there some other way to achieve dynamic routing to sharepoint
library in the BizTalk orchestration. I have been stuck up with this
problem for quite a while now.

Thanks much,

Soumitra
Matt Meleski

2004-10-27, 7:46 am


I am assuming that you are using the Sharepoint Adapter, from
gotdotnet.

I am not sure if you can dynamically set the library with the SharePoint
Adapter.
You could possibly look at the code for the adapter and see if
it is possible, or maybe someone else can give some insight.

Otherwise:

Update/Insert/Delete items in the Sharepoint Libraries using your own
code. Presently I am doing this by creating and calling web services (from
BTS2004 web ports) I have installed
on the WSS machines. The web services directly call methods in the
Sharepoint Api (Microsoft.SharePoint.dll) to
insert/update/delete items in the libraries.
I am not using the Sharepoint Adapter, because I am passing binaries instead
of XML documents, to be set
in document libaries.

If you have not used the Sharepoint Api's before an example is as below:

Microsoft.SharePoint.SPList spList = this.siteCollection[0].AllWebs["Put URL
here"].Lists["Put Name of List Here"];
Microsoft.SharePoint.SPListItemCollection spListItems;
Microsoft.SharePoint.SPListItem spListItem ;
Microsoft.SharePoint.SPQuery spQuery = new Microsoft.SharePoint.SPQuery();
// Create query to find an existing item in the library
spQuery.Query = "<Where><Eq><FieldRef Name='Title'/><Value Type='Text'>" +
"My Document" + "</Value></Eq></Where>";
spListItems = spList.GetItems(spQuery);

if (spListItems.Count > 0)
{
// Found item
spListItem = spListItemsAccountName[0];

}
else
{
// Did not find create a new item
spListItem = spList.Items.Add();
}

// Set the information in the Lists column.
spListItem["My Sharepoint Column Name"] = "some info"
spListItem.Update();


One advantage in using the Sharepoint Api's directly, is that you can get
much finer control over the Sharepoint Libraries. Additionally, your
orchestration
can pass enough information over to the web service, to dynamically get the
correct Sharepoint Library to process.


Matt

"Sam" wrote:

> Hi,
>
> In my orchestration I am trying to route an infopath form to a
> Sharepoint Library using a dynamic port. I need to use the dynamic
> port because I get to know the url at run time. Can some one please
> suggest how to specify the destination address for a dynamic port. I
> have tried following two expressions but they do not work:
>
> DynamicSendPort(Microsoft.XLANGs.BaseTypes.Address) =
> "SHAREPOINT://localhost:8080/sites/BizTalk/LibraryName";
>
> and
>
> DynamicSendPort(Microsoft.XLANGs.BaseTypes.Address) =
> "http://localhost:8080/sites/BizTalk/LibraryName";
>
>
> Is there some other way to achieve dynamic routing to sharepoint
> library in the BizTalk orchestration. I have been stuck up with this
> problem for quite a while now.
>
> Thanks much,
>
> Soumitra
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com