4 1 1 WSDL Option

LANSA Integrator

4.1.1 WSDL Option

JSMDirect has the ability to return the contents of the file specified in the WSDL file location column of DC@W29 or dc_w29.txt configuration file.

By including an additional '+wsdl' parameter on the web service URL, JSMDirect will return the contents of the file instead of executing the web service.

Example

 

http://mycompany.com/cgi-bin/jsmdirect?mywebservice+wsdl

 

 

The file content is treated as binary and text must be UTF-8 encoded.

The IBM i Apache HTTP Server must be configured to run in BINARY mode.

By returning HTML content you can offer more selection choices to the end user, instead of just WSDL content.

JSMDirect recognizes the following file extensions and uses an appropriate content type. If the file extension is not supported then the content type of unknown/unknown is used.

htm

text/html; charset=utf-8

html

text/html; charset=utf-8

xhtml

application/xhtml+xml; charset=utf-8

wsdl

application/xml; charset=utf-8

 

unknown/unknown

 

 

 

WSDL and unknown content will also include a Content-Disposition header using the name of the file, this allows the HTTP browser to prompt the user with a save file dialog.

Example

 

Content-Disposition: attachment; filename=xxxx

 

 

Example: HTML

 

<html>

 

<head>

<title>MyWebService</title>

</head>

 

<body>

 

This is MyWebService in HTML format

 

Use the following link to download the PDF documentation<br/>

 

Use the following link to download the WSDL file<br/>

 

</body>

</html>

 

 

Example: XHTML

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml">

 

<head>

<title>MyWebService</title>

</head>

 

<body>

 

This is MyWebService in XHTML format<br/>

 

Use the following link to download the PDF documentation<br/>

 

Use the following link to download the WSDL file<br/>

 

</body>

</html>