473,396 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Passing array of objects in SOAP

Hi

I can't find out how to send an array of objects with the built in SOAP
in PHP5.

My code looks like this:
****BEGIN CODE****
$id = new GuidVO();
$ids = array($id);
$soap_param = new SoapParam($ids, 'AccountIds');
$soap_params[] = $soap_param;
$server->__soapCall($function, $soap_params, null, $header,
$output_headers);
*****END CODE*****

Part of the soap message produced by the code:
****BEGIN MESSAGE****
<SOAP-ENV:Body>
<ns1:getAccounts>
<in0 SOAP-ENC:arrayType="SOAP-ENC:Struct[1]"
xsi:type="SOAP-ENC:Array">
<item xsi:type="SOAP-ENC:Struct">
<value
xsi:type="xsd:string">749C8C07-FB54-4ED0-8F8F-0D49D2A359D8</value>
</item>
</in0>
</ns1:getAccounts>
</SOAP-ENV:Body>
*****END MESSAGE*****

The problem is that the arrayType is set to Struct. I want it to be set
to GuidVO. I tried to use SoapVar in order to set the arrayType but
apache crashes as a result of a php crash and I can't se the soap
message that would have been sent to the server

****BEGIN CODE****
$id = new GuidVO();
$ids = array($id);
$soapvar = new SoapVar($ids, SOAP_ENC_ARRAY, "GuidVO");
$soap_param = new SoapParam($soapvar, 'AccountIds');
$soap_params[] = $soap_param;
$server->__soapCall($function, $soap_params, null, $header,
$output_headers);
*****END CODE*****

Thanks for any suggestions about sending an array of objects in Soap!

/Andreas

Jan 20 '06 #1
0 1718

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: justanotherguy63 | last post by:
Hi, I am designing an application where to preserve the hierachy and for code substitability, I need to pass an array of derived class object in place of an array of base class object. Since I...
11
by: John Pass | last post by:
Hi, In the attached example, I do understand that the references are not changed if an array is passed by Val. What I do not understand is the result of line 99 (If one can find this by line...
0
by: brian.mills | last post by:
I have a web service in a technology called Jade. It is returning a StudentObject, which has an array of Application Objects on it. The Application objects never are actually Application Instances,...
0
by: Moshe Kravchik | last post by:
Hi! I have a following problem. I have a web service (written in ATL Server). It has 2 function, lets name them getData and setData. The getData returns a byte array, setData receives a byte...
1
by: Mike Logan | last post by:
I have a schema that defines my messages and objects. I then have a WSDL that defines the web services. I have my sample XSD, sample WSDL, and the code generated from WSDL.exe. In the generated...
0
by: Naoum Naoumov | last post by:
So I have a gsoap server and a PHP soap client and I am trying to return a list (vector) of objects to the PHP client. However, the client seems to only store the last element of the array ... Any...
0
by: kencana | last post by:
hi All, I got problem in passing data (more than one) from soap client to the soap server. but if i only passing one data at a time, it works successfully.. The following is the error message i...
0
by: BobbyS | last post by:
I've a xml file.I'm taking its data passing it to a method in string form and converting that string "xmlData" to a array of bytes by Convert.FromBase64String(xmlData) but I'm getting a exception...
0
by: leon70 | last post by:
Hi Group, I built a gSoap 2.7.11 Web services client in C++ on AIX and have got it talking to the remote service. The service is sending back an array of objects to my client but the client is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.