Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account
List archives

Problem invoking a provider

binding problem with cxf
(50 lines)
Problem with a multipart request "Couldn't find MIME boundary"
(57 lines)
Jul 2, 2010
Karoudja
Karoudja
Hi all,
I have implemented a Provider for my web service but the request doesn't
pass into my provider. To declare my provider I only have added there 2
lines before my class:
@javax.xml.ws.WebServiceProvider(portName="HelloWorldSoapBinding",
serviceName="HelloWorld")
@javax.xml.ws.ServiceMode(value = javax.xml.ws.Service.Mode.MESSAGE)

Is there no other thing to do?

thanks a lot,
Fabian.




Reply
Tags: providerclasslines
Messages in this thread
Problem invoking a provider
reply Re: Problem invoking a provider
(37 lines) Jul 3, 2010 10:09
Similar Threads
Exceptions while invoking DataProvider
On the user list an issue was raised about exceptions thrown while
retrieving data from
DataProviders. The problem boils down to the fact that the DataProviders
are only invoked during the
rendering phase, after the response has been written so its not possible
to change the response to
an ErrorPage at that stage.

Anyone see an issue with adding the call Table#getRowList to its onRender
event?

Bob


Invoking Web Service from within Camel Component using CXF -- No conduit initiator found error
Hi,

I'm creating a Camel component from which I want to invoke a web service
using CXF. I'm using plain CXF as opposed to the Camel CXF component.

snippet of code that's connecting to the web service looks like the
following

ss = new MyService(mainWsdl.toURI().toURL(), SERVICE_NAME);
port = ss.getMyService();
portBP = (BindingProvider) port; 
urlUsed = (String) portBP.getRequestContext().get
(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);

setHTTPsConnection();


setHTTPsConnection() does the following:

portBP.getRequestContext().put
(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, _endpointAddress);
portBP.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, 
_myUsername);
portBP.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, 
_myPassword);

Client client = ClientProxy.getClient(port);
HTTPConduit http = (HTTPConduit) client.getConduit();
TLSClientParameters tlsParameters = new TLSClientParameters();
:
:

When I run this, I get the following error:


org.apache.cxf.interceptor.Fault: No conduit initiator was found for the
namespace http://schemas.xmlsoap.org/soap/http.
at
org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:102)
at
org.apache.cxf.endpoint.UpfrontConduitSelector.selectConduit(UpfrontConduitSelector.java:71)
at org.apache.cxf.endpoint.ClientImpl.getConduit(ClientImpl.java:711)
at com.acme.webservice.demo.DEMOPort.setHTTPsConnection(PASSPort.java:514)
at com.acme.webservice.demo.DEMOPort.<init>(DEMOPort.java:118)
at
com.acme.webservice.demo.osgi.DEMOReceiverService.init(DEMOReceiverService.java:58)
atcom.acme.webservice.Service.initialize(Service.java:46)
at
com.acme.webservice.demo.camel.DEMOConsumer.doStart(DEMOConsumer.java:63)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)
at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:989)
at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:197)
at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:593)
at
org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
at
org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
at
org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:
235)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationConte
xt.java:358)
at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplic
ationContext.java:320)
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(Dep
endencyWaiterApplicationContextExecutor.java:136)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.cxf.BusException: No conduit initiator was found for
the namespace http://schemas.xmlsoap.org/soap/http.
at
org.apache.cxf.transport.ConduitInitiatorManagerImpl.getConduitInitiator(ConduitInitiatorManagerImpl.java:112)
at
org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:73)
... 24 more


I've seen some posts on the internet from people having a similar problem
using Maven and CXF and the solution was to include the
cxf-rt-transports-http-jetty jar file in thePOM file. I am doing this, and
I
have imported most of the CXF packages into my bundle, but I am still
getting this error.

My POM file has the following dependencies and Import-Package :

<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.6</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>

<!-- cxf using slf4j -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.5.8</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.8</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-core</artifactId>
<version>2.2.7</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>2.2.7</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>2.2.7</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-bindings-soap</artifactId>
<version>2.2.7</version>
<scope>runtime</scope>
</dependency>

<!-- using Jetty with CXF -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
<version>2.2.7</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle</artifactId>
<version>2.2.6-fuse-01-00</version>
<scope>runtime</scope>
</dependency>


<!-- using JAXB -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.0</version>
</dependency>

<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring-osgi</artifactId>
<version>2.1.0</version>
</dependency>

<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test</artifactId>
<version>2.2.0</version>
<scope>test</scope>
</dependency>

<dependency> 
<groupId>org.osgi</groupId> 
<artifactId>osgi_R4_core</artifactId> 
<version>1.0</version> <scope>provided</scope> 
<optional>true</optional> 
</dependency> 

<dependency> 
<groupId>org.osgi</groupId> 
<artifactId>osgi_R4_compendium</artifactId> 
<version>1.0</version> 
<scope>provided</scope> 
<optional>true</optional> 
</dependency>


</dependencies>

<build>
<plugins> 

<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>2.2.7</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/passsubscriber.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaDirectory>src/main/resources/schema</schemaDirectory>
<outputDirectory>${project.build.directory}/jaxb-generated-sources/</outputDirectory>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${pom.groupId}.${pom.artifactId}</Bundle-SymbolicName>
<Import-Package>
*,
org.apache.commons.logging,
org.apache.commons.digester;version="2.0",
org.apache.commons.configuration;version="1.6",
org.apache.commons.io;version="1.4",
javax.jws,
javax.wsdl,
META-INF.cxf,
META-INF.cxf.osgi, 
org.apache.cxf,
org.apache.cxf.bus,
org.apache.cxf.bus.spring,
org.apache.cxf.configuration.spring,
org.apache.cxf.resource,
org.apache.cxf.binding,
org.apache.cxf.binding.soap,
org.apache.cxf.binding.soap.model,
org.apache.cxf.binding.soap.saaj,
org.apache.cxf.binding.soap.interceptor,
org.apache.cxf.interceptor,
org.apache.cxf.phase,
org.apache.cxf.frontend,
org.apache.cxf.transport,
org.apache.cxf.transport.http,
org.apache.cxf.transport.https,
org.apache.cxf.transport.http_osgi,
org.apache.cxf.transport.http_jetty,
org.apache.cxf.jaxws.handler,
org.apache.cxf.jaxws.handler.logical,
org.apache.cxf.jaxws.handler.soap,
org.apache.cxf.jaxws.binding.soap,
org.apache.servicemix.util,
org.springframework.beans.factory.config,
org.apache.camel,
org.apache.camel.builder,
org.apache.camel.language,
org.apache.camel.model,
mil.army.us.sec.c2gw.dispatcher.service.model.*,
</Import-Package>
<Require-Bundle>org.apache.cxf.bundle</Require-Bundle>
<Export-Package>
mil.army.us.sec.c2gw.adaptor.*,
</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>


I'm basically stuck at this point, so any help in resolving this is much
appreciated.


-T 




Created: (FELIX-2467) The framework extensions should be returned when invoking the method PackageAd
The framework extensions should be returned when invoking the method
PackageAdmin#getFragments with the system bundle

How can I set concurrent policy for a provider?
I setup a provider service in activeMQ and want to offer 1000 requests at
the
same time. How can I set the thread policy for this provider?




x-net] Creating a provider based on OpenSSL
  Hi all,

I'm currently investigating the possibility of implementing a JSSE 
provider wrapping OpenSSL. This has a couple of obvious advantages:
  - The onus of code maintenance and bug fixing in a security sensitive 
area is moved outside of Harmony.
  - New protocols can be integrated into the Harmony provider with 
minimal effort (updating dependencies rather than implementing them 
ourselves).

Really I'm sending this mail as a heads up, but would be interested to 
know if anyone has any experience/opinions in this area. In particular, 
I'd be interested in ideas on:
  - the best way to setup OpenSSL as a dependency - precompile the 
libraries and make them available for download or compile them at build 
time on the user's machine.
  - how to tie in the Java x-net APIs to the OpenSSL APIs.

Any comments/suggestions welcome.

Regards,
Oliver





question about package provider on Solaris
Hello,

Here is how I am trying to make sure sudo is installed on my solaris
boxes:

            package {'sudo':
              ensure => 'installed',
              provider => 'blastwave',
              adminfile => '/usr/local/etc/adminfile',
            }

The package is installed, but every time puppetd executes, I get this:

	notice: //base_server/Package[sudo]/ensure: created

It seems like the package provider is not seeing that sudo is already
installed….
How can I fix that?

Both my puppetmaster and puppetd are 0.25.5

Thanks,

Don





Changing operation in ServiceMix CXF consumer --> provider
Hi,

    When routing from ServiceMix CXF-BC consumer to ServiceMix CXF-BC
provider, need to call a different operation of CXF provider web service.
The application uses ServiceMix and Camel JBI component. Camel is used for
routing purpose only. The route is

CXF BC consumer ----> Camel ----> CXF BC provider

For example 

operation: {http://example.org}hello

changed to

operation: {http://example.org}greet

I tried to set operation as a header in camel route but is not working.

<route>
    <from uri="jbi:service:http://example.org/helloRouteBuilder"/>
    <setHeader headerName="operationName">
        <constant>greet</constant>
    </setHeader>
    <to uri="jbi:service:http://example.org/greetingService"/>
</route>

I know that this syntax is for Camel CXF endpoints. Will it work for
ServiceMix CXF components?

Anto



Overriding the default Jettison JSON Provider
I've defined a jaxrs server like:

<jaxrs:server id="myService" address="http://localhost:19300/ai/" >

    <jaxrs:serviceBeans>
        <ref bean="resourceService" />
    </jaxrs:serviceBeans>
    <jaxrs:providers>
           <bean
class="org.codehaus.jackson.jaxrs.JacksonJsonProvider">
            <property name="mapper">
             <bean
                class="com.rest.json.ObjectMapperFactoryBean">
            </bean>
            </property>
           </bean>
        <ref bean="jaxbElementProvider" />
    </jaxrs:providers>
    <jaxrs:extensionMappings>
        <entry key="json" value="application/json" />
           <entry key="xml" value="application/xml" />
        </jaxrs:extensionMappings>
 </jaxrs:server>

- For some reason, when I request Json from the service the
org.apache.cxf.jaxrs.provider.JSONProvider#readFrom method is used instead
of the jackson provider. How can I remove/override the built-provider and
replace it with Jackson?

Thanks,


Created: (CAMEL-2906) ValueBuilder should provider the DSL for Predicate
ValueBuilder should provider the DSL for Predicate

Created: (FELIX-2490) OBR repository provider should use lastModified value in xml and/or URL Connec
OBR repository provider should use lastModified value in xml and/or URL
Connection lastModified to check whether to update cached index file

Re: SPI-Fly and provider-configuration file names that are different than the abstract service clas
David,

Have you had chance to take a look at the changes mentioned in ARIES-353?

I can rename the main SPI-Fly project to something else than
spi-fly-core/org.apache.aries.spifly.core and send updated pom.xml
files if you like :).

Thanks,
  Bartek

2010/7/8 Bartosz Kowalewski <kowalewski### @gmail.com>:
 Hi David,

 I've just created ARIES-353. It covers initial changes to be applied
 to to the SPI-Fly project structure. These changes transform SPI-Fly
 into a multi-module project. Once these changes are in SVN, I'll
start
 contributing itests and other improvements.

 Thanks,
  Bartek

 2010/6/29 David Bosschaert <david.bo### @gmail.com>:
> Hi Bartek,
>
> On 25 June 2010 22:32, Bartosz Kowalewski
<kowalewsk### @gmail.com> wrote:
>> Hi David,
>>
>> I managed to make Eclipse Aspects/Weaving work inside a Pax
Exam test.
>> I can contribute this simple project with integration tests
(of course
>> after applying some clean-up) if you find it useful. I think
that
>> SPI-Fly requires a change in project structure anyway - it
needs a
>> parent project and a second subproject - spifly-itests.
>
> That would be greatly appreciated!
>
>> Some more comments on the SPI-Fly + AOP topic:
>> 1. My understanding is that there's no single uniform
mechanism for
>> supporting AspectJ load-time weaving that would work in all
OSGi
>> containers. Due to the specifics of the OSGi world,
container-specific
>> mechanism are required. Am I right? For Equinox it's Equinox
>> Aspects/Weaving and there's no such mechanism for Felix. This
seems to
>> be a really important disadvantage of using LTW in SPI-Fly.
>
> Yes - there is currently no general mechanism to support
load-time
> weaving in OSGi but this is something being worked on in the OSGi
> Alliance so I expect that it will be possible in a standardized
way in
> the future.
>
>> 2. The problem with adding aspects to bundles is still
unresolved. I'm
>> not sure if there's a clean solution for adding aspects to
consumer
>> bundles (or bundles that provide the API). Of course some
ugly
>> solutions can be applied (like my original headache causing
fragment
>> based one), but these are more intrusive that we might wish.
>
> Yes, this is still an open question. Maybe something for the
AspectJ
> mailing list. I will post there.
>
>> 3. I started implementing support for SPI-Consumer and
SPI-Provider
>> headers that contain some data helpful whne running the
aspect, i.e.
>> api name and provider name/version for the Provider header,
and some
>> mechanism to define consumer constraints/hints in the
SPI-Consumer
>> header that would help the aspect that will tweak the thread
context
>> classloader to make decisions about providers. These
mechanisms are
>> similar to the ones that you described in one of your
e-mails.
>> However, I feel that we should first solve #1 and #2 above
and only
>> then it makes sense to continue with the implementation.
>
> cool stuff - looking forward to your contributions :)
>
> Best regards,
>
> David
>