Getting Started : (Invoking a method of a WCF/Web service)
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
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.
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 type 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)
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 above, we can see that WCFStorm used the NetTcpBinding endpoint. Recall that when we added the service, we used http://localhost:8080/httpEndpoint?wsdl - obviously it's 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 (mexHttpBinding) for the metadata exchange (to expose the wsdl)
- A NetTcpBinding and for the actual method calls
- And another WsHttpBinding also for the actual method calls
By default WCFStorm uses 1st endpoint that was declared by the service (which was the NetTcpBinding). This is shown in the service config file below.
That's it! we have now successfully invoked the WCF service.