This documentation is for WSO2 Enterprise Integrator version 6.5.0 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

All docs This doc
||
Skip to end of metadata
Go to start of metadata

When you create a proxy service, a default WSDL is automatically generated. You can access this WSDL by suffixing the service URL with ?wsdl. See the example given below, where the proxy service name is 'sample_service' and IP is localhost:

However, this default WSDL only shows the mediate operation. This can be a limitation because your proxy service may be exposing a back-end service that expects additional information such as the message format. Therefore, the proxy service should be able to publish a custom WSDL based on the back-end service's WSDL or a modified version of that WSDL. For example, if the back-end service expects a message that includes the name, department, and permission level, and you want the proxy service to inject the permission level as it processes the message, you could publish a WSDL that includes just the name and department without the permission level parameter. 

See the following topics try a custom WSDL for a proxy service:

Prerequisites

Let's set up a sample proxy service in WSO2 Integration Studio.

Adding a custom WSDL to the proxy service

Follow the steps given below to add a custom WSDL to your proxy service.

  1. Open the proxy service from your tooling project.
  2. In the Properties tab, the WSDL type is set to NONE by default.
  3. To publish a custom WSDL for this proxy service, select one of the WSDL types.

    WSDL TypeDescription
    INLINEEnter the WSDL definition in the WSDL XML field.
    SOURCE_URL

    Enter the URI of the WSDL in the text box, and then click Test URI to ensure it is available. A URI consists of a URL and URN. The URL defines the host address of the network resource (can be omitted if resources are not network homed), and the URN defines the resource name in local "namespaces."

    For example URI = ftp://ftp.dlink.ru/pub/ADSL, where URL = ftp://ftp.dlink.ru and URN = pub/ADSL  

    REGISTRY_KEY

    If the WSDL is saved as a registry entry, select this option and choose the reference key of that registry entry from the governance Registry or configuration Registry.

    ENDPOINT-
  4. If your WSDL has dependencies with other resources (schemas or other WSDL documents), you can link them using the Wsdl Resources property shown below. Click the browse icon and enter the registry key and the location of the dependent resource: The location is available in the WSDL. When you have the location, you can find registry key corresponding to the location from the registry. 

    In the following example, the WSDL imports a metadata schema from the metadata.xsd file. Therefore, the location is metadata.xsd.

    <xsd:import namespace=http://www.wso2.org/test/10 schemaLocation="metadata.xsd" />

    In the following example, the WSDL is retrieved from the registry using the key my.wsdl. This WSDL imports another WSDL from http://www.standards.org/standard.wsdl. This dependent WSDL is retrieved from the registry using the standard.wsdl registry key.

    <publishWSDL key="my.wsdl">
       <resource location="http://www.standards.org/standard.wsdl" key="standard.wsdl"/>
     </publishWSDL>
  5. Go to the Service Parameters section in the Properties tab.

    Following are additional service parameters you can use to configure the service WSDL.

    Parameter

    Description

    useOriginalwsdl

    If this parameter is set to true, the original WSDL published via the publishWSDL parameter is used instead of the custom WSDL.

    modifyUserWSDLPortAddress

    If true (default), the port addresses will be modified to the current host. Effective only with useOriginalwsdl=true.

    ApplicationXMLBuilder.allowDTDIf this parameter is set to true, it enables data type definition processing for the proxy service.
    Data type definition processing is disabled in the Axis2 engine due to security vulnerability. This parameter enables it for individual proxy services.

    enablePublishWSDLSafeMode

    If this parameter is set to true when deploying a proxy service, even though the WSDL is not available, you can prevent the proxy service from being faulty. However, the deployed proxy service will be inaccessible since the WSDL is not available.

    This is only applicable when you publish the WSDL (i.e., via the publishWSDL property) either as a URI or as an endpoint.

    showAbsoluteSchemaURLIf this parameter is set to true, the absolute path of the referred schemas of the WSDL is shown instead of the relative paths.
    showProxySchemaURLIf this parameter is set to true, the full proxy URL will be set as the prefix to the schema location of the imports in proxy WSDL.

Testing the custom WSDL

To test the custom WSDL:

  1. Deploy the proxy service in the ESB profile.
  2. Copy the URL shown below to your browser:

  • No labels