|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
multiple data setsA 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 |
|
|
RE: multiple data setsmaybe 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@...> From: iamdecal@...> 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 |
|
|
Re: multiple data sets>>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; the problem i get this is that the xml comes out as <OrderItemDetailsList>> <OrderItemDetail> <1> <ProductID>string</ProductID> <QuantityOrdered>int</QuantityOrdered> </1> <OrderItemDetail> <2> <ProductID>string</ProductID> <QuantityOrdered>int</QuantityOrdered> </2> </OrderItemDetail> </OrderItemDetailsList i'm sure this must be a comon problem, but its driving me mad ;p( -- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
| Free Forum Powered by Nabble | Forum Help |