You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Chandan <ch...@in.bosch.com> on 2016/04/25 12:39:20 UTC
HttpPUT is not working in karaf
Hello,
I have tried updating a record in eAsee SDOM using http put method.
It is not executing and continuing executing further.
i added org.apache.httpcomponents/httpclient/4.5.0 bundle as well.
Please provide me some solution.
Please see the below code :
After the control comes to executeMethod = httpClient.executeMethod(m1); it
doesnt go further and instead it goes to the calling method.
HttpMethod m1 = new PutMethod(fetchURL.toString());
m1.setRequestHeader("Content-Type","application/json");
m1.addRequestHeader("Accept", "application/json");
m1.addRequestHeader("OSLC-Core-Version", "2.0");
System.out.println("m1:::::::::::::: " + m1);
executeMethod = httpClient.executeMethod(m1);
System.out.println("After exec method..." );
My manifest file import statement :
Import-Package: org.osgi.framework,org.apache.camel,
org.apache.camel.impl,org.apache.camel.builder,org.apache.camel.builder.xml,
org.apache.camel.model,org.apache.camel.component,org.apache.camel.component.http,org.apache.camel.core.osgi,org.apache.camel.spi,org.apache.xerces.jaxp,org.apache.xerces.parsers,org.xml.sax,org.xml.sax.helpers,org.apache.xerces.impl.dv.dtd,org.apache.xerces.impl.dv.xs,org.apache.commons.httpclient,org.apache.commons.httpclient.auth.w3c.dom,javax.xml.parsers
--
View this message in context: http://karaf.922171.n3.nabble.com/HttpPUT-is-not-working-in-karaf-tp4046346.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: HttpPUT is not working in karaf
Posted by Chandan <ch...@in.bosch.com>.
Hi,
Yes i would have anyway shared the solution EOD.
Here is what I did.
IN Manifest file - i removed
"org.apache.commons.httpclient,org.apache.commons.httpclient.auth," lines in
the import statement which forced it to take the karaf installed features or
bundles instead of manually added jars.
So that worked :)
Regards,
Chandan.
--
View this message in context: http://karaf.922171.n3.nabble.com/HttpPUT-is-not-working-in-karaf-tp4046346p4046373.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: HttpPUT is not working in karaf
Posted by Morgan Hautman <mo...@gmail.com>.
Hi Chandan,
Could you please share your solution/fix? Other people may come across the
same problem.
Regards,
Morgan
2016-04-26 14:05 GMT+02:00 Chandan <ch...@in.bosch.com>:
> Hello JB,
>
> It worked :)
>
> Regards,
> Chandan.
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/HttpPUT-is-not-working-in-karaf-tp4046346p4046369.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>
Re: HttpPUT is not working in karaf
Posted by Chandan <ch...@in.bosch.com>.
Hello JB,
It worked :)
Regards,
Chandan.
--
View this message in context: http://karaf.922171.n3.nabble.com/HttpPUT-is-not-working-in-karaf-tp4046346p4046369.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: HttpPUT is not working in karaf
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Chandan,
Do you have a ClassNotFound exception or any other exception ?
Regards
JB
On 04/26/2016 09:33 AM, Chandan wrote:
> Hello All,
>
> I tried everything but still the problem exist.
>
> Http GET works in karaf but Http PUT doesnt work in karaf.
>
> Could you please help me in resolving this.
>
> I dont feel its Certificate issue, Since GET works.
> What else can be the issue?
>
> In my local i have a jar - org.apache.commons.httpclient.jar
>
> In Karaf what should i do? Manifest file and other details are given in my
> previous posts.
>
> Regards,
> Chandan.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/HttpPUT-is-not-working-in-karaf-tp4046346p4046367.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
RE: HttpPUT is not working in karaf
Posted by Chandan <ch...@in.bosch.com>.
Hello All,
I tried everything but still the problem exist.
Http GET works in karaf but Http PUT doesnt work in karaf.
Could you please help me in resolving this.
I dont feel its Certificate issue, Since GET works.
What else can be the issue?
In my local i have a jar - org.apache.commons.httpclient.jar
In Karaf what should i do? Manifest file and other details are given in my
previous posts.
Regards,
Chandan.
--
View this message in context: http://karaf.922171.n3.nabble.com/HttpPUT-is-not-working-in-karaf-tp4046346p4046367.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.
RE: HttpPUT is not working in karaf
Posted by Chandan <ch...@in.bosch.com>.
Hi All,
Thanks for the reply.
Here is my manifest file -
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Service_Name
Created-By: 1.7.0_40 (Oracle Corporation)
Bundle-SymbolicName: com.abc.xyz
Bundle-Version: 1.0.3
Bundle-Activator: com.abc.xyz.Activator
Bundle-Vendor: Abhilash B
Bundle-Localization: plugin
Import-Package: org.osgi.framework,org.apache.camel,
org.apache.camel.impl,org.apache.camel.builder,org.apache.camel.builder.xml,
org.apache.camel.model,org.apache.camel.component,org.apache.camel.component.http,org.apache.camel.core.osgi,org.apache.camel.spi,org.apache.xerces.jaxp,org.apache.xerces.parsers,org.xml.sax,org.xml.sax.helpers,org.apache.xerces.impl.dv.dtd,org.apache.xerces.impl.dv.xs,org.apache.commons.httpclient,org.apache.commons.httpclient.auth,org.w3c.dom,javax.xml.parsers
I installed the httpclient in karaf with the below cmd -
install -s mvn:org.apache.httpcomponents/httpclient/4.5.2
*--- P.S ->>> Http Get works, but not Http Put*
So, What am i missing?
Regards,
Abhilash/Chandan.
--
View this message in context: http://karaf.922171.n3.nabble.com/HttpPUT-is-not-working-in-karaf-tp4046346p4046354.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.