locked
Merge Two WSDL files in single wsdl file RRS feed

  • Question

  • User619277490 posted

    Hi all of you,

    Please help me. I want to merge two wsdl files in single wsdl file using c# or asp .net.

    Thank you in advance.

    Sunday, August 2, 2015 2:28 PM

Answers

  • User2024324573 posted

    Please have a look at: https://github.com/lenardg/WSDLMerge

    Hope this will help.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, August 2, 2015 7:28 PM
  • User281315223 posted

    This similar discussion on Stack Overflow discusses a few different tools that can be used to try and merge multiple WSDL files into a single one, although I cannot vouch for any of them personally. 

    The tool that Mostafa mentions is probably going to be the best / most recent option (at least from a .NET standpoint), however there are a few other tools like WSDLFlattener that could work as well (but may not have options to be used programatically like WSDL Merge.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, August 2, 2015 8:19 PM
  • User-84896714 posted

    Hi Lokesh,

    I have done some research on WSDLMerger, It cann't merge two wsdl files in one file. It only could merge one wsdl  with some <import> elements. And I have some if there any other tools on web, but can't found any. I suggest you do it by yourself use some XML processing technology. For example Linq to XML.

    Best Regards,
    Wang Li

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 5, 2015 11:19 PM

All replies

  • User2024324573 posted

    Please have a look at: https://github.com/lenardg/WSDLMerge

    Hope this will help.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, August 2, 2015 7:28 PM
  • User281315223 posted

    This similar discussion on Stack Overflow discusses a few different tools that can be used to try and merge multiple WSDL files into a single one, although I cannot vouch for any of them personally. 

    The tool that Mostafa mentions is probably going to be the best / most recent option (at least from a .NET standpoint), however there are a few other tools like WSDLFlattener that could work as well (but may not have options to be used programatically like WSDL Merge.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, August 2, 2015 8:19 PM
  • User619277490 posted

    Hi Mostafa Asaduzzaman,

    Thank you for answer. But I have Tried this code. There are only two option source file and destination file. Means I can give only tow file path one for save file content and second on for content. I am unable to get proper result.

    Thank you.

    Monday, August 3, 2015 4:04 AM
  • User2024324573 posted

    Hi Lokesh,

    How do you want to merge the two files? Using command line tool or something? 

    Monday, August 3, 2015 4:08 AM
  • User619277490 posted

    I want marge two wsdl files using c# code. Like you suggest code by you in previous answer. No using command line or something else.

    Thank you.

    Monday, August 3, 2015 12:59 PM
  • User281315223 posted

    Thank you for answer. But I have Tried this code. There are only two option source file and destination file. Means I can give only tow file path one for save file content and second on for content. I am unable to get proper result.

    If that's the case, then you would probably have to continually merge the WSDL files into a single one (e.g. take the result from two files and then merge the next file into the next product), if that makes any sense. If the API only supports two simultaneous files, this seems like it would be the only way to handle it.

    Monday, August 3, 2015 1:03 PM
  • User619277490 posted

    Thank you sir for answering.

    I am using this https://github.com/lenardg/WSDLMerge link code for merge wsdl files in single file. Can you help me for do this I am new in web services and related work to it.

    Its will be obligation. Please help me.

    Monday, August 3, 2015 2:36 PM
  • User-84896714 posted

    Hi Lokesh Hammad,

    Please take care of the suggestion of Rion.

    you would probably have to continually merge the WSDL files into a single one (e.g. take the result from two files and then merge the next file into the next product),

    Try below code.

    public static string MergeFiles(string[] fileNames)
    {
        if (fileNames.Length < 2)
        {
            return fileNames[0];
        }
        for (int i = 1; i < fileNames.Length; i++)
        {
            WSDLMerger.Merge(fileNames[i - 1], fileNames[i]);
        }
        return fileNames[fileNames.Length - 1];
    }

    Best Regards,
    Wang Li

    Wednesday, August 5, 2015 2:52 AM
  • User619277490 posted

    Thank you for reply.

    But I did not get any result.

    I have two URL first one is http://www.webservicex.net/sendsmsworld.asmx?WSDL and second one is http://www.webservicex.com/globalweather.asmx?WSDL and now I want to merge wsdl of both URL into single file. Using C# code.

    Thank you.

    Wednesday, August 5, 2015 1:08 PM
  • User-84896714 posted

    Hi Lokesh,

    I have done some research on WSDLMerger, It cann't merge two wsdl files in one file. It only could merge one wsdl  with some <import> elements. And I have some if there any other tools on web, but can't found any. I suggest you do it by yourself use some XML processing technology. For example Linq to XML.

    Best Regards,
    Wang Li

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 5, 2015 11:19 PM
  • User619277490 posted

    Thank you for reply.

    I will find another way for merge two WSDL files. If you found some thing related with it please suggest to me.

    Thank you.

    Thursday, August 6, 2015 4:38 AM