cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-4928) CXF-rt-frontend-simple - incorrect "location" attribute with "wsdl:import" tag
Date Mon, 08 Apr 2013 14:43:16 GMT

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

Daniel Kulp commented on CXF-4928:
----------------------------------


How are you publishing your service?   If using Endpoint.publish(...) or using the address
attribute on the jaxws:endpoint or similar, those addresses are the address of the endpoint
that should not have the "?wsdl" on there.  It SOUNDS like the endpoint it being published
with the wrong address, but I could be wrong.   A test case would be useful.
                
> 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
>         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

Mime
View raw message