Empty result of the web service method call

Empty result of the web service method call

am 22.01.2008 11:00:07 von Ralfeus

Hi
I have a web service written on the PHP. The appropriate WSDL looks
like this:


nillable="true" type="tns:ObjectData" />




>
type="s:string" />
type="s:string" />
type="tns:ObjectStatus" />






type="s:string" />















type="tns:ArrayOfObjectData" />




There are one abstract object (ObjectData) and two inherited objects
(ProjectData and LocationData)
There is a method Synchronize, which returns an array of the objects
derived from the ObjectData.

There is a PHP code, which fill the array with ProjectData objects:

while ($object = mysql_fetch_array($result, MYSQL_ASSOC))
{
$newProject->ID = $object[object_id];
if ($object[version] == null)
{
$newProject->Status = "Deleted";
}
elseif ($object[object_version] == 0)
{
$newProject->Status = "New";
$newProject->Name = $object[name];
}
else
{
$newProject->Status = "Updated";
$newProject->Name = $object[name];
}
$objects[$objectCount++] = new SoapVar($newProject,
SOAP_ENC_OBJECT, "ProjectData");
}
return array("SynchronizeResult" => $objects);

The result, which SOAP server returns looks like this:


xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns1="http://informer.dataexchange/">




1
Updated
Project 1






So it seems to be a normal array with one element.
The client is written on the C#. It normally calls the method
Synchronize and gets a result without errors. But result is empty
array, it has no elements.
How to fix it? Can it be a problem with object inheritance and forming
result at PHP code?
Thank you in advance

Re: Empty result of the web service method call

am 23.01.2008 02:08:10 von nothingsoriginalontheinternet

On Jan 22, 5:00 am, Ralfeus wrote:
> I have a web service written on the PHP.
>
> The client is written on the C#. It normally calls the method
> Synchronize and gets a result without errors. But result is empty
> array, it has no elements.
> How to fix it? Can it be a problem with object inheritance and forming
> result at PHP code?
> Thank you in advance

Finding a more precise spot in the process where things are broken
will help you solve the problem.

If that is exactly what is being returned from the server, and it is a
valid response, then your problem must be in the client. Did you get
that response data by inspecting the network communication on the test
client machine or did you log that from PHP? (You can try to output
the response through C# to find out).

If you can verify that the data safely reaches the client, then there
will be more people in the C# newsgroup who can help you. Otherwise,
if you can debug your script with breakpoints and a debugging editor
or post some of your code then that would be helpful in finding a
solution to your problem.

-Michael Placentra II | ZCE

Re: Empty result of the web service method call

am 24.01.2008 14:29:08 von Ralfeus

The response from the web service was seen at the client network
interface. If the response is correct one I'll continue fight with C#
client side :-)
Thank you for response

On 23 Led, 02:08, Mike Placentra II
wrote:
> On Jan 22, 5:00 am, Ralfeus wrote:
>
> > I have a web service written on the PHP.
>
> > The client is written on the C#. It normally calls the method
> > Synchronize and gets a result without errors. But result is empty
> > array, it has no elements.
> > How to fix it? Can it be a problem with object inheritance and forming
> > result at PHP code?
> > Thank you in advance
>
> Finding a more precise spot in the process where things are broken
> will help you solve the problem.
>
> If that is exactly what is being returned from the server, and it is a
> valid response, then your problem must be in the client. Did you get
> that response data by inspecting the network communication on the test
> client machine or did you log that from PHP? (You can try to output
> the response through C# to find out).
>
> If you can verify that the data safely reaches the client, then there
> will be more people in the C# newsgroup who can help you. Otherwise,
> if you can debug your script with breakpoints and a debugging editor
> or post some of your code then that would be helpful in finding a
> solution to your problem.
>
> -Michael Placentra II | ZCE