This documentation is for WSO2 API Manager 2.0.0 View documentation for the latest release.
Page Comparison - Create and Publish a SOAP API (v.2 vs v.3) - API Manager 2.0.0 - WSO2 Documentation
Provide Feedback

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Log in to the API Publisher and click ADD NEW API.
  2. Select the option to design an API with an existing SOAP endpoint, give the endpoint URL and click Start Creating.

    Info

    We use the WSDL http://ws.cdyne.com/phoneverify/phoneverify.asmx?wsdl from CDYNE as the endpoint here, but you can use any SOAP backend of your choice.

  3. The Design tab of the API opens. Give the information in the table below and click Implement to proceed to the implementation phase.

    Field
    Sample value
    NameSoapTest
    Context

    /soaptest

    Version1.0

  4. Click the Managed API option.
  5. Select Endpont type as HTTP/SOAP Endpoint, provide the production endpoint, which is http://ws.cdyne.com/phoneverify/phoneverify.asmx in this example, and click Manage.
  6. In the Manage tab, select the Gold tier, scroll down and click Save and Publish.

    Note

    If you wish to add scopes to resource got created, click on add scopes and specify the scopes you want to add. If you specify a scope, you need to use the same scope when generating access token for the subscribed application and when invoking the API. Refer OAuthscopes for more information on working with the scopes.



    You have now published the SOAP API to the API Store. Let's subscribe to it.

    Note

    Note that when creating this API, under Advanced Throttling Policies we are keeping the default which is Apply per Resource. For more information on setting Advanced Throttling Policies refer Enforce Enforcing Throttling and Resource Access Policies.

  7. Login to API Store and open the newly created API from the store.
  8. The SoapTest API opens. Select an application (e.g., DefaultApplication), the Gold tier and subscribe to the API. 
  9. Click the APPLICATIONS menu and click the Production Keys tab. If you have an access token already generated, scroll down and click Re-generate. By default, access tokens expire an hour after creation, unless you change the expiration time.

    You have now subscribed to an API in the API Store. Now Let's invoke the API.

  10. Back in the API Store, click the API to open it and go to its API Console tab.


  11. Expand the POST method, enter the following, and invoke the API.  

    SOAP Request
    Code Block
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:quer="http://ws.cdyne.com/PhoneVerify/query">
       <soapenv:Header/>
       <soapenv:Body>
          <quer:CheckPhoneNumber>
             <!--Optional:-->
             <quer:PhoneNumber>18006785432</quer:PhoneNumber>
             <!--Optional:-->
             <quer:LicenseKey>0</quer:LicenseKey>
          </quer:CheckPhoneNumber>
       </soapenv:Body>
    </soapenv:Envelope>
    SOAP Actionhttp://ws.cdyne.com/PhoneVerify/query/CheckPhoneNumber

  12. Note the API response that appears on the console.

...