Thomas,
   thanks for posting this issue.  I spent few hours on Monday thinking over 
this(when I hacked something in ServiceEndpointServlet).   

I support the idea of not tinkering the schemaLocation in the published wsdl. 
It should be the way the author intended it to be.


  | http://satellite:8080/ws4ee-jbws153/schemas/get/Get.xsd 
  | 

will be routed to the ServiceEndpointServlet and the following code can capture 
that it is a xsd request  (code is not perfect)


  | protected void doGet(HttpServletRequest req, HttpServletResponse res) 
throws ServletException, IOException
  |    {
  |       String pathInfo = req.getPathInfo();
  |       if (pathInfo != null && (pathInfo.endsWith("xsd") || 
pathInfo.endsWith("XSD")))
  |       {
  |          ServiceEndpointInfo sepInfo = wsEndpoint.getServiceEndpointInfo();
  |          DeploymentInfo di = sepInfo.getDeploymentInfo();
  |          URL warURL = di.localUrl != null ? di.localUrl : di.url;
  |          String warUrl = warURL.toString();
  |          String pathToResource = "wsdl" + pathInfo;
  |          //TODO: Assumption is that the xsd files are relative to 
WEB-INF/wsdl
  |          URL xsdURL = new URL(warUrl + "WEB-INF/" + pathToResource);
  |          res.setContentType("text/xml");
  |          ServletOutputStream outputStream = res.getOutputStream();
  |          IOUtils.copyStream(outputStream, xsdURL.openStream());
  |          outputStream.close();
  |       }
  | 

Just the way, we intercept  "?wsdl"  requests in the servlet and copy the wsdl 
content, we should provide a way to intercept xsd and "included" wsdl in the 
servlet.

The only warning is that this approach has to be tested with multiple testcases.




View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3871329#3871329

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3871329


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.  Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to