Thanks  Beth.

I placed my files in "". So I use "" as the data_url. But I got the error :

 faultCode: {}Uncaught
 faultString: java.lang.NullPointerException:null

    at org.apache.axis.message.SOAPFaultBuilder.createFault (
    at org.apache.axis.message.SOAPFaultBuilder.endElement(

and if I throw AuthzDeniedException I don't get any message but the datastream cannot be added

I use the Call to dynamic create objects then add datastream to the object. The creation of object works well if I don't call the addDatastream. But if I call the addDatastream function (to add the pdf to /datastream) then the creation of object sometimes doesn't work. Do you have any idea what did  I do wrong? Any suggestion would be helpful. Thanks

On 7/27/06, Beth Kirschner <> wrote:
You need to have a web server somewhere (probably where your client application runs), and you can place your file there. A valid data_url, for example, might be:

- Beth

On Jul 26, 2006, at 1:53 AM, Mary M wrote:

Dear Beth,

Can you tell me how to define the "data_url, // dsLocation"? I have my files in "/fedoraHOME/myManagement/upload/myfile.pdf", how do I set the value in data_url?

Many thanks



On 7/18/06, Beth Kirschner <> wrote:

    Here's an example that uses Apache's axis classes, instead of the
FedoraAPIM class. Hope this helps!

- Beth

--- snip --- snip --- snip --- snip --- snip --- snip --- snip ---
snip --- snip ---

import org.apache.axis.client.Service;
import org.apache.axis.client.Call ;

         Service service = new Service();
         Call call = (Call) service.createCall();
         call.setOperationName(new QName
(FedoraConstants.FEDORA_API_URI, "addDatastream") );
         call.setTargetEndpointAddress( new URL(fedoraManageEndpoint) );

         call.invoke( new Object[] { pid, // pid
                                     ds_name, // dsId
                                     new String[] {}, // altIds (none)
                                     ds_name,// dsLabel
                                     fedoraVersions, // versionable
                                     mimeType, // MIMEtype
                                     "", // formatURI (none)
                                     data_url, // dsLocation
                                     "E", // controlGr! oup
                                     "A", // dsState (active)
                                     "initial creation" } ); //
      catch ( Exception e )