Forums Register Login

PATH_INFO in messagecontext getting retrieved as null

+Pie Number of slices to send: Send
We have a JAX-WS Provider<Source> based webservice hosted in weblogic 10.3.

@WebServiceProvider(targetNamespace = "http://wl-spot.com/wsSamples/restfulWebService1", serviceName = "RestfulWS")
@BindingType(value = HTTPBinding.HTTP_BINDING)
public class RestfulWS implements Provider<Source> {
public RestfulWS()
{

System.out.println("Inside RestfulWS ctor");
}

public Source invoke(Source source) {
try {

System.out.println("Inside RestfulWS invoke;");
MessageContext messageContext = wsContext.getMessageContext();
String requestMethod = (String) messageContext.get(MessageContext.HTTP_REQUEST_METHOD);
String query = (String) messageContext.get(MessageContext.QUERY_STRING);
String path = (String) messageContext.get(MessageContext.PATH_INFO);
.....
....

Though we retrieve the querystrings and request method successfully,the path info is always getting retrieved as null.

The web.xml is as follows:



<?xml version='1.0' encoding='UTF-8'?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5">
<display-name>RestfulWSWebApp</display-name>
<servlet-mapping>
<servlet-name>RestfulWSServlethttp</servlet-name>
<url-pattern>/RestfulWS/*</url-pattern>
</servlet-mapping>
</web-app>


Where are we going wrong.
Any help is appreciated.




+Pie Number of slices to send: Send
Hi Randhir,
I see there is no Servelt - Servlet Class mapping. What is that missing bit?

+Pie Number of slices to send: Send
God catch.But the service perse is working fine.
So I believe for Provider based JAX-WS services,the servlet is auto-discovered during deployment?

Not sure - will appreciate comments.
But even if the implementation class is specifically mentioned in the servlet-class mapping,it does not resolve the PATH_INFO problem.
+Pie Number of slices to send: Send
Hi Ranadhir,

So I believe for Provider based JAX-WS services,the servlet is auto-discovered during deployment?


Not sure how it is different from provider to provider. But, if you can see web.xml being generated by your provider and have url mapping details. I'm sure you should also see servlet-class mapping.

But even if the implementation class is specifically mentioned in the servlet-class mapping,it does not resolve the PATH_INFO problem.


Is your web service working? What MessageContext you are using? (logical or SOAP)

Shiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2016 times.
Similar Threads
Path Not Reaching Servlet
HEEEELP!!!
please help me with this app - URGENT !
Could not get the connection in struts database application
The AXIS engine could not find a target service to invoke
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 05:42:13.