From: Gamshad, M. <Moh...@sc...> - 2006-02-28 23:40:16
|
I've been asking the question of how to code for the payload data forever, hopefully some one might have an answer this time around. Basically, I have a wsdl that has the following input data specification: =20 <soapenv:Envelope xmlns:soapenv=3D"http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <tns:FlagFileUpdate IsTestMessage=3D"true" xmlns:soapenc=3D"http://schemas.xmlsoap.org/soap/encoding/"=20 xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"=20 xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" xmlns:tns=3D"urn:PrismServices:data:v1"> =20 <tns:FlagFile Name=3D"testName"> <tns:Description Length=3D"0" IsTruncated=3D"true" TruncationSetting=3D"0">test</tns:Description> <tns:Locale>SomeLocale</tns:Locale> </tns:FlagFile> <tns:ReleaseItemID ID=3D"112233" RemoveLink=3D"true"/> </tns:FlagFileUpdate> </soapenv:Body> /soapenv:Envelope> =20 =20 How would I code for the input data that I have to provide? So, from above I need to provide: =20 - IsTestMessage attribute - Name attribute for FlagFile element - the string value for teh Description element - the ID attribute of the ReleaseItem element. =20 =20 I tried this: =20 $msgParams =3D array('IsTestMessage' =3D> 'True', array(array('Name' =3D> 'testName'), = array('Description' =3D> 'test', 'Locale' =3D> 'SomeLocale'), 'ID' =3D> '112233')); =20 But this doesn't work as (when viewed with a SOAP tool) I get : =20 <SOAP-ENV:Envelope xmlns:SOAP-ENV=3Dhttp://schemas.xmlsoap.org/soap/envelope/ xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" xmlns:xsi=3Dhttp://www.w3.org/2001/XMLSchema-instance=20 xmlns:SOAP-ENC=3D"http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns=3D"urn:PrismServices:data:v1"> <SOAP-ENV:Body> <FlagFileUpdate xmlns=3D"urn:PrismServices:data:v1"> <FlagFile/> <ReleaseItemID/> </FlagFileUpdate> </SOAP-ENV:Body> =20 </SOAP-ENV:Envelope> =20 So, I don't get any of the attributes or the data elements populated. Any help would be appreciated. =20 Thanks, mohsen =20 =20 =20 |