Pour les professionnels de l’informatique >
Forums - Accueil
>
SharePoint - Business Data Catalog (pre-SharePoint 2010)
>
BDC with WCF Service
BDC with WCF Service
- Hi,
I am using BusinessDataList web part in MOSS 2007 to call a WCF service. This WCF is created using the BizTalk WCF Publishing Wizard (BTS 2006) (using BasicHttp). This wcf service returns a simple xml with 3 nodes.
I have created the App Definition File (ADF) using MS App Definition Editor.
When I open the page in MOSS, I get the following error -
=============================================================================
An error occurred while retrieving data from <instance name>. Administrators, see the server log for more information.
=============================================================================
When I execute the instance from definition editor, it returns the result (shows the output columns, but not the data). I have added both Finder & Specific Finder. When the MOSS page loads I can see the request coming to BizTalk and the response xml returned from BizTalk.
I can attach the ADF file if required.
Any idea? Thanks in advance.
Toutes les réponses
- My guess is you are having a double-hop issue where the identity of the request is lost. Check and see what account is actually making the request in the web service.
Scot - Thank you for your reply. I was working on an alternate solution using custom webparts and just completed it.
Since MOSS is an asp.net site, aspnet account is making the request to the wcf service (note that wcf service has anonymous access enabled)
When I execute a Finder method instance in Application Definition Designer, it throws the error:
"Backend system adapter returned a structure incompatible with the corresponding metadata (MethodInstance, Parameter or TypeDescriptor)"
But I can see the service returning a valid xml with data (Debugging with a breakpoint in HAT in BizTalk shows the xml file being returned)
When the MOSS page with BDC loads, I see the same error in the error log.
I suspect that this is something to do with the application definition file (ADF).
Any ideas? - Just saw this article
http://msdn.microsoft.com/en-us/library/dd787912(BTS.10).aspx
Issue 3: An array of simple type returned by the WCF service is not displayed
Explanation: If the data returned by the WCF service is an array of simple type, Microsoft Office SharePoint Server does not display the data. Moreover, when you execute a method instance in Business Data Catalog Definition Editor that returns an array of simple type, the following error message is displayed: “Backend system adapter returned a structure incompatible with the corresponding metadata (MethodInstance, Parameter or TypeDescriptor).”
Resolution: No resolution. It is a known limitation with Microsoft Office SharePoint Server and Business Data Catalog Definition Editor.
My wcf service returns an XML data data data
<Root>
<node1>data</node1>
<node2>data</node2>
<node3>data</node3>
</Root>
I think this is not an array of simple type.
Any suggestions? Hi,
My experience is that I would always have to hand-code ADF from the MS App Definition Editor. If you could attach the ADF, that would be helpful.
Wen
Wen He (http://sharepointhawaii.com/wenhe)
Wen- ADF FIle
=====
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<LobSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog BDCMetadata.xsd" Type="WebService" Version="1.0.0.0" Name="WCFPOGetDetail" xmlns="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">
<Properties>
<Property Name="WsdlFetchUrl" Type="System.String">http://blrkec141543d.ad.infosys.com/SAPMOSSInteropDemo/SAPMOSSInteropDemo_GetPODetail_GetPODetail_Recv_Port_WCF.svc</Property>
<Property Name="WebServiceProxyNamespace" Type="System.String">BDC</Property>
</Properties>
<LobSystemInstances>
<LobSystemInstance Name="WCFPOGetDetail_Instance">
<Properties>
<Property Name="LobSystemName" Type="System.String">WCFPOGetDetail</Property>
<Property Name="WebServiceAuthenticationMode" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.WebService.HttpAuthenticationMode">PassThrough</Property>
</Properties>
</LobSystemInstance>
</LobSystemInstances>
<Entities>
<Entity EstimatedInstanceCount="10000" Name="GetPODetail">
<Identifiers>
<Identifier TypeName="System.String" Name="PONumber" />
</Identifiers>
<Methods>
<Method Name="Opn_SendRecv_BAPI_PO_GETDETAIL">
<Parameters>
<Parameter Direction="In" Name="PO_GETDETAIL_Request">
<TypeDescriptor TypeName="BDC.PO_GETDETAIL_Request,WCFPOGetDetail" Name="PO_GETDETAIL_Request">
<TypeDescriptors>
<TypeDescriptor TypeName="BDC.PO_GETDETAIL_RequestPONumber,WCFPOGetDetail" Name="PONumber">
<TypeDescriptors>
<TypeDescriptor TypeName="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IdentifierName="PONumber" Name="Value" />
</TypeDescriptors>
</TypeDescriptor>
<TypeDescriptor TypeName="BDC.PO_GETDETAIL_RequestVendorName,WCFPOGetDetail" Name="VendorName">
<TypeDescriptors>
<TypeDescriptor TypeName="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="Value" />
</TypeDescriptors>
</TypeDescriptor>
<TypeDescriptor TypeName="BDC.PO_GETDETAIL_RequestCurrency,WCFPOGetDetail" Name="Currency">
<TypeDescriptors>
<TypeDescriptor TypeName="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="Value" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
<Parameter Direction="Return" Name="Return">
<TypeDescriptor TypeName="BDC.PO_GETDETAIL_Response,WCFPOGetDetail" Name="Return">
<TypeDescriptors>
<TypeDescriptor TypeName="BDC.PO_GETDETAIL_ResponsePONumber,WCFPOGetDetail" Name="PONumber">
<TypeDescriptors>
<TypeDescriptor TypeName="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="Value" />
</TypeDescriptors>
</TypeDescriptor>
<TypeDescriptor TypeName="BDC.PO_GETDETAIL_ResponseVendorName,WCFPOGetDetail" Name="VendorName">
<TypeDescriptors>
<TypeDescriptor TypeName="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="Value" />
</TypeDescriptors>
</TypeDescriptor>
<TypeDescriptor TypeName="BDC.PO_GETDETAIL_ResponseCurrency,WCFPOGetDetail" Name="Currency">
<TypeDescriptors>
<TypeDescriptor TypeName="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="Value" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="Finder" ReturnParameterName="Return" ReturnTypeDescriptorName="Return" ReturnTypeDescriptorLevel="0" Name="Finder" />
</MethodInstances>
</Method>
</Methods>
</Entity>
</Entities>
</LobSystem>