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

Re: [soaplite] (unknown)

Expand Messages
  • Paul Kulchenko
    Hi John, ... Then you need to fix it on your side. You can update the empty value to something more reasonable: BEGIN { package MyDeserializer; use vars
    Message 1 of 2 , Oct 28, 2002
    • 0 Attachment
      Hi John,

      > Dublin refuses to change anything they've done. I'm stuck.
      Then you need to fix it on your side. You can update the empty value
      to something more reasonable:

      BEGIN {
      package MyDeserializer;
      use vars qw(@ISA); @ISA = 'SOAP::Deserializer';

      sub decode_object {
      my $attrs = $_[1]->[1];

      # search for the "bad" attribute and fix it
      for my $key (keys %$attrs) {
      $attrs->{$key} = "http://fix.org/FooBar" if $key =~ /:/ &&
      $attrs->{$key} eq '';
      }
      shift->SUPER::decode_object(@_);
      }
      }

      now register this new deserializer:

      my $soap = SOAP::Lite
      ...
      ->deserializer(MyDeserializer->new)
      ...

      and you should be okay. Just document the reasons for that hack ;)

      Best wishes, Paul.

      --- John Griffin <johng@...> wrote:
      > Thanks for replying Paul. Our server side code is maintained in
      > Dublin Ireland and I am responsible for writing client side example
      > code for our clients. Dublin defined a null for VB since that's
      > all it will work with. Java doesn't care and neither does PHP.
      > PERL, as you saw in the error message I sent, can't deserialize.
      > Dublin refuses to change anything they've done. I'm stuck.
      >
      > John G.
      > ----- Original Message -----
      > From: Paul Kulchenko
      > To: john_griffin12 ; soaplite@yahoogroups.com
      > Sent: Monday, October 28, 2002 1:17 PM
      > Subject: Re: [soaplite] (unknown)
      >
      >
      > Hi John,
      >
      > > I need a little help with this one. The deployment descriptors
      > I
      > > MUST
      > > use map the serializers/deserializers to a null namespace
      >
      > I'm not sure why you need to do this, but it's not legal
      > according to
      > XML Namespaces spec to have prefix that points to no-namespace:
      > xmlns:n1="" is NOT allowed, whereas xmlns="" is fine.
      >
      > Why do you need to point to empty namespace?
      >
      > Best wishes, Paul.
      >
      > --- john_griffin12 <jgriffin@...> wrote:
      > > I need a little help with this one. The deployment descriptors
      > I
      > > MUST
      > > use map the serializers/deserializers to a null namespace
      > > (xmlns:z=""). This causes me problems when I try to ser/deser
      > a
      > > data type. I know that the null namespace is not standard but
      > I
      > > have
      > > no choice. How can I workaround this problem, force a certain
      > > deser,
      > > etc.
      > >
      > > Here's the error message:
      > > Unresolved prefix 'ns3' for attribute value 'ns3:campaign[1]'
      > >
      > > Here's the returned message(partial):
      > > <SOAP-ENV:Body>
      > > <ns1:getCampaignsResponse
      > xmlns:ns1="urn:CampaignService"
      > >
      > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      > > <return
      > xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/"
      > > xsi:type="ns2:Array" xmlns:ns3=""
      > ns2:arrayType="ns3:campaign[1]">
      > > ...
      > >
      > > Again I know the problem is that the deserializer can't be
      > found
      > > due
      > > to the null namespace. Any help would be greatly appreciated.
      > > Thanks
      > > in advance.
      > >
      > > J.G
      > >
      > >
      > >
      > >
      > > ------------------------ 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!?
      > Y! Web Hosting - Let the expert host your web site
      > http://webhosting.yahoo.com/
      >
      > Yahoo! Groups Sponsor
      > ADVERTISEMENT
      >
      >
      >
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      > Service.
      >


      __________________________________________________
      Do you Yahoo!?
      HotJobs - Search new jobs daily now
      http://hotjobs.yahoo.com/
    Your message has been successfully submitted and would be delivered to recipients shortly.