Ananth,
The schema should be imported with "schemaLocation" not "location".
Tom Gordon
Ananth T. Sarathy wrote:
I tried that, but I keep getting errors. Is there something I am doing
wrong with these? The WSDL2Java is giving me an error that SearchText
isrefrenced not defined but it is defined in the xsd
Any help is appreciated
On Tue, 01 Feb 2005 14:52:59 +0900, Bill Keese
<[EMAIL PROTECTED]> wrote:
Do you know of any ways to create wsdls using the castor objects?
One thing you can do is to import your XSD into your WSDL file.
See http://www-106.ibm.com/developerworks/webservices/library/ws-castor/
Bill
------------------------------------------------------------------------
<xsd:schema elementFormDefault="qualified"
targetNamespace="http://xml.ws.pko.dia.mil"
xmlns="http://xml.ws.pko.dia.mil"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="DaysWithin">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="One Day"/>
<xsd:enumeration value="Three Days"/>
<xsd:enumeration value="One Week"/>
<xsd:enumeration value="Two Weeks"/>
<xsd:enumeration value="Thirty Days"/>
<xsd:enumeration value="All"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="SortBy">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="OrganizationSort"/>
<xsd:enumeration value="PublicationDate"/>
<xsd:enumeration value="TitleSort"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="OrderBy">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="ORG_ID"/>
<xsd:enumeration value="PUBLICATION_DATE"/>
<xsd:enumeration value="TITLE"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="CountryTrigraph">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="3"/>
<xsd:length value="3"/>
<xsd:minLength value="3"/>
<xsd:whiteSpace value="collapse"/>
<xsd:pattern value="[A-Z][A-Z][A-Z]"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:complexType name="SearchText">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="text"
type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="numberOfProducts"
type="xsd:int"/>
<xsd:element maxOccurs="0" minOccurs="1" ref="SortBy"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="SearchParameters">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0"
ref="CountryTrigraph"/>
<xsd:element maxOccurs="1" minOccurs="0" name="crisis"
type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="numberOfProducts"
type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="OrderBy"/>
<xsd:element maxOccurs="1" minOccurs="0" name="topicID"
type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1"
ref="DaysWithin"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="ProductSummary">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="classification"
type="xsd:string"/>
<xsd:element name="organization"
type="xsd:string"/>
<xsd:element name="publicationDate"
type="xsd:date"/>
<xsd:element name="summary" type="xsd:string"/>
<xsd:element name="title" type="xsd:string"/>
<xsd:element name="url" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ProductSummaries">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0"
name="coreKnowledge" type="xsd:string"/>
<xsd:element maxOccurs="100" minOccurs="0"
ref="ProductSummary"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Topic">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="dta" nillable="true"
type="xsd:string"/>
<xsd:element name="id" type="xsd:long"/>
<xsd:element name="name" nillable="true"
type="xsd:string"/>
<xsd:element name="shortName" nillable="true"
type="xsd:string"/>
<xsd:element maxOccurs="unbounded" minOccurs="0"
ref="Topic"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DefenseIssues">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0"
ref="Topic"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DefenseTopicAreas">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0"
ref="Topic"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="Taxonomy">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1"
ref="DefenseTopicAreas"/>
<xsd:element maxOccurs="1" minOccurs="1"
ref="DefenseIssues"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="retrieveProducts">
<xsd:complexType>
<xsd:element maxOccurs="1" minOccurs="1"
ref="SearchParameters"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="retrieveProductsResponse">
<xsd:complexType>
<xsd:element maxOccurs="1" minOccurs="1"
ref="ProductSummaries"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="retrieveTextSearchProducts">
<xsd:complexType>
<xsd:element maxOccurs="1" minOccurs="1"
ref="SearchText"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="retrieveTextSearchProductsResponse">
<xsd:complexType>
<xsd:element maxOccurs="1" minOccurs="1"
ref="ProductSummaries"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="retrieveTaxonomy"></xsd:element>
<xsd:element name="retrieveTaxonomyResponse">
<xsd:complexType>
<xsd:element maxOccurs="1" minOccurs="1"
ref="Taxonomy"/>
</xsd:complexType>
</xsd:element>
</xsd:schema
------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace="http://xml.ws.pko.dia.mil" xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:tns="http://xml.ws.pko.dia.mil" xmlns:types="http://xml.ws.pko.dia.mil"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<types>
<xsd:schema elementFormDefault="qualified" targetNamespace="http://xml.ws.pko.dia.mil"
xmlns="http://xml.ws.pko.dia.mil" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<import location="cko.xsd"
namespace="http://xml.ws.pko.dia.mil"/>
</xsd:schema>
</types>
<message name="retrieveTaxonomyRequest">
</message>
<message name="retrieveTaxonomyResponse">
<part element="types:Taxonomy" name="parameters"/>
</message>
<message name="retrieveTextSearchProductsRequest">
<part element="types:SearchText" name="parameters"/>
</message>
<message name="retrieveTextSearchProductsResponse">
<part element="types:ProductSummaries" name="parameters"/>
</message>
<message name="retrieveProductsResponse">
<part element="types:ProductSummaries" name="parameters"/>
</message>
<message name="retrieveProductsRequest">
<part element="types:SearchParameters" name="parameters"/>
</message>
<portType name="CKO">
<operation name="retrieveProducts">
<input message="tns:retrieveProductsRequest"/>
<output message="tns:retrieveProductsResponse"/>
</operation>
<operation name="retrieveTextSearchProducts">
<input message="tns:retrieveTextSearchProductsRequest"
/>
<output
message="tns:retrieveTextSearchProductsResponse"/>
</operation>
<operation name="retrieveTaxonomy">
<input message="tns:retrieveTaxonomyRequest"/>
<output message="tns:retrieveTaxonomyResponse"/>
</operation>
</portType>
<binding name="CKOSoapBinding" type="tns:CKO">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="retrieveProducts">
<wsdlsoap:operation soapAction="retrieveProducts"
style="document"/>
<input>
<wsdlsoap:body use="literal"/>
</input>
<output>
<wsdlsoap:body use="literal"/>
</output>
</operation>
<operation name="retrieveTextSearchProducts">
<wsdlsoap:operation style="document"
soapAction="retrieveTextSearchProducts"/>
<input>
<wsdlsoap:body use="literal"/>
</input>
<output >
<wsdlsoap:body use="literal"/>
</output>
</operation>
<operation name="retrieveTaxonomy">
<wsdlsoap:operation soapAction="retrieveTaxonomy"
style="document"/>
<input>
<wsdlsoap:body use="literal"/>
</input>
<output>
<wsdlsoap:body use="literal"/>
</output>
</operation>
</binding>
<service name="CKOService">
<port binding="tns:CKOSoapBinding" name="CKO">
<wsdlsoap:address
location="http://localhost/services/"/>
</port>
</service>
</definitions