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

Re: Multiple attr and "anyType" (Client: Soap::Lite/Server: MS SOAP)

Expand Messages
  • mpafrica2001
    ... Thanks Sadanand, but proxying is not my problem. I have no problemsconnecting with the webservice, I just can t get the XML formed in a way that MS Soap
    Message 1 of 4 , Sep 17, 2003
      --- In soaplite@yahoogroups.com, Sadanand Kalasabail <sade_bhat@y...>
      wrote:
      > If you are using a proxyserver you have to send the
      > proxy logins, the easy way is by setting the env in
      > the soaplite client script for eg.
      > $ENV{HTTP_proxy}="http://sk7260:Sadanand43@1...:8080";
      >

      Thanks Sadanand, but proxying is not my problem. I have no
      problemsconnecting with the webservice, I just can't get the
      XML formed in a way that MS Soap will accept.

      Cheers,

      --
      Michael Brader michael.brader@...
      Senior Software Developer (Unix) ntl:ipd
      Hook 01256 75(3413)
    • mpafrica2001
      ... I ve found solutions to both my problems. To use the anyType type specifier as found in the WSDL, I used typelookup to set up the type in SOAP::Lite.
      Message 2 of 4 , Sep 17, 2003
        --- In soaplite@yahoogroups.com, "mpafrica2001" <yahoo@b...> wrote:
        > Apologies for the length of this message but I've tried to include
        > everything relevent....

        I've found solutions to both my problems. To use the
        anyType type specifier as found in the WSDL, I used
        typelookup to set up the type in SOAP::Lite.

        $service->typelookup->{'anyType'} =
        [11, sub { 1 }, 'as_anyType'];

        sub SOAP::Serializer::as_anyType {
        my $self = shift;
        my ($value, $name, $type, $attr) = @_;
        return [$name, {'xsi:type' => 'xsd:string', %{$attr}}, $value];
        }

        and to put multiple xmlns attributes on a data element, I used:

        my $av = SOAP::Data->name('strAvailability')
        ->attr({'xmlns:namesp2' => 'http://www.w3.org/2001/XMLSchema',
        'xmlns:namesp3' =>
        'http://www.w3.org/2001/XMLSchema-Instance'})
        ->type('anyType')->value('');

        A bit of hacking on the on_action sub and I'm now happily talking to
        the MS Soap Toolkit server.

        Cheers,

        --
        Michael Brader michael.brader@n...
        Senior Software Developer (Unix) ntl:ipd
        Hook 01256 75(3413)
      Your message has been successfully submitted and would be delivered to recipients shortly.