You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Iftach Ragoler (JIRA)" <ax...@ws.apache.org> on 2006/05/18 10:15:05 UTC

[jira] Created: (AXIS-2480) When the Binding type is missing, a NullPointerException is thrown

When the Binding type is missing, a NullPointerException is thrown
------------------------------------------------------------------

         Key: AXIS-2480
         URL: http://issues.apache.org/jira/browse/AXIS-2480
     Project: Apache Axis
        Type: Bug

  Components: WSDL processing  
    Versions: 1.3    
 Environment: Windows
    Reporter: Iftach Ragoler


When the WSDL is missing the Binding type, the WSDL parser throws NullPointerException. It should throw IOException with a description.

The error is in SymbolTable class, line 2506: 
if (binding.getPortType().getOperation(
                        opName, inputName, outputName) == null) {
                     throw new IOException(Messages.getMessage("unmatchedOp",
                            new String[]{
                                opName,
                                inputName,
                                outputName}));
                }

It should be something like:
                    if (binding.getPortType()==null)
                    throw new IOException(Messages.getMessage("MissingBindingType",
                            new String[]{
                                bindingName,
                                inputName,
                                outputName}));

                    if(binding.getOperation(
                        opName, inputName, outputName) == null) {
                    throw new IOException(Messages.getMessage("unmatchedOp",
                            new String[]{
                                opName,
                                inputName,
                                outputName}));
                }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira