IBM Support

Problem with soap:address location in the WSDL(If use IHS in front of WebSphere Application Server Community Edition 2.1.1.6 Server)

Troubleshooting


Problem

If put a IBM HTTP server or an Apache Http server in the front of WASCE to handle the request, the WSDL file which is generated by server will choose WASCE server's IP address and port number as it's soap:address location. It will expose WASCE server's information even it is not the developer desires.

Symptom

For example, if the request url is http://www.hostname.com/axis2/services/version?wsdl, the WSDL file will be generated like below.

<wsdl:service name="Version">
<wsdl:port name="VersionHttpSoap11Endpoint" binding="ns:VersionSoap11Binding">
<soap:address location="
//9.186.0.1:8080/axis2/services/Version.VersionHttpSoap11Endpoint"/>
</wsdl:port>
<wsdl:port name="VersionHttpSoap12Endpoint" binding="ns:VersionSoap12Binding">
<soap12:address location="
//9.186.0.1:8080/axis2/services/Version.VersionHttpSoap12Endpoint"/>
</wsdl:port>
<wsdl:port name="VersionHttpEndpoint" binding="ns:VersionHttpBinding">
<
http:address location="//9.186.0.1:8080/axis2/services/Version.VersionHttpEndpoint"/>
</wsdl:port>
</wsdl:service>

WASCE's IP address is 9.186.0.1, and it's port number is 8080.

Resolving The Problem

We introduce geronimo-axis2.xml to customize the configuration of Axis2 in WASCE. There is a parameter named "modifyUserWSDLPortAddress". We can use it to control if the soap:address location is changed from the request url to wasce server's IP address and Port number. If the value of modifyUserWSDLPortAddress is false, the request url will be kept as the soap:address location in the WSDL file generated by server.

To implement the solution, please follow this instruction.

1. Download the patch file. SoapAddressModifyPatch.zipSoapAddressModifyPatch.zip

2. Unpack the patch file into the WebSphere Application Server Community Edition installation directory, and ensure the files in the zip file replace the ones in the server installation.

3. Start the server, for example,

<WAS_CE_HOME>\bin\startup

<WAS_CE_HOME>/bin/startup.sh

4. In order to keep geronimo-axis2.xml on the classpath, please add it into your source code directory src/META-INF. There is a geronimo-axis2.xml sample.

Please refer it.geronimo-axis2.xmlgeronimo-axis2.xml

If you prefer to keep the request url as the soap:address location, please set "modifyUserWSDLPortAddress" to false in the geronimo-axis2.xml.

[{"Product":{"code":"SS6JMN","label":"WebSphere Application Server Community Edition"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"AxisWebServices","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"2.1.1.6","Edition":"Entry;Enhanced;Elite","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21682952