Hi Dan,
I have changed the HelloWorldServer class as
Object implementor = new HelloWorld();
String address = "/helloworld";
Endpoint.publish(address, implementor);
Now it works fine.
Thanks for your help.
When I entered the url http://localhost:8080/testapplication/helloworld It
shows
<soap:Envelope>
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>
No such operation: (HTTP GET PATH_INFO: /testapplication/helloworld)
</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
What does it mean? Is this a error?
But when I append ?wsdl, it shows the correct wsdl file. The sample client
also works fine.
Regards
Saravanan
SaravananRamamoorthy wrote:
>
> Hi Dan,
>
> I have changed the web.xml , now it throws the following error.
>
> javax.xml.ws.WebServiceException:
> org.apache.cxf.service.factory.ServiceConstructionException
>
>
> Regards
> Saravanan R
>
>
>
> dkulp wrote:
>>
>>
>> I think your web.xml would just be something like:
>>
>> <servlet>
>> <servlet-name>CXFServlet</servlet-name>
>> <servlet-class>com.test.HelloWorldServer</servlet-class>
>> <load-on-startup>1</load-on-startup>
>> </servlet>
>> <servlet-mapping>
>> <servlet-name>CXFServlet</servlet-name>
>> <url-pattern>/*</url-pattern>
>> </servlet-mapping>
>>
>> Dan
>>
>>
>>
>> On Thu February 18 2010 6:32:48 pm SaravananRamamoorthy wrote:
>>> Hi Johan Edstrom,
>>>
>>>
>>> After creating HelloWorld webservice class. I have created a class
>>> called
>>> HelloWorldServer that extends extends CXFNonSpringServlet and override
>>> the
>>> loadBus method.
>>>
>>> CXFServlet cxf= new CXFServlet();
>>> Bus bus = cxf.getBus();
>>> BusFactory.setDefaultBus(bus);
>>> Endpoint.publish("/helloworld", new HelloWorld());
>>>
>>>
>>> and in web.xml I have mapped the HelloWorldServer like
>>>
>>> <servlet>
>>> <servlet-name>CXFServlet</servlet-name>
>>>
>>> <servlet-class>org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet</servl
>>> et-class> <init-param>
>>>
>>> <param-name>org.apache.cxf.transport.servlet.CXFNonSpringServlet</param-nam
>>> e> <param-value>com.test.HelloWorldServer</param-value>
>>> </init-param>
>>> <load-on-startup>1</load-on-startup>
>>> </servlet>
>>>
>>> <servlet-mapping>
>>> <servlet-name>CXFServlet</servlet-name>
>>> <url-pattern>/*</url-pattern>
>>> </servlet-mapping>
>>>
>>> I try to retrieve the wsdl from browser like
>>> http://localhost:8080/testapplication/helloworld , It throws
>>>
>>> javax.servlet.ServletException: At least one resource class should be
>>> specified
>>>
>>> Am I missing something?
>>>
>>> Regards
>>> Saravanan
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Object implementor = new HelloWorld();
>>> String address = "/sara";
>>> Endpoint.publish(address, implementor);
>>>
>>> Johan Edstrom-3 wrote:
>>> > Have you configured web.xml?
>>> >
>>> > Look here :
>>> >
>>> http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/resourc
>>> > es/jaxrs_dispatch/WEB-INF/web.xml
>>> >
>>> > On Feb 18, 2010, at 9:06 AM, SaravananRamamoorthy wrote:
>>> >> Hi All,
>>> >>
>>> >> I have created a Helloworld webservice using cxf.When I publish the
>>> >> endpoint
>>> >> in standalone server, it works fine.
>>> >>
>>> >> How do I publish the Helloworld service in tomcat without using any
>>> >> spring
>>> >> stuff.
>>> >>
>>> >> I go-through the servlet transport without spring , I have created a
>>> >> servet
>>> >> which extends CXFNonSpringServlet and then override the method
>>> loadBus
>>> >> as given in the document.
>>> >>
>>> >> How do I use this servlet in web.xml and publish the endpoint.
>>> >>
>>> >> Please suggest me.
>>> >>
>>> >> Regards
>>> >> Saravanan
>>> >
>>> > Johan Edstrom
>>> >
>>> > [email protected]
>>> >
>>> > They that can give up essential liberty to purchase a little temporary
>>> > safety, deserve neither liberty nor safety.
>>> >
>>> > Benjamin Franklin, Historical Review of Pennsylvania, 1759
>>
>> --
>> Daniel Kulp
>> [email protected]
>> http://www.dankulp.com/blog
>>
>>
>
>
--
View this message in context:
http://old.nabble.com/publishing-jaxws-service-endpoint-tp27638100p27662470.html
Sent from the cxf-user mailing list archive at Nabble.com.