BAPI WSDL Exception RRS feed

  • Question


    I use the following code which works fine when i generate wsdl for RFC. But the same code doesnt work for BAPI.

    I get the following exception.

    {Metadata Browse failed while building WSDL at 'http://Microsoft.LobServices.Sap/2007/03/BAPIOBJ/BUS6010'"}

    inner : {"Browse not supported at level http://Microsoft.LobServices.Sap/2007/03/BAPIOBJ/BUS6010."}


    works for "http://Microsoft.LobServices.Sap/2007/03/Rfc/RFC_READ_TABLE"

    but throws exception for "http://Microsoft.LobServices.Sap/2007/03/BAPIOBJ/BUS6010"


    my code which works for RFC:


    SAPBinding binding = new SAPBinding();

    // create the endpoint address

    EndpointAddress address = new EndpointAddress("sapserver");

    // create metadata retrieval client

    MetadataRetrievalClient metadataProxy = new MetadataRetrievalClient(binding, address);

    metadataProxy.ClientCredentials.UserName.UserName = "..";

    metadataProxy.ClientCredentials.UserName.Password = ...";

    binding.OpenTimeout = TimeSpan.MaxValue;

    binding.ReceiveTimeout = TimeSpan.MaxValue;

    binding.SendTimeout = TimeSpan.MaxValue;

    // Show the nodes on the console

    MetadataRetrievalNode op1 = new MetadataRetrievalNode();

    op1.NodeId = "http://Microsoft.LobServices.Sap/2007/03/BAPIOBJ/BUS6010";

    //op1.NodeId = http://Microsoft.LobServices.Sap/2007/03/Rfc/RFC_READ_TABLE;... works for this

    op1.IsOperation = false;

    List<MetadataRetrievalNode> nodes = new List<MetadataRetrievalNode>();


    // Get the WSDL

    System.Web.Services.Description.ServiceDescription wsdl = metadataProxy.GetMetadata(nodes.ToArray());

    // Write the WSDL to a file


    // close the client



    Tuesday, January 29, 2008 1:56 PM


  • binding.EnableBusinessObjects = true;

    //set the above binding property to true before creating your MetadataRetrievalClient proxy.
    Tuesday, January 29, 2008 6:12 PM

All replies

  • binding.EnableBusinessObjects = true;

    //set the above binding property to true before creating your MetadataRetrievalClient proxy.
    Tuesday, January 29, 2008 6:12 PM
  • Hi Mustan Sir..

    I need ur help.I m trying to get the data from sap by using RFC.I have installed BTS 2006 R2and connector and mySap business suite which comes with biztalk adapters CD.First thing is that i m new in BTS 2006 R2.I don't have exact idea how to do this but i m followong some documents.According to this document when i right click on the project in solution explorer i click on add generated items to generate schemas.Then i select SAP from adapter list i get the wizard to pass the information to SAP server like clientId,SyatemId,Username,Pwd but according to the document it should display the wizard to search RFC on that sap server.But it doesn't.I m making the solution in VS 2005.I think connector doesn't work with VS 2005.It is compatible with VS2003.I have installed it.I think it is not coming b'coz i m making solution in VS 2005.I think i shuld make solution in VS 2003 but problem is that i m not getting the biztalk project type in VS 2003.Can't i make solution in VS 2003 for BTS 2006 R2?


    Sir..i need solution b'coz i have to complete for my client very soon.



    Friday, February 1, 2008 5:30 AM
  • Hi Janardhan,

    Could you please start a new thread, since this question is not related to the post subject. Always create your own thread unless it's the same problem.



    Friday, February 1, 2008 8:42 AM
  • Hello Janardan,

    .NET connector very well works with VS2005. Are you expecting RFC/BAPI explorer in VS2005, and select one of them and create the proxy then execute that function?




    Friday, February 1, 2008 8:49 AM
  • Hi taruna...

    Actually i m new here.So i didn't know abt this.Problem is that i don't have knowledge about how to access the data from sap using RFC.I m new in BTS 2006.So can u plz tell me the ways by which i can implement this solution?Plz give me some guidance



    Friday, February 1, 2008 1:56 PM