Troubleshoot the run time for a Web services client based on Web Services for J2EE

This topic discusses troubleshooting Web services clients that are developed and implemented based on the Web Services for Java 2 platform, Enterprise Edition (J2EE) specification.

Malformed URL exception displays when running a client that uses a JMS-style endpoint URL

If you are using the launchClient command to run a managed or unmanaged client that uses a JMS-style endpoint URL, the urlprotocols.jar file that contains the custom protocol handler for the JMS protocol must be in the CLASSPATH. The malformed URL exception can be avoided by making sure the urlprotocols.jar file is in the CLASSPATH.

To add the urlprotocols.jar file to the CLASSPATH:

On Windows platforms, edit the install_root\bin\setupCmdLine.bat and locate the line which sets the WAS_CLASSPATH environment variable. Add %install_root%\lib\urlprotocols.jar to the end of the line that sets the WAS_CLASSPATH environment variable.

On UNIX platforms, edit the install_root/bin/setupCmdLine.sh file and add $install_root/lib/urlprotocols.jar to the end of the line that sets the WAS_CLASSPATH environment variable.

WebServicesFault exception is thrown by the appserver run time for certain Web Services Description Language (WSDL) files

A WebServicesFault exception is thrown by the application server run time for WSDL files that define operations with the document style and literal use, and use the SOAP header to transmit the input data.

If the WSDL files define the operation with document style and literal use, and this operation maps the input to the SOAP header, the Web services run time fails to find the correct operation for the target service and the WebServicesFault exception is thrown.

To solve the problem, change the WSDL files so that the operation does not have input that uses the SOAP header to transmit the data.

Increase the value of the ConnectionIOTimeOut parameter to avoid receiving an exception when hosting Web services on WebSphere Application Server

When hosting Web services on WebSphere Application Server, you can receive the following exception: java.long.SocketTimeOutException: Read Timed Out.

A slow network connection between the client and the Web service causes this problem. In such cases, the HTTP socket might time out before the Web service engine completely reads the SOAP request. Sudden increases in overall network activity cause this problem inmost cases. The problem can also occur when the client is accessing the Web service from a slow network connection and in situations where the amount of data in the SOAP request is large.

To solve the problem, increase the ConnectionIOTimeOut parameter for your Web container HTTP transport. The default value is 5 seconds. You can increase the value 30 seconds or greater. Set the value using the administrative console. Click Servers > Application Servers > server_name > Web Container > HTTP Transports > port_number > Custom Properties > New. Type the following property name and value:

If the Web service is hosted in a clustered environment, set the property on each appserver in the cluster. If your application server is listening on more than one port number, set the property on all ports.


Related tasks
Troubleshooting Web services based on Web Services for J2EE