[ 
https://issues.apache.org/jira/browse/CXF-4869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13592014#comment-13592014
 ] 

Yan Min Sheng commented on CXF-4869:
------------------------------------

The spec JSR 224 has the following statements:
The RequestWrapper annotation is applied to the methods of an SEI. It is used 
to capture the JAXB generated
request wrapper bean and the element name and namespace for marshalling / 
unmarshalling the bean.
The default value of localName element is the operationName as defined in 
WebMethod annotation and
the default value for the targetNamespace element is the target namespace of 
the SEI.

So I think we should use the "iftest.interfaces.webservice_g2.annotations" as 
the targetNameSpace not the one from implementation class.
                
> CXF will throw exception if impl class and interface targetNameSpace is 
> different
> ---------------------------------------------------------------------------------
>
>                 Key: CXF-4869
>                 URL: https://issues.apache.org/jira/browse/CXF-4869
>             Project: CXF
>          Issue Type: Bug
>          Components: Core, JAX-WS Runtime
>    Affects Versions: 2.6.2
>            Reporter: Yan Min Sheng
>
> SimonTestOne.java:
> package annotations.webservice_g2.interfaces.server;
> import javax.jws.*;
> @WebService(name="SimonTestOne",        
>                       
> targetNamespace="iftest.interfaces.webservice_g2.annotations",
>                       wsdlLocation="WEB-INF/wsdl/if.wsdl"
>                       )
> //@WebResult needed due to beta limitation, may go away later.            
> public interface SimonTestOne {
>       
>     @WebResult(name="notreturn")
>       public String bareIfMethod(String s);
> }
> SimonTestOneImpl.java
> package annotations.webservice_g2.interfaces.server;
> import javax.jws.*;
> @WebService(targetNamespace="server.interfaces.webservice_g2.annotations",
>                       serviceName="ifimplsvc",
>                       portName="iftest",
>                       
> endpointInterface="annotations.webservice_g2.interfaces.server.SimonTestOne"
>             )
> // note that the implements statement is missing, indeed it's not required.   
>         
> public class SimonTestOneImpl {
>       // implemented from interface
>       public String bareIfMethod(String s){return  s;}
> }
> Note the taragetNameSpace of WebService annotation is different.
> When accessing the interface, CXF will report error at 
> org.apache.cxf.interceptor.DocLiteralInInterceptor Line 99:
>                     if 
> (!msgInfo.getMessageParts().get(0).getConcreteName().equals(startQName)) {
>                         throw new Fault("UNEXPECTED_WRAPPER_ELEMENT", LOG, 
> null, startQName,
>                                         
> msgInfo.getMessageParts().get(0).getConcreteName());
>                     }
> It seems taht the concreteName should be the one in SEI, not the one in impl 
> class. I think it is a defect and I am debugging it. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to