Hi Everyone,

Axis 2 1.0 Release, cygwin, java 1.5.0_05-b05.

I'm attempting to run WSDL2Java.sh and I'm running into an NPE.  The wsdl is
actually broken up into a ton of different files, so I'm not sure if that is
contributing to my error or not.  I'm afraid I've included a ton of diag
info in the email - please feel free to tell me to take a long walk off a
short pier - all apologies.

Anyway, I've gathered some data from Eclipse.  I can't determine if I'm
running into a bug, or just poor WSDL.  I placed a breakpoint at line 595 in
org.apache.axis2.description.WSDL2AxisServiceBuilder which is where the NPE
originates.  It appears that the Input of my Operation's have null Messages. 
I have 8 Operations, and all of them have null Messges.  I have some info
from eclipse:

Stack:
Thread [main] (Suspended (breakpoint at line 595 in
WSDL2AxisServiceBuilder))
        WSDL2AxisServiceBuilder.createSchemaForPorttype(PortType, String, 
boolean)
line: 595
        WSDL2AxisServiceBuilder.generateWrapperSchema(Definition, Binding) line:
554
        WSDL2AxisServiceBuilder.populateService() line: 228
        CodeGenerationEngine.<init>(CommandLineOptionParser) line: 87
        WSDL2Code.main(String[]) line: 32
        WSDL2Java.main(String[]) line: 21


WSDL2AxisServiceBuilder:
this= org.apache.axis2.description.WSDL2AxisServiceBuilder  (id=15)
        nsCount= 0
        axisService= org.apache.axis2.description.AxisService  (id=83)
        baseUri= null
        customResolver= null
        customWSLD4JResolver= null
        in= null
        isServerSide= true
        portName= null
        registry= org.apache.ws.policy.util.PolicyRegistry  (id=89)
        resolvedRpcWrappedElementMap= java.util.HashMap<K,V>  (id=91)
        serviceName= null
        style= null
        wsdl4jDefinition= com.ibm.wsdl.DefinitionImpl  (id=92)

operations:
operations= java.util.Vector<E>  (id=53)
        [0]= com.ibm.wsdl.OperationImpl  (id=23)
        [1]= com.ibm.wsdl.OperationImpl  (id=120)
        [2]= com.ibm.wsdl.OperationImpl  (id=121)
        [3]= com.ibm.wsdl.OperationImpl  (id=122)
        [4]= com.ibm.wsdl.OperationImpl  (id=123)
        [5]= com.ibm.wsdl.OperationImpl  (id=124)
        [6]= com.ibm.wsdl.OperationImpl  (id=125)
        [7]= com.ibm.wsdl.OperationImpl  (id=126)

First iteration through operations List, input object:
input= com.ibm.wsdl.InputImpl  (id=17)
        docEl= null
        extensionAttributes= java.util.HashMap<K,V>  (id=99)
        message= null
        name= null
        nativeAttributeNames= java.util.Arrays$ArrayList<E>  (id=100)
                [0]= "name"
                [1]= "message"

The message field is null, so an NPE is thrown at line 595:
messagesMap.put(message.getQName(), message);

The relavent portion of the wsdl:
<wsdl:definitions name = "ResourceListManagementServiceSync" targetNamespace
= "http://www.imsglobal.org/services/rli/wsdl/imsRLIManServiceSync_v1p0"; 
xmlns:tns =
"http://www.imsglobal.org/services/rli/wsdl/imsRLIManServiceSync_v1p0"; 
xmlns:absr =
"http://www.imsglobal.org/services/rli/wsdl/imsRLManAbstractSync_v1p0"; 
xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:wsdl =
"http://schemas.xmlsoap.org/wsdl/"; xmlns =
"http://schemas.xmlsoap.org/wsdl/"; 
xmlns:xsi = "http://www.w3.org/2000/10/XMLSchema-instance";
xsi:schemaLocation = "http://schemas.xmlsoap.org/wsdl/
http://www.imsglobal.org/services/schemas/wsiwsdlv1p1.xsd";>

 <... snip ...>
<wsdl:operation name = "createResourceList">
                        <soap:operation soapAction =
"http://www.imsglobal.org/soap/rli/createResourceList"; style = "document"/>
                        <wsdl:input>
                                <soap:body use = "literal" parts = 
"parameters"/>
                                <soap:header message = 
"absr:createResourceListRequest" part =
"headerInfoRequest" use = "literal" wsdl:required = "true"/> 
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use = "literal" parts = "response"/>
                                <soap:header message = 
"absr:createResourceListResponse" part =
"headerInfoResponse" use = "literal" wsdl:required = "true"/>
                        </wsdl:output>
                </wsdl:operation>


Thank you for your feedback, help, input, and flames!
Full wsdl and run of WSDL2Java is below.

Best regards,
Elliot




Here is the full output when I run WSDL2Java:

/cygdrive/d/rli/scratch $ ./WSDL2Java.sh -uri
../schemas/rli/wsdl/imsRLIManServiceSync_v1p0.wsdl 
the classpath
axis2-bin\lib\XmlSchema-1.0.2.jar;axis2-bin\lib\annogen-0.1.0.jar;axis2-bin\lib\axiom-api-1.0.jar;axis2-bin\lib\axiom-dom-1.0.jar;axis2-bin\lib\axiom-impl-1.0.jar;axis2-bin\lib\axis2-adb-1.0.jar;axis2-bin\lib\axis2-codegen-1.0.jar;axis2-bin\lib\axis2-jibx-1.0.jar;axis2-bin\lib\axis2-kernel-1.0.jar;axis2-bin\lib\axis2-tools-1.0.jar;axis2-bin\lib\axis2-xmlbeans-1.0.jar;axis2-bin\lib\backport-util-concurrent-2.1.jar;axis2-bin\lib\commons-codec-1.3.jar;axis2-bin\lib\commons-fileupload-1.0.jar;axis2-bin\lib\commons-httpclient-3.0.jar;axis2-bin\lib\commons-logging-1.0.4.jar;axis2-bin\lib\geronimo-spec-activation-1.0.2-rc4.jar;axis2-bin\lib\geronimo-spec-javamail-1.3.1-rc5.jar;axis2-bin\lib\geronimo-spec-jms-1.1-rc4.jar;axis2-bin\lib\jaxen-1.1-beta-8.jar;axis2-bin\lib\jaxme2-0.5.1.jar;axis2-bin\lib\jaxmeapi-0.5.1.jar;axis2-bin\lib\jaxmejs-0.5.1.jar;axis2-bin\lib\jaxmexs-0.5.1.jar;axis2-bin\lib\log4j-1.2.13.jar;axis2-bin\lib\neethi-1.0.1.jar;axis2-bin\lib\servletapi-2.3.jar;axis2-bin\lib\stax-api-1.0.jar;axis2-bin\lib\stax-utils-20060501.jar;axis2-bin\lib\wsdl4j-1.5.2.jar;axis2-bin\lib\wstx-asl-2.9.3.jar;axis2-bin\lib\xbean-2.1.0.jar;
Listening for transport dt_socket at address: 8000
Retrieving document at
'http://www.imsglobal.org/services/rli/wsdl/imsRLIManAbstractSync_v1p0.wsdl',
relative to 'file:/d:/rli/scratch/../schemas/rli/wsdl/'.
Retrieving schema at
'http://www.imsglobal.org/services/common/imsMessBindSchema_v1p0.xsd',
relative to
'http://www.imsglobal.org/services/rli/wsdl/imsRLIManAbstractSync_v1p0.wsdl'.
Retrieving schema at
'http://www.imsglobal.org/services/common/imsCommonSchema_v1p0.xsd',
relative to
'http://www.imsglobal.org/services/common/imsMessBindSchema_v1p0.xsd'.
Retrieving schema at
'http://www.imsglobal.org/services/rli/xsd/imsRLIManMessSchema_v1p0.xsd',
relative to
'http://www.imsglobal.org/services/rli/wsdl/imsRLIManAbstractSync_v1p0.wsdl'.
Retrieving schema at
'http://www.imsglobal.org/services/rli/rlicommon/imsRLICommonSchema_v1p0.xsd',
relative to
'http://www.imsglobal.org/services/rli/xsd/imsRLIManMessSchema_v1p0.xsd'.
Retrieving schema at
'http://www.imsglobal.org/services/rli/xsd/imsRLIManDataSchema_v1p0.xsd',
relative to
'http://www.imsglobal.org/services/rli/xsd/imsRLIManMessSchema_v1p0.xsd'.
Retrieving schema at
'http://www.imsglobal.org/services/rli/rlicommon/imsRLICommonSchema_v1p0.xsd',
relative to
'http://www.imsglobal.org/services/rli/xsd/imsRLIManDataSchema_v1p0.xsd'.
log4j:WARN No appenders could be found for logger
(org.apache.axis2.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:94)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: org.apache.axis2.AxisFault: null; nested exception is: 
        java.lang.NullPointerException
        at
org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:243)
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:87)
        ... 2 more
Caused by: java.lang.NullPointerException
        at
org.apache.axis2.description.WSDL2AxisServiceBuilder.createSchemaForPorttype(WSDL2AxisServiceBuilder.java:595)
        at
org.apache.axis2.description.WSDL2AxisServiceBuilder.generateWrapperSchema(WSDL2AxisServiceBuilder.java:554)
        at
org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:228)
        ... 3 more
Thu May 18
/cygdrive/d/rli/scratch $ 


The full WSDL is long, but it is copied below (sorry):
<?xml version = "1.0" encoding = "UTF-8"?>
<wsdl:definitions name = "ResourceListManagementServiceSync" targetNamespace
= "http://www.imsglobal.org/services/rli/wsdl/imsRLIManServiceSync_v1p0"; 
xmlns:tns =
"http://www.imsglobal.org/services/rli/wsdl/imsRLIManServiceSync_v1p0"; 
xmlns:absr =
"http://www.imsglobal.org/services/rli/wsdl/imsRLManAbstractSync_v1p0"; 
xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:wsdl =
"http://schemas.xmlsoap.org/wsdl/"; xmlns =
"http://schemas.xmlsoap.org/wsdl/"; 
xmlns:xsi = "http://www.w3.org/2000/10/XMLSchema-instance";
xsi:schemaLocation = "http://schemas.xmlsoap.org/wsdl/
http://www.imsglobal.org/services/schemas/wsiwsdlv1p1.xsd";>
        <wsdl:documentation>Service:    Synchronous ResourceList Management
                                                Component:      Specific 
Service Binding (SOAP)
                                                Author:         Colin Smythe
                                                Date:           6th August, 2004
                                                Version:        1.0
                                                Status:  Final Specification
                                                Comments:       WSDL for the 
IMS ResourceList Management Service.
                                                                        Using 
SOAPv1.1/HTTPv1.1 as the transport mechanism.
                                                History:        N/A
                                                Copyright:      (c) IMS Global 
Learning Consortium Inc.
                                                                        All 
Rights Reserved.
                                                                        IMS 
Global Learning Consortium, Inc. (IMS) is publishing the
information contained in this binding (“Specification”) 
                                                                        for 
purposes of scientific, experimental and scholarly
collaboration only.  IMS makes no warranty or representation 
                                                                        
regarding the accuracy or completeness of the Specification.  This
material is provided on an “As Is’ and “As Available” 
                                                                        basis.  
The Specification is at all times subject to change and
revision without notice.  It is your sole responsibility 
                                                                        to 
evaluate the usefulness, accuracy and completeness of the
Specification as it relates to you.  IMS would appreciate 
                                                                        
receiving your comments and suggestions.  Please contact IMS
through our website at: http://www.imsglobal.org.
        </wsdl:documentation>
        <wsdl:import namespace =
"http://www.imsglobal.org/services/rli/wsdl/imsRLIManAbstractSync_v1p0";
location =
"http://www.imsglobal.org/services/rli/wsdl/imsRLIManAbstractSync_v1p0.wsdl"/>
        <wsdl:binding name = "ResourceListManagementServiceSyncSoap" type =
"absr:ResourceListManagementServiceSync">
                <soap:binding transport = 
"http://schemas.xmlsoap.org/soap/http"; style =
"document"/> 
                <wsdl:operation name = "createResourceList">
                        <soap:operation soapAction =
"http://www.imsglobal.org/soap/rli/createResourceList"; style = "document"/>
                        <wsdl:input>
                                <soap:body use = "literal" parts = 
"parameters"/>
                                <soap:header message = 
"absr:createResourceListRequest" part =
"headerInfoRequest" use = "literal" wsdl:required = "true"/> 
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use = "literal" parts = "response"/>
                                <soap:header message = 
"absr:createResourceListResponse" part =
"headerInfoResponse" use = "literal" wsdl:required = "true"/>
                        </wsdl:output>
                </wsdl:operation>
                <wsdl:operation name = "createByProxyResourceList">
                        <soap:operation soapAction =
"http://www.imsglobal.org/soap/rli/createByProxyResourceList"; style =
"document"/>
                        <wsdl:input>
                                <soap:body use = "literal" parts = 
"parameters"/>
                                <soap:header message = 
"absr:createByProxyResourceListRequest" part =
"headerInfoRequest" use = "literal" wsdl:required = "true"/> 
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use = "literal" parts = "response"/>
                                <soap:header message = 
"absr:createByProxyResourceListResponse" part =
"headerInfoResponse" use = "literal" wsdl:required = "true"/>
                        </wsdl:output>
                </wsdl:operation>
                <wsdl:operation name = "deleteResourceList">
                        <soap:operation soapAction =
"http://www.imsglobal.org/soap/rli/deleteResourceList"; style = "document"/>
                        <wsdl:input>
                                <soap:body use = "literal" parts = 
"parameters"/>
                                <soap:header message = 
"absr:deleteResourceListRequest" part =
"headerInfoRequest" use = "literal" wsdl:required = "true"/> 
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use = "literal" parts = "response"/>
                                <soap:header message = 
"absr:deleteResourceListResponse" part =
"headerInfoResponse" use = "literal" wsdl:required = "true"/>
                        </wsdl:output>
                </wsdl:operation>
                <wsdl:operation name = "readResourceList">
                        <soap:operation soapAction =
"http://www.imsglobal.org/soap/rli/readResourceList"; style = "document"/>
                        <wsdl:input>
                                <soap:body use = "literal" parts = 
"parameters"/>
                                <soap:header message = 
"absr:readResourceListRequest" part =
"headerInfoRequest" use = "literal" wsdl:required = "true"/> 
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use = "literal" parts = "response"/>
                                <soap:header message = 
"absr:readResourceListResponse" part =
"headerInfoResponse" use = "literal" wsdl:required = "true"/>
                        </wsdl:output>
                </wsdl:operation>
                <wsdl:operation name = "readResourceListsForGroup">
                        <soap:operation soapAction =
"http://www.imsglobal.org/soap/rli/readResourceListsForGroup"; style =
"document"/>
                        <wsdl:input>
                                <soap:body use = "literal" parts = 
"parameters"/>
                                <soap:header message = 
"absr:readResourceListsForGroupRequest" part =
"headerInfoRequest" use = "literal" wsdl:required = "true"/> 
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use = "literal" parts = "response"/>
                                <soap:header message = 
"absr:readResourceListsForGroupResponse" part =
"headerInfoResponse" use = "literal" wsdl:required = "true"/>
                        </wsdl:output>
                </wsdl:operation>
                <wsdl:operation name = "replaceResourceList">
                        <soap:operation soapAction =
"http://www.imsglobal.org/soap/rli/replaceResourceList"; style = "document"/>
                        <wsdl:input>
                                <soap:body use = "literal" parts = 
"parameters"/>
                                <soap:header message = 
"absr:replaceResourceListRequest" part =
"headerInfoRequest" use = "literal" wsdl:required = "true"/>
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use = "literal" parts = "response"/>
                                <soap:header message = 
"absr:replaceResourceListResponse" part =
"headerInfoResponse" use = "literal" wsdl:required = "true"/>
                        </wsdl:output>
                </wsdl:operation>
                <wsdl:operation name = "assignResourceList">
                        <soap:operation soapAction =
"http://www.imsglobal.org/soap/rli/assignResourceList"; style = "document"/>
                        <wsdl:input>
                                <soap:body use = "literal" parts = 
"parameters"/>
                                <soap:header message = 
"absr:assignResourceListRequest" part =
"headerInfoRequest" use = "literal" wsdl:required = "true"/>
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use = "literal" parts = "response"/>
                                <soap:header message = 
"absr:assignResourceListResponse" part =
"headerInfoResponse" use = "literal" wsdl:required = "true"/>
                        </wsdl:output>
                </wsdl:operation>
                <wsdl:operation name = "deassignResourceList">
                        <soap:operation soapAction =
"http://www.imsglobal.org/soap/rli/deassignResourceList"; style =
"document"/>
                        <wsdl:input>
                                <soap:body use = "literal" parts = 
"parameters"/>
                                <soap:header message = 
"absr:deassignResourceListRequest" part =
"headerInfoRequest" use = "literal" wsdl:required = "true"/>
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use = "literal" parts = "response"/>
                                <soap:header message = 
"absr:deassignResourceListResponse" part =
"headerInfoResponse" use = "literal" wsdl:required = "true"/>
                        </wsdl:output>
                </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name = "ResourceListManagementServiceSync">
                <wsdl:port name = "ResourceListManagementServiceSyncSoap" 
binding =
"tns:ResourceListManagementServiceSyncSoap">
                        <soap:address location =
"http://imsglobal.org/services/ResourceListManagementService/"/> 
                </wsdl:port>
        </wsdl:service>
</wsdl:definitions>

--
View this message in context: 
http://www.nabble.com/-Axis2-NPE-in-WSDL2AxisServiceBuilder-t1647900.html#a4462942
Sent from the Axis - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to