Hello Eyad,
can you please share complete stack trace?
Thanks,
Pavel
On 1/31/12 1:30 PM, Eyad Almsalkhi wrote:
> Dears;
>
> I have the following method which is working fine when I am tried to
> call from my web application(FileNet Workplace):
> ***********************************************************************************
>
> public void addImage(String os,String Id,String ut) throws Exception
> {
> Client client;
> String imageUrl ;
> Builder resource;
> ClientResponse response;
> client = Client.create();
> //String imageUrl =
> "http://localhost:8080/imprezzeo-demo/data/image-library/1-2.jpg";
> //imageUrl =
> "http://localhost:9080/Workplace/getImageContent?vsId=%7B0CE109BF-C1F0-47EE-B217-688AAC861590%7D&objectStoreName=FNOBJ&objectType=document&mode=download&ut=
> <http://localhost:9080/Workplace/getImageContent?vsId=%7B0CE109BF-C1F0-47EE-B217-688AAC861590%7D&objectStoreName=FNOBJ&objectType=document&mode=download&ut=>"+userToken;
> imageUrl =
> workplaceUrl+"getImageContent?Id="+Id+"&objectStoreName="+os+"&objectType=document&mode=download&ut="+ut;
> System.out.println("#############: "+imageUrl);
> resource = client.resource(mImprezzeoEngineUrl)
> .path("image")
> .path(Id)
> .queryParam("url", imageUrl)
> .queryParam("overwrite", "true")
> .getRequestBuilder();
> response = resource.post(ClientResponse.class);
> System.out.println("@@@@@@@@@@@Eyad: response:
> "+response.getStatus());
> if(response==null || response.getStatus()!=204)//failure to
> add to Imprezzeo repository
> throw new IOException("Fail to add image to Imprezzeo repository");
> }
> ***********************************************************************************
> but when I am trying to call the same function from back end engine
> (using FileNet event subscription), I have an exception at line
> "client = Client.create();"
> This line returns null exception.
>
> any help please.
> thanks
>
>
>
> --
> Regards,
> .......................................
> Eyad Almasalkhi
> Software Engineer