webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

How do I reference a webMethods WSDL in a .NET app?

  • 1.  How do I reference a webMethods WSDL in a .NET app?

    Posted Wed January 09, 2008 04:42 PM

    Greetings

    I would like to use a webMethods-created WSDL to add a web reference in a .NET application. I need to push data generated from an existing .NET web service to the webMethods service alluded to in the aforementioned WSDL.

    When I attempt to add the WSDL as a web reference in .NET I get a message saying “the proxy settings on this computer are not configured correctly for web discovery.” Does this mean my local machine or the server housing the WSDL?

    At the very least, I need a confirmation that what I am trying to do here is possible - and am hoping I am just missing a step or two. Please advise. Thanks…

    • Tim B.

    #webMethods
    #soa
    #API-Management


  • 2.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Wed January 09, 2008 05:51 PM

    UPDATE:

    I did solve the proxy error message I had, but now am getting the following:

    The underlying connection was closed: Unable to connect to the remote server.

    I’m hoping this is a simply a matter of my getting permissions.

    Again, assuming this (adding a webMethods WSDL as a .NET web reference) is doable. Please advise…


    #API-Management
    #soa
    #webMethods


  • 3.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Wed January 09, 2008 06:09 PM

    IS 6.5 and earlier does not provide a built-in way to expose a static (or dynamic) WSDL. You can generate one with the much maligned WSDL-generator and host it on IS by copying to your package’s pub folder, but it’s just as easy to give the static WSDL to Visual Studio to generate the client code.

    IS 7.1 and later provides a Web Services Descriptor node which gives you a URL at which a WSDL can be obtained dynamically.

    HTH,

    Mark


    #webMethods
    #API-Management
    #soa


  • 4.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Wed January 09, 2008 07:19 PM

    So, is this a “yes” to my question: Is adding a webMethods WSDL as a .NET web reference doable? It sounds like we’re saying the same thing, but want to confirm.

    Also - I further assume that means its possible for the WSDL to be made available to be discovered via lookup. Please advise. Thanks for the help…

    • Tim B.

    #API-Management
    #webMethods
    #soa


  • 5.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Thu January 10, 2008 06:29 AM

    WSDL is WSDL. You can create a web reference from any valid WSDL in .Net if you know what you are doing. .Net does not care that the service you are consuming is provided by IS. You will need to set the PreAuthenticate property to true so that .NET will perform HTTP basic auth before sending the request, but other than that quirk (how-to is well-documented on MS sites) its just like any other web reference.

    You would need to publish the WSDL in a registry to support discovery. WM happens to sell just such a registry, but you can use your reg/rep tool of choice.

    Mark


    #webMethods
    #soa
    #API-Management


  • 6.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Tue March 25, 2008 04:22 PM

    Can you walkthrough how this is done (I’m using VS 2003)? Thanks…


    #API-Management
    #soa
    #webMethods


  • 7.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Tue March 25, 2008 05:33 PM

    There are tons of forums and zillions of pages of MS documentation that should be able to guide you in this. For that matter the online help inside VS .Net 2003 should suffice.


    #soa
    #webMethods
    #API-Management


  • 8.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Tue March 25, 2008 05:45 PM

    Appreciate the reply. That said it gets me no closer. Most MS documentation tends to be overloaded with irrelevant mumbo jumbo and in some cases never cuts to the chase (the actual how-to).

    For not only myself, but for other wM users, I was hoping you had a cut-and-dry step-by-step example of doing this for a wM WSDL. Please advise. Thanks…


    #API-Management
    #soa
    #webMethods


  • 9.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Tue March 25, 2008 06:16 PM

    Sorry to disappoint you, but I am not a VS .Net developer. I know just enough to be dangerous and to have done this a couple of years back. You want to read up on adding a web reference to your project. At least in the past you could supply the WSDL from either a URL or a path and filename on the file system.

    Mark


    #API-Management
    #soa
    #webMethods


  • 10.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Wed March 26, 2008 07:57 AM

    Usually you get this error when the target soap location is wrong. Did you check the soap location in the WSDL or in the .NET app? It should point to one of the soap processors in the webMethods (as the target service in in WM): default or custom like: http://server:port/soap/default
    You can make the .NET app to choose this location from config file by making web reference behaviour dynamic in the IDE.
    This change should work if the execute privileges of the wm service thats exposed as a web serive are set to ananymous. Otherwise you have to provide auth details in the .NET app before making web service call.

    As you said, if you don’t have access rights, then you should get access denied exception instead.

    Cheers
    Guna


    #soa
    #webMethods
    #API-Management


  • 11.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Wed March 26, 2008 02:56 PM

    Thanks for the heads-up, tgunasekhar. It sounds like you’ve done this before, so I’ll ask you what I asked Mark:

    Do you have a cut-and-dry step-by-step example of a .NET app accessing a wM WSDL you’re willing to share? Please advise. Thanks…


    #API-Management
    #soa
    #webMethods


  • 12.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Thu March 27, 2008 07:58 AM
    1. Copy the WSDL to your developement or local machine.
    2. Add the WSDL to your .NET project, so that the file will be available with the application.
    3. Now in the solution explorer. Right click on project → add web reference.
    4. Copy the path of the WSDL in your machine.
    5. In the web reference wizard, paste this WSDL path in the URL text box and then click on ‘GO’.
    6. You will see all the services/functions described in the WSDL under ‘Web Services Found at this URL’.
    7. Give a name to the web reference and click ‘Add Webreference’.
    8. In the project, you will see a web reference added with the given name. Click on it and see its properties (Right click → properties).
    9. In the properties, you will see ‘URL Behavior’. Set the value to dynamic.
    10. An entry in the section in the app.config (or web.config if its a web app) file will be created as below: [SIZE=2][COLOR=#0000ff]
    11. <[/color][/size]addkey="FAST2UpdateE2.e2.rbfastv2eworksService"value=“http://kor119744.in.bosch.com:5005/soap/default”/>
    12. You can change this value to point to different WM systems: D, Q or P. You can see all the funtions/services and their respective input signatures in the object browser (Double click on the web reference)
    13. You can set the execute privileges of the wm web service to ‘Ananymous’ and make a web service call for testing. Later you can set the credentials based on the ACL of the service.
    14. I attached a sample VB.NET 2003 project that uses the WM WSDL

    Cheers:)
    Guna

    FAST2UpdateE2.zip (23.7 KB)


    #soa
    #webMethods
    #API-Management


  • 13.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Thu March 27, 2008 03:55 PM

    Wow…Guna that is really impressive that you went out of your way to gather step by step information to help someone.


    #API-Management
    #soa
    #webMethods


  • 14.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Thu March 27, 2008 04:51 PM

    Providing this type of detailed information is what make these user group forums valuable. Otherwise, what’s the point?

    My thanks to Guna. Not just for myself, but for other users who have the same question.


    #webMethods
    #API-Management
    #soa


  • 15.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Thu March 27, 2008 05:34 PM

    What’s above-and-beyond the call of duty on this one, is that the steps he provided were for Microsoft Visual Studio .Net and actually had very little to do with webMethods other than the WSDL happened to come from there.

    Try getting webMethods support on a Tibco forum or MS forum and see if you get the same good results. :wink:


    #webMethods
    #API-Management
    #soa


  • 16.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Thu March 27, 2008 06:42 PM

    Here’s a “cut-and-dry step-by-step example” with screenshots. Found this in about 30 seconds of searching: [URL=“Xefteri.com is for sale | HugeDomains”]Xefteri.com is for sale | HugeDomains

    Looks to be exactly what you were looking for.

    The search string I used was “visual studio .net add wsdl” in Google. The second result has exactly what you were looking for.

    There is no such thing as “wM WSDL”–there is only WSDL.

    This thread on getting help might be useful for you in the future. Particularly the point:

    “The more you do to demonstrate that you have put thought and effort into solving your problem before asking for help, the more likely you are to actually get help.”

    A little more effort on your part might have answered your question much faster than the almost 3 months that it took.


    #soa
    #API-Management
    #webMethods


  • 17.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Fri March 28, 2008 01:51 PM

    Hi Khan, Actually I came from a .NET background into webMethods. So its a well known job for me.

    Hi Rob, you are absolutely right. Many times hitting a right keyword in search engines show us what we need.

    Cheers:)
    Guna


    #webMethods
    #API-Management
    #soa


  • 18.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Wed May 07, 2008 03:26 PM

    As tgunasekhar notes, it sometimes takes the right keywords to find what we’re looking for. In this particular case, I am in a .NET-only shop working with an out-of-town client who is mainly wM. Not having both to play with in front of you makes research more difficult - but research was indeed done.

    Which is what can make these forums very valuable when used as intended (providing useful information for sometimes very specific cases like this one).

    reamon, I trust you now see that your comments, while understandable from your initial perspective, were out-of-turn. That said I appreciate your following up with additional information and am glad it could be done in short order.


    #API-Management
    #webMethods
    #soa


  • 19.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Wed May 07, 2008 05:33 PM

    I do not see that my comments were out of place nor out of turn. I provided objective advice based on the course of the thread.

    If the advice about demonstrating that you’ve put some effort into solving the problem yourself felt unwarranted, I’d offer that the simple span of time from the initial question to two separate posted solutions (almost 3 months) clearly demonstrates that you did little to resolve this yourself. A couple of months would seem more than enough time to try various search terms, or wade through the “mumbo jumbo” of MS documentation. That is primarily why I gave the advice that I did.

    You say research was done but you never gave any indication of that. You didn’t say where you looked. You didn’t say what terms you searched for. In fact, you didn’t give any indication that you looked at all–you appeared to shun even the notion of looking in the MS docs. You simply repeatedly asked for “cut-and-dry” steps. I’m no search wizard (and haven’t done any VS stuff in years) but if I can find something in 30 seconds, surely you can find the same over the course of almost 3 months.

    “Which is what can make these forums very valuable when used as intended (providing useful information for sometimes very specific cases like this one).”

    Repeating documentation is the intent of forums like these? I don’t think so. Pointing people to the docs (or where to find the docs) yes. Repeating existing content, no. Sure, step-by-step instructions will show up from time to time but that’s the exception.

    “Give a man a fish, he’ll eat for a day. Teach a man to fish, he’ll eat for a lifetime.”

    Ask for clarification on something that you’ve demonstrated you’ve tried to understand for yourself, you’ll likely get a response with a smile. Ask for step-by-step details that are readily available elsewhere or ask simply “please tell me everything I need to know about X”, you’ll likely get a different response.


    #soa
    #API-Management
    #webMethods


  • 20.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Wed May 07, 2008 06:59 PM

    [COLOR=black][FONT=Verdana]

    [/font][/color]

    Really…

    [COLOR=black][FONT=Verdana]

    [/font][/color]

    Not very objectionable IMO. You seem to suggest that I did little to nothing to find an answer on my own as a matter of fact. You then try to justify your comment:

    [COLOR=black][FONT=Verdana]

    [/font][/color]

    Wha….? This proves nothing, really. You cannot infer, let alone “declare,” that I did not do any research simply because I did not cite chapter and verse of where else I looked. Logical fallacies abound in the same – to say nothing of what else it may suggest.

    [COLOR=black][FONT=Verdana]

    [/font][/color]

    I respect your opinion. That said I would again submit that this was indeed an exception. Thus, your reasoning, which seems to suggest that I should somehow be pigeonholed into some derogatory category (i.e., needing to learn how to “fish”), does not follow.

    As you do not know the specific, non-trivial details of my case, as well as not knowing my background, I am willing to take the high road for now and let this one go. If, however, you feel the need to continue this discussion, feel free to PM me.

    Again, my thanks to you and Guna for your help and insight….


    #soa
    #webMethods
    #API-Management


  • 21.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Wed May 07, 2008 11:01 PM

    I’ll summarize the thread, in as objective terms as possible:

    • You asked how to import a WSDL into VS.

    • Mark C. explained to use a static WSDL to import to VS for IS 6.5 and earlier. And that IS 7.1 can be queried for a WSDL dynamically.

    • Mark’s response confused you. You asked for clarification.

    • Mark responded with additional detail on making the resulting code workable. And provided high level info on making the WSDL discoverable.

    • No activity in the thread from 1/9 to 3/25.

    • You asked Mark for specific instructions for VS 2003.

    • Mark said search the net or review the online help.

    • You dismissed the MS docs as mumbo jumbo. And asked again for detailed steps.

    • Mark again referred you to documentation, adding “read up on adding a web reference to your project.”

    • Guna responded to the errors you encountered. You ignored that and instead asked for step-by-step instructions again, which Guna provided.

    • Talha Khan complimented Guna’s effort.

    • You stated that this is the sort of help that makes these forums valuable.

    • I posted what I found in a search. I commented that future questions might be answered more quickly if you demonstrate what you’ve done to help yourself (the thread was silent for almost 3 months).

    • You thought I was out of line making that observation.

    That brings us to today.

    After the first two posts, where you resolved the proxy error you encountered, you didn’t demonstrate in any way that you did any research yourself. You may have done plenty, or did a bunch of trial and error attempts, but there is no indication of such activity in the thread. Noone expects “chapter and verse” necessarily but zero citations is the other extreme.

    You think I was being derogatory with the give a fish/learn to fish quote. You’ve misinterpreted the intent. There is nothing derogatory about needing to learn to fish. Mark and I were trying to help you to either fish or learn how to fish, rather than just give you a fish. Guna gave you a fish. I too gave you a fish and advised on how I caught that fish so that you might catch the next one yourself.

    You seem to think I’ve taken the low road and that I’m attacking you. I agree that the comment “…a little more effort on your part…” and the followup yesterday morning may have drawn a hasty conclusion. But here’s what lead me to that conclusion:

    • No indication of research posted to the thread.
    • No resolution after many weeks.
    • Repeated requests for step-by-step instructions, but no info about what you did for yourself, what you may have tried, etc.

    The conclusion may have been faulty but the advice given was still relevant and objective based on the data available. Not only is it important that you do self-help, it’s important that you post what you’ve done (in summary at least, though “chapter and verse” would be helpful too) so that we know you’re not just looking for someone to do your work for you.


    #soa
    #webMethods
    #API-Management


  • 22.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Thu May 08, 2008 04:14 PM

    I do understand, based on your initial perspective, your conclusion that I was “confused” and “dismissing/ignoring” certain answers, while all but asking someone else to do my work. Apologies for not sharing the details of this case, which is due in large part to its proprietary nature. Let it suffice to say that said conclusion is, by your own suggestion, “hasty” and “faulty.”

    To your choice of words: Perhaps it is from my background as a consultant, but I have in most cases found myself needing to be careful in my wording – even in the “heat of battle.” Cooler heads prevail in these instances, as diplomacy is key. Without knowing your background, it could very well be that you saw nothing wrong with your choice of words and that it is more my perception of what was implied versus what was explicitly intended.

    That said, and take it for what it’s worth, I would suggest previewing your posts as if you were the one receiving them – asking “does this offend?”

    Sticking to the “fishing” analogy: You could be the best angler in the world and still come away with nothing. As one still needs to eat, you sometimes have to ask for a fish. I still maintain that is a key benefit of forums like this. Users come to these forums to share ideas, comments, and to help one another.

    Asking users to prove they already “fished” with no luck first before “giving them a fish” is not the way to inspire them to return to the forum in my estimation. I see the point of wanting to get people to “fish for themselves,” but it is just not as simple as that sometimes – which separate forums like this from others that only repeat the same cookie-cutter information.

    Thank you for your insight. Food for thought….


    #soa
    #API-Management
    #webMethods


  • 23.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Thu May 08, 2008 05:32 PM

    This sums up our disagreement quite nicely. This particular case was exactly as simple as that.


    #webMethods
    #API-Management
    #soa


  • 24.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Thu May 08, 2008 08:15 PM

    From http://www.wmusers.com/forum/showthread.php?t=9162 by another wMUser regular:

    “The main thing I like to see in a post is some evidence that the poster has put at least some effort into solving their own problem. If you can’t put any effort into solving it, why should I? Don’t just post a stack trace or log file without at least indicating what you’ve tried to do to interpret it. Most people do like to help somebody who’s putting forth some effort but is just stuck and needs a hand because we’ve all been there.”


    #soa
    #API-Management
    #webMethods


  • 25.  RE: How do I reference a webMethods WSDL in a .NET app?

    Posted Thu May 08, 2008 08:37 PM

    [COLOR=black]

    [/color]

    You’re making it more and more difficult to take the high road here.

    Again, you are making conclusions that are, to borrow your terms, “hasty” and “faulty.” Your thinly-veiled insistence that I be lumped among those that want others to “do the work for me,” without any conclusive evidence to support the same, clearly shows a lack of objectivity - regardless of your insistence to the contrary.

    As we are grossly off-topic here, I again ask that you PM me if you feel the need to continue this "discussion.” Thank you….


    #webMethods
    #API-Management
    #soa