Link to home
Start Free TrialLog in
Avatar of Tolgar
Tolgar

asked on

How can I update a field in the Perl output?

As you have described before, I can now get the value from the Perl output.

Now I want  to update this field, which means I want to overwrite it. Let's say I want to change the status field to 'incomplete'.

I tried the following but it did not work:

$ssc->{geckStates}[0]{status} = 'THIS IS A WSDL TEST';

Open in new window


Can you please explain me how to do it?

Note: I am not sure it it matters but I communicate with a web application via a web service. And I try to upload a field in this application.

Thanks,
Avatar of Tolgar
Tolgar

ASKER

Actually, overwrite is not a right word in the question. I want to add someother text to that field like 'THIS IS A WSDL TEST'
Avatar of wilcoxon
That line of code will update the value in the perl data structure.  You can see this by doing

print Dumper $ssc->{geckStates};

after the update line.

How to update the value in your web application completely depends on your web service and web app.
Avatar of Tolgar

ASKER

Sorry for the confusion. Actually this overwrites the solution field. But I wan to append it to that field. How can I do it?

Thanks,
So are you saying that you want to replace status 'Completed' with 'THIS IS A WSDL TEST' or that you want to add the string after Completed?  The code you posted will do the former.  For the latter, this will work:

$ssc->{geckStates}[0]{status} .= ' THIS IS A WSDL TEST';
ASKER CERTIFIED SOLUTION
Avatar of wilcoxon
wilcoxon
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial