Troubleshoot Web services compiled bindings

This topic discusses troubleshooting compiled bindings of Web services that are developed and implemented based on the Web Services for Java 2 Platform, Enterprise Edition (J2EE) specification

Each section in this topic is a problem that you 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 Java2WSDL command to specify the package for the fully qualified namespace.

 

Java code to WSDL mapping cannot

be reversed to the original Java code

If you find that a WSDL file that you 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.


 

Related Tasks


Troubleshooting Web services