You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Deping Chian <de...@infopoll.net> on 2001/02/08 17:55:12 UTC

Extract XML submission from another Delphi server?

This may be a little off topic for struts. 

I want my JSP/struts page to accept XML data submission from another
server written in Delphi/windows. I know only XML data has been sent,
but I just can not get it from JSP.

I tried: 

      StringBuffer sb = new StringBuffer();
      java.io.BufferedReader in = req.getReader();
      if (in.ready()) {
        in.reset();
        String line;
        char[] c = new char[req.getContentLength()];
        int i = in.read(c);
        if (i>0) sb.append(new String(c));
      }
      in.close();


or 

     java.net.URL url = new java.net.URL(req.getScheme(),
                          req.getServerName(),
                          req.getServerPort(),
                          req.getContextPath());
	String = (String)url.getContent();


They all failed to give the XML document. Could somebody help?

Thanks,

Deping