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

WSDL Generation with SOAP::Data / SOAP::Lite

Expand Messages
  • profhoward99
    I ve been mucking around with SOAP::Lite for a few days. I need to create a service and have a WSDL file available for clients. I ve tried to use
    Message 1 of 1 , May 5, 2005
    • 0 Attachment
      I've been mucking around with SOAP::Lite for a few days. I need to create a service and
      have a WSDL file available for clients. I've tried to use WSDL::Generator, but it doesn't
      seem to like it when I specifically specify server data types in SOAP::Lite using SOAP::Data.

      When I use SOAP::Data to 'type' my service return values, the WSDL::Generator give me this
      (as an example):

      ...
      <xsd:complexType name="isRegisteredUserResponse">
      -
      <xsd:sequence>
      <xsd:element name="_value" type="xsd:xsdl:myelement0"/>
      <xsd:element name="_signature" type="xsd:string"/>
      <xsd:element name="_type" type="xsd:string"/>
      <xsd:element name="_attr" type="xsd:xsdl:myelement1"/>
      <xsd:element name="_name" type="xsd:string"/>
      </xsd:sequence>
      </xsd:complexType>
      <message name="isRegisteredUserResponse">
      <part name="result" type="typens: isRegisteredUserResponse"/>
      </message>
      ...

      when it should just be:

      ...
      <message name="isRegisteredUserResponse">
      <part name="isRegistered" type="xsd:boolean"/>
      </message>
      ...

      my service method is:

      sub isRegisteredUser {
      my ($class, $license_string) = @_;
      my $result = 0;
      my $license = License->new($license_string);
      $result = $license->isRegistered() if $license->isLoaded();
      $result = SOAP::Data->type(boolean => $result || 0)->name('isRegistered');
      return $result;
      }

      Is there any way to auto-generate SOAP::Lite services when using SOAP::Data to strictly
      'type' my return values?

      Thanks,
      Nathan
    Your message has been successfully submitted and would be delivered to recipients shortly.