Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invoke a web service... no invoke button!

Status
Not open for further replies.

CharlieMike73

Programmer
May 17, 2002
120
US
Hi, I have inherited a project and having not done much work with Web Services so I am at a loss. Some of the web services have an invoke button and I can fill out a test form in the browser, then view the XML result.

But there are some services that do not have the 'Invoke' button, they just say "The test form is only available for methods with primitive types as parameters". My questions are:

1) How do I test these web services and get to see the XML that will be returned when such a serivce is called?
2) How do I find out what parameters the service will accept?

I am trying to learn what content exists in each of these services, and don't have too much time, as is often the case; so any quick response is really appreciated!

Regards,
Charlie
 
Well, the thing is, you cannot call a web service from that test web page if takes in say a dataset as a parameter--because it's kind of impossible to type a dataset into a text box on a web page. So you're going to have to test it by testing it, as in writing a program to reference it.

You'll easily see what the parameter types are in your intellisense in Visual Studio. When you reference and instantiate it, you get the same intellisense as you would by referencing a local class's methods.
 
Recall that web services are designed to work in more languages than VB.NET, C#, etc. You can call them from Ruby, Perl, Java, etc. etc.

And so passing complex objects which have no equivalent in those other languages is not allowed.

If you want to call/create a web service, you will have to restrain yourself to only using primitive types. And your only choice for passing multiple instances is arrays (no collections, hashtables, etc, for the same reason as above)

Chip H.


____________________________________________________________________
www.chipholland.com
 
Chip I agree with you if you're talking about web services for public and general use web sites. However, if this is a .Net specific solution, then you can pass around some complex data types like DataSets which are serialized when passed.
 
Just because you can, doesn't mean it's a good idea.
:)

Anyone who's been in the biz for a while knows that management will come to you one day and say "My brother-in-law has a company and we want to share some data with them. They use Java. That won't be a problem will it?"

Chip H.


____________________________________________________________________
www.chipholland.com
 
Point taken Chip, and you know I respect your views here. But I categorize it along the same lines of writing only ANSI compliant SQL for your specific DBMS just in case the organization wants to change from one DBMS vendor to another for some reason somewhere down the road.

Sometimes, in my opinion, the best option isn't the least common denominator. Why not take advantage of better performance or reduced maintenance or easier integration (in this case .Net to .Net integration) when available?
 
No problem -- both approaches are valid.

Chip H.


____________________________________________________________________
www.chipholland.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top