logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

ArrayOfString, client, WSDL, proxy mode: msg#00013

Subject: ArrayOfString, client, WSDL, proxy mode
Hello all,

I've digged through the conference archives & utfg a lot but I cannot
find an answer, so I am reverting to this list as my last chance.

The problem is simple: I got this snippet of WSDL from remote WebService
(UnicenterServicePlus/ServiceDesk) which says

<element name="updateObject">
        <complexType>
                <sequence>
                        <element name="sid" type="xsd:int"/>
                        <element name="objectHandle" type="xsd:string"/>
                        <element name="attrVals"
type="impl:ArrayOfString"/>
                        <element name="attributes"
type="impl:ArrayOfString"/>
                </sequence>
        </complexType>
</element>

I am using the $proxy = $soap_client->getProxy(); method of acces, thus
in my case $result = $proxy->updateObject($obj_vals); (yes, the method
has the same name as its input element).

I have tried all thinkable (for me) methods of creating the $obj_vals
array, at first it was:

$obj_vals["sid"] = intval($in_sid);
$obj_vals["objectHandle"] = $in_mpsv_id;
$obj_vals["attrVals"][0] = "charge_back_id";
$obj_vals["attrVals"][1] = "";
...
$obj_vals["attrVals"][5] = REJECT_HANDLE; 
$obj_vals["attributes"][0] = "persistent_id";

(I've also tried to assigg an array directly, but it's not worth
mentioning as it's in fact the same as this approach)

with no luck, the attrVals and attributes element of the XML request
were empty

<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:x
sd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:SOAP-ENC="http://schemas.xmlso
ap.org/soap/encoding/"
xmlns:impl="http://www.ca.com/UnicenterServicePlus/ServiceDesk";><SOAP-EN
V:Body><updateObject xmlns=""><si
d xmlns="">1783430911</sid><objectHandle
xmlns="">cr:1653612</objectHandle><attrVals xmlns=""><string
xmlns=""/></attrVals><attr
ibutes xmlns=""><string
xmlns=""/></attributes></updateObject></SOAP-ENV:Body></SOAP-ENV:Envelop
e>

so my second thought was creating a new soapval a pass it as a
reference:

$attrVals =
array("charge_back_id","","string3","","support_lev",REJECT_HANDLE);
$attributes = array("persistent_id");
        
$obj_vals["attrVals"] = new
soapval("attrVals","ArrayOfstring",$attrVals);
$obj_vals["attributes"] = new
soapval("attributes","ArrayOfstring",$attributes);

and I ended up with wsdl error: ArrayOfstring (ArrayOfstring) is not a
supported type. (the same with ArrayOfString).

Can the problem be in fact, that the attrVals and attributes property
has no "named" elements and no forced count of elements?

Is there any solution or at least a tip (even "Do not use NuSOAP"
counts) for me?

Thanks a lot!

PS: I cannot change the WSDL as was told to me from Hewlette-Packard
boys who are implementing the UnicenterServicePlus with one of our
customers (in fact a goverment customer)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


<Prev in Thread] Current Thread [Next in Thread>