[ic] split or \$myvar is not parsing or interpolte in a right way

Stefan Hornburg (Racke) racke at linuxia.de
Sun Dec 7 16:01:17 UTC 2008


jojospace wrote:
> Stefan Hornburg (Racke) wrote:
>>> A code like
>>>
>>>  my $recipient = SOAP::Data->name("Recipient", \$mydata);
>>>
>>> is not working properly. A "\" in front of "$mydata" make me mad.
>> I hope not! :-)
>>
>> Where do you get \$mydata from?
> 
> This is comming from the example script of the Gateway-Provider.
> 
> This is a part of the normal perl script:
> 
> sub array_string  {
>   my ($name, @data) = @_;
>   my $soap_data = SOAP::Data->value(SOAP::Data->name("string" =>
> @data)->type(""));
>   $soap_data->type('ArrayOfString');
>   return SOAP::Data->name($name, \$soap_data);
> }
> 
> The calling function ist
> 
> my $Empf     = array_string("Recipient", @list);
> 
> Calling the script with "perl myscript.pl" runs well. But not as an
> usertag oder perl tag.

You can use [soap_entity] which probably makes your life easier, e.g.


	$pages = int(@$set / $pagesize);
	$pages++ if @$set % $pagesize;

	for (my $i = $offset; $i < @$set && $i < $pagesize + $offset; $i++) {
		push (@selected, $Tag->productinfo($set->[$i]->[0], $storeid));
	}

	@slarr = ($Tag->soap_entity({name => 'matches', type => 'int',
		value => scalar(@$set)}),
			 $Tag->soap_entity({name => 'pages', type => 'int',
		value => $pages}),
			 $Tag->soap_entity({name => 'list', type => 'ProductList', value => 
\@selected}));

	return $Tag->soap_entity({name => 'ProductSearchListResponse',
			type => 'ProductSearchListResponse',
			value => $Tag->soap_entity({name => 'return', type => 'SearchList',
				value => \@slarr})});

Regards
           Racke



-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team




More information about the interchange-users mailing list