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

Re: [soaplite] attribute name of "id"

Expand Messages
  • rahed
    ... id/href pair attributes are used in soap to define uniquely its entities. So rename them (or qualifiy them into a namespace). -- Radek
    Message 1 of 4 , Aug 1, 2007
    • 0 Attachment
      On 8/1/07, Robert Eden <rmeden@...> wrote:

      > The attribute with a name of "id" never shows up in the XML. If I
      > change it do "idz" it does.
      >
      > Is this a known issue? Is there any way to get around it?

      id/href pair attributes are used in soap to define uniquely its entities.
      So rename them (or qualifiy them into a namespace).

      --
      Radek
    • Thomas Eden
      You can use XML::Simple or any other XML generation tool you want. Just make sure you specify the SOAP::Data- type( xml )- value($myXML). Thom Eden
      Message 2 of 4 , Aug 1, 2007
      • 0 Attachment
        You can use XML::Simple or any other XML generation tool you want. Just make sure you specify the SOAP::Data->type("xml")->value($myXML).

        Thom Eden

        On 8/1/07, Robert Eden <rmeden@...> wrote:

        Look at the following code...

        $subscr= SOAP::Data
        ->name("subscription")
        ->type("subscription")
        ->attr({ subscriptionProfile => "OpenEGP", id => "3" })
        ->value( \SOAP::Data->value(
        SOAP::Data->name("activationstatus" => 'A'),

        The attribute with a name of "id" never shows up in the XML. If I
        change it do "idz" it does.

        Is this a known issue? Is there any way to get around it?

        What if I use XML::Simple to generate my request... can I pass it to
        the SOAP method? I tried, but it HTMLizes it. (changes < to &lt)

        Robert


      • rahed
        ... Something like this: $soap = SOAP::Data- name(subscr= SOAP::Data- value( SOAP::Data- name(tag1= 10)- attr({ n1:id = 1}),
        Message 3 of 4 , Aug 2, 2007
        • 0 Attachment
          > Sorry.... I'm new to SOAP, hacking my way through this... I can't rename it,
          > so how do I qualify it into a namespace?

          Something like this:

          $soap = SOAP::Data->name(subscr=>\SOAP::Data->value(
          SOAP::Data->name(tag1=>10)->attr({'n1:id'=>1}),
          SOAP::Data->name(tag2=>20)->attr({'n2:id'=>2})
          )
          )->attr({'xmlns:n1'=>"myns1",
          'xmlns:n2'=>"myns2",});

          Here the namespaces myns1 and myns2 are declared within the parent
          element subscr with prefixes n1 and n2. Id attributes are then
          qualified into these namespaces.

          HTH

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