none
Retrieving sap Idoc MetaData in Visual Studio RRS feed

  • Question

  • Hi folks,

    I have a Biztalk app that use sapbinding I generated the sap schemas but the sap system changed the schema and I need to re-import the sap metadata but when I try to do this the error below happen:

    Error while retrieving or generating the WSDL. Adapter message: The complexType 'http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/ZTESTE_IDOC//700:ZTESTE_IDOC' has already been declared.

     

    System.Xml.Schema.XmlSchemaException: The complexType 'http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/ZTESTE_IDOC//700:ZTESTE_IDOC' has already been declared.

    Server stack trace:
    at System.Xml.Schema.XmlSchemaSet.InternalValidationCallback(Object sender, ValidationEventArgs e)
    at System.Xml.Schema.BaseProcessor.SendValidationEvent(XmlSchemaException e, XmlSeverityType severity)
    at System.Xml.Schema.BaseProcessor.AddToTable(XmlSchemaObjectTable table, XmlQualifiedName qname, XmlSchemaObject item)
    at System.Xml.Schema.Preprocessor.Preprocess(XmlSchema schema, String targetNamespace, ArrayList imports)
    at System.Xml.Schema.Preprocessor.Execute(XmlSchema schema, String targetNamespace, Boolean loadExternals)
    at System.Xml.Schema.XmlSchemaSet.PreprocessSchema(XmlSchema& schema, String targetNamespace)
    at System.Xml.Schema.XmlSchemaSet.Reprocess(XmlSchema schema)
    at Microsoft.ServiceModel.Channels.Common.Design.WsdlBuilderHelper.GetServiceDescription()
    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.MetadataUserControl.GetWsdl()

    Anybody could help me?

    Thanks,


    Bruno Lins de Oliveira - Microsoft Student Partner
    Wednesday, April 15, 2009 7:34 PM

Answers

  • Hi,

    I had tried checking the checkbox but did not solve my problem. However, I solved my problem generating a new Idoc based on default sap idocs and now everything is working fine. I think the problem was the properties in IDOC but the SAP's PRO didn't explain nothing about this.

    Thanks a lot,
    Bruno Lins de Oliveira
    Bruno Lins de Oliveira - Microsoft Student Partner
    Wednesday, April 22, 2009 6:00 PM

All replies

  • Unfortunately, there is not a simple way to just ask the BizTalk schema wizard to just update the schema. You could change the namespace of the previously generated schema (if you wanted to keep it around), then regenerate the new schema. Then outside of Visual Studio you could delete the old schema file and rename the new one as the old schema's file name so that the solution will build successfully again.

    If you delete the old schema in Visual Studio the maps and orchestrations that rely on the schema will break so you should remove the old schema outside of Visual Studio once you have an updated one.

    Thanks,
    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Thursday, April 16, 2009 2:50 PM
    Moderator
  • Hi Ben,

    The problem is that I already delete the schema and the error message still happen.

    Do you have any idea?

    Thanks,
    Bruno Lins de Oliveira - Microsoft Student Partner
    Thursday, April 16, 2009 6:28 PM
  • Can you try checking the checkbox, "genrate unique schema types" in BizTalk schema wizard, and se if it helps.  

    Friday, April 17, 2009 6:08 AM
  • Hi,

    I had tried checking the checkbox but did not solve my problem. However, I solved my problem generating a new Idoc based on default sap idocs and now everything is working fine. I think the problem was the properties in IDOC but the SAP's PRO didn't explain nothing about this.

    Thanks a lot,
    Bruno Lins de Oliveira
    Bruno Lins de Oliveira - Microsoft Student Partner
    Wednesday, April 22, 2009 6:00 PM