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

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

If I put the following interface into the CXF which is generated by CXF 
wsdl2java tool, it will not report any error. 

/**
 * This class was generated by Apache CXF 2.6.2
 * 2013-03-01T16:06:16.874+08:00
 * Generated source version: 2.6.2
 * 
 */
@WebService(targetNamespace = "iftest.interfaces.webservice_g2.annotations", 
name = "SimonTestOne")
@XmlSeeAlso({ObjectFactory.class})
public interface SimonTestOne {

    @WebResult(name = "notreturn", targetNamespace = "")
    @ResponseWrapper(localName = "bareIfMethodResponse", targetNamespace = 
"iftest.interfaces.webservice_g2.annotations", className = 
"annotations.webservice_g2.interfaces.iftest.BareIfMethodResponse")
    @RequestWrapper(localName = "bareIfMethod", targetNamespace = 
"iftest.interfaces.webservice_g2.annotations", className = 
"annotations.webservice_g2.interfaces.iftest.BareIfMethod")
    @WebMethod
    public java.lang.String bareIfMethod(
        @WebParam(name = "arg0", targetNamespace = "")
        java.lang.String arg0
    );
}
                
> 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