targetNamespace and namespace in WSDL

The target namespace in the WSDL file will be the name space associated with the SOAP service itself. For example we have a customer service the namespace would be something like http://www.acme.com/Customer/V1/CustomerService.

The XSD imports section is where you specify the namespace of the XSD you are about to import. A XSD file will contain the data that the service will send i.e. it contains the object definitions that will be serialized into XML and sent up and down as the request and responses. A XSD can also contain the operations that the WSDL will expose.

A WSDL can import one or more XSD files and each XSD will have its own namespace. A XSD will contain a namespace such as:

  1. http://www.acme.com/Customer/V1/GetCustomerRequest for the GetCustomerRequest this will define the data structure of the GetCustomerRequest operation.
  2. http://www.acme.com/Customer/V1/CustomerObject for the CustomerObject this will define the data structure of the CustomerObject.

Namespaces are a bit like Java packages they just allow you to define a hierarchy of objects. One important thing to understand is that you might have two Customer objects one that belongs to your sale system and one that belong to your CRM system for example. By placing these in separate namespaces you will be able to use both Customer object in the same service as long as they have unique namespaces.

Normally these namespaces will form part of the SOA catalog as well and defining them will be part of your SOA governance standards. They are important if you want to do SOA successfully.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)