Microsoft Land

Archive for April 2012

If SharePoint Search is throwing the below error while crawling the site collection

SharePoint Search can’t crawl SharePoint site – Error HRESULT E_FAIL has been returned from a call to a COM component

Possible issue could be with the Impersonation settings in the web.config

Edit the web.config of the web application, and make sure that the identity impersonation is set to “true”.

<identity impersonate=”true” />

$sourceWebUrl = $args[0]

$destWebUrl = $args[1]

$path = “c:\Sriram\Contents\”

$lists = @(“ideastream”, “Clients”)

foreach($list in $lists)

{

Write-Host (“Exporting ” + $sourceWebUrl + “/lists/” + $list)

export-spweb $sourceWebUrl -ItemUrl (“/lists/” + $list) -IncludeUserSecurity -IncludeVersions All -path ($path + $list + “.cmp”) -nologfile -force

“Exporting complete.”

Write-Host (“Importing ” + $destWebUrl + “/lists/” + $list)

import-spweb $destWebUrl -IncludeUserSecurity -path ($path + $list + “.cmp”) -nologfile

“Importing Complete”

}

$doclibs = @(“sitecollectionimages”)

foreach($doclib in $doclibs)

{

Write-Host (“Exporting ” + $sourceWebUrl + “/” + $doclib)

export-spweb $sourceWebUrl -ItemUrl (“/” + $doclib) -IncludeUserSecurity -IncludeVersions All -path ($path + $doclib + “.cmp”) -nologfile -force

“Exporting complete.”

Write-Host (“Importing ” + $destWebUrl + “/” + $doclib)

import-spweb $destWebUrl -IncludeUserSecurity -path ($path + $doclib + “.cmp”) -nologfile

“Importing Complete”

}

$site = new-object Microsoft.SharePoint.SPSite(“site url”);

$query = new-object Microsoft.SharePoint.SPRecycleBinQuery;

$query.ItemState = “FirstStageRecycleBin”;

$query.ItemState = “SecondStageRecycleBin”;

$query.RowLimit = 100;

$itemcoll = $site.GetRecycleBinItems($query);

foreach ($item in $itemcoll)

{

$id = $item.ID;

write-host -nonewline “Deleting FS: ” $item.Title ” … “;

$itemcoll.Delete($id);

write-host “Done”;

}

$query.ItemState = “SecondStageRecycleBin”;

$query.RowLimit = 100;

$itemcoll = $site.GetRecycleBinItems($query);

foreach ($item in $itemcoll)

{

$id = $item.ID;

write-host -nonewline “Deleting SS: ” $item.Title ” … “;

$itemcoll.Delete($id);

write-host “Done”;

}

Recently found this issue while integrating a .NET application with PeopleSoft Integration Broker.

Basically the response that comes from PeopleSoft will be a NULL in .NET and doesn’t include any further error messages / details at .NET side. But the service itself will be working when trying to test it from tools like SOAP UI.

So, first tried to test it with .NET WCF Client and then found that it’s not able to create the request for the Service.  Then went to PeopleSoft IB error logs folders and found these error messages.

com.peoplesoft.pt.integrationgateway.common.InvalidMessageException: HttpListeningConnectorUtility.initializeISRequest(). Invalid URL path. Path should be end with either of these values: {.xsd|.wsdl|.wsil}

So after having a close look at the issue, found that the WSDL is wrong.  The targetNamespace for the Response that comes from PoepleSoft IB is wrong when compared to what actually is being generated by IB.

xmlns:EDL_TE_CI_RES.VERSION_1=http://xmlns.oracle.com/Enterprise/FSCM/schema/EDL_TE_CI_RES.VERSION_1

above is the targetNamespace for the response, but when we actually see the response using tools like SOAP UI it’s

http://xmlns.oracle.com/Enterprise/FSCM/schema/EDL_TE_CI_RESResponse

Becase of this .NET is not able to De Serialize the response that’s comes back from PeopleSoft IB which is causing the response to be NULL.  It’s amazing why the error messages are not captured.

So to fix this, downloaded the WSDL, changed the targetNamespace manually and then created the Proxy using WSDL.EXE and then included that in the solution.. which worked.

Hope this helps.

 


My Tweets

Follow

Get every new post delivered to your Inbox.

Join 120 other followers