Path_info showing up as null in Glassfish JAX-WS

I was trying to deploy some JAX-WS endpoints in Glassfish and for some reason this was always returning a null.
String path = (String)mc.get(MessageContext.PATH_INFO); Turns out that the url-pattern must terminate in a \*
 <servlet-mapping>
    <servlet-name>sample_webservice</servlet-name>
    <url-pattern>/jaxws/\*</url-pattern>
 </servlet-mapping>
The /jaxws/\* was the key. When the url-pattern was just /jaxws the endpoint kept showing up as a HTTP-404 error. Once I added the \* in the web.xml - voila !
Will eyeball the jax-ws code to figureout why it does this when I get some time. For now the \* fix works.
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

sameert

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today