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

SOAP::Lite, MIME attachments and WSDL

Expand Messages
  • Tobias Hoellrich
    I m having a really hard time coming up with a valid (valid for SOAP::Lite) WSDL describing a method that accepts MIME attachments. I m using SOAP::Lite 0.55
    Message 1 of 1 , Apr 1, 2003
    • 0 Attachment
      I'm having a really hard time coming up with a valid (valid for SOAP::Lite)
      WSDL describing a method that accepts MIME attachments. I'm using
      SOAP::Lite 0.55 and SOAP::MIME on the server- and client-side.

      The following WSDL fragment:

      <binding name="MySoap" type="tns:MyPort">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="doSomething">
      <soap:operation soapAction="urn:my#doSomething"/>
      <input>
      <mime:multipartRelated>
      <mime:part>
      <soap:body namespace="urn:my" use="encoded"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </mime:part>
      <mime:part>
      <mime:content part="sourceDocument" type="application/octetstream"/>
      </mime:part>
      </mime:multipartRelated>
      </input>
      <output>
      <soap:body use="encoded"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:my"/>
      </output>
      </operation>
      </binding>

      always results in:

      Can't call method "namespace" on an undefined value at
      /usr/local2/lib/perl5/site_perl/5.8.0/SOAP/Lite.pm line 2409.
      SOAP::Schema::WSDL::parse('SOAP::Schema::WSDL=HASH(0x95d018)','SOAP::Custom::XML::Data=HASH(0xc2ea38)')
      called at /usr/local2/lib/perl5/site_perl/5.8.0/SOAP/Lite.pm line 2480
      SOAP::Schema::parse('SOAP::Schema=HASH(0x95ce38)') called at
      /usr/local2/lib/perl5/site_perl/5.8.0/SOAP/Lite.pm line 2773
      SOAP::Lite::service('SOAP::Lite','http://172.25.36.102:8080/my.wsdl')
      called at wsdlsoap.pl line 14

      which seems to be related to this code fragment:

      foreach ($_->operation) {
      my $opername = $_->name;
      my $soapaction = $_->operation->soapAction;
      ---> my $namespace = $_->input->body->namespace;
      my @parts;
      foreach ($s->portType) {
      next unless $_->name eq $porttype;
      foreach ($_->operation) {
      next unless $_->name eq $opername;
      my $inputmessage = SOAP::Utils::disqualify($_->input->message);
      foreach ($s->message) {
      next unless $_->name eq $inputmessage;
      @parts = $_->part;
      }
      }

      and makes me believe that SOAP::Lite is looking at the "wrong" place
      (because the soap-body is contained within the
      mime:multipartRelated/mime:part).

      Does anybody happen to know how I can get this to work?

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