Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3538

SchemaLocation of imported schemas rewritten in WSDL take address from proxy-host and not wsdl-host.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: jbossws-cxf-4.0.2
    • Fix Version/s: None
    • Component/s: jbossws-cxf
    • Labels:
    • Steps to Reproduce:
      Hide

      1) Make the changes in the configuration as described (using a proxy-name and wsdl-host of your choosing)
      2) Deploy the attached example which contains a WSDL and referred XSD.
      3) Browse to the WSDL directly and you will see the schemaLocation and soap:address do not match

      Show
      1) Make the changes in the configuration as described (using a proxy-name and wsdl-host of your choosing) 2) Deploy the attached example which contains a WSDL and referred XSD. 3) Browse to the WSDL directly and you will see the schemaLocation and soap:address do not match
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Package the WSDL in your application and change the schemaLocation by hand. Use the @Webservice.wsdlLocation attribute to refer to the packaged WSDL avoiding JBoss rewriting the wrong address in the schemaLocation.

      Show
      Package the WSDL in your application and change the schemaLocation by hand. Use the @Webservice.wsdlLocation attribute to refer to the packaged WSDL avoiding JBoss rewriting the wrong address in the schemaLocation.

      Description

      If you add a proxy to the HTTP/1.1 connector in standalone.xml

            <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
                  <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" proxy-name="someothermachine.somewhere" proxy-port="8080"/>
                  <virtual-server name="default-host" enable-welcome-root="true">
                      <alias name="localhost"/>
                      <alias name="example.com"/>
                  </virtual-server>
              </subsystem>
      

      and you also have a rewrite rule in web service subsystem

              <subsystem xmlns="urn:jboss:domain:webservices:1.1">
                  <modify-wsdl-address>true</modify-wsdl-address>
                  <wsdl-host>wsdlHostAddress</wsdl-host>
                  <endpoint-config name="Standard-Endpoint-Config"/>
                  <endpoint-config name="Recording-Endpoint-Config">
                      <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
                          <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
                      </pre-handler-chain>
                  </endpoint-config>
              </subsystem>
      

      The resulting WSDL published by JBoss will have the schemaLocation as the proxy-name and not the wsdl-host. This results in clients unable to process the WSDL

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              asoldano Alessio Soldano
              Reporter:
              mmusaji Mustafa Musaji
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: