Hi, I turned your WSDL in a valid one; see attached. You had to qualify your simple types in the type section with the prefix xsd. Also your port in the service section referenced an invalid binding.
HTH Bille > -----Ursprüngliche Nachricht----- > Von: [email protected] > Gesendet: 08.07.06 18:19:59 > An: [email protected] > Betreff: WSDL2Java in Axis2 is not working? > Hi Guys, > > I'm a newbie and I'm trying to generate java code for the example wsdl > attached to this email. I'm using the wsdl2java from the > axis2-std-SNAPSHOT-bin.zip package. > After execution I receive the following errors: > > Exception in thread "main" > org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing > WSDL > at > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:123) > 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.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:210) > at > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:114) > ... 2 more > Caused by: java.lang.NullPointerException > at > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processPortType(WSDL11ToAxisServiceBuilder.java:392) > at > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processBinding(WSDL11ToAxisServiceBuilder.java:310) > at > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:205) > ... 3 more > > > Is this a bug in wsdl2java > > Thank you, > bruno. > > <hr> > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] ______________________________________________________________________________ Mit WEB.DE iNews werden Sie über die Ergebnisse der wichtigsten WM-Begegnungen per SMS informiert: http://freemail.web.de/features/inews.htm/?mc=021202
<?xml version="1.0"?> <!-- root element wsdl:definitions defines set of related services --> <wsdl:definitions xmlns:tns="http://example.com/stockquote.wsdl" xmlns:xsd1="http://example.com/stockquote.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.com/stockquote.wsdl" name="StockQuote"> <wsdl:types> <xsd:schema targetNamespace="http://example.com/stockquote.xsd" xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"> <!-- xsd definition: TradePriceRequest [... tickerSymbol string ...] --> <xsd:element name="TradePriceRequest"> <xsd:complexType> <xsd:all> <xsd:element name="tickerSymbol" type="string"/> </xsd:all> </xsd:complexType> </xsd:element> <!-- xsd definition: TradePrice [... price float ...] --> <xsd:element name="TradePrice"> <xsd:complexType> <xsd:all> <xsd:element name="price" type="float"/> </xsd:all> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> <wsdl:message name="GetLastTradePriceInput"> <wsdl:part name="body" element="xsd1:TradePriceRequest"/> </wsdl:message> <wsdl:message name="GetLastTradePriceOutput"> <wsdl:part name="body" element="xsd1:TradePrice"/> </wsdl:message> <wsdl:portType name="StockQuotePortType"> <!-- the value of wsdl:operation eludes me --> <wsdl:operation name="GetLastTradePrice"> <wsdl:input message="tns:GetLastTradePriceInput"/> <wsdl:output message="tns:GetLastTradePriceOutput"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <!-- leverage off soap:binding document style @@@(no wsdl:foo pointing at the soap binding) --> <!-- semi-opaque container of network transport details classed by soap:binding above @@@ --> <wsdl:operation name="GetLastTradePrice"> <!-- again bind to SOAP? @@@ --> <soap:operation soapAction="http://example.com/GetLastTradePrice"/> <!-- furthur specify that the messages in the wsdl:operation "" use SOAP? @@@ --> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="StockQuoteService"> <wsdl:documentation>My first service</wsdl:documentation> <!-- connect it to the binding "StockQuoteBinding" above --> <wsdl:port name="StockQuotePort" binding="tns:StockQuoteBinding"> <soap:address location="http://example.com/stockquote"/> <!-- give the binding an network address --> </wsdl:port> </wsdl:service> <!-- wsdl:types encapsulates schema definitions of communication types; here using xsd --> <!-- request GetLastTradePriceInput is of type TradePriceRequest --> <!-- request GetLastTradePriceOutput is of type TradePrice --> <!-- wsdl:portType describes messages in an operation --> <!-- wsdl:binding states a serialization protocol for this service --> <!-- wsdl:service names a new service "StockQuoteService" --> </wsdl:definitions>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
