Skip to main content

Testing the Query from the Terminal

Again, you can test the service using the Terminal. Here are the steps:

  1. Open the Terminal in the namespace in which you are working.

  2. Use the WSDL to regenerate a client for the service and then instantiate the client. See Testing the Service from the Terminal for the steps.

  3. Use the client to execute the RunPhoneNumberQuery service. In the following code client points to the client created in the previous step. Pass as arguments a valid Contact ID and a contact type.

    
    USER>Set xml = client.RunPhoneNumberQuery(1,"Business")
    
    
  4. You can then use different methods of %XML.DataSetOpens in a new tab to query the data.

    
    USER>Do xml.WriteXML(,,,,,1)
    <SQLResult>
    <s:schema id="DefaultDataSet" xmlns="" attributeFormDefault="qualified" elementFormDefault="qualified" 
    xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
      <s:element name="DefaultDataSet" msdata:IsDataSet="true">
        <s:complexType>
          <s:choice maxOccurs="unbounded">
            <s:element name="SQL">
              <s:complexType>
                <s:sequence>
                  <s:element name="PhoneNumberType" type="s:string" minOccurs="0" />
                  <s:element name="Number" type="s:string" minOccurs="0" />
                </s:sequence>
                       ....
    
    

    For readability, this example shows an artificial line break after elementFormDefault.

FeedbackOpens in a new tab