Entwickler-Ecke

Verteilte Systeme - soap Fehler


jogisarge - Di 06.11.07 15:47
Titel: soap Fehler
Hi to all,


i have a problem using a webservice(.NET).
The webservice expects a body like this:

XML-Daten
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
<soap:Body>
  <GetItemInfo xmlns="http://server.de/o2Web/o2Con">
    <InItemsRows>
      <InItemsRow>
        <ItemID>int</ItemID>
        <Quantity>double</Quantity>
      </InItemsRow>
      <InItemsRow>
        <ItemID>int</ItemID>
        <Quantity>double</Quantity>
      </InItemsRow>
    </InItemsRows>
  </GetItemInfo>
</soap:Body>

i have no idea how to build the structure above with arrays.
my attempt looks like :

Quelltext
1:
2:
3:
4:
5:
$client = new SoapClient("http://server.de/o2Web/o2Con?WSDL");
$p1 = new SoapParam(5,'Quantity');
$p2 = new SoapParam(4757380,'ItemID');
$parms = array($p1,$p2);
$result = $client->__soapCall("GetItemInfo",$parms);

the server throws an error:

Quelltext
1:
2:
Der Server konnte die Anforderung nicht verarbeiten. --> Der 
Objektverweis wurde nicht auf eine Objektinstanz festgelegt.

please help me, im new in Soap.
I searched for help in the php page, but i don't find an example that was easy to understand.

Bye jogi


Moderiert von user profile iconChristian S.: Topic aus Web und Netzwerk verschoben am Di 06.11.2007 um 16:48
Moderiert von user profile iconChristian S.: Replaced code with xml tags


Yogu - Di 06.11.07 19:06

I don't know, what that is, but a fact ist, a part of your parameter is nil.
I wonder, why there's a German error message. You speek English; and you have a German version of the program? That's funny.

Ich weiß nicht, was das ist, aber es steht fest, dass ein Teil deines Parameters nil ist.
Ich wundere mich, warum du eine deutsche Fehlermeldung erhältst. Du sprichst englisch; und du hast eine deutsche Version des Programms? Das ist komisch.