The case of the missing binding

Today, while preparing a training session on WCF, I decided to use Eclipse’s Web Services Explorer (WSE) to view and interact with a WCF-based service (using plain WSHttpBinding).

However, after processing the service’s WSDL description, WSE showed a service with an empty binding list.

Knowing that some web services stacks don’t support WSDL descriptions divided into multiple files, I used the FlatWSDL endpoint behavior authored by C. Weyer. This behavior extends WCF’s WSDL exporting mechanism, by inlining in the WSDL document all the schemas directly or indirectly referenced by it.

Unfortunately, the behavior of WSE remained the same: it continued to show a service with no bindings. After inspecting again the generated WSDL, I observed that it was still divided into two WSDL documents: the first one with the <service> and <binding> elements, and the second one (imported by the first) with the remaining WSDL elements and the flattened schemas.

The reason for this division is explained in this post by Kirill Gavrylyuk: this division is used when there are WSDL elements (<service>, <binding>, <portType>, …) in different namespaces.

So, a solution is to put all the elements in the same namespace, which also is described in the same post.

After this change, all the WSDL elements were contained in a single document and WSE finally showed the service binding.

These are the joys of interoperability.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s