cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jimma (JIRA)" <j...@apache.org>
Subject [jira] Closed: (CXF-257) PortType can have its own targetnamespace and different from the service one
Date Tue, 05 Jun 2007 06:15:26 GMT

     [ https://issues.apache.org/jira/browse/CXF-257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

jimma closed CXF-257.
---------------------

    Resolution: Fixed

This issue is duplicate with CXF-669

> PortType can have its own targetnamespace and different from the service one
> ----------------------------------------------------------------------------
>
>                 Key: CXF-257
>                 URL: https://issues.apache.org/jira/browse/CXF-257
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime, Tooling
>    Affects Versions: 2.0-RC
>            Reporter: jimma
>            Assignee: jimma
>             Fix For: 2.0
>
>
> When building the model from a java class using jaxws,
> the PortType QName must be inferred from the @WebService
> annotation on the SEI.
> For example
> @WebService( serviceName = "SoapService",
>                        targetNamespace = "urn:greeter:service"
>                        endpointInterface =
> "org.apache.hello_world_soap_http.Greeter" )
> public class GreeterImpl {
>   ...
> }
> @WebService( name = "Greeter", targetNamespace = "urn:greeter:port" )
> public interface Greeter {
>   ...
> }
> must lead to a service QName of "{urn:greeter:service}SoapService",
> and a PortType QName of "{urn:greeter:port}Greeter".
> Due to wsdl spec, the generated wsdl must be splitted in two with
> an import statement, so that the PortType can have its own
> targetNamespace, different from the Service one.
> The PortType QName can be easily fixed in the JaxWsServiceConfiguration with
> the following code:
>     @Override
>     public QName getInterfaceName() {
>         Class<?> epi = implInfo.getEndpointClass();
>         WebService ws = null;
>         if (epi != null) {
>             ws = epi.getAnnotation(WebService.class);
>         }
>         if (ws != null && ws.name() != null && ws.name().length() >
0) {
>             String name = ws.name();
>             String nsuri = ws.targetNamespace();
>             if (nsuri == null || nsuri.length() == 0) {
>                 nsuri =
> ServiceUtils.makeNamespaceFromClassName(epi.getName(), "http");
>             }
>             return new QName(nsuri, name);
>         }
>         return null;
>     }
> However, the tooling needs some refactoring to be able to output
> two different wsdls, but I think there was a plan to use to service
> model ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message