none
Retrieval of Type Metadata has failed while building WSDL - SAP Deep Structure Issue RRS feed

  • Question

  • Hi,
       I'm getting this exception when trying to generate the BindingClient information in Adapter Service Reference

    Microsoft.ServiceModel.Channels.Common.MetadataException: Retrieval of Type Metadata has failed while building WSDL at 'SAPTABLE/PTARQ_UIA_REQUEST' ---> Microsoft.ServiceModel.Channels.Common.MetadataException: The SAP system returned error: Details: ErrorCode=RFC_EXCEPTION. ErrorGroup=RFC_ERROR_APPLICATION_EXCEPTION. SapErrorMessage=. AdapterErrorMessage=The RfcGetStructureInfoAsTable API returned the error code 2 when obtaining metadata for the type PTARQ_UIA_REQUEST. Check the RFC SDK trace files for details.. when trying to retrieve metadata for table: PTARQ_UIA_REQUEST. ---> Microsoft.Adapters.SAP.RFCException: Details: ErrorCode=RFC_EXCEPTION. ErrorGroup=RFC_ERROR_APPLICATION_EXCEPTION. SapErrorMessage=. AdapterErrorMessage=The RfcGetStructureInfoAsTable API returned the error code 2 when obtaining metadata for the type PTARQ_UIA_REQUEST. Check the RFC SDK trace files for details..

    at Microsoft.Adapters.SAP.RFCException.HelperThrow(Int32 retCode, String additionalErrorMessage)

    at Microsoft.Adapters.SAP.RfcClientConnection.GetTableDefinition(String tableName, Int32& singleByteEncodingLength, Int32& doubleByteEncodingLength)

    at Microsoft.Adapters.SAP.InternalTableMetadata..ctor(String originalTypeName, SAPConnection sapConnection)

    at Microsoft.Adapters.SAP.SAPMetadataContract.ResolveTypeMetadata(String typeId, TimeSpan timeout, TypeMetadataCollection& extraTypeMetadataResolved)

    at Microsoft.ServiceModel.Channels.Common.Design.MetadataCache.GetTypeMetadata(String uniqueId, Guid clientId, TimeSpan timeout)

    at Microsoft.ServiceModel.Channels.Common.MetadataLookup.GetTypeDefinition(String typeId, TimeSpan timeout)

    at Microsoft.Adapters.SAP.SapTableMetadata.ResolveSapTableMetadata(String tableName, SAPConnection sapConnection, MetadataLookup metadataLookup, TimeoutHelper timeoutHelper)

    --- End of inner exception stack trace ---

    at Microsoft.Adapters.SAP.SapTableMetadata.ResolveSapTableMetadata(String tableName, SAPConnection sapConnection, MetadataLookup metadataLookup, TimeoutHelper timeoutHelper)

    at Microsoft.Adapters.SAP.SAPMetadataContract.ResolveTypeMetadata(String typeId, TimeSpan timeout, TypeMetadataCollection& extraTypeMetadataResolved)

    at Microsoft.ServiceModel.Channels.Common.Design.MetadataCache.GetTypeMetadata(String uniqueId, Guid clientId, TimeSpan timeout)

    at Microsoft.ServiceModel.Channels.Common.MetadataLookup.GetTypeDefinition(String typeId, TimeSpan timeout)

    at Microsoft.ServiceModel.Channels.Common.Design.XmlSchemaGenHelper.SetElementSchema(XmlSchemaExportContext schemaExportContext, MetadataLookup metadataLookup, XmlSchema schema, XmlSchemaElement elem, QualifiedTypeContainer qualifiedTypeContainer, TimeSpan timeout)

    --- End of inner exception stack trace ---

    Server stack trace:

    at Microsoft.ServiceModel.Channels.Common.Design.AdapterExceptions.ThrowMetadataException(String errorMessage, Object arg, Object source, Exception innerException)

    at Microsoft.ServiceModel.Channels.Common.Design.XmlSchemaGenHelper.SetElementSchema(XmlSchemaExportContext schemaExportContext, MetadataLookup metadataLookup, XmlSchema schema, XmlSchemaElement elem, QualifiedTypeContainer qualifiedTypeContainer, TimeSpan timeout)

    at Microsoft.ServiceModel.Channels.Common.ParameterizedOperationMetadata.AddSequenceElements(XmlSchemaExportContext schemaExportContext, MetadataLookup metadataLookup, XmlSchema schema, XmlSchemaSequence sequence, Boolean isRequest, TimeSpan timeout)

    at Microsoft.ServiceModel.Channels.Common.ParameterizedOperationMetadata.ExportOutputXmlSchema(XmlSchemaExportContext schemaExportContext, MetadataLookup metadataLookup, TimeSpan timeout)

    at Microsoft.ServiceModel.Channels.Common.Design.WsdlBuilderHelper.AddOperationSchema(OperationMetadata operationMetadata, TimeSpan timeout)

    at Microsoft.ServiceModel.Channels.Common.Design.WsdlBuilder.SearchBrowseNodes(MetadataRetrievalNode[] nodes, WsdlBuilderHelper helper, TimeoutHelper timeoutHelper)

    at Microsoft.ServiceModel.Channels.Common.Design.WsdlBuilder.GenerateOperationSchemas(WsdlBuilderHelper helper, MetadataRetrievalNode[] nodes, TimeSpan timeout)

    at Microsoft.ServiceModel.Channels.Common.Design.WsdlBuilder.GetWsdl(MetadataRetrievalNode[] nodes, Uri uri, TimeSpan timeout)

    at Microsoft.Adapters.SAP.SapCustomWsdlRetrieval.GetWsdl(MetadataRetrievalNode[] nodes, Uri uri, TimeSpan timeout)

    at Microsoft.ServiceModel.Channels.Common.Design.MetadataExchanger.ProcessMetadataGet(Message message, Uri target, TimeSpan timeout, MetadataLookup metadataLookup)

    at Microsoft.ServiceModel.Channels.Common.Design.MetadataExchanger.ProcessMetadataMessage(Message message, Uri target, TimeSpan timeout, MetadataLookup metadataLookup, Message& replyMessage)

    at Microsoft.ServiceModel.Channels.Common.Channels.AdapterRequestChannel.Request(Message message, TimeSpan timeout)

    at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)

    at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

    at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)

    at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

    at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:

    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

    at Microsoft.ServiceModel.Channels.IMetadataRetrievalContract.GetMetadata(MetadataRetrievalNode[] nodes)

    at Microsoft.ServiceModel.Channels.Tools.MetadataSearchBrowse.MetadataPanel.GetWsdl(MetadataRetrievalNode[] nodes)

    at Microsoft.ServiceModel.Channels.Tools.MetadataSearchBrowse.MetadataPanel.btnProperties_Click(Object sender, EventArgs e)

    Tuesday, May 26, 2009 11:37 PM

Answers

  • The table PTARQ_UIA_REQUEST

    contains another  table 

     PTARQ_UIA_DEDUCT.

    So, this is a RFC with nested tables (ITAB2).

    The SAP adapter doesnot support  ITAB2 type  tables as the underlying library, used by the adapter to  communicate with SAP ( RFC-SDK ),

     doesn't support ITAB2 type tables.
    • Marked as answer by shri82 Sunday, May 31, 2009 6:18 AM
    Wednesday, May 27, 2009 5:56 AM

All replies


  • Does the RFC for which you are trying to genrate metadata contain ITAB2 type tables?


    Wednesday, May 27, 2009 5:43 AM
  • The table PTARQ_UIA_REQUEST

    contains another  table 

     PTARQ_UIA_DEDUCT.

    So, this is a RFC with nested tables (ITAB2).

    The SAP adapter doesnot support  ITAB2 type  tables as the underlying library, used by the adapter to  communicate with SAP ( RFC-SDK ),

     doesn't support ITAB2 type tables.
    • Marked as answer by shri82 Sunday, May 31, 2009 6:18 AM
    Wednesday, May 27, 2009 5:56 AM
  • Rohit,
       But for the same RFC, when I use SAP.NET connetor, am able to generate the proxy wsdl and the call is also sucessful. Is there any patch available for the same or anything releasing in the near future by the Biztalk Adapter team? Am asking the same coz most of the RFC's which we are using currently in our application has got similar structures. As SAP.NET connetor has some issues around 64 bit envs, I believe SAP Enterprise Services is worth trying. Any other alternative you can think of ?
    Wednesday, May 27, 2009 4:02 PM
  • Again, as mentioned by Rohit, if the RFC uses nested tables (ITAB2), those RFCs cannot be invoked using the WCF SAP Adapter, as the RFC SDK does not work with them.
    Sunday, May 31, 2009 6:14 AM
  • I want this problem
    Wednesday, December 17, 2014 8:24 AM