Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7552845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:53:20+00:00 2026-05-30T10:53:20+00:00

I write soap-client based on Delcampe API. Simple methods work fine, but functions with

  • 0

I write soap-client based on Delcampe API. Simple methods work fine, but functions with need on complex data give me an error message like “You must send item’s data!”. Based on PHP example here i thought, that data should be either hash or hashref, but both give me error mentioned before.

Sample script i use:

use 5.010;
use SOAP::Lite;
use SOAP::WSDL;
use strict;
use warnings;
use Data::Dumper;

my $API_key = 'xyz';
my $service = SOAP::Lite->service('http://api.delcampe.net/soap.php?wsdl');
my $return = $service->authenticateUser($API_key);

if ($return->{status}) {
    my $key = $return->{data};
    my %data = (description => 'updated description');
    my $response = $service->updateItem($key, 123456, \%data);

    if ($response->{status}) {
        say Dumper $response->{data};
    } else {
        say $response->{errorMsg};
    } 
} else {
    say "no: " . $return->{status};
}

So, what kind of data structure should i use instead of %data or how could i debug the SOAP-envelope, which is produced as request? (PHP code based on example works fine)

ADDITION

with use SOAP::Lite qw(trace); igot SOAP envelope too:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://api.delcampe.net/soap.php">
    <soap:Body>
        <tns:updateItem>
            <token xsi:type="xsd:string">secret_one</token>
            <id_item xsi:type="xsd:int">123456</id_item>
            <arrData xsi:nil="true" xsi:type="soap-enc:Array" />
        </tns:updateItem>
    </soap:Body>
</soap:Envelope>

As seen above, there is no bit of data sent. I tried data also as string, array and arrayref. Maybe it is bug of SOAP::Lite?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T10:53:21+00:00Added an answer on May 30, 2026 at 10:53 am

    May be you’d try to replace

    my %data = (description => ‘updated description’);

    with

    my $data = SOAP::Data->name(description => ‘updated description’);

    We have similar issues when working on our SOAP API, and it was solved by something like that, wrapping complex data into SOAP::Data. So I hope this’ll help. )

    UPDATE:

    The previous advice didn’t help: looks like it’s indeed the SOAP::Lite bug, which ignores the ‘soap-enc:Array’ definition in WSDL file whatsoever.

    Have finally found a workaround, though. It’s not pretty, but as a final resort it may work.

    First, I’ve manually downloaded the WSDL file from Delcampe site, saved it into local directory, and referred to it as …

    my $service = SOAP::Lite->service('file://...delcampe.wsdl')
    

    … as absolute path is required.

    Then I’ve commented out the ‘arrData line’ within WSDL updateItem definition.

    And, finally, I’ve made this:

    my $little_monster = SOAP::Data->name(arrData => 
      \SOAP::Data->value((
        SOAP::Data->name(item => 
            \SOAP::Data->value(
              SOAP::Data->name(key => 'personal_reference'),
              SOAP::Data->name(value => 'Some Personal Reference')->type('string'),
            )
         ),
         SOAP::Data->name(item => 
            \SOAP::Data->value(
              SOAP::Data->name(key => 'title'),
              SOAP::Data->name(value => 'Some Amazing Title')->type('string'),
            )
         ),
         # ... 
      ))
    )->type('ns1:Map');
    

    … and, I confess, successfully released it into the wilderness by …

    $service->updateItem($key, 123456, $little_monster);
    

    … which, at least, generated more-o-less likable Envelope.

    I sincerely hope that’ll save at least some poor soul from banging head against the wall as much as I did working on all that. )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write a simple SOAP client using SOAP::Lite . After making a
I'm trying to write a .Net client to a vendor's SOAP Service, but I'm
I need to write a soap client that is capable of sending and receiving
I have SOAP server running. I need to write a SOAP client for the
I am using C# .Net 2.0 to write a webservices client. The server's soap
I'm testing calling a SOAP based service from a .net client app and am
I need to consume a SOAP web service from a C# .Net 4.0 client.
I need to build a simple webservice to get data in and out of
I need to write a small demo to send and serve a SOAP function,
So I'm trying to write a php SOAP client that requires the user to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.