Guillaume,
1. sf.setTransportId("http://schemas.xmlsoap.org/wsdl/http/"); where "sf" is you JaxWsServerFactoryBean 2. Yes Cheers, Brice On 5/23/07, tog <[EMAIL PROTECTED]> wrote:
Brice 2 questions: 1- How did you set this transportId ? I saw that http://schemas.xmlsoap.org/wsdl/http/ has been registered in the last commit by Willem but compiling from trunk did not solve my problem. 2 Do you mean that you rely on the cxf-bundle jar file instead of having tons of individual jars ? Guillaume On 5/23/07, Brice Ruth <[EMAIL PROTECTED]> wrote: > > I was able to get past this exception by setting the transportId to " > http://schemas.xmlsoap.org/wsdl/http/" - worked charmingly after that. > > I'm using the comprehensive JAR, not the individual module JARs, on my > classpath. Is this not recommended? > > -Brice > > On 5/23/07, Willem Jiang <[EMAIL PROTECTED]> wrote: > > > > Hi tog, > > > > Can you fill a jira and attached the workspace with it. Or you can send > > a mail to directly. > > I will have a look at it. > > > > I just fixed the same ClassCastException in the CXFServlet, it was > > related to the transportId and TransportFactory. > > > > Cheers, > > > > Willem. > > > > tog wrote: > > > Hi Willem, > > > > > > I have exactly the same error: > > > > > > Exception in thread "main" java.lang.ClassCastException: > > > org.apache.cxf.service.model.BindingInfo > > > > > > while my classpath is made of: > > > > > > cxf-api-2.0-incubator-SNAPSHOT.jar > > > cxf-common-utilities-2.0-incubator-SNAPSHOT.jar > > > cxf-rt-bindings-http-2.0-incubator-SNAPSHOT.jar > > > cxf-rt-bindings-soap-2.0-incubator-SNAPSHOT.jar > > > cxf-rt-core-2.0-incubator-SNAPSHOT.jar > > > cxf-rt-databinding-aegis-2.0-incubator-SNAPSHOT.jar > > > cxf-rt-databinding-jaxb-2.0-incubator-SNAPSHOT.jar > > > cxf-rt-frontend-jaxws-2.0-incubator-SNAPSHOT.jar > > > cxf-rt-frontend-js-2.0-incubator-SNAPSHOT.jar > > > cxf-rt-frontend-simple-2.0-incubator-SNAPSHOT.jar > > > cxf-rt-transports-http-2.0-incubator-SNAPSHOT.jar > > > cxf-rt-transports-http-jetty-2.0-incubator-SNAPSHOT.jar > > > cxf-tools-common-2.0-incubator-SNAPSHOT.jar > > > > > > > > > May be I am missing one more ;-) > > > > > > Cheers > > > Guillaume > > > > > > On 5/23/07, Willem Jiang <[EMAIL PROTECTED]> wrote: > > >> > > >> Hi Brice, > > >> > > >> It looks like you missing the cxf-rt-transports-http-jetty module in > > >> your class path. > > >> Can you check your class path for it? > > >> > > >> BTW, > > >> I just fixed some bugs in CXFServlet, now I am running the test. I > > think > > >> you can use the restful_http_binding with http-servlet transport > after > > >> my next commit. > > >> > > >> Cheers, > > >> Willem. > > >> > > >> > > >> Brice Ruth wrote: > > >> > Back again ... > > >> > > > >> > Trying to get JaxWsServerFactoryBean to work with my service using > > >> > restful > > >> > http binding. Following the code in Main.java provided by the > > >> > restful_http_binding sample, to the T. > > >> > > > >> > public static void main(String[] args) { > > >> > // Build up the server factory bean > > >> > JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean(); > > >> > sf.setServiceClass(MessageService.class); > > >> > // Use the HTTP Binding which understands the Java Rest > > >> > Annotations > > >> > sf.setBindingId(HttpBindingFactory.HTTP_BINDING_ID); > > >> > sf.setAddress("http://localhost:8080/xml/"); > > >> > > > >> > sf.getServiceFactory().setInvoker(new BeanInvoker( > > >> > injector.getInstance(new MessageServiceImpl()))); > > >> > > > >> > sf.create(); > > >> > } > > >> > > > >> > Here's the stack trace. Any ideas? The sample in > restful_http_binding > > >> > works > > >> > when I run $ ant server. > > >> > > > >> > May 23, 2007 12:09:37 AM > > >> > > > >> > > > org.apache.cxf.service.factory.ReflectionServiceFactoryBeanbuildServiceFromClass > > >> > > >> > > > >> > INFO: Creating Service { > http://example.com/}MessageServiceServicefrom > > >> > class > > >> > com.example.MessageService > > >> > May 23, 2007 12:09:38 AM > > >> > org.apache.cxf.binding.http.strategy.ConventionStrategy map > > >> > INFO: Mapping method getMessage to resource /messages/{arg0} and > verb > > >> GET > > >> > May 23, 2007 12:09:38 AM > > >> > org.apache.cxf.binding.http.strategy.ConventionStrategy map > > >> > INFO: Mapping method addMessage to resource /messages and verb POST > > >> > May 23, 2007 12:09:38 AM > > >> > org.apache.cxf.binding.http.strategy.ConventionStrategy map > > >> > INFO: Mapping method deleteMessage to resource /messages/{arg0} and > > >> verb > > >> > DELETE > > >> > May 23, 2007 12:09:38 AM > > >> > org.apache.cxf.binding.http.strategy.ConventionStrategy map > > >> > INFO: Mapping method updateMessage to resource /messages/{arg0} and > > >> > verb PUT > > >> > Exception in thread "main" java.lang.ClassCastException: > > >> > org.apache.cxf.service.model.BindingInfo > > >> > at > > >> > > org.apache.cxf.binding.soap.SoapTransportFactory.createPortExtensors( > > >> > SoapTransportFactory.java:89) > > >> > at > > >> org.apache.cxf.frontend.AbstractEndpointFactory.createEndpointInfo > > >> ( > > >> > AbstractEndpointFactory.java:212) > > >> > at > org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint( > > >> > AbstractEndpointFactory.java:104) > > >> > at org.apache.cxf.frontend.ServerFactoryBean.create( > > >> > ServerFactoryBean.java:84) > > >> > at Main.main(Main.java:44) > > >> > > > >> > > > >> > > >> > > >> > > > > > > > > > > > > -- > Brice Ruth > Software Engineer, Madison WI >
-- Brice Ruth Software Engineer, Madison WI