WSDLException while parsing wsdl

When I am running wsdl2Java task I am getting the following error

[wsdl2java] [Fatal Error] StocksQuote.wsdl:11:34: The prefix "xsd" for element "xsd:schema" is not bound.
[wsdl2java] WSDLToJava Error: java.lang.RuntimeException: Fail to create wsdl definition from : file:/D:/Prasad/workspace_webservices/StockQuotation/StocksQuote.wsdl
[wsdl2java] Caused by : WSDLException: faultCode=PARSER_ERROR: Problem parsing 'file:/D:/Prasad/workspace_webservices/StockQuotation/StocksQuote.wsdl'.: The prefix "xsd" for element "xsd:schema" is not bound.

Below is my wsdl2java anttask and wsdl
///build file
	<taskdef name="wsdl2java"
	           classname="org.apache.cxf.ant.extensions.WSDL2JavaTask"
	  		   classpathref="lib.path"/>

	<target name="Wsdl2javaBuild">
		<echo level="info" message="Generating code using wsdl2java..."/>
		<mkdir dir="${temp}"/>
		<mkdir dir="${build.dir}"/>
		<wsdl2java wsdl="StocksQuote.wsdl" 
		           sourceDestDir="${temp}"
		           destDir="${build.dir}"/>
	</target>

////StocksQuote.wsdl
<definitions
  targetNamespace="http://com.stockquote/wsdl"
  xmlns="http://schemas.xmlsoap.org/wsdl/"
  xmlns:tns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote/wsdl"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  xmlns:types="http://com.stockquote">
   <types>
     <xsd:schema elementFormDefault="qualified"
        targetNamespace=
        "http://com.stockquote/">
          <import namespace=
                "http://com.stockquote/"
             location="StockQuote.xsd/" />
     </xsd:schema>
   </types>
   <message name="getStockQuoteReq">
     <part name="parameters" element="types:getStockQuote" />
   </message>
   <message name="getStockQuoteResp">
     <part name="parameters" element="types:getStockQuoteResponse" />
   </message>
   <portType name="StockQuotePortType">
        <operation name="getStockQuote">
             <input message="tns:getStockQuoteReq" />
             <output message="tns:getStockQuoteResp" />
        </operation>
   </portType>
<binding name="StockQuoteSOAPBinding" type="tns:StockQuotePortType">
           <soap:binding style="document"
              transport="http://schemas.xmlsoap.org/soap/http" />
           <operation name="getStockQuote">
                <soap:operation style="document" soapAction="getStockQuote" />
                <input>
                     <soap:body use="literal" />
                </input>
                <output>
                     <soap:body use="literal" />
                </output>
           </operation>
      </binding>
      <service name="StockQuoteService">
           <port name="StockQuoteSOAPPort" binding="tns:StockQuoteSOAPBinding">
                <soap:address
                   location=
                   "http://localhost:8080/AxisWeb/services/StockQuoteSOAPPort" />
           </port>
      </service>
</definitions>

Open in new window

prsubjectAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

VenabiliCommented:
You are missing
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
from the definitions (or any definition for xsd really)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
prsubjectAuthor Commented:
I added the above line it is giving the following error


    [echo] Generating code using wsdl2java...
[wsdl2java] WSDLToJava Error:
[wsdl2java]  Summary:  Failures: 1, Warnings: 0
[wsdl2java]  <<< ERROR!
[wsdl2java] file:/D:/Prasad/workspace_webservices/StockQuotation/src/com/stockquote/StocksQuote.wsdl:[46,80]
[wsdl2java]  Caused by {http://w3.ibm.com/schemas/services/2002/11/15/stockquote/wsdl}[binding:StockQuoteSOAPBinding] not exist.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.