私は次のようにC#とNetDocumentsのSOAP APIを呼び出すことができます。私は、軸1.4でJavaによってNetDocumentsのSOAP APIを呼び出すときしかし、私はエラーが表示されなかっJavaでNetDocuments SOAP APIを呼び出す方法は?
// Authenticate to the NetDocuments directory service
ndDir.Directory ndDirectory = new ndDir.Directory();
ndDirectory.CookieContainer = new System.Net.CookieContainer(); // enable cookie handling
ndDirectory.Login(username, password);
// Connect to the NetDocuments storage service
ndStor.storage ndStorage = new ndStor.storage();
ndStorage.CookieContainer = ndDirectory.CookieContainer; // share cookies with the directory service
XmlNode searchRes = ndStorage.Search(criteria, attrList);
:「認証なしのセッションを認証セッションがタイムアウトしましたかこの呼び出しの前に確立されていませんでした。
DirectorySoapStub stubDir = new DirectorySoapStub(new URL("https://vault.netvoyage.com/ndApi/directory.asmx"), new DirectoryLocator());
StorageSoapStub stubSto = new StorageSoapStub(new URL("https://vault.netvoyage.com/ndApi/storage.asmx"), new StorageLocator());
stubSto.setMaintainSession(true);
stubDir.login(username, password);
javax.xml.soap.MimeHeaders mhds = stubDir._getCall().getMessageContext().getCurrentMessage().getMimeHeaders();
java.util.Iterator iterator = mhds.getAllHeaders();
while (iterator.hasNext()) {
javax.xml.soap.MimeHeader mhd = (javax.xml.soap.MimeHeader)iterator.next();
if ("set-cookie".indexOf(mhd.getName()) >= 0) {
stubSto._setProperty(mhd.getName(), mhd.getValue());
}
}
stubSto.search(criteria, attrList);
JavaでCookieContainerと同様のことはありますか? Axis 1.4でJavaからNetDocuments SOAP APIを呼び出すにはどうすればよいですか?