Hi Yunxi,

I went through the wsdl you have provided me (
http://www.w3.org/TR/wsdl#_wsdl). There I found several issues as listed
below.

1. Port defined for the "StockQuotePort" in the "StockQuoteService" has an
incorrect binding  as tns:StockQuoteBinding.
    The correct binding is "tns:StockQuoteSoapBinding".

2. WSDl file refers to the older version of xml schema as xmlns="
http://www.w3.org/2000/10/XMLSchema";
    Latest version of the schema is  xmlns="http://www.w3.org/2001/XMLSchema";.


Here I have attached the correct version of the WSDL file for the same
example. Please use this wsdl file for your code generation.

Thanks and Regards,
Harshana Martin

On 8 August 2011 08:29, Harshana Eranga Martin <[email protected]> wrote:

> Hi Yunxi,
>
> Thanks a lot for the detailed explanation. I'll look in to it and get back
> to you.
>
> Thanks and Regards,
> Harshana
>
> 2011/8/8 Yunxi Zhang <[email protected]>
>
>>  Hi, Harshana,
>>
>> Thank you for your reply. The wsdl sample file i used is the different one
>> from yours, which i got from http://www.w3.org/TR/wsdl shown below:
>>
>> <?xml version="1.0"?>
>>
>> <definitions name="StockQuote"
>>
>>
>> targetNamespace="http://example.com/stockquote.wsdl";
>>
>>           xmlns:tns="http://example.com/stockquote.wsdl";
>>
>>           xmlns:xsd1="http://example.com/stockquote.xsd";
>>
>>           xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
>>
>>           xmlns="http://schemas.xmlsoap.org/wsdl/";>
>>
>>
>>     <types>
>>
>>        <schema targetNamespace="http://example.com/stockquote.xsd";
>>
>>               xmlns="http://www.w3.org/2000/10/XMLSchema";>
>>
>>            <element name="TradePriceRequest">
>>
>>               <complexType>
>>
>>                   <all>
>>
>>                       <element name="tickerSymbol" type="string"/>
>>
>>                   </all>
>>
>>               </complexType>
>>
>>            </element>
>>
>>            <element name="TradePrice">
>>
>>               <complexType>
>>
>>                   <all>
>>
>>                       <element name="price" type="float"/>
>>
>>                   </all>
>>
>>               </complexType>
>>
>>            </element>
>>
>>        </schema>
>>
>>     </types>
>>
>>
>>     <message name="GetLastTradePriceInput">
>>
>>         <part name="body" element="xsd1:TradePriceRequest"/>
>>
>>     </message>
>>
>>
>>     <message name="GetLastTradePriceOutput">
>>
>>         <part name="body" element="xsd1:TradePrice"/>
>>
>>     </message>
>>
>>
>>     <portType name="StockQuotePortType">
>>
>>         <operation name="GetLastTradePrice">
>>
>>            <input message="tns:GetLastTradePriceInput"/>
>>
>>            <output message="tns:GetLastTradePriceOutput"/>
>>
>>         </operation>
>>
>>     </portType>
>>
>>
>>     <binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
>>
>>         <soap:binding style="document" transport="
>> http://schemas.xmlsoap.org/soap/http"/>
>>
>>         <operation name="GetLastTradePrice">
>>
>>            <soap:operation soapAction="
>> http://example.com/GetLastTradePrice"/>
>>
>>            <input>
>>
>>                <soap:body use="literal"/>
>>
>>            </input>
>>
>>            <output>
>>
>>                <soap:body use="literal"/>
>>
>>            </output>
>>
>>         </operation>
>>
>>     </binding>
>>
>>
>>     <service name="StockQuoteService">
>>
>>         <documentation>My first service</documentation>
>>
>>         <port name="StockQuotePort" binding="tns:StockQuoteBinding">
>>
>>            <soap:address location="http://example.com/stockquote"/>
>>
>>         </port>
>>
>>     </service>
>>
>>
>> </definitions>
>>
>>
>> But, I'm not sure if different wsdl files can make the result different.
>> The plugin I used just popped up a warning window in the last step shown in
>> figure below:
>>
>>
>> After I clicked on the finish button, a warning window just popped up with
>> errors
>>
>>
>> Sorry, I have no idea how to print out the stack trace for this error
>> message. Could you tell me how to do that?
>>
>>
>> By the way, the IDE i used is myEclipse 8.6, the version of axis2.jar is
>> 1.6.0, and the os is Mac os 10.6.8.
>>
>>
>> Hope this information is clear.
>>
>>
>> Many thanks
>>
>>
>> Yunxi
>>
>>
>>
>>
>> ------------------------------
>> From: [email protected]
>> Date: Sun, 7 Aug 2011 22:44:15 +0530
>> Subject: Re: wsdl2java eclipse plugin error
>> To: [email protected]
>>
>>
>> Hi Yunxi,
>>
>> On 7 August 2011 20:00, Yunxi Zhang <[email protected]> wrote:
>>
>> Hi, guys,
>>
>> I'm using the wsdl2java eclipse plugin to generate a java file from a wsdl
>> file which is sample wsdl file from w3c web site .
>>
>>
>> I believe you are referring to
>> http://www.w3schools.com/webservices/tempconvert.asmx?wsdl. I used this
>> and was able generate both skeleton and client without any issue.
>>
>> But i got an error in the last step where popped up a window giving the
>> information "An error occurred while completing process
>> -java.lang.InterruptedException".
>>
>>
>> You might have got the error message after the above text in the message
>> box. Can you let us know the complete error message and the stack trace on
>> your console?
>>
>> Thanks and Regards,
>> Harshana Martin
>>
>> I've search this error information on line, but found out other users got
>> the different error information like mine. Has anyone got any idea about
>> this? Thank you.
>>
>> Best regards,
>>
>> Yunxi
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>>
>>
>> --
>> Harshana Eranga Martin
>> Software Engineer,
>> WSO2 Inc.
>> Web: http://wso2.com
>>            http://wso2.org
>>
>> ECF Committer: http://www.eclipse.org/ecf/
>> Blog: http://harshana05.blogspot.com
>> Profile: https://www.google.com/profiles/harshana05
>>
>>
>
>
> --
> Thanks and Regards,
> Harshana Martin
> --
> Harshana Eranga Martin
> Software Engineer,
> WSO2 Inc.
> Web: http://wso2.com
>            http://wso2.org
>
> ECF Committer: http://www.eclipse.org/ecf/
> Blog: http://harshana05.blogspot.com
> Profile: https://www.google.com/profiles/harshana05
>
>
--
Harshana Eranga Martin
Software Engineer,
WSO2 Inc.
Web: http://wso2.com
           http://wso2.org

ECF Committer: http://www.eclipse.org/ecf/
Blog: http://harshana05.blogspot.com
Profile: https://www.google.com/profiles/harshana05
<?xml version="1.0"?>
<definitions name="StockQuote"

targetNamespace="http://example.com/stockquote.wsdl";
          xmlns:tns="http://example.com/stockquote.wsdl";
          xmlns:xsd1="http://example.com/stockquote.xsd";
          xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
          xmlns="http://schemas.xmlsoap.org/wsdl/";>

    <types>
       <schema targetNamespace="http://example.com/stockquote.xsd";
              xmlns="http://www.w3.org/2001/XMLSchema";>
           <element name="TradePriceRequest">
              <complexType>
                  <all>
                      <element name="tickerSymbol" type="string"/>
                  </all>
              </complexType>
           </element>
           <element name="TradePrice">
              <complexType>
                  <all>
                      <element name="price" type="float"/>
                  </all>
              </complexType>
           </element>
       </schema>
    </types>

    <message name="GetLastTradePriceInput">
        <part name="body" element="xsd1:TradePriceRequest"/>
    </message>

    <message name="GetLastTradePriceOutput">
        <part name="body" element="xsd1:TradePrice"/>
    </message>

    <portType name="StockQuotePortType">
        <operation name="GetLastTradePrice">
           <input message="tns:GetLastTradePriceInput"/>
           <output message="tns:GetLastTradePriceOutput"/>
        </operation>
    </portType>

    <binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="GetLastTradePrice">
           <soap:operation soapAction="http://example.com/GetLastTradePrice"/>
           <input>
               <soap:body use="literal"/>
           </input>
           <output>
               <soap:body use="literal"/>
           </output>
        </operation>
    </binding>

    <service name="StockQuoteService">
        <documentation>My first service</documentation>
        <port name="StockQuotePort" binding="tns:StockQuoteSoapBinding">
           <soap:address location="http://example.com/stockquote"/>
        </port>
    </service>

</definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to