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

Re: outputxml usage

Expand Messages
  • borislavd@gmx.net
    Paul, Let me clarify the problem I was having. Here is the code: my $soap_response = SOAP::Lite - uri( ... ) - proxy( ... ) - outputxml( 1 ) - myMethod();
    Message 1 of 4 , Mar 27, 2001
    View Source
    • 0 Attachment
      Paul,

      Let me clarify the problem I was having. Here is the code:

      my $soap_response = SOAP::Lite
      -> uri("...")
      -> proxy("...")
      -> outputxml("1")
      -> myMethod();

      if ($soap_response->fault) {
      ...

      This resulted in an error:

      Can't call method "fault" without a package or object reference at
      <...> You used the syntax of a method call, but the slot filled by
      the object reference or package name contains an expression that
      returns a defined value which is neither an object reference nor a
      package name. Something like this will reproduce the error: $BADREF =
      42; process $BADREF 1,2,3; $BADREF->process(1,2,3);

      I tried your example and it worked. My code works if I remove the
      line with '-> outputxml("1")'.

      Regards,
      Borislav
    • Paul Kulchenko
      Hi, Borislav! Right. outputxml() says that method will return UNPARSED xml code and you re willing to do what you want with it, but since it wasn t parsed
      Message 2 of 4 , Mar 27, 2001
      View Source
      • 0 Attachment
        Hi, Borislav!

        Right. outputxml() says that method will return UNPARSED xml code and
        you're willing to do what you want with it, but since it wasn't
        parsed there is NO WAY to show faultcode, faultstring or to get
        something else for it. This is ALTERNATIVE way to usual processing.
        You got xml code and you are one-to-one with it. No more help from
        SOAP::Lite on it :)). THAT is the reason, because you're trying to
        apply faultstring() method to string that has XML inside, not to the
        object that represent parsed XML. That's the difference. Hope it
        helps.

        Best wishes, Paul.

        --- borislavd@... wrote:
        > Paul,
        >
        > Let me clarify the problem I was having. Here is the code:
        >
        > my $soap_response = SOAP::Lite
        > -> uri("...")
        > -> proxy("...")
        > -> outputxml("1")
        > -> myMethod();
        >
        > if ($soap_response->fault) {
        > ...
        >
        > This resulted in an error:
        >
        > Can't call method "fault" without a package or object reference at
        > <...> You used the syntax of a method call, but the slot filled by
        > the object reference or package name contains an expression that
        > returns a defined value which is neither an object reference nor a
        > package name. Something like this will reproduce the error: $BADREF
        > =
        > 42; process $BADREF 1,2,3; $BADREF->process(1,2,3);
        >
        > I tried your example and it worked. My code works if I remove the
        > line with '-> outputxml("1")'.
        >
        > Regards,
        > Borislav
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Get email at your own domain with Yahoo! Mail.
        http://personal.mail.yahoo.com/?.refer=text
      Your message has been successfully submitted and would be delivered to recipients shortly.