开发者

CXF multiple implementors for one address

is it possible to have multiple implementors with only one address开发者_运维问答 ? So something like:

<jaxws:endpoint id="ws1" implementor="#ws1" address="/ws" />
<jaxws:endpoint id="ws2" implementor="#ws2" address="/ws" />

Thanks --MB


I assume you have a huge endpoint with lots of operations. If you do contract first development, CXF will create a single class per each endpoint, containing one method per operation. I believe this is the only way. You can however use this endpoint class only as a facade, delegating to several specialized classes (one line per operation, that's it).

Of course you can always refactor your WSDL to have multiple endpoints, but probably this is not an option for you. As far as I know there is no way to split implementation into several classes, the class must implement WS interface entirely.

In Spring WS however any method can handle SOAP request by annotating it with @PayloadRoot inside a class annotated with @Endpoint. This looks like a great feature in your case, since you can span implementation in as many classes as you want (even one class per SOAP operation!)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜