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

Re: [soaplite] Serialization problems:

Expand Messages
  • rahed
    ... Do it this way: $CallCredentials = SOAP::Data - name(credentials = SOAP::Data- value( SOAP::Data- name(Username = $UserName)- type( string ),
    Message 1 of 5 , Aug 20 12:58 PM
      > my $CallCredentials = SOAP::Data->name("credentials" =>
      > SOAP::Data->value(
      > SOAP::Data->name("Username")->value($UserName)->type('string'),
      > SOAP::Data->name("Password")->value($Password)->type('string'))
      > );

      Do it this way:

      $CallCredentials = SOAP::Data
      ->name(credentials => \SOAP::Data->value(

      SOAP::Data->name(Username => $UserName)->type('string'),

      SOAP::Data->name(Password => $Password) ->type('string'),
      )
      );

      --
      Radek
    • ErikTheRed
      ... From: rahed Subject: Re: [soaplite] Serialization problems: To: Date: Wednesday, August 20, 2008, 12:58 PM ... Do it this way:
      Message 2 of 5 , Aug 20 3:37 PM


        --- On Wed, 8/20/08, rahed <raherh@...> wrote:
        From: rahed <raherh@...>
        Subject: Re: [soaplite] Serialization problems:
        To:
        Date: Wednesday, August 20, 2008, 12:58 PM

        > my $CallCredentials = SOAP::Data-> name("credential s" =>
        > SOAP::Data-> value(
        > SOAP::Data-> name("Username" )->value( $UserName) ->type('string' ),
        > SOAP::Data-> name("Password" )->value( $Password) ->type('string' ))
        > );

        Do it this way:

        $CallCredentials = SOAP::Data
        ->name(credentials => \SOAP::Data- >value(

        SOAP::Data-> name(Username => $UserName)-> type('string' ),

        SOAP::Data-> name(Password => $Password) ->type('string' ),
        )
        );

        --
        Radek




        Radek,

        Thank you for your suggestion; I had missed the backslash creating a reference. I also made the other changes as you suggested (even tried a copy / paste).

        However, this syntax still gives the same result: a xsi:nil="true" value in the output XML.

        Any other suggestions would be appreciated.

        Thanks again,

        Erik



      • rahed
        ... Will you send the whole request/response? -- Radek
        Message 3 of 5 , Aug 22 7:24 AM
          > Thank you for your suggestion; I had missed the backslash creating a reference.
          >
          > However, this syntax still gives the same result: a xsi:nil="true" value in the output XML.
          >
          > Any other suggestions would be appreciated.
          >

          Will you send the whole request/response?

          --
          Radek
        • rahed
          ... Fault string says you send a wrong envelope namespace. It should be xmlns:soap= http://schemas.xmlsoap.org/soap/envelope/ If there are problems I wouldn t
          Message 4 of 5 , Aug 24 5:59 AM
            > <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><soap12:Upgrade xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"><soap12:SupportedEnvelope qname="soap:Envelope" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" /><soap12:SupportedEnvelope qname="soap12:Envelope" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" /></soap12:Upgrade></soap:Header><soap:Body><soap:Fault><faultcode>soap:VersionMismatch</faultcode><faultstring>Possible SOAP version mismatch: Envelope namespace http://schemas.xmlsoap.org/wsdl/soap/ was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/.</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope>

            Fault string says you send a wrong envelope namespace.
            It should be xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

            If there are problems I wouldn't create the message from wsdl using a
            service method and start like this:

            $client = SOAP::Lite->new(uri => 'namespace',
            proxy => 'endpoint',);
            $client->List('soapdata');
            Default namespaces are generated implicitly.

            --
            Radek
          Your message has been successfully submitted and would be delivered to recipients shortly.