[
https://issues.jboss.org/browse/JBWS-4087?page=com.atlassian.jira.plugin....
]
R Searls commented on JBWS-4087:
--------------------------------
What about doing the url rewrite when there is no absolute
path/protocol included in the schemaLocation URL?
(e.g.
{code:java}
<xs:import namespace="http://example.co.za/claim/zmf"
schemaLocation="ZietoClaim_2_1.xsd"/>
<xsd:import namespace="http://example.co.za/claim/zmf/datatypes"
schemaLocation="zmf_dt_2_1.xsd" />
<xsd:import namespace="http://example.co.za/common/datatypes"
schemaLocation="zdt_1_2.xsd" />
{code}
In all these cases the schema location is required to be in the archive relative
to the declaring wsdl or schema. There are 2 testcases in jbossws that show this
{code:java}
modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2412
modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3870
{code}
Alternatively, what if the schemaLocation URL uses the
jbossws.undefined.host
(e.g.
{code:java}
<xsd:import namespace="http://example.co.za/claim/zmf/datatypes"
schemaLocation="{jbossws.undefined.host}/zmf_dt_2_1.xsd" />
<xsd:import namespace="http://example.co.za/common/datatypes"
schemaLocation="{jbossws.undefined.host}/zdt_1_2.xsd" />
}
{code}
You are using an incorrect assumption that every declaration such as
(jbossws.undefined.host)
in a wsdl file is substituted with the corresponding real value. This is not
how a wsdl is processed. (There is no EE spec requirement to support this.) Only
the service's soap:address is evaluated for such a substitution. This feature is
wfly specific. It is a convenience wfly provides that allows the server admin to
declare the desired value in the server [1].
[1]
https://docs.jboss.org/author/display/WFLY8/Web+services+configuration
Yes, as a convenience we often times use a bug number to declare a unique
directory for a new testcase.
SOAP address rewrite for wsdl-uri-scheme=https for nested XML schema
documents (XSD) referenced by the WSDL behind reverse proxy
--------------------------------------------------------------------------------------------------------------------------------
Key: JBWS-4087
URL:
https://issues.jboss.org/browse/JBWS-4087
Project: JBoss Web Services
Issue Type: Bug
Components: jbossws-cxf
Affects Versions: jbossws-cxf-5.1.5.Final
Environment: Wildfly 10
JBossWS 5.1.5-Final
Reporter: Nico Schlebusch
Assignee: R Searls
Labels: JBossWS
Fix For: jbossws-cxf-5.2.2.Final
We have Wildfly 10 configured behind NGINX as a reverse proxy for handling the SSL
requirements of the web service. Wildfly serves everything as plain HTTP and NGINX handles
the HTTPS side of the request. The webservices subsystem is configured to rewrite the uri
using https schema. The XSD schema location referenced inside the WSDL is rewritten to use
https. However, any other XSD's scheme location that is referenced by the first XSD is
not changed to use https.
The URI rewriting for the SOAP address and the schema location of the XSD included in the
WSDL works correctly.
{code:xml}
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://example.systems/webservices/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:ns1="http://example.co.za/claim/zmf"
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="http://example.systems/webservices/">
<xs:import namespace="http://example.co.za/claim/zmf"
schemaLocation="https://dev.example.ws:8081/webservices/Claim?xsd=ZietoClaim_2_1.xsd"/>
<!-- xml omitted -->
<wsdl:service name="ClaimService">
<wsdl:port binding="tns:ClaimServiceSoapBinding"
name="ClaimWSPort">
<soap12:address
location="https://dev.example.ws:8081/webservices/ZMF"/>
</wsdl:port>
</wsdl:service>
{code}
The XSD referenced inside the WSDL contains 2 more import statements to import 2 more
XSD's. This is however where the problem starts. In the extract below you will notice
that the schema location uses http and not https for the other 2 XSD's.
{code:xml}
<?xml version='1.0' encoding='UTF-8'?>
<xsd:schema xmlns:zdt="http://example.co.za/claim/zmf/datatypes"
xmlns:zcdt="http://example.co.za/common/datatypes"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://example.co.za/claim/zmf" elementFormDefault="qualified"
targetNamespace="http://example.co.za/claim/zmf">
<xsd:import namespace="http://example.co.za/claim/zmf/datatypes"
schemaLocation="http://dev.example.ws:8081/webservices/Claim?xsd=zmf_dt_2_1.xsd"/>
<xsd:import namespace="http://example.co.za/common/datatypes"
schemaLocation="http://dev.example.ws:8081/webservices/Claim?xsd=zdt_1_2.xsd"/>
{code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)