Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to build a web service client with blueprint
    primarykey
    data
    text
    <p>we have built a WAR with one servlet and one JPS and converted it to make a bundle by using the maven bundle plugin. The servlet and jsp's are running fine in Apache Karaf with pax-web. Now I would like to use a web service client in that servlet. How can I achieve that?</p> <p>So far we used the cxf-codegen maven plugin to create all required classes to build a client. We have all the dependencies: <em>cxf-rt-transports-http</em>, <em>cxf-rt-ws-addr</em>, <em>cxf-rt-ws-policy</em>, <em>cxf-rt-frontend-jaxrs</em>, <em>cxf-rt-ws-security</em> and <em>cxf-rt-transports-http-jetty</em> declared in maven. Futhermore I have the following entry inside the blueprint.xml:</p> <pre><code>&lt;blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws" xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd"&gt; &lt;bean id="myServlet" class="com.production.dashboard.DataCombination"&gt; &lt;property name="dataMergingService" ref="dataMergingService"/&gt; &lt;/bean&gt; &lt;service ref="myServlet" interface="javax.servlet.http.HttpServlet"&gt; &lt;service-properties&gt; &lt;entry key="alias" value="/hello" /&gt; &lt;/service-properties&gt; &lt;/service&gt; &lt;jaxws:client id="dataMergingService" serviceClass="com.production.engine.datacombination.OrderDataMergingService" address="http://localhost:8181/engine/datacombination?wsdl" /&gt; </code></pre> <p></p> <p>When I use this approach the injection fails because the client is always null.</p> <p>Could anybody please explain me how a web service client has to be used in OSGi, blueprint and in conjunction with a war enabled bundle?</p> <p>Many thanks in advance.</p> <p>Cheers Hilderich </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload