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

using a SimpleType (schema/namespace not found)

Expand Messages
  • spacemanbow
    Hello, Some time ago I created a SOAP simulator to be able to easily test the various combinations of our webservices. Currently I am having problems though to
    Message 1 of 1 , Jun 14, 2004
    • 0 Attachment
      Hello,

      Some time ago I created a SOAP simulator to be able to easily test
      the various combinations of our webservices. Currently I am having
      problems though to use a custom defined type (enumeration)

      The following script is a representation of what is done in the
      simulator.


      my $data=[];
      $soap = new SOAP::Lite->service($soapUrl);

      push (@$data,SOAP::Data->value(SOAP::Data->name('Par1' => 'Test' )));
      push (@$data,SOAP::Data->value(SOAP::Data->name('Par2' => 'of' )));
      push (@$data,SOAP::Data->value(SOAP::Data->name('Par3'
      => 'WebService')->type('ServiceType) ));

      $soap->testSuite(@$data);


      This is the definition of the message in the wsdl
      - <wsdl:message name="testSuite">
      <wsdl:part name="Par1" type="xsd:string" />
      <wsdl:part name="Par2" type="xsd:string" />
      <wsdl:part name="Par3" type="impl:ServiceType" />
      </wsdl:message>

      - <simpleType name="ServiceType">
      - <restriction base="xsd:string">
      <enumeration value="WebService" />
      <enumeration value="OtherService" />
      </restriction>
      </simpleType>


      I always keep getting the error:
      'Schema/namespace for type 'ServiceType' is not specified'

      I already tried adding the xmlns attribute, or the uri attribute...
      push (@$data,SOAP::Data->value(SOAP::Data->name('Par3'
      => 'WebService')->type('ServiceType) )->);

      Does anyone know what I might be overlooking here?

      Thanks in advance!
    Your message has been successfully submitted and would be delivered to recipients shortly.