Hi Leandro,
Not sure what you are asking but maybe some of this can help? Have you seen
https://github.com/alxp/islandora/blob/master/api/fedora_item.inc - function add_datastream_from_url ?
Here is some php borrowed from Paul and others,
function ingestXML($xml){
//if tidy is available
$config = array(
'clean' => true,
'bare' => true,
'input-xml' => true,
'output-xml' => true);
$tidy = new tidy();
$tidy->parseString($xml, $config, 'utf8');
$tidy->cleanRepair();
$xml = tidy_get_output($tidy);
//$xml = utf8_encode(str_replace("�", "", $xml));//spiders live where they want
//
http://www.fileformat.info/info/unicode/char/fffd/index.htm
$url = '
http://localhost:8080/fedora/services/management?wsdl';
$foxml = new DOMDocument();
$foxml->loadXML($xml);
$params = array('objectXML' => $foxml->saveXML(), 'format' => "info:fedora/fedora-system:FOXML-1.1", 'logMessage'=>"Fedora Object Ingested");
$client = new SoapClient($url, array (
'login' => 'fedoraAdmin',
'password' => 'fedoraAdmin'
));
try {
$client->__soapCall('ingest', array ('parameters' => $params));
}catch (Exception $e){
echo 'Caught exception: ', $e->getMessage(), "\n";
}
echo '<pre>',print_r($params),'</pre>';
}
some pages that may help
//
https://wiki.duraspace.org/display/FCKB/mail/8753405
//
http://fedora-commons.org/documentation/3.0/userdocs/client/servlet/soapclient/index.html
//
http://www.fedora-commons.org/documentation/3.0/userdocs/server/webservices/apia/index.html
//
http://www.fedora-commons.org/documentation/3.0/userdocs/server/webservices/apim/index.html
//
http://search.cpan.org/~dfielding/FedoraCommons-APIA-0.5/lib/FedoraCommons/APIA.pm
//
http://search.cpan.org/~dfielding/FedoraCommons-APIM-0.6/lib/FedoraCommons/APIM.pm
best,