It *is* in the same directory and I *did* attach the schema... I dunno
why it didn't get through to the list. Anyway, here it is again.
The WebStat schema references another schema which I'm also attaching
in the hopes that it wont get plundered by foul thieves along its
voyage to your inbox.



2007/7/11, James Mao <[EMAIL PROTECTED]>:
Hi,

Wsdl2java do support schema import and wsdl import, do you have the

WebStat1.0.xsd in the same directory as the wsdl file.

Please also attach the schema, so we can reproduce

Thanks
James


Christian Vest Hansen wrote:
> Hi,
>
> Busy day, I guess... When I run the wsdl2java tool on the attached
> WSDL and schemas, I get an exception about "velocity engin write
> errors" whos cause appear to be an NPE.
>
> I'm wondering that the schemas might be too complex, or the tool can't
> handle the importing.
>
> Can you guys shed some light on what's going on, and tell me if
> there's a way to get past this? I tried the tool on a much simple wsdl
> and it worked out alright.
>
> Here's the output from wsdl2java:
>
> Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -verbose -client -server -impl -d
> /Users/vest/workspace/Statistics2/src/main/java
> /Users/vest/workspace/Statistics2/src/main/resources/WebStat1.0.wsdl
> wsdl2java - 2.0-incubator-SNAPSHOT
>
>
> WSDLToJava Error : velocity engin write errors
>
> org.apache.cxf.tools.common.ToolException: velocity engin write errors
>     at
> 
org.apache.cxf.tools.common.VelocityGenerator.doWrite(VelocityGenerator.java:103)
>
>     at
> 
org.apache.cxf.tools.wsdlto.core.AbstractGenerator.doWrite(AbstractGenerator.java:49)
>
>     at
> 
org.apache.cxf.tools.wsdlto.frontend.jaxws.generators.ClientGenerator.generate(ClientGenerator.java:118)
>
>     at
> 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:185)
>
>     at
> 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:215)
>
>     at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:84)
>
>     at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:102)
>     at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:171)
> Caused by: org.apache.velocity.exception.MethodInvocationException:
> Invocation of method 'getDefaultTypeValue' in  class
> org.apache.cxf.tools.common.model.JavaParameter threw exception class
> java.lang.NullPointerException : null
>     at
> 
org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:193)
>
>     at
> 
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175)
>
>     at
> 
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220)
>
>     at
> org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55)
>     at
> org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:166)
>     at
> 
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:114)
>
>     at
> org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55)
>     at
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230)
>
>     at
> 
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:89)
>
>     at
> org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55)
>     at
> org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:166)
>     at
> 
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:114)
>
>     at
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230)
>
>     at org.apache.velocity.Template.merge(Template.java:256)
>     at
> 
org.apache.cxf.tools.common.VelocityGenerator.doWrite(VelocityGenerator.java:99)
>
>     ... 7 more
>
>
> ------------------------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; 
xmlns:unw="http://ws.unwire.dk/webstat/v1"; xmlns:ns="http://unwire.dk/statistics"; targetNamespace="http://ws.unwire.dk/webstat/v1";>
>       <wsdl:import namespace="http://ws.unwire.dk/webstat/v1"; 
location="WebStat1.0.xsd"/>
>       <wsdl:types>
>               <xs:schema targetNamespace="http://ws.unwire.dk/webstat/v1"; 
elementFormDefault="qualified"/>
>       </wsdl:types>
>       <wsdl:message name="VoidMessage"/>
>       <wsdl:message name="ReportList">
>               <wsdl:part name="reports" type="ReportList"/>
>       </wsdl:message>
>       <wsdl:message name="ReportConfigurationList">
>               <wsdl:part name="configurations" 
type="ReportConfigurationList"/>
>       </wsdl:message>
>       <wsdl:message name="Report">
>               <wsdl:part name="report" type="Report"/>
>       </wsdl:message>
>       <wsdl:message name="ReportConfiguration">
>               <wsdl:part name="configuration" type="ReportConfiguration"/>
>       </wsdl:message>
>       <wsdl:message name="Status">
>               <wsdl:part name="status" type="Status"/>
>       </wsdl:message>
>       <wsdl:message name="ReportResult">
>               <wsdl:part name="result" type="ReportResult"/>
>       </wsdl:message>
>       <wsdl:message name="ForwardRequest">
>               <wsdl:part name="defered" type="Defered"/>
>               <wsdl:part name="email" type="xs:string"/>
>       </wsdl:message>
>       <wsdl:message name="Defered">
>               <wsdl:part name="defered" type="Defered"/>
>       </wsdl:message>
>       <wsdl:message name="ScheduledReport">
>               <wsdl:part name="scheduled-report" type="ScheduledReport"/>
>       </wsdl:message>
>       <wsdl:message name="ScheduledReportList">
>               <wsdl:part name="scheduled-reports" type="ScheduledReportList"/>
>       </wsdl:message>
>       <wsdl:message name="NewMessage"/>
>       <wsdl:message name="NewMessage2"/>
>       <wsdl:portType name="WebStat">
>               <wsdl:operation name="ListReports">
>                       <wsdl:input message="unw:VoidMessage"/>
>                       <wsdl:output message="unw:ReportList"/>
>               </wsdl:operation>
>               <wsdl:operation name="ListReportConfigurations">
>                       <wsdl:input message="unw:VoidMessage"/>
>                       <wsdl:output message="unw:ReportConfigurationList"/>
>               </wsdl:operation>
>               <wsdl:operation name="CreateReportConfiguration">
>                       <wsdl:input message="unw:Report"/>
>                       <wsdl:output message="unw:ReportConfiguration"/>
>               </wsdl:operation>
>               <wsdl:operation name="GetReportConfiguration">
>                       <wsdl:input message="unw:ReportConfiguration"/>
>                       <wsdl:output message="unw:ReportConfiguration"/>
>               </wsdl:operation>
>               <wsdl:operation name="SaveReportConfiguration">
>                       <wsdl:input message="unw:ReportConfiguration"/>
>                       <wsdl:output message="unw:ReportConfiguration"/>
>               </wsdl:operation>
>               <wsdl:operation name="RunReportConfigurationAsync">
>                       <wsdl:input message="unw:ReportConfiguration"/>
>                       <wsdl:output message="unw:Defered"/>
>               </wsdl:operation>
>               <wsdl:operation name="GetRunStatus">
>                       <wsdl:input message="unw:Defered"/>
>                       <wsdl:output message="unw:Status"/>
>               </wsdl:operation>
>               <wsdl:operation name="GetReportResult">
>                       <wsdl:input message="unw:Defered"/>
>                       <wsdl:output message="unw:ReportResult"/>
>               </wsdl:operation>
>               <wsdl:operation name="RunReportConfiguration">
>                       <wsdl:input message="unw:ReportConfiguration"/>
>                       <wsdl:output message="unw:ReportResult"/>
>               </wsdl:operation>
>               <wsdl:operation name="ForwardResultTo">
>                       <wsdl:input message="unw:ForwardRequest"/>
>                       <wsdl:output message="unw:VoidMessage"/>
>               </wsdl:operation>
>               <wsdl:operation name="ScheduleReport">
>                       <wsdl:input message="unw:ReportConfiguration"/>
>                       <wsdl:output message="unw:ScheduledReport"/>
>               </wsdl:operation>
>               <wsdl:operation name="DeleteReportConfiguration">
>                       <wsdl:input message="unw:ReportConfiguration"/>
>                       <wsdl:output message="unw:ReportConfiguration"/>
>               </wsdl:operation>
>               <wsdl:operation name="DeleteScheduledReport">
>                       <wsdl:input message="unw:ScheduledReport"/>
>                       <wsdl:output message="unw:ScheduledReport"/>
>               </wsdl:operation>
>               <wsdl:operation name="ListScheduledReports">
>                       <wsdl:input message="unw:VoidMessage"/>
>                       <wsdl:output message="unw:ScheduledReportList"/>
>               </wsdl:operation>
>               <wsdl:operation name="CancelReportRun">
>                       <wsdl:input message="unw:Defered"/>
>                       <wsdl:output message="unw:Status"/>
>               </wsdl:operation>
>       </wsdl:portType>
>       <wsdl:binding name="WebStatSOAP" type="unw:WebStat">
>               <soap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>
>               <wsdl:operation name="ListReports">
>                       <soap:operation 
soapAction="http://unwire.dk/ListReports"/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="ListReportConfigurations">
>                       <soap:operation 
soapAction="http://unwire.dk/ListReportConfigurations"/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="CreateReportConfiguration">
>                       <soap:operation 
soapAction="http://unwire.dk/CreateReportConfiguration"/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="GetReportConfiguration">
>                       <soap:operation 
soapAction="http://unwire.dk/GetReportConfiguration"/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="SaveReportConfiguration">
>                       <soap:operation 
soapAction="http://unwire.dk/SaveReportConfiguration"/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="RunReportConfigurationAsync">
>                       <soap:operation 
soapAction="http://unwire.dk/RunReportConfigurationAsync"/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="GetRunStatus">
>                       <soap:operation 
soapAction="http://unwire.dk/GetRunStatus"/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="GetReportResult">
>                       <soap:operation 
soapAction="http://unwire.dk/GetReportResult"/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="RunReportConfiguration">
>                       <soap:operation 
soapAction="http://unwire.dk/RunReportConfiguration"/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="ForwardResultTo">
>                       <soap:operation 
soapAction="http://unwire.dk/ForwardResultTo"/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="ScheduleReport">
>                       <soap:operation 
soapAction="http://unwire.dk/ScheduleReport"/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="DeleteReportConfiguration">
>                       <soap:operation 
soapAction="http://unwire.dk/DeleteReportConfiguration"/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="DeleteScheduledReport">
>                       <soap:operation 
soapAction="http://unwire.dk/DeleteScheduledReport"/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="ListScheduledReports">
>                       <soap:operation 
soapAction="http://unwire.dk/ListScheduledReports"/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="CancelReportRun">
>                       <soap:operation 
soapAction="http://unwire.dk/CancelReportRun"/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>       </wsdl:binding>
>       <wsdl:service name="WebStat">
>               <wsdl:port name="WebStatDev" binding="unw:WebStatSOAP">
>                       <soap:address 
location="http://localhost:8000/statistics2/services/WebStat"/>
>               </wsdl:port>
>       </wsdl:service>
> </wsdl:definitions>
>



--
Venlig hilsen / Kind regards,
Christian Vest Hansen.

Reply via email to