How to SOAP as web service (import)

How to SOAP as web service (import)?

Step-by-step guide

Prerequisites: An endpoint and some methods running on SoapUI 5.5.0, Studio

All the steps on how to setup a endpoint are described in the article:  "How to SOAP on http/https"

1. Once everything from prerequisites are in place open Studio and start by creating a new Library!

2. From main window use New Service function:

3. On File or Link field copy/paste the address of your endpoint WSDL (ie: https://orch2018:8443/mockNumberConversionSoapBinding?WSDL)

Usually there's no need to specify any Namespace as this will be auto-filed on Loading. (press Load)


4. After loading check operations available, namespace is automatically completed and will be used later on. Click Save.

5.  On the Project tab a new service should be created under Services with a json describing operations, namespace etc.

6. Also in Activities tab a new section with the Namespace name will be created.

7.  Drag both operation to a new sequence and create variables for both operations (below example shows only 1 set of variable for operation NumberToWords):

Easiest way is to use CTRL+K command on properties tab and create a Request and a Response varible. This must be completed for all included operations. Note the EndPoint link present and the Variable Type definition. 

The variable type definition is defined in the web service and it's real type falls back to a supported .net primitive ones (as shown later on).

8.  Checking the above info in the SoapUI 5.5.0 we notice the following information:


The endpoint should be running and the response for service can be altered (as shown above) and tested on the correct address. In this case a call to NumberToDollars will respond NbrTo$$ Eug_test, and the NumberToWords will respond NbrToWords_Eugentest.

Also we note the body of the request, on one case the type of message is web:dNUM and the other is web:ubiNum. (We'll explain those below).

9.  As mentioned above we'll need to define 1 Response variable and 1 Request variable for each of the operation (4 total for this example), and those should respect the type as described by the service. Looking at Imports in the project, notice the NumberConversion which is our namespace instance in which variables must be instantiated. 

To complete our variable definition, in the default section of the variable type new <namespace>. and notice the suggestions classes Class IconNumberToWords . Here only requests are needed since the response will be populated from endpoint.


Example : new NumberConversion.NumberToWordsRequest 

10. Before each operation defined, use an Assign activity and specify the request variable previously defined (here Request1N2W). By accessing object properties the field (variable)Field Iconname will be shown on autocomplete.

Example  Request1N2W.ubiNum

Notice that ubiNum is in fact a Ulong type which is defined my Microsoft as part of System.Uint64 .NET type. Check here 

Also this is a Unsigned 64-bit integer (<ubiNum>unsignedLong</ubiNum>) as defined by the host of endpoint.  Check here

Checking on Uint64 struct we notice that is has a Declaration SymbolParse(String) method defined. Check here

<p style="margin: 12px 0px 0px;padding: 0px;color: rgb(51, 5