Vitaliy Lukashev [
http://community.jboss.org/people/VitaliyLu] replied to the discussion
"Problem in retrieving WSDL from remote endpoint"
To view the discussion, visit:
http://community.jboss.org/message/533645#533645
--------------------------------------------------------------
Hi all !
I want to know have i a right in decision?
in a HttpGatewayServlet class:
protected void service(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, IOException {
// if it's a wsdl request, serve up the contract then short-circuit
if ("wsdl".equalsIgnoreCase(req.getQueryString())) {
resp.setCharacterEncoding("UTF-8");
Charset charset = Charset.forName("UTF-8"); // add
CharsetEncoder chr = charset.newEncoder(); //add
String mimeType = (contract != null ? contract.getMimeType() :
"text/xml");
resp.setContentType(mimeType);
String data = (contract != null ? contract.getData() :
"<definitions/>");
ByteBuffer bbuf = chr.encode(CharBuffer.wrap(data)); //add
resp.setContentLength(bbuf.capacity()); // this is problem place i change
length buf
Writer writer = new BufferedWriter(resp.getWriter());
writer.write(data);
writer.flush();
return;
}
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/533645#533645]
Start a new discussion in JBoss ESB Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]