SOAPProxy transforms URLs in WSDL inconsistently in SOA-P 5

Solution Verified - Updated -

Issue

  • I have an ESB service which uses a SOAPProxy action, whose 'wsdl' property is set to a WSDL file (file:///path/to/wsdl/SampleService.wsdl) located on the server machine.
  • The WSDL file contains a reference to XSD files (the schema is not defined within the WSDL file itself) which is located within the same directory as the WSDL file:

    <xs:schema targetNamespace='http://example.com/types' version='1.0' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
        <xs:include schemaLocation='./types.xsd'/>
    </xs:schema>
    
  • The WSDL file also contains a reference to a web service:

    <wsdl:service name="SampleService">
        <wsdl:port binding='tns:SampleServiceBinding' name='SampleServicePortType'>
            <soap:address location='http://some.other.server/path/to/SampleService/'/>
        </wsdl:port>
    </wsdl:service>
    
  • After deploying the ESB service, its WSDL file can be reached in two ways (using a machine name or using the IP-number to the SOA-P server):

    • http://192.168.1.1:8080/myEsbFile/http/myProxyService?wsdl
    • http://machine1:8080/myEsbFile/http/myProxyService?wsdl
  • If I use 'http://192.168.1.1:8080/myEsbFile/http/myProxyService?wsdl' to reach the WSDL (using my web browser) of my ESB service the WSDL is shown in the following way:

    <xs:include schemaLocation='http://192.168.1.1:8080/myEsbFile/http/myProxyService?wsdl&resource=[TEMPORARY_FILE_NAME_A]&protocol=http'/>
    ...
    <soap:address location='http://192.168.1.1:8080/myEsbFile/http/myProxyService?wsdl'/>
    
  • If I instead use 'http://machine1:8080/myEsbFile/http/myProxyService?wsdl' the WSDL is shown in the following way:

    <xs:include schemaLocation='http://machine1:8080/myEsbFile/http/myProxyService?wsdl&resource=[TEMPORARY_FILE_NAME_A]&protocol=http'/>
    ...
    <soap:address location='http://192.168.1.1:8080/myEsbFile/http/myProxyService?wsdl'/>
    
  • Why is the host part of the schemaLocation attribute transformed to the same host part ('192.168.1.1:8080' or 'machine1:8080') as being used when requesting the WSDL file? Why isn’t it consistent (e.g. only using '192.168.1.1:8080' for the host part) in contrast to the soap:address location attribute?

  • The above behavior may not seem like a problem but we are using a load balancer in front of two clustered SOA-P servers (machine1 / 192.168.1.1 and machine2 / 192.168.1.2) and have created an address ('http://some.non-machine.specific.host/myEsbFile/http/myProxyService?wsdl') which is used to access the WSDL. Since the schemaLocation is changing (based on the URL used when requesting the WSDL file) an problem occur since the temporary file name used to access the XSD file is different on both servers. This results in the following schemaLocations being referenced by the WSDL file:
    • http://some.non-machine.specific.host/myEsbFile/http/myProxyService?wsdl&resource=[TEMPORARY_FILE_NAME_A]&protocol=http
    • http://some.non-machine.specific.host/myEsbFile/http/myProxyService?wsdl&resource=[TEMPORARY_FILE_NAME_B]&protocol=http
  • Since the loadbalancing takes place when requesting the XSD file as well, it sometimes happen that no file exists on the server which should return the file.
  • It is also a problem that the location (of the soap:address element) is machine specific since this might lead to sidestepping the loadbalancing address if not specifying a specific endpontUrl when calling the web service.

Environment

  • JBoss Enterprise SOA Platform (SOA-P)
    • 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content