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

Re: [soaplite] encounter some problems in the new soap version

Expand Messages
  • Shin Neng Wong
    Hi Paul, Thanks for the info. However, it s different from what I want because the code will work even though if it is a different prefix. That is, this will
    Message 1 of 6 , May 6, 2002
    • 0 Attachment
      Hi Paul,

      Thanks for the info. However, it's different from
      what I want because the code will work even though if
      it is a different prefix. That is, this will still
      work:

      <SOAP-ENV:Header>
      <Ax:head xmlns:Ax=uri>test</Ah:head>
      </SOAP-ENV:Header>

      I want to make sure that it is "Ah" and not anything
      else. Is there another method around it?

      --- Paul Kulchenko <paulclinger@...> wrote:
      > Hi, Shin!
      >
      > > > $self->match(join '/', SOAP::SOM::header,
      > > > 'head')->dataof->attr->{'xmlns:Ah'};
      > > >
      > > > That is, I can extract the attribute value "uri"
      > > > from
      > > > the following:
      > > > <SOAP-ENV:Header>
      > > > <Ah:head xmlns:Ah=uri>test</Ah:head>
      > > > </SOAP-ENV:Header>
      > I'm not getting this error, but that was changed in
      > 0.52 and now you
      > can't access xmlns attributes directly (may change
      > in future
      > versions). To access associated namespace you can do
      > this:
      >
      > $self->dataof(join '/', SOAP::SOM::header,
      > 'head')->uri;
      >
      > Let me know if that's not what you want.
      >
      > Best wishes, Paul.
      >
      > --- Shin Neng Wong <shinnengw@...> wrote:
      > > hi all again,
      > >
      > > This is a re-post of the below email. Anyone has
      > any
      > > idea what is the problem that I am encountering?
      > I
      > > experience this problem after I upgraded to
      > version
      > > 0.55.
      > >
      > > Thanks in advance again....
      > > --- Shin Neng Wong <shinnengw@...> wrote:
      > > > Hi all,
      > > >
      > > > I upgraded my soaplite to the latest one to
      > avoid
      > > > the
      > > > security flaw. I like to thank Paul and
      > everyone
      > > > else
      > > > in the contribution.
      > > >
      > > > However, I just encounter a problem after
      > upgrading.
      > > >
      > > > Before the upgrade, this worked:
      > > >
      > > > $self->match(join '/', SOAP::SOM::header,
      > > > 'head')->dataof->attr->{'xmlns:Ah'};
      > > >
      > > > That is, I can extract the attribute value "uri"
      > > > from
      > > > the following:
      > > > <SOAP-ENV:Header>
      > > > <Ah:head xmlns:Ah=uri>test</Ah:head>
      > > > </SOAP-ENV:Header>
      > > >
      > > > The trace highlighted the following error:
      > > >
      > > > Use of uninitialized value in join or string at
      > > > /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line
      > > > 2244.
      > > >
      > > > Is SOAP::SOM::header deprecated? If so, what is
      > the
      > > > other way of doing it?
      > > >
      > > >
      > > >
      > __________________________________________________
      > > > Do You Yahoo!?
      > > > Yahoo! Games - play chess, backgammon, pool and
      > more
      > > > http://games.yahoo.com/
      > > >
      > >
      > >
      > > __________________________________________________
      > > Do You Yahoo!?
      > > Yahoo! Health - your guide to health and wellness
      > > http://health.yahoo.com
      > >
      > > ------------------------ 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!?
      > Yahoo! Health - your guide to health and wellness
      > http://health.yahoo.com
      >


      __________________________________________________
      Do You Yahoo!?
      Yahoo! Health - your guide to health and wellness
      http://health.yahoo.com
    • Paul Kulchenko
      Hi, Shin! ... Yes. prefix() method for SOAP::Data object will return prefix used for that element, but it really shouldn t matter when dealing with XML.
      Message 2 of 6 , May 6, 2002
      • 0 Attachment
        Hi, Shin!

        --- Shin Neng Wong <shinnengw@...> wrote:
        > Thanks for the info. However, it's different from
        > what I want because the code will work even though if
        > it is a different prefix. That is, this will still
        > work:
        >
        > <SOAP-ENV:Header>
        > <Ax:head xmlns:Ax=uri>test</Ah:head>
        > </SOAP-ENV:Header>
        >
        > I want to make sure that it is "Ah" and not anything
        > else. Is there another method around it?
        Yes. prefix() method for SOAP::Data object will return prefix used
        for that element, but it really shouldn't matter when dealing with
        XML. Anyway, this code:

        print $self->dataof(join '/', SOAP::SOM::header, 'head')->prefix;

        will print 'Ah';

        Best wishes, Paul.

        __________________________________________________
        Do You Yahoo!?
        Yahoo! Health - your guide to health and wellness
        http://health.yahoo.com
      • Shin Neng Wong
        Hi Paul, Thanks. It worked. I wasn t aware of the prefix() function so I did not try it. Best wishes, Shin Neng ...
        Message 3 of 6 , May 6, 2002
        • 0 Attachment
          Hi Paul,

          Thanks. It worked. I wasn't aware of the prefix()
          function so I did not try it.


          Best wishes,

          Shin Neng


          --- Paul Kulchenko <paulclinger@...> wrote:
          > Hi, Shin!
          >
          > --- Shin Neng Wong <shinnengw@...> wrote:
          > > Thanks for the info. However, it's different from
          > > what I want because the code will work even though
          > if
          > > it is a different prefix. That is, this will
          > still
          > > work:
          > >
          > > <SOAP-ENV:Header>
          > > <Ax:head xmlns:Ax=uri>test</Ah:head>
          > > </SOAP-ENV:Header>
          > >
          > > I want to make sure that it is "Ah" and not
          > anything
          > > else. Is there another method around it?
          > Yes. prefix() method for SOAP::Data object will
          > return prefix used
          > for that element, but it really shouldn't matter
          > when dealing with
          > XML. Anyway, this code:
          >
          > print $self->dataof(join '/', SOAP::SOM::header,
          > 'head')->prefix;
          >
          > will print 'Ah';
          >
          > Best wishes, Paul.
          >
          > __________________________________________________
          > Do You Yahoo!?
          > Yahoo! Health - your guide to health and wellness
          > http://health.yahoo.com


          __________________________________________________
          Do You Yahoo!?
          Yahoo! Health - your guide to health and wellness
          http://health.yahoo.com
        Your message has been successfully submitted and would be delivered to recipients shortly.