CXF: Implement multiple ports on same soap:adress?

Viewed 4960

We got a WSDL from a client, asking us to implement the service on our side.

The WSDL contains 3 port-bindings, with different names and bindings, but identical <soap:adress> --- like this:

<port name="Name1" binding="tns:Binding1">
    <soap:address location="http://localhost/Service/ServicePort" />
</port>
<port name="Name2" binding="tns:Binding2">
    <soap:address location="http://localhost/Service/ServicePort" />
</port>
<port name="Name3" binding="tns:Binding3">
    <soap:address location="http://localhost/Service/ServicePort" />
</port>

Is such WSDL possible to implement with CXF?

When I run wsdl2java, CXF generates 3 java-interfaces.

I first tried a single implementation-class, like

class MyServiceClass implements Interface1, Interface2, Interface3 {...}

But when I deployed it and checked with SoapUI, for some reason, it would only expose Port-binding for Interface1, and seemed to ignore the 2 other ones. Why?

I then tried instead, to implement 3 different ServiceClasses (each implementing one of the interfaces), then put multiple <jaxws:endpoint> with identical address attributes in cxf-config.xml

But I then get deployment-error:

RuntimeException: Soap 1.1 endpoint already registered on address /Address

Any hints, how to implement such WSDL in CXF? Is it possible?

1 Answers
Related