RE: [SOAP] multiple data sets
| From: | Alexandre Morgaut | Date: | Thu, 19 Jun 2008 11:38:48 +0000 |
| Subject: | RE: [SOAP] multiple data sets | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-2819@lists.php.net to get a copy of this message | ||
maybe should you set OrderItemDetail as an array :
$i = 0;
$params->OrderItemDetailsList->OrderItemDetail[$i]->ProductID =
'1';$params->OrderItemDetailsList->OrderItemDetail[$i]->QuantityOrdered = 2;
$i++;
$params->OrderItemDetailsList->OrderItemDetail[$i]->ProductID =
'2';$params->OrderItemDetailsList->OrderItemDetail[$i]->QuantityOrdered = 2;Note
that as your model define ProductID as a string, you should affect it the string '1'
instead of the number 1.
> To: soap@lists.php.net> From: iamdecal@gmail.com> Date: Thu, 19 Jun 2008 11:40:02
> +0100> Subject: [SOAP] multiple data sets> > A large part of the problem is that i dont
> know the correct vocabulary. i> dont think multiple data sets is the correct phrase, so even if
> you cant> help with the problem - the correct phrase for what im trying to do may help> me
> search for my own answers.> > I'm trying to work out how to get mutliple data sets to
> work, the wsdl> requires...> > [..]> <OrderItemDetailsList>>
> <OrderItemDetail>> <ProductID>string</ProductID>>
> <QuantityOrdered>int</QuantityOrdered>> <OrderItemDetail>>
> <ProductID>string</ProductID>> <QuantityOrdered>int</QuantityOrdered>>
> </OrderItemDetail>> </OrderItemDetailsList>> [..]> > so normally i'd
> use something like> > $client = new SoapClient($wsdl,$options);> $method =
> "DoSomething";> $params = new stdClass;> >
> $params->OrderItemDetailsList->OrderItemDetail->ProductID = 1;>
> $params->OrderItemDetailsList->OrderItemDetail->QuantityOrdered = 2;> > but obviously
> when i add the second set of data, it just overwrites the> first, i'm sure there must be
> away round this, but i just cant see it.> > > wsdl>
> http://213.123.43.101:8078/helixsopext.asmx?WSDL> method
> description>
> http://213.123.43.101:8078/helixsopext.asmx?op=OrderProcessAllClientProdID>
> > > --> Regards> Derek Almond>
> http://www.derekalmond.com> > > > > > > >
> > > -- > PHP Soap Mailing List (http://www.php.net/)> To unsubscribe, visit:
> http://www.php.net/unsub.php>
_________________________________________________________________
Faites vous de nouveaux amis grâce à l'annuaire des profils Messenger !
http://home.services.spaces.live.com/search/?page=searchresults&ss=true&FormId=AdvPeopleSearch&form=SPXFRM&tp=3&sc=2&pg=0&Search.DisplayName=Nom+public&search.gender=&search.age=&Search.FirstName=Pr%C3%A9nom&Search.LastName=Nom&search.location=Lieu&search.occupation=Profession&search.interests=amis&submit=Rechercher