.NET has problems with imports. That's why it works when you embed the
schema, but not when you import it.

Anne

On 6/15/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Heya,
> 
>         I'm fairly new to Axis, so hopefully I'm not missing something too 
> obvious or have bad search skills(I've been searching and researching and 
> haven't come up with an answer).  I managed to get an example service using 
> Axis/Castor (the example from the IBM site) working using the generated jars; 
> a client java application using the generated client classes returns the 
> right information.  Per the example, there is an .xsd file whose namespace is 
> imported into the WSDL.  However, when my coworker captures the generated 
> WSDL from the server using XMLSpy and .Net's wsdl.exe, it cannot define the 
> return type (quote).  Is there some way to expose the external schema file 
> via the generated WSDL?  We've noticed that if we imbed the information from 
> the XSD file directly into the WSDL everything is all good, but I'm guessing 
> that Castor requires the use of a separate Schema file.  I've included the 
> files below for reference.
> 
>                         Thanks,
>                                 Anna
> 
> XSD
> ===
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema
>         xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>         targetNamespace="http://w3.ibm.com/schemas/services/stockquote";
>         xmlns="http://w3.ibm.com/schemas/services/stockquote";>
> 
>         <xsd:element name="quote">
>                 <xsd:complexType>
>                         <xsd:sequence>
>                                 <xsd:element name="symbol" type="xsd:string"/>
>                                 <xsd:element name="volume" 
> type="xsd:integer"/>
>                                 <xsd:element name="lastTrade" 
> type="lastTradeType"/>
>                                 <xsd:element name="change" type="changeType"/>
>                         </xsd:sequence>
>                 </xsd:complexType>
>         </xsd:element>
> 
>         <xsd:complexType name="changeType">
>                 <xsd:sequence>
>                         <xsd:element name="dollar" type="xsd:float"/>
>                         <xsd:element name="percent" type="xsd:float"/>
>                         <xsd:element name="positive" type="xsd:boolean"/>
>                 </xsd:sequence>
>         </xsd:complexType>
> 
>         <xsd:complexType name="lastTradeType">
>                 <xsd:sequence>
>                         <xsd:element name="price" type="xsd:float"/>
>                         <xsd:element name="date" type="xsd:long"/>
>                 </xsd:sequence>
>         </xsd:complexType>
> 
>         <!-- Methods signatures -->
>         <xsd:element name="getStockQuote">
>                 <xsd:complexType>
>                         <xsd:sequence>
>                                 <xsd:element name="symbol" type="xsd:string"/>
>                         </xsd:sequence>
>                 </xsd:complexType>
>         </xsd:element>
>         <xsd:element name="getStockQuoteResponse">
>                 <xsd:complexType>
>                         <xsd:sequence>
>                                 <xsd:element ref="quote" />
>                         </xsd:sequence>
>                 </xsd:complexType>
>         </xsd:element>
> 
> </xsd:schema>
> 
> 
> WSDL (ORIGINAL FILE)
> =====
> <definitions 
> targetNamespace="http://w3.ibm.com/schemas/services/stockquote/wsdl";
>         xmlns="http://schemas.xmlsoap.org/wsdl/";
>         xmlns:tns="http://w3.ibm.com/schemas/services/stockquote/wsdl";
>         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
>         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>         xmlns:types="http://w3.ibm.com/schemas/services/stockquote";
>         xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>         >
>         <types>
>         <xsd:schema 
> targetNamespace="http://w3.ibm.com/schemas/services/stockquote/wsdl";
>                 xmlns:types="xmlns:types"
>                 xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>                 <xsd:import 
> namespace="http://w3.ibm.com/schemas/services/stockquote";
>                         schemaLocation="../xsd/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://10.10.10.85/axis/services/StockQuoteSOAPPort"; />
>                 </port>
>         </service>
> 
> </definitions>
> 
> 
> GENERATED WSLD (USING ?WSDL)
> ==============================
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions 
> targetNamespace="http://w3.ibm.com/schemas/services/stockquote/wsdl"; 
> xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
> xmlns:impl="http://w3.ibm.com/schemas/services/stockquote/wsdl"; 
> xmlns:intf="http://w3.ibm.com/schemas/services/stockquote/wsdl"; 
> xmlns:tns1="http://w3.ibm.com/schemas/services/stockquote"; 
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
> <!--WSDL created by Apache Axis version: 1.2
> Built on May 03, 2005 (02:20:24 EDT)-->
>  <wsdl:types>
>   <schema elementFormDefault="qualified" 
> targetNamespace="http://w3.ibm.com/schemas/services/stockquote"; 
> xmlns="http://www.w3.org/2001/XMLSchema";>
>    <element name="getStockQuote">
>     <complexType>
>      <sequence>
>       <element name="symbol" type="xsd:string"/>
>      </sequence>
>     </complexType>
>    </element>
>    <element name="getStockQuoteResponse">
>     <complexType>
>      <sequence>
>       <element name="quote" type="tns1:quote"/>
>      </sequence>
>     </complexType>
>    </element>
>   </schema>
>  </wsdl:types>
> 
>    <wsdl:message name="getStockQuoteResponse">
> 
>       <wsdl:part element="tns1:getStockQuoteResponse" name="parameters"/>
> 
>    </wsdl:message>
> 
>    <wsdl:message name="getStockQuoteRequest">
> 
>       <wsdl:part element="tns1:getStockQuote" name="parameters"/>
> 
>    </wsdl:message>
> 
>    <wsdl:portType name="StockQuotePortType">
> 
>       <wsdl:operation name="getStockQuote">
> 
>          <wsdl:input message="impl:getStockQuoteRequest" 
> name="getStockQuoteRequest"/>
> 
>          <wsdl:output message="impl:getStockQuoteResponse" 
> name="getStockQuoteResponse"/>
> 
>       </wsdl:operation>
> 
>    </wsdl:portType>
> 
>    <wsdl:binding name="StockQuoteSOAPPortSoapBinding" 
> type="impl:StockQuotePortType">
> 
>       <wsdlsoap:binding style="document" 
> transport="http://schemas.xmlsoap.org/soap/http"/>
> 
>       <wsdl:operation name="getStockQuote">
> 
>          <wsdlsoap:operation soapAction="getStockQuote"/>
> 
>          <wsdl:input name="getStockQuoteRequest">
> 
>             <wsdlsoap:body use="literal"/>
> 
>          </wsdl:input>
> 
>          <wsdl:output name="getStockQuoteResponse">
> 
>             <wsdlsoap:body use="literal"/>
> 
>          </wsdl:output>
> 
>       </wsdl:operation>
> 
>    </wsdl:binding>
> 
>    <wsdl:service name="StockQuoteService">
> 
>       <wsdl:port binding="impl:StockQuoteSOAPPortSoapBinding" 
> name="StockQuoteSOAPPort">
> 
>          <wsdlsoap:address 
> location="http://10.10.10.85/axis/services/StockQuoteSOAPPort"/>
> 
>       </wsdl:port>
> 
>    </wsdl:service>
> 
> </wsdl:definitions>
> 
> 
> ========================
> SunGard Advisor Technologies
>

Reply via email to