Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PATH_INFO in messagecontext getting retrieved as null

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.




 
Ranch Hand
Posts: 577
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Randhir,
I see there is no Servelt - Servlet Class mapping. What is that missing bit?

 
Ranadhir Nag
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Naren Chivukula
Ranch Hand
Posts: 577
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)

 
I don't always make ads but when I do they're tiny
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic