[jbossws-issues] [JBoss JIRA] (JBWS-3792) JBossWS: wsdl:import always handled as relative location

Marc H. (JIRA) issues at jboss.org
Thu May 8 03:31:56 EDT 2014


     [ https://issues.jboss.org/browse/JBWS-3792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marc H. updated JBWS-3792:
--------------------------

    Attachment: JBWS-3792_java.net.URL_proposal.patch


Note that the problem also affect locations containing only an absolute path (starting with a slash): "http://test.com/1/2" and "/a/b" will be resolved to "http://test.com/1/2/a/b" instead of "http://test.com/a/b".

A straightforward fix could be to resolve the context using directly the java.net.URL API which already implements RFC-2396 specificities (see patch attached)...

Is there any chance to see this jbossws-cxf-4.3.1 ? (I guess that jbossws-cxf-5, will not be available before a while).

> JBossWS: wsdl:import always handled as relative location
> --------------------------------------------------------
>
>                 Key: JBWS-3792
>                 URL: https://issues.jboss.org/browse/JBWS-3792
>             Project: JBoss Web Services
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: jbossws-cxf
>    Affects Versions: jbossws-cxf-4.3
>            Reporter: Marc H.
>             Fix For: jbossws-cxf-5.0
>
>         Attachments: JBWS-3792_java.net.URL_proposal.patch
>
>
> As described in this thread: https://community.jboss.org/thread/240821
> wsdl:import directive seems to be always resolved as a relative location.
> For example, this statement:
> <wsdl:import namespace="http://foo.bar.com/foo.bar.Service" location="http://foo.bar.com/Service.svc?wsdl=wsdl0"/>
> May result in this URL being resolved:
> http://foo.bar.com/http://foo.bar.com/Service.svc?wsdl=wsdl0
> This prevents the WSDL file from being parsed.
> This behavior seems to originate from: org.jboss.ws.common.deployment.SOAPAddressWSDLParser, line 211 in v2.3.0.Final and current trunk:
> } else if (match(reader, WSDL_NS, IMPORT)) {
>                   final String location = reader.getAttributeValue(null, LOCATION);
>                   final String url = wsdlUrl.toString();
>                   final String newUrl = url.substring(0, url.lastIndexOf("/") + (location.startsWith("/") ? 0 : 1)) + location;
>                   if (!metadata.getImports().containsKey(newUrl)) {
>                      metadata.getImports().put(newUrl, false);
>                    }
> }



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the jbossws-issues mailing list