Web services compiled bindings troubleshooting tips
Use these tips to troubleshoot compiled bindings of Web services developed and implemented based on Java programming models.
Each section in this topic is a problem that we might experience with compiled bindings for web services. A solution is provided to help you troubleshoot the problem.
Context root not recognized when mapping the default XML namespace to a Java package
When we map the default XML namespace to a Java package the context root is not recognized. If two namespaces are the same up to the first slash, they map to the same Java package. For example, the XML namespaces http://www.ibm.com/foo and http://www.ibm.com/bar both map to the www.ibm.com Java package . Use the -NStoPkg option of the Java2WSDL command to specify the package for the fully qualified namespace.
Java code to Web Services Description Language (WSDL) mapping cannot be reversed to the original Java code
If we find that a WSDL file that we created with the Java2WSDL command-line tool cannot be compiled when regenerated into Java code using the WSDL2Java command-line tool, it is because the Java API for XML-based remote procedure call (JAX-RPC) mapping from Java code to WSDL is not reversible back to the original Java code.
To troubleshoot this problem, try specifying the -introspect option to the WSDL2Java command. The -instrospect option indicates to the WSDL2Java command to look into existing Java classes and gather information useful in generating artifacts that match the original Java code.
The session bean fails to instantiate when the web service is accessed
If we are trying to access a web service and we get the following error, WSWS3422E: Error: Can not instantiate bean_name, the session bean might be trying to be accessed as a servlet-type web service.
If this error message displays during the initial testing of a web service, we need to verify with the web service developer that the correct type of web service was generated. For example, if a session bean is exposed as a web service, an enterprise bean-type web service is created. A session bean that is accessed as a servlet-type web service can cause this exception.
Troubleshoot web services Web services specifications and APIs WSDL2Java command for JAX-RPC applications Java2WSDL command for JAX-RPC applications