cancel
Showing results for 
Search instead for 
Did you mean: 

Unique WSDL target namespaces

Former Member
0 Kudos

We have defined a number of services interfaces in a common namespace (just as SAP does in their delivered content).

Is there a way to expose each of our services so that the WSDL definition target namespace (the targetNamespace attribute in the wsdl:definition tag) is unique?

We have some guys from soa.com at the client who dictate that each WSDL definition must have a unique target namespace, but that is obviously not the case in our services.

After having done some reading, I see no official directive that says that each WSDL definition (wsdl:definition tag) must have its own namespace (I am looking for example at the WSDL 1.1 specification), but the examples I see generally have a target namespace that reflects the WSDL itself, so it may be a matter of interpretation, as SAP definitely provides for multiple WSDL definitions in a common namespace.

Our PI consultant has found a workaround by creating each service interface in a unique namespace, but if possible, we would like to keep everything in the same namespace.

Has anyone had some experience with this? Do you know of a way to make the WSDL definition targetNamespace reflect uniquely for each WSDL?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks for all the replies on this message. It seems like there may have been a bug in the libraries used by the consumers. Now they are able to import our WSDLs without problems.

Answers (2)

Answers (2)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Martin,

Adding to what Jorg has said, there are actually two or more target namespaces in a service interface wsdl. It depends on the number of operations it has e.g one operation would have a 2 target namespaces, one for the service interface namespace and the other for the message type/external definition namespace.

Unfortunately, it is not possible to change the service interface target namespace since it takes the namespace where the service interface is located, but you can play around with the target namespaces of the message/s in it e.g by modifying target namespace in message type.

Hope this helps,

Mark

Former Member
0 Kudos

Thanks Mark. Yes, we have seen the option to specify a different namespace for the message interface, but unfortunately our consumers want the WSDL definitions in unique namespaces.

I have yet to get behind the actual root of the problem, as I see that SOA (the company, soa.com), is an SAP partner, and as such, should have no problem (technically) consuming WSDLs in shared target namespaces.

I am dreading having to put each service interface into its own namespace

Former Member
0 Kudos

Hello Martin,

I recommend you to ask for the reason of this unnecessary diversification. There may be valid reasons for that, either restrictions of their tool or some architectural design pattern that may be worth studying. You may also ask whether there are naming conventions for the namespaces or if you could just name them "namespace1", "namespace2" and so on. I hope there are, because otherwise it would be quite a senseless restriction.

Putting each SI into a different namespace is not as dreadful as it sounds. You can still group all common objects in one namespace and just put the SI somewhere else. They can all be put into the same Software Component as their common objects, so you'll be able to find them in PI.

Good luck,

Jörg

Former Member
0 Kudos

Hello Martin,

in my opinion (and by saying that I'd like to imply that there is no rule to that carved in stone) a namespace is a tool for structuring your service landscape. Since each service will most probably be uniquely named it makes sense to use common namespaces to arrange several services to groups. It is certainly not required for technical reasons to give a unique namespace to each WSDL, it is an architectural question.

Thinking about it in PI terms this means that you can have only one service per namespace. In my eyes this is an unnecessary restriction, it might even be confusing making it harder to find the objects of the service. If this is a requirement I wouldn't have a better solution than your consultant, i.e., create a Service Interface for each WSDL exposed in a separate namespace. I believe this is required, since PI generates the WSDL from the Service Interface and will take the WSDL namespace from the SI namespace.

Regards,

Jörg

Former Member
0 Kudos

Hello Jörg,

Thanks for your reply. I completely share your sentiment on the use of namespaces and I agree that there should be no technical restriction. As I said to Mark, our consumers represent SOA (soa.com), and they are an SAP partner, so I cannot imagine why they should not be able to cope with WSDL definitions in a shared namespace.

In the meantime, if there is a way to expose the WSDL definitions in a target namespace other than the service interface definition (which it seems unlikely that such a thing is supported by PI), it would be a preferable option to having to move each service interface into its own namespace.

Kind Regards,

Martin