cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Cheng <christopher.sw.ch...@gmail.com>
Subject Re: service routing based on message header
Date Tue, 26 Jul 2011 18:44:26 GMT
After setting "allow-multiplex-endpoint" in "jaxws:properties", it seems to
be able to bypass that, but still since Service1 and Service2 have different
schema, "DocLiteralInInterceptor" complains the format even my interceptor
returns a correct endpoint. After reading the source codes, it looks like it
is hard coded in many places, how could I get around?

org.apache.cxf.interceptor.Fault: Unexpected wrapper element {
http://www.mycompany.com/websvcs}Service1RQ found.   Expected {
http://www.mycompany.com/websvcs/}Service2RQ.
at
org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:106)


On Wed, Jul 27, 2011 at 12:24 AM, Christopher Cheng <
christopher.sw.cheng@gmail.com> wrote:

> Could somebody give me an example how to use a single endpoint to route to
> different implementors based on message header?
>
> For instance, I have these endpoints with different address
>
> <jaxws:endpoint
>             name="{http://www.mycompany.com}Service1PortType"
>             address="/websvc/soap/Service1"
>             implementor="#service1PortType"
>             wsdlLocation="classpath:com/mycompany/wsdl/Service1RQ.wsdl"
>             />
>
> <jaxws:endpoint
>             name="{http://www.mycompany.com}Service2PortType"
>             address="/websvc/soap/Service2"
>             implementor="#service2PortType"
>             wsdlLocation="classpath:com/mycompany/wsdl/Service2RQ.wsdl"
>             />
>
> I would like both of them to use the same address such as "/websvc/soap".
> I've read "http://cxf.apache.org/docs/service-routing.html", it says that
> I have to use an interceptor with a dummy service to do that, but I am not
> able to find an example to configure in cxf.xml
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message