Altova XMLSpy 2024 Enterprise Edition

Creating a New Document

Home Prev Top Next

To create a new WSDL document, select the File | New command. In the Create New Document dialog that pops up, select WSDL (WSDL Web Service Description v1.1) as the type of document you wish to create and click OK. This creates a skeleton new document (screenshot below), which opens in the graphical WSDL View (called WSDL View in this tutorial).

wsdl-tut-newserv1

 

Assigning a target namespace

Switch to Text View. The start tag of the wsdl:definitions element will look something like this:

wsdl-tut-ns1

Change the target namespace (targetNamespace) attribute to http://mywebservice.namespace or anything else you like (since this tutorial focuses on showing how to create a WSDL document and does not provide an actual service). You should then also change the namespace value of the tns attribute to http:://mywebservice.namespace (or the namespace you selected for the target namespace).

 

Note:In the skeleton starter document, WSDL elements are in the target namespace while references to WSDL elements are made using the tns prefix. For example: <wsdl:binding name="NewBinding" type="tns:NewPortType">. In order for the tns prefix to match the target namespace, its namespace value should be identical with the target namespace.

 

© 2017-2023 Altova GmbH