axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ales St" <sta...@seznam.cz>
Subject wsdl definition problem
Date Sat, 10 Dec 2005 14:19:23 GMT
Hi,
I have a problem with my wsdl, because I don't knew how to define one thing 
in it. In my wsdl I import 2 external *.xsd files, one 
wms_schemas.xsd(namespace http://www.opengis.net/ows )  and second is 
StyledLayerDescriptor.xsd (namespace http://www.opengis.net/sld ) , when I 
tried to refer to type from ows namespace:
<wsdl:message name="getCapabilitiesRequest">
<wsdl:part name="version" type="ows:WmsVersionType"/>
</wsdl:message>
ewerything is ok. But when from sld namespace:
<wsdl:part name="StyledLayerDescriptor" type="sld:StyledLayerDescriptor"/>
And when I wantet to generate java classes from wsdl with wsdl2java it 
writes:
java.io.IOException: Type {http://www.opengis.net/sld}StyledLayerDescriptor 
is referenced but not defined.
        at 
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
        at 
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
        at 
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
        at 
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
        at java.lang.Thread.run(Unknown Source)
My wsdl and wms_schemas.xsd and StyledLayerDescriptor.xsd  is show down. 
StyledLayerDescriptor.xsd  is calling another xsd files,so them and also 
wsdl you can get here: http://sweb.cz/stanax/xsd.zip
Thank for help
                    Ales
wms.wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:Wms" 
xmlns:ows="http://www.opengis.net/ows" 
xmlns:sld="http://www.opengis.net/sld"
xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:Wms" 
xmlns:intf="urn:Wms" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:import namespace="http://www.opengis.net/ows" 
location="./wms_schemas.xsd"/>
<wsdl:import namespace="http://www.opengis.net/sld" 
location="../sld/1.0.20/StyledLayerDescriptor.xsd"/>
   <wsdl:message name="getMapResponse">
      <wsdl:part name="getMapReturn" type="soapenc:base64Binary"/>
   </wsdl:message>
   <wsdl:message name="getCapabilitiesRequest">
      <wsdl:part name="version" type="ows:WmsVersionType"/>
      <wsdl:part name="service" type="ows:ServiceType"/>
      <wsdl:part name="exceptions" type="ows:ExceptionType"/>
      <wsdl:part name="section" type="ows:CapabilitiesSectionType"/>
   </wsdl:message>
   <wsdl:message name="getCapabilitiesResponse">
      <wsdl:part name="getCapabilitiesReturn" type="soapenc:string"/>
   </wsdl:message>
   <wsdl:message name="getFeatureInfoResponse">
      <wsdl:part name="getFeatureInfoReturn" type="soapenc:string"/>
   </wsdl:message>
   <wsdl:message name="getFeatureInfoRequest">
      <wsdl:part name="version" type="ows:WmsVersionType"/>
      <wsdl:part name="service" type="ows:ServiceType"/>
      <wsdl:part name="exceptions" type="ows:ExceptionType"/>
  <wsdl:part name="Map" type="ows:MapType"/>
     <wsdl:part name="Image" type="ows:ImageType"/>
      <wsdl:part name="StyledLayerDescriptor" 
type="sld:StyledLayerDescriptor"/>
<wsdl:part name="QueryLayer" type="soapenc:string"/>
<wsdl:part name="InfoFormat" type="soapenc:string" />
<wsdl:part name="FeatureCount" type="soapenc:int" />
<wsdl:part name="x" type="soapenc:int" />
<wsdl:part name="y" type="soapenc:int" />
<wsdl:part name="Vendor" type="ows:Vendor" />
   </wsdl:message>
   <wsdl:message name="getMapRequest">
      <wsdl:part name="version" type="ows:WmsVersionType"/>
      <wsdl:part name="service" type="ows:ServiceType"/>
      <wsdl:part name="exceptions" type="ows:ExceptionType"/>
     <wsdl:part name="Map" type="ows:MapType"/>
      <wsdl:part name="Image" type="ows:ImageType"/>
     <wsdl:part name="StyledLayerDescriptor" 
type="sld:StyledLayerDescriptor"/>
   </wsdl:message>
   <wsdl:portType name="Wms">
      <wsdl:operation name="getMap" parameterOrder="version service 
exceptions Map Image StyledLayerDescriptor">
         <wsdl:input message="impl:getMapRequest" name="getMapRequest"/>
         <wsdl:output message="impl:getMapResponse" name="getMapResponse"/>
      </wsdl:operation>
      <wsdl:operation name="getCapabilities" parameterOrder="version service 
exceptions section">
         <wsdl:input message="impl:getCapabilitiesRequest" 
name="getCapabilitiesRequest"/>
         <wsdl:output message="impl:getCapabilitiesResponse" 
name="getCapabilitiesResponse"/>
      </wsdl:operation>
      <wsdl:operation name="getFeatureInfo" parameterOrder="version service 
exceptions Map Image StyledLayerDescriptor QueryLayer InfoFormat 
FeatureCount x y Vendor">
         <wsdl:input message="impl:getFeatureInfoRequest" 
name="getFeatureInfoRequest"/>
         <wsdl:output message="impl:getFeatureInfoResponse" 
name="getFeatureInfoResponse"/>
      </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name="wmsSoapBinding" type="impl:Wms">
      <wsdlsoap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="getMap">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="getMapRequest">
            <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:Wms" use="encoded"/>
         </wsdl:input>
         <wsdl:output name="getMapResponse">
            <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:Wms" use="encoded"/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="getCapabilities">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="getCapabilitiesRequest">
            <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:Wms" use="encoded"/>
         </wsdl:input>
         <wsdl:output name="getCapabilitiesResponse">
            <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:Wms" use="encoded"/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="getFeatureInfo">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="getFeatureInfoRequest">
            <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:Wms" use="encoded"/>
         </wsdl:input>
         <wsdl:output name="getFeatureInfoResponse">
            <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:Wms" use="encoded"/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="WmsService">
      <wsdl:port binding="impl:wmsSoapBinding" name="wms">
         <wsdlsoap:address 
location="http://localhost:8080/axis/services/wms"/>
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>





wms_schemas.xsd:

<?xml version="1.0" encoding="ISO-8859-2"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:sim="http://www.opengis.net/sim"
        xmlns:sld="http://www.opengis.net/sld"
        xmlns:ows="http://www.opengis.net/ows"
        xmlns:ogc="http://www.opengis.net/ogc"
        xmlns:gml="http://www.opengis.net/gml"
        targetNamespace="http://www.opengis.net/ows"
        elementFormDefault="qualified">

  <import namespace="http://www.opengis.net/sld" 
schemaLocation="../sld/1.0.20/StyledLayerDescriptor.xsd" />

<!-- **************************************************************** 
Request Attribute Group 
**************************************************************** -->
 <complexType name="CapabilitiesSectionType">

        <sequence minOccurs="0" maxOccurs="unbounded">
            <element name="RegEntry">
                <complexType>
                    <attribute name="regEntryId" type="string" 
use="required" />
                    <attribute name="updateSequence" type="int" 
use="optional" />
                </complexType>
            </element>
        </sequence>
    </complexType>
 <complexType name="MapType">
        <sequence>
            <element name="BoundingBox" type="gml:CoordinatesType" />
            <element name="Elevation" type="int" minOccurs="0" />
            <element name="Time" type="string" minOccurs="0" />
        </sequence>
    </complexType>

    <complexType name="ImageType">
        <sequence>
            <element name="Height" type="int" />
            <element name="Width" type="int" />
            <element name="Format" type="string" />
            <element name="Transparent" type="boolean" default="false" 
minOccurs="0" />
            <element name="BGColor" type="ows:ColorType" default="0xFFFFFF" 
minOccurs="0" />
        </sequence>
    </complexType>
    <!-- **************************************************************** 
BasicTypes 
**************************************************************** -->
    <complexType name="Vendor">
        <sequence>
            <element name="test" type="string" />
        </sequence>
    </complexType>
    <simpleType name="ExceptionType">
        <restriction base="token">
            <enumeration value="application_vnd_ogc_se_inimage" />
            <enumeration value="application_vnd_ogc_se_xml" />
            <enumeration value="application_vnd_ogc_se_blank" />
        </restriction>
    </simpleType>
<!-- ColorType -->
    <simpleType name="ColorType">
        <restriction base="token">
            <pattern value="0[xX][0-9a-fA-F]{6}" />
        </restriction>
    </simpleType>


    <!-- WmsVersionType -->
    <simpleType name="WmsVersionType">
        <restriction base="token">
            <enumeration value="1.1.1" />
        </restriction>
    </simpleType>
    <!-- ServiceType -->
    <simpleType name="ServiceType">
        <restriction base="token">
            <enumeration value="wms" />
            <enumeration value="wfs" />
            <enumeration value="wcs" />
        </restriction>
    </simpleType>
    <!-- **************************************************************** 
Other **************************************************************** -->
    <!-- These element are needed by .NET to generate HTTP Get binding -->
    <element name="base64Binary" type="base64Binary" nillable="true" />
    <element name="string" type="string" nillable="true" />
</schema>






StyledLayerDescriptor.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.opengis.net/sld"
            xmlns:sld="http://www.opengis.net/sld"
            xmlns:ogc="http://www.opengis.net/ogc"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            elementFormDefault="qualified">
  <xsd:include schemaLocation="FeatureStyle.xsd"/>
  <xsd:import namespace="http://www.opengis.net/ogc"
              schemaLocation="../../filter/1.0.0/filter.xsd"/>
<!--  
*********************************************************************** -->
  <xsd:annotation>
    <xsd:documentation>
      STYLED LAYER DESCRIPTOR version 1.0.20 (2002-09-21)
    </xsd:documentation>
  </xsd:annotation>
  <xsd:element name="StyledLayerDescriptor">
    <xsd:annotation>
      <xsd:documentation>
        A StyledLayerDescriptor is a sequence of styled layers, represented
        at the first level by NamedLayer and UserLayer elements.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="sld:Name" minOccurs="0"/>
        <xsd:element ref="sld:Description" minOccurs="0"/>
        <xsd:element ref="sld:EnvironmentVariables" minOccurs="0"/>
        <xsd:element ref="sld:UseSLDLibrary" minOccurs="0"
                                             maxOccurs="unbounded"/>
        <xsd:choice minOccurs="0" maxOccurs="unbounded">
          <xsd:element ref="sld:NamedLayer"/>
          <xsd:element ref="sld:UserLayer"/>
        </xsd:choice>
      </xsd:sequence>
      <xsd:attribute name="version" type="sld:VersionType" use="required"/>
    </xsd:complexType>
  </xsd:element>
<!--  
*********************************************************************** -->
  <xsd:annotation>
    <xsd:documentation>
      RUN-TIME ENVIRONMENT VARIABLES
    </xsd:documentation>
  </xsd:annotation>

  <xsd:element name="EnvironmentVariables">
    <xsd:annotation>
      <xsd:documentation>
        An "EnvironmentVariables" element includes an XML blob which
        can be used to declare the values to use for global environment
        variables during the execution of the styling operations.
        These variables may be refered to in styles and symbols in the
        same way as feature properties.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:any/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
<!--  
*********************************************************************** -->
  <xsd:annotation>
    <xsd:documentation>
      SLD LIBRARIES
    </xsd:documentation>
  </xsd:annotation>
  <xsd:element name="UseSLDLibrary">
    <xsd:annotation>
      <xsd:documentation>
        The UseSLDLibrary tag specifies that an external SLD document
        should be used as a "library" of named layers and styles to
        augment the set of named layers and styles that are available
        for use inside of a WMS.  In the event of name collisions, the
        SLD library takes precedence over the ones internal to the WMS.
        Any number of libraries may be specified in an SLD and each
        successive library takes precedence over the former ones in the
        case of name collisions.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="sld:OnlineResource"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
<!--  
*********************************************************************** -->
  <xsd:annotation>
    <xsd:documentation>
      LAYERS AND STYLES
    </xsd:documentation>
  </xsd:annotation>
  <xsd:element name="NamedLayer">
    <xsd:annotation>
      <xsd:documentation>
        A NamedLayer is a layer of data that has a name advertised by a WMS.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="sld:Name"/>
        <xsd:element ref="sld:Description" minOccurs="0"/>
        <xsd:element ref="sld:LayerFeatureConstraints" minOccurs="0"/>
        <xsd:choice minOccurs="0" maxOccurs="unbounded">
          <xsd:element ref="sld:NamedStyle"/>
          <xsd:element ref="sld:UserStyle"/>
        </xsd:choice>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="NamedStyle">
    <xsd:annotation>
      <xsd:documentation>
        A NamedStyle is used to refer to a style that has a name in a WMS.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="sld:Name"/>
        <xsd:element ref="sld:Description" minOccurs="0"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="UserLayer">
    <xsd:annotation>
      <xsd:documentation>
        A UserLayer allows a user-defined layer to be built from WFS and
        WCS data.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="sld:Name" minOccurs="0"/>
        <xsd:element ref="sld:Description" minOccurs="0"/>
        <xsd:element ref="sld:RemoteOWS" minOccurs="0"/>
        <xsd:element ref="sld:LayerFeatureConstraints"/>
        <xsd:element ref="sld:UserStyle" maxOccurs="unbounded"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="RemoteOWS">
    <xsd:annotation>
      <xsd:documentation>
        A RemoteOWS gives a reference to a remote WFS/WCS/other-OWS server.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="sld:Service"/>
        <xsd:element ref="sld:OnlineResource"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="Service">
    <xsd:annotation>
      <xsd:documentation>
        A Service refers to the type of a remote OWS server.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:simpleType>
      <xsd:restriction base="xsd:string">
        <xsd:enumeration value="WFS"/>
        <xsd:enumeration value="WCS"/>
      </xsd:restriction>
    </xsd:simpleType>
  </xsd:element>
  <xsd:element name="LayerFeatureConstraints">
    <xsd:annotation>
      <xsd:documentation>
        LayerFeatureConstraints define what features &amp; feature types are
        referenced in a layer.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="sld:FeatureTypeConstraint" maxOccurs="unbounded"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="FeatureTypeConstraint">
    <xsd:annotation>
      <xsd:documentation>
        A FeatureTypeConstraint identifies a specific feature type and
        supplies fitlering.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="sld:FeatureTypeName" minOccurs="0"/>
        <xsd:element ref="ogc:Filter" minOccurs="0"/>
        <xsd:element ref="sld:Extent" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="Extent">
    <xsd:annotation>
      <xsd:documentation>
        An Extent gives feature/coverage/raster/matrix dimension extent.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="sld:Name"/>
        <xsd:element ref="sld:Value"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="Value" type="xsd:string"/>
  <xsd:element name="UserStyle">
    <xsd:annotation>
      <xsd:documentation>
        A UserStyle allows user-defined styling and is semantically
        equivalent to a WMS named style.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="sld:Name" minOccurs="0"/>
        <xsd:element ref="sld:Description" minOccurs="0"/>
        <xsd:element ref="sld:IsDefault" minOccurs="0"/>
        <xsd:element ref="sld:FeatureStyle" maxOccurs="unbounded"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="IsDefault" type="xsd:boolean"/>
</xsd:schema> 

Mime
View raw message