SharePoint Products TechCenter >
SharePoint Products and Technologies Forums
>
SharePoint - Business Data Catalog
>
BDC & WebService - IDEnumerator Problems
BDC & WebService - IDEnumerator Problems
- Let's start here. Due to specific constraints of my environment I cannot connect directly to the database. In leu of these I am using an additional layer via WebServices.
I have 3 methods in my webservice...
GetPartNumbers_IDEnumerator()
GetPart_SpecificFinder()
GetParts (Finder)
As far as the WebService goes, GetPartNumbers_IDEnumerator() returns an ArrayOfString(Collection) with string elements containing only the ID's. See below
<?xml version="1.0" encoding="utf-8"?> <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://intranet1/WebServices/"> <string>01210801 00 </string> <string>02050902 00 </string> <string>02050903 00 </string> <string>100014 03 </string> <string>100020 03 </string> </ArrayOfString>
GetPart_SpecificFinder() returns below...
<GSSPart> <PartNumber>102233 00</PartNumber> <PartDescription>WELDED REAR SHELF ASSY 150 </PartDescription> <Exists>true</Exists> </GSSPart>
GetParts() returns...
<ArrayOfGSSPart> <GSSPart> <PartNumber>100014 03 </PartNumber> <PartDescription>CLIP </PartDescription> <Exists>true</Exists> </GSSPart> <GSSPart> <PartNumber>100020 03 </PartNumber> <PartDescription>BOTTOM TRANSFER PLATE (BE) </PartDescription> <Exists>true</Exists> </GSSPart> </ArrayOfGSSPart>
Using ApplicationDefinitionDesigner, when Executing the IDEnumerator method, I get the error,
"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index."
I know what the error means, but I don't know why I'm getting it. I'm assuming it has something to do with my ADF, but I don't know what.
However, the Finder and Specific Finder methods work fine.
Any ideas welcome. Including my ADF.
<?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="GSS_VJobHeader_PartDescription" xmlns="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog"> <Properties> <Property Name="WsdlFetchUrl" Type="System.String">http://intranet1/WebServices/GSS_VJobHeader_PartDescription.asmx?wsdl</Property> <Property Name="WebServiceProxyNamespace" Type="System.String">BDC</Property> <Property Name="WildcardCharacter" Type="System.String">%</Property> </Properties> <LobSystemInstances> <LobSystemInstance Name="GSS_VJobHeader_PartDescription_Instance"> <Properties> <Property Name="LobSystemName" Type="System.String">GSS_VJobHeader_PartDescription</Property> <Property Name="WebServiceAuthenticationMode" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.WebService.HttpAuthenticationMode">PassThrough</Property> </Properties> </LobSystemInstance> </LobSystemInstances> <Entities> <Entity EstimatedInstanceCount="10000" Name="GetPartsResult"> <Identifiers> <Identifier TypeName="System.String" Name="PartNumber" /> </Identifiers> <Methods> <Method Name="GetPartNumbers_IDEnumerator"> <Parameters> <Parameter Direction="Return" Name="Return"> <TypeDescriptor TypeName="System.String[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="ArrayOfString" DefaultDisplayName="GetPartNumbers_IDEnumeratorResult"> <TypeDescriptors> <TypeDescriptor TypeName="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IdentifierName="PartNumber" Name="string" /> </TypeDescriptors> </TypeDescriptor> </Parameter> </Parameters> <MethodInstances> <MethodInstance Type="IdEnumerator" ReturnParameterName="Return" ReturnTypeDescriptorName="ArrayOfString" ReturnTypeDescriptorLevel="0" Name="GetPartNumbers_IDEnumeratorResultInstance" /> </MethodInstances> </Method> <Method Name="GetPart_SpecificFinder"> <Parameters> <Parameter Direction="In" Name="Part"> <TypeDescriptor TypeName="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IdentifierName="PartNumber" Name="Part" /> </Parameter> <Parameter Direction="Return" Name="Return"> <TypeDescriptor TypeName="BDC.GSSPart,GSS_VJobHeader_PartDescription" Name="GSSPart" DefaultDisplayName="Return"> <TypeDescriptors> <TypeDescriptor TypeName="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IdentifierName="PartNumber" Name="PartNumber"> <Properties> <Property Name="ShowInPicker" Type="System.Boolean">true</Property> </Properties> </TypeDescriptor> <TypeDescriptor TypeName="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IdentifierName="PartNumber" Name="PartDescription"> <Properties> <Property Name="ShowInPicker" Type="System.Boolean">true</Property> </Properties> </TypeDescriptor> <TypeDescriptor TypeName="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="Exists" /> </TypeDescriptors> </TypeDescriptor> </Parameter> </Parameters> <MethodInstances> <MethodInstance Type="SpecificFinder" ReturnParameterName="Return" ReturnTypeDescriptorName="GSSPart" ReturnTypeDescriptorLevel="0" Name="GetPart_SpecificFinderResultInstance" /> </MethodInstances> </Method> <Method Name="GetParts"> <FilterDescriptors> <FilterDescriptor Type="Wildcard" Name="Part" /> </FilterDescriptors> <Parameters> <Parameter Direction="In" Name="Part"> <TypeDescriptor TypeName="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IdentifierName="PartNumber" AssociatedFilter="Part" Name="Part" /> </Parameter> <Parameter Direction="Return" Name="Return"> <TypeDescriptor TypeName="BDC.GSSPart[],GSS_VJobHeader_PartDescription" IsCollection="true" Name="ArrayOfGSSPart" DefaultDisplayName="GetPartsResult"> <TypeDescriptors> <TypeDescriptor TypeName="BDC.GSSPart,GSS_VJobHeader_PartDescription" Name="GSSPart"> <TypeDescriptors> <TypeDescriptor TypeName="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IdentifierName="PartNumber" Name="PartNumber"> <Properties> <Property Name="ShowInPicker" Type="System.Boolean">true</Property> </Properties> </TypeDescriptor> <TypeDescriptor TypeName="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IdentifierName="PartNumber" Name="PartDescription"> <Properties> <Property Name="ShowInPicker" Type="System.Boolean">true</Property> </Properties> </TypeDescriptor> <TypeDescriptor TypeName="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="Exists" /> </TypeDescriptors> </TypeDescriptor> </TypeDescriptors> </TypeDescriptor> </Parameter> </Parameters> <MethodInstances> <MethodInstance Type="Finder" ReturnParameterName="Return" ReturnTypeDescriptorName="ArrayOfGSSPart" ReturnTypeDescriptorLevel="0" Name="GetPartsResultInstance" /> </MethodInstances> </Method> </Methods> </Entity> </Entities> </LobSystem>
All Replies
- Istead of something like this
<string>01210801 00 </string>
<string>02050902 00 </string>
<string>02050903 00 </string>
<string>100014 03 </string>
<string>100020 03 </string>
Try returning something like
<PartNumber>01210801 00 </PartNumber>
<PartNumber>02050902 00 </PartNumber>
<PartNumber>02050903 00 </PartNumber>
<PartNumber>100014 03 </PartNumber>
<PartNumber>100020 03 </PartNumber>
Just a suggestion, you can try and see if it helps.
Cheers - Hi Joshwithrow
Were you able to solve this problem?
Cheers

