Hi,
I made a mistake in the first solution I provided to solve this problem. In fact, you can let the service definition XML files in the WEB-INF directory, but you have to append the name of the SOAP servlet mapping + '/' to the name of each of the servlet init parameters.
<servlet>
<servlet-name>soap_servlet</servlet-name>
<servlet-class>org.jibx.soap.server.SOAPServlet</servlet-class>
<init-param>
<param-name>soap/rechercher-professionnel-sante</param-name>
<param-value>rechercher-professionnel-sante.xml</param-value>
</init-param>
<init-param>
<param-name>soap/rechercher-ressortissant</param-name>
<param-value>rechercher-ressortissant.xml</param-value>
</init-param>
</servlet>
(...)
<servlet-mapping>
<servlet-name>soap_servlet</servlet-name>
<url-pattern>/soap/*</url-pattern>
</servlet-mapping>
--
Hoani CROSS
[ Service Informatique | I.T. Department ]
[ Caisse de Prévoyance Sociale | French Polynesia Social Security & Healthcare Institution ]
| [EMAIL PROTECTED]
Envoyé par : [EMAIL PROTECTED] 25/08/2005 14:40
|
Pour : [email protected] cc : Objet : Re : Re: [jibx-users] jibx-soap not at root |
Looking further in the SOAPServlet class source code it seems that it works like this :
- initServices() load each init-parameter and associated XML file located in WEB-INF folder, and stores the unmarshalled XML service definitions in a map using the init-parameter name appended to a "/" character as key
- each request triggers the associated doXxx() method which tries to retrieve the associated service definition using the returned value of HTTPServletRequet.getServletPath().
In other words, two possible solutions :
- store the XML service definitions to a sub-directory of WEB-INF named using the mapped servlet name ("soap" for example) and reference them in web.xml as "soap/my-service.xml",
- modify SOAPServlet initServices() method to append "/" + getServletContextName() as map key for XML services descriptors
Hoani CROSS
[ Service Informatique | I.T. Department ]
[ Caisse de Prévoyance Sociale | French Polynesia Social Security & Healthcare Institution ]
| Tim Sawyer <[EMAIL PROTECTED]>
Envoyé par : [EMAIL PROTECTED] 25/08/2005 00:36
| Pour : <[email protected]> cc : Tim Sawyer <[EMAIL PROTECTED]> Objet : Re: [jibx-users] jibx-soap not at root |
Thanks Mocky, that still results in the same problem.
Anyone got any more ideas?
Tim.
Mocky Habeeb said:
>
> Have you tried using a wildcard in your url pattern?
>
> e.g. /soap/*
>
> Mocky
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> On Behalf Of Tim Sawyer
> Sent: Wednesday, August 24, 2005 12:49 PM
> To: [email protected]
> Cc: Tim Sawyer
> Subject: [jibx-users] jibx-soap not at root
>
>
> Hi,
>
> I'm tring to use jibx-soap in a project where it is not the only servlet
> - there's also a tapestry app in the same WAR file.
>
> I'm therefore trying to map it like this:
>
>
> soap_servlet
> /soap
>
>
> rather than like this:
>
>
> soap_servlet
> /
>
>
> The one with /soap doesn't work, the one with / does.
>
> Anyone point me in the right direction?
>
> ta,
>
> Tim.
>
> (PS: Dennis - I haven't forgotten you want a quote.)
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users
