I am getting a really strange error in SharePoint designer upon trying to create an external content type for a simple SOAP Web service.
The error happens at the moment I clicked Add Connection, have filled out the data source connection details and clicked OK
More exactly, the error message in SPD is not really descriptive (something like it was not able to load WSDL), but if I capture the traffic with Fiddler, I can see this:
<MetadataException i:type="a:MetadataObjectNotFoundExceptionState" xmlns="Microsoft.BusinessData.SharePoint" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:a="Microsoft.SharePoint.BusinessData">
<explicitMessage>false</explicitMessage>
<innerExceptionToStringed i:nil="true"/>
<innerExceptionTypeFullName i:nil="true"/>
<message>IEntity could not be found using criteria 'The requested Entity 'Account List' under Namespace 'http://...' was not found.'.</message>
<metadataObjectTypeName>Microsoft.BusinessData.MetadataModel.IEntity, Microsoft.BusinessData, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</metadataObjectTypeName>
<serverStackTrace> at Microsoft.SharePoint.BusinessData.SharedService.BdcServiceApplicationProxy.Execute[T](String operationName, UInt32 maxRunningTime, ExecuteDelegate`1 operation, Boolean performCanaryCheck, Boolean isChannelThatDelegatesIdentity)
at Microsoft.SharePoint.BusinessData.SharedService.BdcServiceApplicationProxy.GetEntityWithNameAndNamespace(String namespace, String name, Guid partitionId)
(namespace omitted for privacy reasons)
If I take a look at the MSDN page for GetEntityWithNameAndNamespace, I can see that
The GetEntityWithNameAndNamespace operation retrieves the active Entity with the specified name and namespace in the specified partition.
But I am not really sure why SharePoint Designer expects to retrieve any entities for an external content type that has not even been created yet?
What I can also see from the Fiddler capture is that the failing GetEntityWithNameAndNamespace operations (there are several ones, by the way) are consistently preceded with attempt to create an AdministrationMetadataCatalogStruct:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<MetadataObjectCreate xmlns="http://www.microsoft.com/Office/2009/BusinessDataCatalog">
<rawValues i:type="a:AdministrationMetadataCatalogStruct"
xmlns:a="Microsoft.SharePoint.BusinessData"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:id>0</a:id><a:isCached>true</a:isCached>
<a:name/><a:objectVersion>0</a:objectVersion>
<a:partitionId>00000000-0000-0000-0000-000000000000</a:partitionId>
</rawValues>
<parentStruct i:nil="true"
xmlns:a="Microsoft.SharePoint.BusinessData"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
</MetadataObjectCreate>
</s:Body>
</s:Envelope>
I am pretty sure we're all set at the BCS side (permissions, target application in secure store etc.)