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

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.

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…

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

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.

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

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

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.

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…

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

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

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…

  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)

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

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.

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:

Here’s a “cut-and-dry step-by-step example” with screenshots. Found this in about 30 seconds of searching: http://www.xefteri.com/articles/show.cfm?id=15

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.

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

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.

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.

[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….