WaveMaker Docs

WaveMaker Docs

  • Get started
  • Widgets
  • Mobile
  • How-to
  • Enterprise
  • Releases
  • Blog
  • Sign-in

›SOAP

Getting started

  • Introduction
  • Walkthrough

Pages

  • Pages Overview
  • Creating a Page
  • Layout and Styles

    • Page Layout
    • Templates
    • Themes
    • Accessibility

    Page Configure

    • Page Artefacts
    • Page Cache
    • Partial Page
    • Page Parameters
    • Examples

    Page Actions

    • Navigation
    • Events

    Custom Development

    • Theme Editor
    • Manual Theme
    • Create Template

SSPA

  • Micro Frontend App

Databases

  • Database Services Overview
  • Database Tools
  • Database Designing

    • Working with Databases
    • Data Modelling
    • DataBase Schema Modes
    • Working with DB Schema
    • Database Views
    • Temporal Support

    Accessing Database

    • Accessing Database

    Queries and Procedures

    • Working with Queries
    • Working with Stored Procedures
    • Version Queries & Procedures
    • Blob Queries and Procedures
    • Queries & Procedures - Java Services

    Database Variables & API

    • Database CRUD
    • CRUD Event Listeners
    • Database APIs
    • Database Service APIs

REST & SOAP

  • Web Services Overview
  • Restful

    • REST Services
    • Secure Server-side Properties
    • REST Request Timeouts
    • REST Services using OAuth 2.0

    SOAP

    • Working with SOAP Services
    • Imported SOAP APIs

    Websocket

    • Working with WebSockets

    APIs

    • API Designer
    • Mocking APIs
    • Mocking REST API
    • Swagger Import

    Variables

    • CRUD Variable
    • Service Variable
    • WebSocket Variable

Java Services

  • Java Service
  • Java Services

    • Java Integration Services
    • DB Service Integration
    • API Composition
    • Variables for Invocation
    • Generated REST APIs (API Designer)

    Java Services Variables & API

    • Variable for Java Service
    • Java Service APIs

    Source Files

    • Resources and Third-party Libraries
    • Using 3rd party JavaScript files
    • Using 3rd party jar files

Variables & Actions

    Variables

    • Variables Overview
    • Model Variable
    • Device Variables

    Binding

    • Variable Binding
    • Custom Formatter

    Actions

    • Actions
    • Navigation Action
    • Login Action
    • Logout Action
    • Timer Action
    • Notification Action

    Events

    • Events
    • JavaScript Access

Security

    App Security

    • Overview
    • Authentication
    • Authorization
    • Access Levels & Permissions
    • Login Configuration
    • Session Persistence
    • SSL Encryption
    • XSS antisamy policy configuration
    • OWASP
    • XSS Prevention
    • Central Authentication System
    • Token Based Authentication
    • SAML Integration
    • Secure Connection for Deployed Apps
    • Concurrent Sessions
    • HostHeader Injection

    Security Variable and API

    • Security Variables
    • Remember Me
    • Variable for Security Service
    • Security Service APIs

Developer options

  • Test and Run (Preview) Apps
  • Chrome Extension: Devtool
  • Debugging
  • Inspection Framework
  • Build Options
  • WaveMaker Mobile Apps Automation
  • Developer Integration

    • Project User Management
    • Developer Collaboration
    • Extending the Application using IDEs
    • Import, Export & Update Apps
    • Project Shells

    Add-ons

    • Localization
    • Artifacts Repository

Deployment

  • Overview
  • Deployment Profile
  • One-click Deployment
  • WaveMaker CI/CD Pipeline

    • Overview
    • Configuration Profiles
    • Configuration Management
    • Pipelines and Phases

    Pipeline Configuration

    • Default Pipelines in WMO
    • Configure Pipeline in WME

    Deploy to Cloud Providers

    • AWS
    • Azure
    • Google Cloud
    • DigitalOcean

    Pipeline Configuration cont.

    • Phase configurations
    • Webhooks Integration
    • Tests Integration

    Manage Deployed Apps

    • Manage Deployed Apps

    Integrate with your CI/CD Providers

    • Push Code to External repo
    • Custom VCS Integration
    • Export WaveMaker Application
    • Building Project with Maven
    • Build with Docker
    • Jenkins Integration
    • Deploy using Docker Compose
    • Deployment to Heroku

    WaveMaker apps Interation with CDN

    • App Integration with AWS CDN
    • App Integration with Azure CDN

    Deployment to external web servers

    • Application Server Overview
    • Deploy to Tomcat
    • WebSphere
    • JBoss - WildFly
    • WebLogic Server

Connectors

  • Introduction
  • Architecture
  • Import Connectors
  • List of Connectors
  • Build a New Connector

Teams

  • Overview
  • Team Setup
  • Dashboard
  • Manage Users
  • Manage Projects
  • Manage Prefabs
  • Project Branches
  • Manage Roles
  • Code Repository
  • Import VCS Project
  • Team Profile
  • Manage Subscription
  • FAQs
Edit

Working with SOAP Services


SOAP (Simple Object Access Protocol) is a standard XML protocol for exposing and calling web services. A SOAP service is described by a Web Services Definition Language (WSDL) document, often available through a URL from the service itself.

In order to import a SOAP service into your WaveMaker application, you need the .wsdl file that describes the service. You can see here for some free web services.

Once you have located the WSDL file, follow these steps to import the same:

SOAP Service Setup

  1. From Resources, choose Web Service and click +

  1. From the Web Service dialog, click the SOAP icon
  2. Give the Soap Service details.
  3. Provide the WSDL source in one of the following ways:
    • URL: Toggle WSDL Source to URL and enter the URL of the WSDL, for example: http://www.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL
    • File: Toggle WSDL Source to File and click Choose File to upload the .wsdl file from your local machine. The file can be an individual file or a group of files packaged into a zip file.
  4. Advanced Settings include the optional items:
    • option to import bindings .xjb file to map Java classes to XML representations.
    • service name, if not entered it will be generated by the platform
    • package name, if not entered it will be set to the project package

See here for more on the Import Settings.

note

Only Doc - Literal and DOC-Encoded communication style models are supported within WaveMaker.

SOAP Service Settings

  1. Clicking Import will create a new service which is displayed under Web Services.
  2. Select the service name listed under the SOAP Service section and you can access the WSDL File and Service Settings.
  3. You can choose to edit, save or delete the service.

  1. The HTTP Basic Auth settings for the service can be configured by providing the Username and Password.
  2. Connection Timeout is a value specified in milliseconds used when opening a connection to a resource. If the timeout expires before the connection is established, then java.net.SocketTimeoutException is thrown. The default value is 10000. Zero indicates infinite timeout value.
  3. Request Timeout in milliseconds specifies the timeout when reading from an input stream after the connection is established to a resource. If the timeout expires before data is read, then java.net.SocketTimeoutException is thrown. The default value is 10000. Zero indicates infinite timeout value.
  4. You can view the WSDL code from the WSDL File tab.

Generated REST APIs

For each method defined by the SOAP service, a REST API is generated. You can view the API definition, request and response formats and even test the same before using it within the app. You can achieve all this from the API Designer.

SOAP Service Usage

To use the Service data within the app, you need to create Variable.

We have seen how SOAP service can be imported and used within a WaveMaker app. Learn more about Variables for the Web Services from here.

Reimport of SOAP Service

There might be a need when the SOAP Service you have been using has undergone some changes which you need to incorporate in your app. To cater for such situations, Re-import of SOAP Service has been introduced.

Using this option, you can achieve the following:

  1. Change the WSDL Source
  2. Remove the Bindings File, if provided
  3. Upload a new Bindings File, if provided
  4. Modify the Package Name
  5. Download a previously uploaded WSDL File and Bindings File

SOAP Import Settings

Zip File import

While importing the SOAP service you can upload the zip file that contains the WSDL file along with all its dependent schema files. The contents of the zip file should be:

  1. One WSDL at the root level folder.
  2. Optional external dependent schema files at the same level or in child folders which are relatively referred in WSDL file.
  3. Optionally xjb bindings file which helps in avoiding the model class collisions in code generating by separating the packages/altering the class names. Explained more in below sections.

Package Name Customization

By default package name is set to the project base package name by the platform as <project-base-package-name>.services.<service-id-of-soap-being-imported>. You can provide an optional package name so that the generated sources will be created in that package.

Avoiding Name Collisions

Name collisions happen while code generation when there is more than one schema definition with the same name that can be from two different external schema files.

Following example depicts the collision of element “root”, because this element is defined twice in two different namespaces:

<wsdl:types>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns="http://www.xyz.com/schemas/CustService/Services/Schemas/Schema.xsd" 
      **targetNamespace="http://www.xyz.com/schemas/CustService/Services/Schemas/Schema.xsd"** 
      elementFormDefault="qualified" attributeFormDefault="unqualified">
        <xs:element name="advFormat" type="xs:string"/>
        **<xs:element name="root">**
         <xs:complexType>
          <xs:sequence>
            <xs:element ref="ns0:advFormat" minOccurs="0"/>
          </xs:sequence>
         </xs:complexType>
        </xs:element>
        </xs:schema>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns="http://www.xyz.com/schemas/CustService/Services/Schemas/Schema.xsd2"
           **targetNamespace="http://www.xyz.com/schemas/CustService/Services/Schemas/Schema.xsd2"** 
           elementFormDefault="qualified" attributeFormDefault="unqualified">
          <xs:element name="path" type="xs:string"/>
          **<xs:element name="root">**
           <xs:complexType>
            <xs:sequence>
             <xs:element ref="ns1:path" minOccurs="0"/>
            </xs:sequence>
           </xs:complexType>
          </xs:element>
        </xs:schema>
</wsdl:types>

These collisions can be avoided either by implicit handling by the platform or manual handling using an xjb file.

Implicit handling of name collisions

In implicit handling, the system automatically resolves the bindings by providing the unique package name for each namespace, this package name is prefixed with service package name. However, there is a limitation in implicit handling that is it cannot handle the collisions that happen with definitions within (inline) the WSDL file.

Manual handling of name collisions

In manual handling, you have to write an xjb file which defines the customization of packages/class names while code generation. This xjb file can be included while importing the soap service using the following options (in the order of their priority):

  • Upload through the Bindings XML option from UI
  • As a part of the uploaded zip file

Writing XJB files

XJB bindings can be customized by defining separate <jaxws:bindings> element for each namespace, which selects the node with given targetNamespace within the WSDL document.

<jaxws:bindings node=">wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://www.xyz.com/schemas/CustService/Services/Schemas/Schema.xsd'"

Inside the <jaxws:bindings> element should define which describes customization of package names/class names in code generation for selected node:

  1. Suffixing all the classes generated from the schema
  <jaxb:schemaBindings>
     <jaxb:nameXmlTransform>
       <jaxb:elementName suffix="Foo"/>
     </jaxb:nameXmlTransform>
  </jaxb:schemaBindings>
  1. Changing the package name for generated classes from the schema
  <jaxb:schemaBindings>
       <jaxb:package name="com.services.test.custom"/>
  </jaxb:schemaBindings>

Example

Custom xjb file

<?xml version="1.0" encoding="UTF-8"?>
<jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
       xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" version="2.1"
       xmlns:xs="http://www.w3.org/2001/XMLSchema">
       <jaxws:bindings
         node="wsdl:definitions/wsdl:types/xs:schema[
            @targetNamespace='http://www.xyz.com/schemas/CustService/Services/Schemas/Schema.xsd']">
        <jaxb:schemaBindings>
         <jaxb:nameXmlTransform>
          <jaxb:elementName suffix="Foo"/>
         </jaxb:nameXmlTransform>
        </jaxb:schemaBindings>
       </jaxws:bindings>
       <jaxws:bindings
         node="wsdl:definitions/wsdl:types/xs:schema[
            @targetNamespace='http://www.xyz.com/schemas/CustService/Services/Schemas/Schema.xsd2']">
        <jaxb:schemaBindings>
          <jaxb:nameXmlTransform>
           <jaxb:elementName suffix="Bar"/>
          </jaxb:nameXmlTransform>
        </jaxb:schemaBindings>
       </jaxws:bindings>
</jaxws:bindings>
Last updated on 11/27/2019 by Swetha Kundaram
← REST Services using OAuth 2.0Imported SOAP APIs →
  • SOAP Service Setup
  • SOAP Service Settings
  • Generated REST APIs
  • SOAP Service Usage
  • Reimport of SOAP Service
  • SOAP Import Settings
    • Zip File import
    • Package Name Customization
  • Avoiding Name Collisions
    • Implicit handling of name collisions
    • Manual handling of name collisions
    • Writing XJB files
WaveMaker
  • PRICING
  • PARTNERS
  • CUSTOMERS
  • ABOUT US
  • CONTACT US
Terms of Use | Copyright © 2013-2023 WaveMaker, Inc. All rights reserved.