In a typical SDK usage, the first order of business after connecting to the Switch Server is getting information, either to present to the user or to use in later calls (or both). A lot of different information can be retrieved, e.g. about flows, jobs, or the Switch Server itself.
As an example, let's look at how to retrieve all the submit points present in our Switch Server. For this, we have the GetSubmitPoints SOAP method. GetSubmitPoints needs one parameter: the identifier (ID) of the flow for which we want to get the submit points. The flow IDs can in turn be retrieved using the GetFlowList SOAP method, which takes no parameters:
<soap:Body xmlns:butterfly="http://tempuri.org/butterfly.xsd"> <butterfly: GetFlowList/> </soap:Body>
This returns the IDs of all the flows (both active and inactive) on the Switch Server, e.g.:
<soap:Body xmlns:butterfly="http://tempuri.org/butterfly.xsd"> <butterfly:GetFlowListResponse> <flowList>10</flowList> <flowList>14</flowList> </butterfly:GetFlowListResponse> </soap:Body>
Now we can use these flow IDs to get the submit points for each flow. The GetSubmitPoints method takes one parameter: the flow ID.
<soap:Body xmlns:butterfly="http://tempuri.org/butterfly.xsd"> <butterfly:GetSubmitPoints> <flowId>10</flowId> </butterfly:GetSubmitPoints> </soap:Body>
The response is a list with 0 or more submit point IDs:
<soap:Body xmlns:butterfly="http://tempuri.org/butterfly.xsd"> <butterfly:GetSubmitPointsResponse> <submitPoints>1</submitPoints> <submitPoints>8</submitPoints> </butterfly:GetSubmitPointsResponse> </soap:Body>
The same scheme can now be used, for example, to get the names of the submit points to present to the user. Or the submit point IDs could be used to submit a job to the Switch Server.