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

Denied access to method [..] in class (main) at /usr/share/perl5/SOAP/Lite

Expand Messages
  • blssmr
    hi, im currently messing arround with SOAP::Lite. I ve already created a service without wsdl description which works nicely. However, now there is another
    Message 1 of 1 , Jun 29, 2005
      hi,

      im currently messing arround with SOAP::Lite. I've already created
      a service without wsdl description which works nicely. However, now
      there is another service which needs to provide a wsdl file to the
      clients.

      I started from scratch using a simple example i found in on the web.

      Thiese are my files:

      sms.cgi:
      #!/usr/bin/perl
      use SOAP::Transport::HTTP;
      SOAP::Transport::HTTP::CGI
      -> dispatch_to('AxeSMS')
      -> handle;
      package AxeSMS;
      sub sendSMS {
      return "works";
      }

      client.pl:
      #!/usr/bin/perl
      use SOAP::Lite +trace;
      print SOAP::Lite
      -> service('http://localhost/axe.wsdl')
      -> sendSMS();

      and, last but not least, the wsdl file:

      <?xml version="1.0" encoding="utf-8"?>
      <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:s="http://www.w3.org/2001/XMLSchema"
      xmlns:s0="AxeSMS"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
      xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
      targetNamespace="AxeSMS"
      xmlns="http://schemas.xmlsoap.org/wsdl/">
      <types>
      <s:schema elementFormDefault="qualified" targetNamespace="AxeSMS">
      <s:element name="sendSMS">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="phone"
      type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="message"
      type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
      <s:element name="sendSMSResponse">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="sendSMSResult"
      type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:schema>
      </types>
      <message name="sendSMSSoapIn">
      <part name="parameters" element="s0:sendSMS" />
      </message>
      <message name="sendSMSSoapOut">
      <part name="parameters" element="s0:sendSMSResponse" />
      </message>
      <portType name="Service1Soap">
      <operation name="sendSMS">
      <input message="s0:sendSMSSoapIn" />
      <output message="s0:sendSMSSoapOut" />
      </operation>
      </portType>
      <binding name="Service1Soap" type="s0:Service1Soap">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
      style="document" />
      <operation name="sendSMS">
      <soap:operation soapAction="" style="document" />
      <input>
      <soap:body use="literal" />
      </input>
      <output>
      <soap:body use="literal" />
      </output>
      </operation>
      </binding>
      <service name="Service1">
      <port name="Service1Soap" binding="s0:Service1Soap">
      <soap:address location="http://localhost/cgi-bin/sms.cgi" />
      </port>
      </service>
      </definitions>

      calling the client results in the following error message:

      [..]
      <faultstring>Denied access to method (sendSMS) in class (main) at
      /usr/share/perl5/SOAP/Lite.pm line 2267.
      </faultstring>
      [..]

      if i dispatch to a local function (like dispatch_to('sendSMS')) it
      works, but i want to split them up among several classes. I also
      tried put the package AxeSMS in its own .pm and then 'use' it.

      Whats the problem here? Could it be that the wsdl file is messy?
    Your message has been successfully submitted and would be delivered to recipients shortly.