Geeks With Blogs
Buhay Programmer Dont byte more than you can chew

EDIT : Please visit www.wcfstorm.com for th updated tutorials.

This is a first in a series for post describing the tasks and the features available inWCF Storm.


 1. Getting Started

2. Invoking a service having multiple endpoints.

3. How to create and run a performance test

4. How to create and execute a functional test

  

Ok, so lets get started....

 Getting Started : (Invoking a method of  a WCF/Web service)

  1. Add a service.

This can be done by either clicking "File --> Service --> Add" or by clicking the Add button in the menu bar.

This will bring up a form where you can type in the metadata exchange endpoint (i.e. WSDL endpoint). WcfStorm will then read the wsdl, generate the client code and compile it. If all goes well, the service and its method will be displayed on the left hand side.

 

 

  Now go ahead and select on method

           2.  Select a method

 If a method is selected, its parameters will be read and displayed in the "RequestPane'.  In the screenshot below I've selected the method "GetDataUsingContract" which takes parameter of type "CompositeType"

 

 The structure of CompositeType is shown below.  As you can see, what's displayed in the request pane matches exactly the defined type. 

 

 

Now, select a field of the composite type parameter.

 

            3.  Edit a field in the parameter

 This will bring up the Object Editor which will let you edit the field.  If the type is not primitive, the "Set to null' checkbox will be enabled.  If the tye of the selected field is polymorphic, the object editor will display the subtypes that can be assigned to the field.

 Here I've selected the string field.

 

  Clicking OK will assign the value "my string" to the StringValue field of the CompositeType parameter.

 Now Click Send (Green arrow)

          4.  Invoking the service method

 Click on send to invoke the web method.   The test service we are invoking merely echoes back the input parameters it has received ( a convenient way of checking that the object editor in the previous step worked). This is shown in the screenshot below

 

 

Looking at the log, we can see that WCFStorm used the NetTcpBinding endpoint.  Recall that when we added the service, we used http://localhost:8080/httpEndpoint?wsdl - obvoiusly an endpoint that uses http. So how come the tool is now using NetTcpBinding?  In this case, the service that we are using declared 3 endpoints in its config.  An http endpoint for the metadata exchange (to expose the wsdl)  a NetTcpBinding and a WsHttpBinding endpoint for the actual method calls.  By default WCFStorm uses 1st endpoint that was declared by the service (which was the NetTcpBinding.)

 

  

         That's it! we have now successfully invoked the WCF service.

      
Posted on Saturday, April 4, 2009 2:19 PM | Back to top


Comments on this post: WCFStorm : How To's

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Erik Araojo | Powered by: GeeksWithBlogs.net