I am send a XML String which is extract from XML file to a jax Web-services
My XML is
<GTSRequest command="version">
<Authorization account="jrl" user="" password="123456"/>
</GTSRequest>
and Java Code is
public static void main(String[] args) throws IOException {
// TODO code application logic here
String a = System.getProperty("user.dir") + "/XML/Get Current GTS Version.xml";
System.out.println(convertXMLFileToString(a));
// call web service
System.out.println(gtsServiceRequest(convertXMLFileToString(a)));
}
public static String convertXMLFileToString(String fileName) throws FileNotFoundException, IOException {
BufferedReader br = new BufferedReader(new FileReader(fileName));
String everything;
try {
StringBuilder sb = new StringBuilder();
String line = br.readLine();
while (line != null) {
sb.append(line);
sb.append(System.lineSeparator());
line = br.readLine();
}
everything = sb.toString();
} finally {
br.close();
}
return everything;
}
But when string goes to server the string is change in
lt;?xml version="1.0" encoding="utf-8" ?>
<GTSRequest command="version">
<Authorization account="jrl" user="" password="123456"/>
</GTSRequest>
but i don't want it please help me
 
No comments:
Post a Comment