this is java webservices code and please convert to C# webservices code, just change for me , i think you understand my probelm, and please do for me
here is a code below ,
<div>import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.util.Enumeration;
import java.util.Properties;
import java.util.Vector;</div> <div>import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;</div> <div>import com.maaco.server.mServlet;</div> <div>public class ProcessTransferRequest extends mServlet {</div> <div> public void service(HttpServletRequest req, HttpServletResponse res)
throws ServletException {</div> <div> try {
//PrintWriter wlog = new PrintWriter(new FileOutputStream("C:/temp/xmlLog.txt"));
Vector wlogMsg = new Vector();
String wresponse = "OK";
try {
System.out.println("parser count "+XmlTransferParser.parserCount);
XmlTransferParser wrequestProcessor = new XmlTransferParser( new Properties(), wlogMsg);
wrequestProcessor.generateDecodedXmlPages(req.getReader());
//if (wrequestProcessor.isTransactionOK()) {
wresponse = wrequestProcessor.getZipedAndEncryptedResponse();
/*}
else {
res.setStatus(HttpURLConnection.HTTP_BAD_REQUEST);
}*/
} catch (Throwable ex) {
//ex.printStackTrace(wlog);
ex.printStackTrace();
}
/*
Enumeration wenum = wlogMsg.elements();
if (wenum != null) {
while (wenum.hasMoreElements()) {
wlog.println((String) wenum.nextElement());
}
}
wlog.close(); // send response back
*/
PrintWriter out = new PrintWriter(res.getOutputStream());
out.println(wresponse);
out.flush();
out.close();
} catch (Throwable e) {
try {
PrintWriter out = new PrintWriter(res.getOutputStream());
e.printStackTrace(out);
out.flush();
out.close();
} catch (Exception ex) {
}
}
finally {
XmlTransferParser.parserCount--;
}
}
}
}
zubair khalil 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.