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 "Davanum Srinivas (JIRA)" <ax...@ws.apache.org> on 2004/10/25 16:47:45 UTC

[jira] Resolved: (AXIS-1617) WSDL2Java throw NullPointerException instead of useful error message when doesn't find Part

     [ http://issues.apache.org/jira/browse/AXIS-1617?page=history ]
     
Davanum Srinivas resolved AXIS-1617:
------------------------------------

    Resolution: Fixed

Fixed. Thanks.

-- dims

> WSDL2Java throw NullPointerException instead of useful error message when doesn't find Part
> -------------------------------------------------------------------------------------------
>
>          Key: AXIS-1617
>          URL: http://issues.apache.org/jira/browse/AXIS-1617
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: beta-2
>  Environment: cvs updated 9/23/2004
>     Reporter: Sébastien Tardif
>  Attachments: docHarbor.wsdl
>
> Here the parameter sent to wsdl2Java and the stack trace:
> [axis-wsdl2java] WSDL2Java C:\docHarborWebServices/etc/docHarbor.wsdl
> [axis-wsdl2java] Parsing XML file:  C:\docHarborWebServices/etc/docHarbor.wsdl
> [axis-wsdl2java] Running Wsdl2javaAntTask with parameters:
> [axis-wsdl2java]        verbose:true
> [axis-wsdl2java]        debug:true
> [axis-wsdl2java]        quiet:false
> [axis-wsdl2java]        server-side:true
> [axis-wsdl2java]        skeletonDeploy:false
> [axis-wsdl2java]        helperGen:false
> [axis-wsdl2java]        factory:null
> [axis-wsdl2java]        nsIncludes:[]
> [axis-wsdl2java]        nsExcludes:[]
> [axis-wsdl2java]        factoryProps:[]
> [axis-wsdl2java]        testCase:true
> [axis-wsdl2java]        noImports:false
> [axis-wsdl2java]        NStoPkg:{}
> [axis-wsdl2java]        output:C:\docHarborWebServices\srcGenerated
> [axis-wsdl2java]        protocolHandlerPkgs:
> [axis-wsdl2java]        deployScope:Application
> [axis-wsdl2java]        URL:C:\docHarborWebServices/etc/docHarbor.wsdl
> [axis-wsdl2java]        all:true
> [axis-wsdl2java]        typeMappingVersion:1.1
> [axis-wsdl2java]        timeout:-1
> [axis-wsdl2java]        failOnNetworkErrors:false
> [axis-wsdl2java]        printStackTraceOnFailure:true
> [axis-wsdl2java]        namespaceMappingFile:null
> [axis-wsdl2java]        username:null
> [axis-wsdl2java]        :passwordnull
> [axis-wsdl2java]        :noWrappedfalse
> [axis-wsdl2java]        :implementationClassNamenull
> [axis-wsdl2java]        :classpathnull
> [axis-wsdl2java]        http.proxyHost=null
> [axis-wsdl2java]        http.proxyPort=null
> [axis-wsdl2java]        http.proxyUser=null
> [axis-wsdl2java]        http.proxyPassword=null
> [axis-wsdl2java]        socks.proxyHost=null
> [axis-wsdl2java]        socks.proxyPort=null
> [axis-wsdl2java] java.lang.NullPointerException
> [axis-wsdl2java]        at 
> org.apache.axis.wsdl.symbolTable.SymbolTable.addMIMETypes(SymbolTable.java:2876)
> [axis-wsdl2java]        at 
> org.apache.axis.wsdl.symbolTable.SymbolTable.fillInBindingInfo(SymbolTable.java:2556)
> [axis-wsdl2java]        at 
> org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTable.java:2465)
> [axis-wsdl2java]        at 
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:732)
> [axis-wsdl2java]        at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:531)
> [axis-wsdl2java]        at 
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:506)
> [axis-wsdl2java]        at 
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:483)
> [axis-wsdl2java]        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:356)
> [axis-wsdl2java]        at java.lang.Thread.run(Thread.java:534)
> The problem is that typeEntry is null, meaning it doesn't find the Part it expecting.
> An error message giving the Mime component and the part that it doesn't find should be provided.
>  
>  private Use addMIMETypes(
>             BindingEntry bEntry, MIMEMultipartRelated mpr, Operation op)
>             throws IOException {
>         Use bodyType = Use.ENCODED;
>         List parts = mpr.getMIMEParts();
>         Iterator i = parts.iterator();
>         while (i.hasNext()) {
>             MIMEPart part = (MIMEPart) i.next();
>             List elems = part.getExtensibilityElements();
>             Iterator j = elems.iterator();
>             while (j.hasNext()) {
>                 Object obj = j.next();
>                 if (obj instanceof MIMEContent) {
>                     MIMEContent content = (MIMEContent) obj;
>                     TypeEntry typeEntry = findPart(op, content.getPart());
>                     String dims = typeEntry.getDimensions();
>                     if ((dims.length() <= 0)
>                             && (typeEntry.getRefType() != null)) {
>                         Node node = typeEntry.getRefType().getNode();
>                         if (getInnerCollectionComponentQName(node) != null) {
>                             dims += "[]";
>                         }
>                     }

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira