SOAPProxy transforms URLs in WSDL inconsistently in SOA-P 5
Issue
- I have an ESB service which uses a
SOAPProxyaction, 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?wsdlhttp://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
schemaLocationattribute 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 thesoap:addresslocationattribute? - 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.1andmachine2/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 theschemaLocationis 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 followingschemaLocations being referenced by the WSDL file:http://some.non-machine.specific.host/myEsbFile/http/myProxyService?wsdl&resource=[TEMPORARY_FILE_NAME_A]&protocol=httphttp://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 thesoap:addresselement) is machine specific since this might lead to sidestepping the loadbalancing address if not specifying a specificendpontUrlwhen 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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
