sreeis
2011-12-27 06:54:41 UTC
Hi,
I am trying to use below jersey code (v1.0.2) to access a web service
protected by siteminder. But gets compile error at the line which receives
the response.
import javax.ws.rs.core.MediaType;
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.client.ClientHandlerException;
.
.
WebResource webResource = client.resource(wsURL);
com.sun.jersey.api.client.WebResource.Builder wbsrc = webResource.cookie(new
javax.ws.rs.core.Cookie("SMSESSION", smSession));
wsOutput = wbsrc.accept("application/xml").get(String.class); // Error
here
The above fails to compile with error
The method accept(MediaType[]) in the type PartialRequestBuilder is not
applicable for the arguments (String)
Any help is appreciated.
Thanks,
Sree
--
View this message in context: http://jersey.576304.n2.nabble.com/WebResource-Builder-Issue-with-setting-response-type-tp7129413p7129413.html
Sent from the Jersey mailing list archive at Nabble.com.
I am trying to use below jersey code (v1.0.2) to access a web service
protected by siteminder. But gets compile error at the line which receives
the response.
import javax.ws.rs.core.MediaType;
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.client.ClientHandlerException;
.
.
WebResource webResource = client.resource(wsURL);
com.sun.jersey.api.client.WebResource.Builder wbsrc = webResource.cookie(new
javax.ws.rs.core.Cookie("SMSESSION", smSession));
wsOutput = wbsrc.accept("application/xml").get(String.class); // Error
here
The above fails to compile with error
The method accept(MediaType[]) in the type PartialRequestBuilder is not
applicable for the arguments (String)
Any help is appreciated.
Thanks,
Sree
--
View this message in context: http://jersey.576304.n2.nabble.com/WebResource-Builder-Issue-with-setting-response-type-tp7129413p7129413.html
Sent from the Jersey mailing list archive at Nabble.com.