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

Daniel Kulp updated CXF-4928:
-----------------------------

    Fix Version/s: NeedMoreInfo
    
> CXF-rt-frontend-simple - incorrect "location" attribute with "wsdl:import" tag
> ------------------------------------------------------------------------------
>
>                 Key: CXF-4928
>                 URL: https://issues.apache.org/jira/browse/CXF-4928
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.6.2, 2.7.3
>         Environment: OpenEJB embedded server with CXF implementation
>            Reporter: Pawel Ruta
>            Assignee: Freeman Fang
>             Fix For: NeedMoreInfo
>
>         Attachments: WSDLGetUtils.java
>
>
> I'm using CXF 2.6.2 implementation with OpenEJB embedded 4.5.0 for functional 
> testing in my project.
> When using interface for WebService and implementation of this interface but 
> without "name" and "targetNamespace" attribute in @WebServic, OpenEJB server 
> publish wsdl with "wsdl:import" that has incorrect "location" attribute.
> CXF implementation with Jboss 7 behave correctly.
> Example.
> 1. Interface
> {code}
> @WebService(name = "WSTest ", targetNamespace = "http://test.com/wstest";)
> public interface WSTest {
>  //...
> }
> {code}
> 2. Implementation
> {code}
> @Stateless
> @WebService
> public class WSTestImpl implements WSTest {
>  //...
> }
> {code}
> 3. Published wsdl by OpenEJB under http://127.0.0.1:8983/test/WSTestImpl?wsdl 
> : 
> {code}
> <wsdl:definitions xmlns:ns1="http://test.com/wstest"; 
> xmlns:ns4="http://schemas.xmlsoap.org/soap/http"; 
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; name="WSTestImplService" 
> targetNamespace="http://test.com/";>
> <wsdl:import 
> location="http://127.0.0.1:8983/test/WSTestImpl?wsdl?wsdl=TestWS.wsdl"; 
> namespace="http://test.com/wstest"/>
> {code}
> The "?wsdl" keyword is repeated 2 times:
> <wsdl:import 
> location="http://127.0.0.1:8983/test/WSTestImpl?wsdl{color:red}?wsdl{color}=TestWS.wsdl";
> OpenEJB or CXF doesn't set any properties of the endpoint WS (like 
> PUBLISHED_ENDPOINT_URL) and this cause that WSDLGetUtils.updateDoc method 
> take the whole address of wsdl (http://127.0.0.1:8983/test/WSTestImpl?wsdl) 
> and append to it another "?wsdl" keyword causing this bug.
> I've made quick, not elegant, fix to WSDLGetUtils.java version 2.6.2 (but 
> problem exists also with newest 2.7.3). Simply cutting the end of base 
> location if it has "?wsdl" substring.
> {code}
>             // FIX base adres can be like http://aaa.com/Service?wsdl
>             // remove wsdl parameter
>             int indexOfParam = base.indexOf("?");
>             if (indexOfParam != -1){
>                 base = base.substring(0, indexOfParam);
>             }
> {code}
> Probably more elegant solution is needed.
> Attached source of the whole class WSDLGetUtils.java version 2.6.2

--
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