Loading ...
Sorry, an error occurred while loading the content.

1675WSDL call uses a unknown namespace

Expand Messages
  • jeromesonnet2002
    Jul 4, 2002
    • 0 Attachment
      Hi,

      I'm trying to connect to a WASP SOAP service using WSDL. Everything
      works just
      fine but one wrong namespace (the MapRequest one).

      Here is the WSDL document:

      --------------------------------------------------
      -----------------------
      <?xml version='1.0'?>
      <definitions targetNamespace='http://www.opengis.net/wms/soap'
      xmlns:wms='http://www.opengis.net/wms/soap'
      xmlns:xsd='http://www.w3.org/2001/XMLSchema'
      xmlns:tns='http://www.opengis.net/wms/soap'
      xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
      xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
      xmlns='http://schemas.xmlsoap.org/wsdl/'>
      <types>
      <xsd:schema
      targetNamespace="http://www.opengis.net/wms/soap">
      <xsd:import
      namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
      <xsd:import
      namespace="http://schemas.xmlsoap.org/wsdl/"/>
      <xsd:simpleType name="ServiceValueType">
      <xsd:restriction base="xsd:string">
      <xsd:enumeration value="WMS"/>
      </xsd:restriction>
      </xsd:simpleType>
      <xsd:complexType name="BBoxType">
      <xsd:sequence>
      <xsd:element name="SRS" type="xsd:string"/>
      <xsd:element name="MinX" type="xsd:float"/>
      <xsd:element name="MinY" type="xsd:float"/>
      <xsd:element name="MaxX" type="xsd:float"/>
      <xsd:element name="MaxY" type="xsd:float"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="NamedObject">
      <xsd:sequence>
      <xsd:element name="Name" type="xsd:string"/>
      <xsd:element name="Title" type="xsd:string"/>
      <xsd:element name="Abstract" type="xsd:string"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="ArrayOfLayers">
      <xsd:complexContent mixed="false">
      <xsd:restriction base="soapenc:Array">
      <xsd:attribute d7p1:arrayType="wms:Layer[]"
      ref="soapenc:arrayType"

      xmlns:d7p1="http://schemas.xmlsoap.org/wsdl/"/>
      </xsd:restriction>
      </xsd:complexContent>
      </xsd:complexType>
      <xsd:complexType name="ArrayOfString">
      <xsd:complexContent mixed="false">
      <xsd:restriction base="soapenc:Array">
      <xsd:attribute d7p1:arrayType="xsd:string[]"
      ref="soapenc:arrayType"

      xmlns:d7p1="http://schemas.xmlsoap.org/wsdl/"/>
      </xsd:restriction>
      </xsd:complexContent>
      </xsd:complexType>
      <xsd:complexType name="Layer">
      <xsd:complexContent>
      <xsd:extension base="wms:NamedObject">
      <xsd:sequence>
      <xsd:element name="opaque"
      type="xsd:boolean"/>
      <xsd:element name="queryable"
      type="xsd:boolean"/>
      <xsd:element name="LatLongBox"
      type="wms:BBoxType"/>
      <xsd:element name="BoundingBox"
      type="wms:BBoxType"/>
      <xsd:element name="Layers"
      type="wms:ArrayOfLayers"/>
      <xsd:element name="Styles"
      type="wms:ArrayOfString"/>
      <xsd:element name="SRS"
      type="wms:ArrayOfString"/>
      <xsd:element name="Formats"
      type="wms:ArrayOfString"/>
      </xsd:sequence>
      </xsd:extension>
      </xsd:complexContent>
      </xsd:complexType>
      <xsd:complexType name="ImageSizeType">
      <xsd:sequence>
      <xsd:element name="Width" type="xsd:integer"/>
      <xsd:element name="Height" type="xsd:integer"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="MapServiceDescription">
      <xsd:complexContent>
      <xsd:extension base="wms:NamedObject">
      <xsd:sequence>
      <xsd:element name="LatLongBox"
      type="wms:BBoxType"/>
      <xsd:element name="BoundingBox"
      type="wms:BBoxType"/>
      <xsd:element name="Layers"
      type="wms:ArrayOfLayers"/>
      </xsd:sequence>
      </xsd:extension>
      </xsd:complexContent>
      </xsd:complexType>
      <xsd:complexType name="LayerStyle">
      <xsd:sequence>
      <xsd:element name="Layer" type="xsd:string"/>
      <xsd:element name="Style" type="xsd:string"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="ArrayOfLayerStyle">
      <xsd:complexContent mixed="false">
      <xsd:restriction base="soapenc:Array">
      <xsd:attribute
      d7p1:arrayType="wms:LayerStyle[]"
      ref="soapenc:arrayType"

      xmlns:d7p1="http://schemas.xmlsoap.org/wsdl/"/>
      </xsd:restriction>
      </xsd:complexContent>
      </xsd:complexType>
      <xsd:complexType name="MapRequest">
      <xsd:sequence>
      <xsd:element name="Format" type="xsd:string"/>
      <xsd:element name="ImageSize"
      type="wms:ImageSizeType"/>
      <xsd:element name="BGColor" type="xsd:string"/>
      <xsd:element name="Transparent"
      type="xsd:boolean"/>
      <xsd:element name="BoundingBox"
      type="wms:BBoxType"/>
      <xsd:element name="Layers"
      type="wms:ArrayOfLayerStyle"/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:schema>

      </types>
      <message name='GetCapabilitiesSoapOut'>
      <part name='service' type='tns:MapServiceDescription'/>
      </message>
      <message name='GetCapabilitiesSoapIn'>
      <part name='serviceType' type='tns:ServiceValueType'/>
      </message>
      <message name='GetMapSoapIn'>
      <part name='maprequest' type='tns:MapRequest'/>
      </message>
      <message name='GetMapSoapOut'>
      <part name='map' type='xsd:base64Binary'/>
      </message>
      <portType name='MapServiceSoap'>
      <operation name='GetCapabilities'>
      <input message='tns:GetCapabilitiesSoapIn'/>
      <output message='tns:GetCapabilitiesSoapOut'/>
      </operation>
      <operation name='GetMap'>
      <input message='tns:GetMapSoapIn'/>
      <output message='tns:GetMapSoapOut'/>
      </operation>
      </portType>
      <binding name='MapServiceSoap' type='tns:MapServiceSoap'>
      <soap:binding
      transport='http://schemas.xmlsoap.org/soap/http'
      style='rpc'/>
      <operation name='GetCapabilities'>
      <soap:operation
      soapAction='http://lithium:6060/map/GetCapabilities'

      style='rpc'/>
      <input>
      <soap:body use='encoded'
      encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
      namespace='http://www.opengis.net/wms/soap'/>
      </input>
      <output>
      <soap:body use='encoded'
      encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
      namespace='http://www.opengis.net/wms/soap'/>
      </output>
      </operation>
      <operation name='GetMap'>
      <soap:operation
      soapAction='http://lithium:6060/map/GetMap'
      style='rpc'/>
      <input>
      <soap:body use='encoded'
      encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
      namespace='http://www.opengis.net/wms/soap'/>
      </input>
      <output>
      <soap:body use='encoded'
      encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
      namespace='http://www.opengis.net/wms/soap'/>
      </output>
      </operation>
      </binding>
      <service name='MapService'>
      <port name='MapService' binding='tns:MapServiceSoap'>
      <soap:address location='http://lithium:6060/map/'/>
      </port>
      </service>
      </definitions>
      --------------------------------------------------
      ------------------------

      Here is the code I try :

      --------------------------------------------------
      ------------------------

      use SOAP::Lite +trace;

      my $soap = SOAP::Lite
      ->uri('http://www.opengis.net/wms/soap')
      ->service('http://lithium.ionicsoft.com:6060/map/');

      $soap->serializer->maptype->{MapRequest} =
      'http://www.opengis.net/wms/soap';

      my $query = bless {
      Format => "image/gif"
      } => 'maprequest';

      print $soap->GetMap($query);

      --------------------------------------------------
      ------------------------

      And here is the sent envelope :

      --------------------------------------------------
      ------------------------
      <?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"

      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema">
      <SOAP-ENV:Body>
      <namesp1:GetMap xmlns:namesp1="http://www.opengis.net/wms/soap">
      <maprequest xsi:type="tns:MapRequest">
      <Format xsi:type="xsd:string">image/gif</Format>
      </maprequest>
      </namesp1:GetMap>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
      --------------------------------------------------
      ------------------------

      As you can see, the type xsi:type="tns:MapRequest" use an unknown
      namespace prefix 'tns'.

      Have you an idea to fix this one?

      Many thanks,
      Jerome.