Hi All,
I'm migrating my Web Service Client code from CXF 2.3.5 to 2.7.8.
The service schema I'm using has abstractly defined elements along with
Substitution Groups:
/ <xs:element name="bookResponse" type="BookRS" abstract="true"/>
<xs:element name="bookSuccessRS" substitutionGroup="bookResponse"
type="BookSuccessRS"/>
<xs:element name="bookFailureRS" substitutionGroup="bookResponse"
type="BookFailureRS"/>/
In my response I can get either implementation types of "bookSuccessRS" or
"bookFailureRS". I won't get "bookResponse" as it is an abstract type.
This was working fine with CXF 2.3.5. As soon as I moved to CXF 2.7.8 I
started to get 'Unexpected Element' error for both the cases.
I didn't change anything in my port loader implementation. Here it is:
/JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(aClass);
factory.setAddress(endPoint);
Object port = factory.create();/
Am I missing any setting which needs to be done in CXF-2.7.8?
My Error Trace:
/====== ROOT CAUSESTACK TRACE ======
javax.xml.ws.soap.SOAPFaultException: Unexpected element
{http://xxx/xxx/service/vx}bookFailureRS found. Expected
{http://xxx/xxx/service/vx}bookResponse.
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
at com.sun.proxy.$Proxy75.bookProduct(Unknown Source)
at (my class...)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
/
-Kalpa
--
View this message in context:
http://cxf.547215.n5.nabble.com/CXF-2-7-8-Not-recognize-substitutionGroup-Elements-tp5744532.html
Sent from the cxf-user mailing list archive at Nabble.com.