Announcement

Collapse
No announcement yet.

Soap and change quota for context in php

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Soap and change quota for context in php

    Hi,
    I'm writing my own management software for OX 7.2. If I create context everything is ok but when i try to change quota for context i've got a problem. I'm changing quota with soap function:
    Code:
    (...)
    	$ctx = new Context();
    	$ctx->maxQuota = 1000;
    	$ctx->filestoreId = 2;
    	$cts->id = 96;
    	$ctx->enabled=true;
    	$cts->name="test123.test.pl";
    
    	$result = getContextClient("ox.abad.pl")->changeQuota($ctx,"infostore",0, getCredentialsObject("oxadminmaster", "somepassword"));
    (...)
    Problem is that no matter what I pass to $ctx and to changeQuota i've got always problem like below:
    Code:
    Unmarshalling Error: unexpected element (uri:"", local:"idAsString"). Expected elements are <{http://dataobjects.soap.admin.openexchange.com/xsd}enabled>,
    <{http://dataobjects.soap.admin.openexchange.com/xsd}id>,
    <{http://dataobjects.soap.admin.openexchange.com/xsd}loginMappings>,
    <{http://dataobjects.soap.admin.openexchange.com/xsd}writeDatabase>,
    <{http://dataobjects.soap.admin.openexchange.com/xsd}filestoreId>,
    <{http://dataobjects.soap.admin.openexchange.com/xsd}name>,
    <{http://dataobjects.soap.admin.openexchange.com/xsd}maxQuota>,
    <{http://dataobjects.soap.admin.openexchange.com/xsd}usedQuota>,
    <{http://dataobjects.soap.admin.openexchange.com/xsd}readDatabase>,
    <{http://dataobjects.soap.admin.openexchange.com/xsd}filestore_name>,
    <{http://dataobjects.soap.admin.openexchange.com/xsd}average_size>,
    <{http://dataobjects.soap.admin.openexchange.com/xsd}userAttributes>
    (do i really need to put all this things reported in error to functions?)
    This is my second or third time when i use soap (in any programming language).
    Only one way that I found to change quota remotely is updating row in database. Also i'm trying to avoid cgi-bin scripts for changing quota.
    Does anybody know where I'm making mistake? Thanks for your time to help me.

    Tomasz

  • #2
    Without seeing the code doing the change on the context, it is hard to tell you what the problem is.
    For sure, there is NO function changeQuota in our API.



    (see also http://oxpedia.org/wiki/index.php?ti...ing_using_SOAP for more info)

    Comment

    Working...
    X