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

Looking for some direction with this

Expand Messages
  • stephenc01_01
    I am talking to a soap API. This is the desired output $xml =
    Message 1 of 2 , Feb 2, 2011
    View Source
    • 0 Attachment
      I am talking to a soap API.

      This is the desired output
      $xml = ' <metadata xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="ns4:kt_metadata_fieldset[1]" SOAP-ENC:offset="[0]">
      <fieldset xsi:type="ns4:kt_metadata_fieldset">
      <fieldset xsi:type="xsd:string">General Information</fieldset>
      <fields xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="ns4:kt_metadata_field[5]" SOAP-ENC:offset="[0]">
      <field xsi:type="ns4:kt_metadata_field">
      <name xsi:type="xsd:string">Document Author</name><value xsi:type="xsd:string">N/A</value>
      </field>
      <field xsi:type="ns4:kt_metadata_field">
      <name xsi:type="xsd:string">Date On Document</name><value xsi:type="xsd:string">2010-08-12</value>
      </field>
      <field xsi:type="ns4:kt_metadata_field">
      <name xsi:type="xsd:string">Notes</name><value xsi:type="xsd:string">some notes</value>
      </field>
      </fields>
      </fieldset>
      </metadata>';

      I would like to create this using SOAP::Data right now i am building the XML by hand and sending it with SOAP::Data->type('xml' => $xml)
    • Joseph Werner
      This should get you started: my $value = some notes ; my $name = Notes ; my $fieldset = General Information ; my $soapdata = SOAP::Data- name( metadata =
      Message 2 of 2 , Feb 2, 2011
      View Source
      • 0 Attachment
        This should get you started:

        my $value = 'some notes';
        my $name = 'Notes';
        my $fieldset = 'General Information';
        my $soapdata = SOAP::Data->name(
            'metadata' => \SOAP::Data->value(
            SOAP::Data->name(
                'fieldset' => \SOAP::Data->value(
                SOAP::Data->name(
                    'fields' => \SOAP::Data->value(
                    SOAP::Data->name(
                        'field' => \SOAP::Data->value(
                        SOAP::Data->name('value')->value($value)
                        ->type(q{}),
                        SOAP::Data->name('name')->value($name)
                        ->type(q{}),
                        )
                    ),
                    )
                ),
                SOAP::Data->name('fieldset')->value($fieldset)
                ->type(q{}),
                )
            ),
            )
            );

        On Wed, Feb 2, 2011 at 1:55 PM, stephenc01_01 <stephen@...> wrote:
         

        I am talking to a soap API.

        This is the desired output
        $xml = ' <metadata xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="ns4:kt_metadata_fieldset[1]" SOAP-ENC:offset="[0]">
        <fieldset xsi:type="ns4:kt_metadata_fieldset">
        <fieldset xsi:type="xsd:string">General Information</fieldset>
        <fields xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="ns4:kt_metadata_field[5]" SOAP-ENC:offset="[0]">
        <field xsi:type="ns4:kt_metadata_field">
        <name xsi:type="xsd:string">Document Author</name><value xsi:type="xsd:string">N/A</value>
        </field>
        <field xsi:type="ns4:kt_metadata_field">
        <name xsi:type="xsd:string">Date On Document</name><value xsi:type="xsd:string">2010-08-12</value>
        </field>
        <field xsi:type="ns4:kt_metadata_field">
        <name xsi:type="xsd:string">Notes</name><value xsi:type="xsd:string">some notes</value>
        </field>
        </fields>
        </fieldset>
        </metadata>';

        I would like to create this using SOAP::Data right now i am building the XML by hand and sending it with SOAP::Data->type('xml' => $xml)




        --
        I require any third parties to obtain my permission to submit my information to any other party for each such submission. I further require any third party to follow up on any submittal of my information by sending detailed information regarding each such submission to telcodev@...
        Joseph Werner
      Your message has been successfully submitted and would be delivered to recipients shortly.