0
私はRESTfulなWebサービスを持っているし、ブラウザでは、そのように見える動作しません。
接続などは機能しますが、それでも正しく動作していません。接続は、私はこの出力を取得する作業をしているがアンドロイド残りFUL Webサービスクライアントが正しく
InputStream in = null;
String s = "";
try {
in = OpenHttpConnection(url);
Document doc = null;
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db;
try {
db = dbf.newDocumentBuilder();
doc = db.parse(in);
} catch (Exception e) {
e.printStackTrace();
}
doc.getDocumentElement().normalize();
NodeList defs = doc.getElementsByTagName("users"); // iterate through <Definition>s
for (int i=0; i<defs.getLength(); i++) {
Node node = defs.item(i);
if (node.getNodeType() == Node.ELEMENT_NODE) {
Element e = (Element)node; // convert Definition node into an element
NodeList words = (e).getElementsByTagName("user"); // iterate through its <WordDefinition>s
for (int j=0; j<words.getLength(); j++) {
Element we = (Element)words.item(j);
NodeList textNodes = ((Node) we).getChildNodes();
s += ((Node) textNodes.item(0)).getNodeValue() + ". \n";
}
}
}
} catch (IOException e1) {
Log.d("NetworkingActivity", e1.getLocalizedMessage());
}
return s;
::私は、Webサービスをこのようにアクセスしよう
this xml file does not appear to have any style information associated with it
:ブラウザで私はまた、次のメッセージが表示されます
null.
null.
null.