+

Search Tips   |   Advanced Search

Web services compiled bindings troubleshooting tips


This page discusses troubleshooting compiled bindings of Web services that are developed and implemented based on Java 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 you 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 Java 2WSDL command to specify the package for the fully qualified namespace.

 

Java code to Web Service Description Language (WSDL) mapping cannot be reversed to the original Java code

If we find that a WSDL file createdd with the Java 2WSDL 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 trying to access a Web service and you 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.



 

Related tasks


Troubleshooting Web services

 

Related


Web services specifications and APIs

 

Related information


WSDL2Java command for JAX-RPC applications
Java 2WSDL command for JAX-RPC applications