[wsf-c-dev] [jira] Commented: (WSFPHP-212) problem serializing a 2
dimentional array
Dimuthu Gamage (JIRA)
jira at wso2.org
Thu Feb 21 20:08:44 PST 2008
[ https://wso2.org/jira/browse/WSFPHP-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15673#action_15673 ]
Dimuthu Gamage commented on WSFPHP-212:
---------------------------------------
Hi Dushshantha,
I think your code should be corrected to,
$input = new inArrayString2D();
//note that I m creating "ArrayOfstring" objects
$strArray0 = new ArrayOfstring();
$strArray0->string = array("str00","str01","str02");
$strArray1 = new ArrayOfstring();
$strArray1->string = array("str10","str11","str12");
$arrStrArr = array($strArray0,$strArray1);
$input->ArrayOfstring = $arrStrArr;
$val = $proxy->RetArrayString2D($input);
I couldn't test this, But this should work:)
> problem serializing a 2 dimentional array
> -----------------------------------------
>
> Key: WSFPHP-212
> URL: https://wso2.org/jira/browse/WSFPHP-212
> Project: WSO2 WSF/PHP
> Issue Type: Bug
> Components: WSDL Mode
> Affects Versions: Current (nightly)
> Environment: All
> Reporter: Dushshantha Chandradasa
>
> class inArrayString2D {
> public $ArrayOfstring; //ArrayOfstring
> }
> class ArrayOfstring {
> public $string; //string
> }
> ...
> $input = new inArrayString2D();
>
> $strArray0 = array("str00","str01","str02");
> $strArray1 = array("str10","str11","str12");
>
> $arrStrArr = array($strArray0,$strArray1);
>
> $input->ArrayOfstring = $arrStrArr;
>
> $val = $proxy->RetArrayString2D($input);
> Above is a segment of script i used to send a 2D string array. But the message on the wire sends only one element from each array.
> <ns1:inArrayString2D xmlns:ns1="http://tempuri.org/" xmlns:ns2="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
> <ns2:ArrayOfstring>
> <ns2:string>str00</ns2:string>
> </ns2:ArrayOfstring>
> <ns2:ArrayOfstring>
> <ns2:string>str10</ns2:string>
> </ns2:ArrayOfstring>
> </ns1:inArrayString2D>
> Steps to regenerate the problem:
> cd src/tests/samples/interop_wsdl_mode/cmplx_all
> php microsoft_ret_arrayString2D.phpt
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://wso2.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the Wsf-c-dev
mailing list