Yeah, come on on. Sure, have a seat. Sure. Good evening, everyone. Hi, good evening, everyone. I'm Andrew Weiss. It's a real pleasure to welcome you all to the Carnegie Endowment for International Peace. We are delighted to see two very good friends of Carnegie and such a big audience here on hand to listen to Susan Glasser talk with her New Yorker magazine colleague, Josh Yaffa, who's the author of a wonderful new book. Two or three quick programming notes before I turn things over to Susan. One, if you have a cell phone, I'd appreciate it if you could please silence it. There'll be a period at the end of this for questions, so I hope people will all actively participate. We're web-streaming this. And then finally, there's going to be a reception immediately afterwards downstairs with wine and a chance to buy books and have them signed by Josh. So anyways, please welcome Josh Yaffa and Susan Glasser. Thank you. Thank you so much, Andrew, and congratulations, Joshua. He's the first time author, so I'll get to do all the shameless book promotion and flackery while he's still easing into it. Because I can say, having read the book, it is terrific and very worthwhile of your time. And of course, at this moment, he has conveniently arranged for the news gods in Russia to provide him with an all-purpose news hook for his book tour. So we'll get started on that in a moment. I have to say, Andrew, I really want to thank you and Carnegie. I was saying, beforehand, I've been having flashbacks as we were standing offstage to our book launch on a book about Russia and Putin in 2005 in this exact same room. And there is, in fact, this sense of the remarkable long run of Vladimir Putin. At the time, it's hard to believe that was 15 years ago. But I'm not sure anyone in the room or I would have said that Vladimir Putin would not only have blown-plast Leonid Brezhnev's record in power, but would be looking to compete eventually with Stalin in terms of tenure, flash forward 15 years. And we're talking about someone who has been in the Kremlin for more than two decades already and is still only, I believe, 66 years old. So there's this picture making around yesterday on social media of what an aged grandpa Putin would look like, presumably once the Constitution has changed and he's still in power after 2024. I have to admit, in the confusion of impeachment here in Washington, I knew we would be having this event with you today, Joshua. So I thought you could explain to me and to all the rest of us what you actually make of yesterday's events before we get on to your smart observations about how to think about Putin's Russia. What's the deal? Is this leader for life? Is this just a preliminary stage? Do we even care that Medvedev and his government are gone? Are they coming back? I'll try. Please help us, help us, help us. I was on a train today and happily distracted this week with the lunch for my book and other things. So I didn't pay much more acute attention to the news than you, though, did try and catch up on it, certainly, and have some thoughts about what it all might mean, because people have been waiting for something like this for a long time, at least since March of 2018 when Putin was re-elected for a third term. The fact of his re-election was never really in doubt. The Kremlin has long ago created a very manicured and controlled political space where the fact that he would win that election was not the mystery. The only mystery, if there even was one at all, is what would his last ostensible presidential term look like? And most importantly, what would his transition from power, if there would be one, look like? So the real question for Putin's, sorry, fourth term, I spoke, not third, would be what would happen at the end of it. He was a kind of lame duck from day one. So something had to give before 2024. Although he has a long time. I mean, that's the other thing that's mysterious about yesterday, right, is why yesterday. Right. I'm not sure there's a reason why yesterday, why January 15th as opposed to the 14th or the 16th or the 20th. Though I'm guessing the answer will emerge in short order and yesterday will appear as the opening gambit in a longer process of reconfiguring the Constitution, reconfiguring the architecture of power in Russia, removing or sharing some powers of the presidency, giving them to other institutions, building up the profile and influence of a new-ish body, the state council that Putin has begun to reference more and more than he may had as a kind of soft retirement president emeritus. Much of that will require constitutional changes. And because the Putin state likes to do things with the ostensible veneer of democratic process, there's a kind of internal emphasis on rule following, even if they allow themselves the prerogative to set the rules and decide what the rules are. They very much like to keep up the appearances of a rule of law state, at least according to their own definition of the term. It's important then that the parliament, say, has enough time to put forward the necessary changes. If there's a referendum, that can be carried out. If the constitutional court has to weigh in. So what happened yesterday, like I said, I think it's just the first move in what's going to be a whole series of dominoes that just may take time, that maybe you can't pull off. If you want to do it with the veneer of adherence to a kind of process, you can't just do in 2023, but have to set in motion some time before. But your bottom line is Vladimir Putin isn't going anywhere. No, but I think, and this could be famous last words, that the scenario in which he just stays on as president and they change the Constitution to allow a fifth or indefinite number of presidential terms and the system basically remains as it is and he just runs again for president and is the kind of president for life, that seems less likely if not ruled out. Because why would they have removed or softened the power of the presidency if the plan was for him to just stay president forever? This seems like, if nothing else, we can say the plan is he'll do something else besides be president, that something else may be imbued with a lot of power and influence, maybe more than the president, but someone else could be a figurehead, could be a placeholder, a temporary figure, but someone else will be president and Putin will do some other to be determined job. You know, I remember here in Washington at the very beginning of the Obama presidency, which also coincided with the last kind of leadership shakeup in Moscow when Putin, again, to observe the, at the time, constitutional niceties stepped aside temporarily from the presidency and handed that title over to Dmitry Medvedev, became prime minister. You know, there were endless probably events here at Carnegie and conversations and debates inside the administration as well as outside of it on, you know, well, is this for real and you know, isn't Medvedev actually really the president and we can deal with him and, you know, there was a sense, it'll conceive, as it turned out, that perhaps this was a stage along the way of Putin actually stepping aside and that the US did make an effort to sort of imbue Medvedev with actual powers that he may not have had at that moment in time. I wonder if Washington sort of having been burned, you know, will make that mistake again, you know, so do you take seriously, have you even ever heard of the new prime minister who appears to be a very sort of faceless bureaucrat from the tax service, which is a very powerful entity in Putin's Russia? I had never heard of him. I don't think that's a huge mark against me because it seems like most people who follow Russia hadn't heard of him either. And I think that's an indication that he's likely not to be the successor president, that he is performing a placeholder technocratic function and that it's another indication that what happened yesterday is an interim step to some other end game, that this is not the final configuration of Russian power going forward. Yeah, and in fact, he's not even the first sort of obscure prime minister that Putin has appointed. I was there in Moscow when Putin got rid of Mikhail Kasyanov, the holdover from the Yeltsin era and appointed Mikhail Fragkov, I think, was the prime minister. Probably very few people remember him and justify it, so. So what, you know, I think he actually is this conversation which is a sort of modern day Putinology, Kremlinology. It does seem like a pretty good pivot point to your book which is really about the nature of what is required to operate in even the semi-public space in Putin's Russia. It's all about, as you say, compromise in Putin's Russia and these very nuanced, complicated portraits of just how sort of both suffocating the public spaces under Putin and also the kinds of trade-offs and ambiguities that are necessary to exist in this sort of nether world just like the politics we're talking about, right? Like we're talking about a world where we don't even know what the constitution is gonna say next month and it's ambiguous and yet we know very clearly on the one hand that who's the boss and I feel like that these are essentially all on that theme. Even though you couldn't have anticipated exactly yesterday's news, the book is very on point to helping to think about the world that produced this news. And I'm curious actually how much in the end you have come away from this exercise of reporting in Russia feeling like this is truly a construct and a creation of the Putin era. Is this, was Russia just always like this? Is this because it's a post-Soviet state or is it, how much is it related to this incredible long run of Vladimir Putin? I think it's definitely related in just the duration, the length of time that this individual and a larger system that the individual has come to represent has existed and at this point it's about much more than just Putin, the one human being. There's an entire system and a logic to that system, rules to that system that have grown up and developed around him where, and we'll see this will be the great test of going forward, right? How much is now Putin or Putinism not about the single living, breathing human being but about tens of thousands or hundreds of thousands of living, breathing human beings who can keep alive a system long past its initial creator or namesake and that's certainly one of the themes of the book. I found a lot of continuity in Soviet history, post-Soviet history or rather, Soviet history, the kind of history around the breakup of the Soviet Union both just before and just after and leading into Putin that there was a lot more continuity in how people understood themselves and understood their relationship to the state than might seem just if you look at the changing figures, the changing individuals who sat atop that state who seemed to have much different and contradictory profiles and agendas but beneath the surface the way people understood their own place in society and both the opportunities presented to them and what kind of vexed or would prevent the realization of those opportunities and how to get around them, there was a lot of continuity there and my suspicion is that that could be the same going forward regardless of what particular role Putin takes or doesn't take. Well, it's a great observation, I mean, right that the former Soviet people just because the Soviet Union collapsed, they didn't wake up the next day and abandoned all of their previous habits of navigating the system and the world and they brought a lot of that into the Putin era and to me that really is the sort of great contribution of this book, why did you decide to write it around the sort of moral ambiguity and compromise?  That's a nice observation, that's a nice summation of the repertorial approach I took to the book, I wouldn't have described it that way exactly but I think, but I agree to it and I don't really have a greater answer just then that's what interested me the most and that's what I feel like, not that I wasn't getting it getting to say it in articles I was writing but I wasn't getting to say enough of it maybe and I wasn't getting to follow those questions all the way to the end or at least in the depth and nuance as you say as I wanted and I felt like Russia for totally understandable reasons like a lot of places but I think Putin makes this all the more true is that it's reduced into a very black or white prism and there are a lot of things especially that Putin and those around him do that are just objectively harmful and worthy of our judgment and contempt as kind of moral, political beings and we can retain that power of judgment over the country's politics but the way people live their lives I felt like it was unfair to the Russian people to take that same prism and to view everyday Russians or even not everyday Russians people who might occupy some position of stature and influence in the system the same way and I just felt a growing sense of sympathy or empathy to people I was reporting about who were trapped in situations that I found frankly just very interesting repertorially very compelling to see them stuck between a kind of rock and a hard place wanting to realize or bring about something that at least began as a virtuous admirable or at least understandable goal but in doing so were confronted with obstacles and compromises as you said that demanded a lot of them and changed them in the process and I couldn't think of myself or I couldn't say with certainty that I would have acted differently I didn't see myself as necessarily different than them and certainly not above them and when I realized that what they were going through both resembled but maybe in a more dramatic scale some of the compromises I face we all face but also in their position I'm not sure I would act so heroically different maybe there's no inner saffron inside of me Okay that's very interesting you're being very I maybe humble is the right word but you know let's be real one of your main characters and it's fascinating that he agreed to talk to you is Konstantin Ernst who is essentially the visionary chief propagandist chief artist you know of channel one the main instrument of communication and political influence as well as artistic influence in Putin's Russia it's amazing that he agreed to talk to you first of all but second of all you know he's just not some simple man I mean he made an explicit choice which is to engage with power and to you know to ride that for his own ends but did you you know you started out with this empathy but where did you end up I mean you know this is a guy who more than any other has you know essentially provided the platform for the justification of all of the Putin government's you know most controversial and problematic acts where I ended up is a position of understanding him I think though maybe that's my own estimation right I mean he might disagree others might disagree how close I got to really understanding the core of his essence and what motive have you heard from him since you you published a big excerpt of this in the New Yorker not exactly no he confirmed having read it let's say well they haven't canceled your visa to Russia have I'm here now so let's see what happens in a few weeks we'll have a follow-up conversation but actually I think to rewind which it's both about his likely reaction to it and why he agreed to talk to me in the first place gets in a way to the answer to your question is he sees himself very much as a sophisticated auteur the kind of person who of course would sit and talk with a reporter from the New Yorker because he knows what the New Yorker as he reads the New Yorker he is proud of that kind of cultural sophistication and where's it well I mean it's organic to him actually that kind of cultural sophistication as one of his friends told me and it was the best and most pithiest summation of Ernst was that he's an intellectual and an estet but he's not a liberal and oftentimes in my life those things kind of overlap and you don't actually think about the distinctions between them because so many people I encounter are all three things fluidly he's not so in a way there's not a huge contradiction maybe he's actually one of the people in the book who's compromising the least because he doesn't necessarily have this wellspring of liberal values that he knowingly or subconsciously you know violated in this Faustian bargain for power what he has gotten are unlimited resources to realize his aesthetic and creative vision as the head of channel one he has almost unlimited budget to produce these really quality from a cinematic or aesthetic point of view programs and films that he wouldn't have that opportunity otherwise that the central or one of the central conundrums of the book is it's not like, this is in regards to another character the theater director Kareel Serebnikov it's not like in Russia you have the choice of making a movie with state money or without state money the choice is do you want to make a movie or not make a movie and if you want to make a movie while there's one source of financing in town and then when you think about it that way especially in someone like Serebnikov who's a very different kind of creature than earned so I don't want to compare the two unjustly but nonetheless you can start or I could start to understand the nuance as you say or the difficulty in these choices and I could at least understand if not applaud certainly Ernst's choice to take the reins of this channel where he could do as he pleased creatively and yes, serve the state that I think he ultimately legitimately believes in so for him it's not such a huge I think he sleeps well at night in other words. No, I get that he does that's pretty clear he's benefited by his choice but I guess for you as a writer for a liberal bright thinking western magazine it's just such a fascinating like as you contemplated these characters in the end what is different for us to try to understand about a propagandist for Putin's Russia or another one of your characters an apologist for what we would view as the illegal annexation of another country's territory now he gets burned so he has probably a different point of view but in the end these are characters that are familiar to all regimes in history in Ernst you found a sophisticated wannabe auteur who also is in the end a propagandist for a regime that does some bad stuff all the worst dictatorships in the world many of them had pretty sophisticated propagandists too why is he any different? It's hard for me to say how he's different than those propagandists who worked in other regimes I think he's particular to the Putin system because of his intellectual sophistication I compare in the book channel one under his leadership to the other two main state channels which are no less propagandistic much more propagandistic but they're also frankly kind of tawdry or trashy or cheap and they're full of just the most sort of low budget oftentimes literally pseudo documentaries the most bombastic television hosts the most sulfurous of all Russian television personalities Dmitry Kostylev is I think by no accident not on channel one but on Russia channel one's main rival where he holds forth about how gays and lesbians should not be allowed to donate organs because their genetic code is not worthy and that Russia can destroy the United States in a nuclear war and turn it into a heap of radioactive dust I mean the most vile bombastic rhetoric is not on channel one and I don't want to give Ernst too much credit there's a whole lot of propaganda on channel one including especially during the war and that most active phase of the war and Donbass some outright vile disinformation but overall the tone on channel one has an air of a kind of sophistication or aesthetic quality that is not found on the other channel so to compare him to other people who do the same work in Russia he does carry the air of an auteur of someone who understands and cares about quality and that degree of cultural sophistication I think does make him an interesting figure and he's retained don't just take my word for it he's retained the affection or at least there's this great word in Russian which essentially means someone is handshakeable which means he's kind of welcomed in certain whatever the subculture or community of people is within that community he's considered handshakeable and Ernst is largely handshakeable among Russia's cultural elite people who do consider themselves liberals who do consider themselves anti-Putin somehow there's something about Ernst and his discerning on certain questions air that allows him to retain that handshakeable quality and that's what made him interesting to me No I think that and that in the end is why the book is something you don't see all that often in our sort of who's up who's down political coverage which is why I found it so interesting so tell me first of all the between two fires you know you could pick it up and be forgiven for thinking like you know are we talking about that Donald Trump and Vladimir Putin what are the what are the two fires in the book's title? Well it comes from a Russian phrase which literally means between two fires which I thought had a nice literary ring to it it's essentially close to not the same thing as between a rock and a hard place but it gets to this idea of navigating yourself between two forces that are much larger than you right it gets to the kind of impossible smallness of the individual between two larger forces that are objectively dominating maybe not quite insurmountable but the trick is how do you navigate yourself between them how do you find the path from out of between those two fires and making it out the other side is really just about the best outcome available I think embedded in the phrase and my understanding of it or at least in the way I deploy it in the book it's kind of it suggests that there are no perfect outcomes here when you're stuck between two fires the kind of survival equilibrium is the best you could hope for and it's about balancing and navigating those two forces that are much bigger than your own well you know I think that was a very powerful metaphor and there's actually there's another quote in the book that is reminiscent of the book's title one of my favorite chapters is where you are going to Russia's essentially only major museum of the Gulag which features a classic state takeover and lots of political intrigue as a country that's really not come to terms with its own history is essentially not only one of the themes of your book but it's one of the great themes I think of its whole post-Soviet story and you quote the great poet Anna Akhmatova who observed after the death of Stalin now the two Russia's are eyeball to eyeball those who were in prison and those who put them there well essentially flash forward 70 years and that's still essentially the raw material of the country and that's very much the story that you're talking about that everybody is compromised and both the kind of victim of an overbearing state and yet also compromised in having to work with it if they wanna operate in it and that's the story I've earned you told so for me that chapter I think about the politics the unsupportable politics if you will of a museum about the Gulag in Putin's Russia that was I think my favorite chapter which characters do you think you learned the most from in reporting this book? You know I'll answer that in a second I'm glad you quoted the Akhmatova line because that was an important chapter for me to write and to research really to understand how much of Russia's current I think the degree to which it doesn't understand itself and how much that determines the way Russians and Russia as a state acts that there's so much unprocessed gestalt that has been left to just fester in a corner untended to and oftentimes purposely ignored is really explains a lot I think about the way Russia operates as a state in society today and there was another scene in that Pirm chapter where a former someone who was a prisoner at the Pirm camp who became a human rights activist Sergei Kovalev he was a political prisoner then a human rights activist and then did some outside curatorial work for the museum he visited the museum one day with some German students who became very perturbed when they saw Kovalev shaking hands and acting generally friendly with another employee of the museum who was a former prison guard so there was a former prisoner and a former prison guard who were both now helping to create exhibits at the museum and the German students who were a product of Germany's very admirable post-war reckoning with its dark history were aghast by this bonhomie between a prison guard and a prisoner, right? It's how could you ever imagine a scene in which someone who was at Auschwitz is shaking hands and smiling with a guard from Auschwitz? It's an overly dramatic metaphor that doesn't exactly fit the case but nonetheless that's what the German students had in mind and they became very upset and they wanted to leave and what kept them from leaving was a very impassioned lecture, I guess, from Kovalev where he explained essentially this notion that Ahmata was summed up so beautifully and poignantly in one sentence which is there was less of a difference between me and this guard than you think. In fact, we were all trapped in kind of the same prison together and there was nothing so different about him or his fate or rather it was just an accident of fate that meant he was the guard and I was the prisoner and there's a line from one of my favorite Russian authors Sergei Davlatov that I quote at the beginning of the book and he was a prison guard early in his life. He was sent as part of his conscripted military service to be a prison guard in the north of Soviet Union in the 70s and he wrote a series of diary entries from that experience or during that experience and one of them was saying it was as if he just walked through the wrong door and ended up a prison guard when he easily could have gone through the other door and been the prisoner and I think it's that notion of how similar or overlapping those two positions are in Russia as opposed to say a place like Germany that makes Russian history and Russia's present reality so complicated and so interesting for me ultimately that the overlap is very subtle or at times non-existent and there isn't this sense of the other like say there was in Germany's horrific 20th century history. Yeah you have the two rushes both talking to each other and coexisting but even being the same person in a way that the idea of a whole population that was both victims and victimizers is something that is really, I think that's probably the thing that's most different say here in our divided politics where we have non-intersecting, non-talking to each other to America's, this is almost the exact opposite is a phenomenon you're exploring through this vein of compromises. So I wanna get to the audience questions in just a second but two quick ones for you. First of all Crimea obviously and Ukraine remains top of mind both here in Washington as well as in terms of the foreign policy challenges that are facing Russia today. You address this in the form of a very memorable character zookeeper of Crimea but putting aside the sort of personality of it what can you tell us about where that is headed? Why is it still a hot conflict? It seems amazing and yet there haven't been meaningful negotiations. You just did a big profile of the now famous President Zelensky in Ukraine. Do you think that developments here as well as elsewhere mean that there's more pressure for Ukraine and Russia to come to the table now? Do you see a resolution of this conflict? I'm not sure about a resolution because what you hear in both capitals Kiev and Moscow is that for there to be a final resolution it would have to end on the terms of each capital would only agree to a final resolution on their own terms and that's just definitionally unlikely if not impossible the conflict can't end on the terms of both of the two conflicting parties at the same time but there does seem to be momentum and interest for some sort of quasi resolution or at last at least a sustained quieting of that conflict. I think that neither certainly not Putin anymore sees great utility in keeping that war hot or particularly active and very much and quite openly would like to end the Western sanctions that are a result of that war and I think would be willing to do what would the minimal requirement to lift those sanctions and in New President Lenin-Merzelensky you also have someone who is quite vocal and open about his desire to end that war. In fact, for someone who didn't run on a very substantive political campaign, presidential campaign, it was much more about a kind of mood and in general image the one thing he was specific about during the campaign was about ending that war and that seems to be a promise he's pretty intent and transparently intent about delivering on so that creates some room for a kind of resolution that would maybe be an end to the war and all but name or rather a kind of de facto but not totally de jure end to the war but from Russia's perspective, the whole reason for there being a war in the Donbass in the first place and for Russia continuing to support it through military and other covert means is to create this perpetual wedge or lever of influence over Ukrainian politics for some indeterminate or indefinite period to come and I think Putin would be loathe to lose that instrument, though he does seem to be equally concerned about ending sanctions so that might be the only place where there could be some room for a maneuver going forward. So you were spending time obviously reporting this story about Zelensky first you started it before the events now in question on Capitol Hill had while they were actually playing out unbeknownst to us and then continued it once the whistleblowers complaint became public and this became an impeachment inquiry. So give us a little bit of a sense of how do they, how are people in Kiev, how do they look at this American political explosion around their country? I mean obviously it can't be, it's not good for Ukraine to be in world headlines in this respect but what were people there telling you about this? How do they perceive President Trump and what he was trying to do? Has it diminished the view of the United States and made people more cynical about politics? Definitely yes to your last question. Ukraine and I've been going there and reporting there for some time for about the same time I've lived in Russia which is eight years so I've been going back and forth to Kiev since before the Maidan Revolution in 2014 and certainly consistently after and there was this really sweet affection for the American idea that you had in Ukraine and among especially a younger generation of Ukrainian politicians, people who came into politics after the 2014 Maidan Revolution. Yeah it was what was different about Kiev versus Moscow. Right, there really was this charming maybe a bit outdated and kind of naive notion of city on a hill image of America and that certainly has been tarnished if not entirely dismantled by this scandal. It would be hard to look if you were a Ukrainian politician to look at what's happening in Washington under Trump and still think of the US as the shining city on a hill whose politics are to be admired and emulated. That would be just objectively strange thing to think at this point. So it certainly has affected Ukrainian perceptions of America and in this political class most of all the sense I got frankly which was just frustrating from a repertorial perspective maybe interesting for you all was the extent to which figuratively in some cases I got the situation quite literally the Ukrainian politicians were hiding under their desks after this story broke. I mean nobody wanted to touch it for obvious political reasons there's just no good would come of Zelensky or anyone around him getting themselves involved in this story one way or another either Trump survives and is reelected and is around for another five years and if you put yourself into the story one way that he's even more mad at you and thinks even more poorly of you than he seems to have already and on the other side you could end up an enemy of the Democrats with Biden central figure in this whole story what if he's elected president I mean so there's whatever way you insert yourself in the story you're gonna make enemies that you don't wanna make for totally understandable reasons if you're a relatively small country like Ukraine that is dependent on American assistance and it's kind of an unbroken bipartisan American diplomatic consensus or support for the country that's existed for 20 years. Do you think though I've been surprised I mean I see all of that and you know I think people have done a good job of conveying that your reports and others from the scene do you think that I'm surprised that they've never really actually been forced in any way though to lay out you know just even the basic vaccine and we have a drip drab of background reports and things like that for example it's still at issue what did they know and when did they know it with regards to the holdup of nearly 400 million dollars and congressionally appropriated aid that's a very significant issue as regards to what Trump did or didn't do in the trial and yet you know they've never except through blind quotes and anonymous reports in the New York Times and other media they've never been forced to sort of even give a pretty straightforward accounting of what actually happened from their point of view are we ever gonna hear that? I'm not sure I mean I would like to be you know among those whom they tell it to if they ever do and I've certainly tried and in this sense I would say Zelensky has very quickly matured into a seasoned politician I was at this marathon that they call it a press marathon not a press conference press marathon held at a food hall in Kiev which went on I think in the end for 14 or 16 hours I mean is there from 10 in the morning until past midnight? He didn't say anything. And that was his great you have to hand it to him I mean he sat there answering questions for 16 hours and this question came up over and over and over again what did you know when did you know exactly the way you're phrasing it and he somehow managed to wiggle out of it not just once or twice but for 16 hours he managed to ostensibly answer the question without answering the question and that's not accidental right I mean I think his task for that day and beyond is to not give red meat to either side to not put himself at the center of this he doesn't want Ukrainian officials being subpoenaed testifying before Congress having to answer those kind of direct yes no black or white questions that you're alluding to because that would put Ukraine in the tough position it doesn't wanna be and if he emerged from this press marathon talking to every American reporter who could get him or herself to Kiev without giving a concrete answer if he managed to avoid doing it for 16 hours I think we can say he knows how to avoid doing it and I don't know if that's gonna change anytime soon. All right well stay tuned we'll see whether Ukrainian reporters have an interest in knowing what their country knew and what it didn't so I wanna bring the audience in I would say there's so many of you let's in the interest of time really make it a question tell us who you are and who you're with and we have some microphones here so we'll just jump right in to these questions and see how many we can get through ma'am you can go ahead right there thanks I'm Dr. Caroline Poplin this is way outside the you don't know any of the places that I deal with my question is do you have any sense of what Putin has over Trump why Trump turns to Jell-O whenever Putin is around he's never given him a nickname he just Putin has a spell over him and I wondered if spending all this time in Moscow you had any sense of what's going on? I'm glad we led with the easy question forgive me as the moderator for failing to ask this already I mean if I knew the true answer to that I wouldn't be sitting on it and just accidentally reveal it at the Q&A yeah don't tell David Remnick that he knows the answer oh by the way I found that out two years ago I just forgot to put it in the page of the New Yorker he's also got the tax return but the answer the reason I haven't put this in the page of the New Yorker anywhere else is that I definitely don't know and suspect maybe I'm letting myself off the hook I don't know because there isn't anything is my suspicion time could totally make a fool of me I'm open to that possibility also but I think it's if I had to wager it's a combination of one that Putin, Russia every time Trump hears those words there for him code words for his election somehow being having an asterisk next to it that his victory in 2016 the biggest victory in American political history however he likes to talk about it that he can't totally claim that as some glorious win because people bring up Putin, Russia, Hackers, whatever and it drives him crazy and so to talk negatively about Putin specifically to admit or chastise Putin for election interview in 2016 it would really be an ego hit for him and so it becomes this kind of impossibility to give a voice to that and the second thing we see it not just with Putin but with Erdogan Netanyahu MBS and Saudi Arabia he just has a kind of infinity affinity or even envy for autocrats and I think he just feels more comfortable in their company and sort of aspires to that style of rule and doesn't understand you know why he can't just have it like that here and so you know there's something about Putin especially being this alpha male figure that Trump so desperately wants to be seen as himself that it's a further reason why maybe you know he doesn't do the nicknames and all the rest as you say but you know as concerns the you know infamous you know tape from the Ritz Carlton I haven't seen it and waiting for someone to show it to me well the conventional wisdom is that of course Putin in his latest move is in transferring power from the executive to the parliament is trying to maintain power some way but is it possible from another perspective that he really wants out and that he wants a Russia that has a new system in which the executive is not more of a system like the German system that he foresees it that it's better that you have a whole parliament of I don't know how many have a parliament that's six hundred vote on who the prime minister should be rather than the public who can be easily corrupted voting for the president in other words this is not as in this is his way out maybe I mean you know one of the reasons I wrote this book to Susan's question earlier is that I found myself so incapable and therefore kind of exhausted by Putin's psychology which was a growing requirement of the job as a American reporter in Moscow and I just wasn't getting anywhere with that and found it more interesting and just more doable to do psychology is of people a few lower a few rungs lower many rungs lower were more accessible and understandable to me so Putin's psychology I wouldn't claim to or motives understand we can make some analytical guesses about them but your theory is as good as any it does seem clear that whether it's because it's idea grows out of his political philosophy or it's a way of assuaging the elite that the next president will have much less power than putin did there won't be a second putin whether that's because putin had some epiphany about you know the nature of political power in Russia or he did that because otherwise he could never get consensus among elite groups for there to be a successor I don't know but like I said with with this book I happily got out of the the putin psycho analysis game and your your your version sounds as good as any okay let's I want to try somebody in the back all the way in the back there thank you hi I'm from Ukrainian Embassy and I'll be just say that I'm still not acquainted with the book but I will definitely look into it as soon as I have the ability to take my hands on it and thank you for the very interesting discussion I just wanted to ask you while you were working on your book did you get the feeling that Russia is actually changing that something drives it towards the critical change that not only all the neighboring countries like my like my motherland but maybe all the other countries in the world are waiting and just a little remark I don't know how about my countryman but I'm personally a fan of the United States and I don't know with the documents that were approved with the financial aid and everything that a little misunderstanding of the scandal seems a little bit shuttered so back to my question and if you could answer it that would be fantastic thank you sure the whole last chapter of the book actually is about the question of generational change and will the sorts of compromises that I talk about and narrate in the bulk of the book with the with the main characters you know will that carry forward in the next generation and how will the next generation think about their own place in society and relations with the state and will they be ready to make the same kind of compromises will they have to make the same kind of compromises uh... I don't totally answer all those questions with great specificity or finality in in the last chapter uh... of the book but I do think things are happening generational processes are happening and the generation that is coming of age now is different insignificant important ways than those that have come before it for the most immediate reason because of their what their formative experiences were that it's the first generation that didn't live through and wasn't shaped by the dual traumas of the soviet collapse and then the hardship uh... and and kind of lack uh... void of meaning uh... of of the nineties which seems very formative formative trauma for many people in in russia many people uh... in in my book who lived through cynical double-think years of the late soviet union and then the abject uh... chaos and hardship of the nineties those dual traumas seem quite powerful in the lives many people really shaped how they think of themselves and their certainly their relationship to the state now there's a whole generation just didn't have those experiences by dint of biology the year they were born they grew up in a different time there's the so-called putin generation people who were born around or after two thousand who quite literally known or not lived under any other president and they seem to have degrees of trust of openness uh... aren't quite as scared or scarable uh... with talk of say you know return to the anarchy of the nineties that they never saw uh... so i do notice a different level of essentially civic or social trust which i think is a pretty important building block people ready to enter into bonds of one kind or another with their peers with the belief that those groups or groupings however even informal might actually lead to something i guess you can say less less cynicism or trust in less cynicism and that could prove to be a powerful uh... factor for as this generation comes of age okay uh... i think we probably have time for just one or two others so uh... go ahead right right up here no right here no right here this guy right here either i'm timothy i go to university pennsylvania here for the semester alright so if you were in russia you would be part of generation that uh... so my question i'm not uh... my question does kind of concern that though so you talked a little bit about the city on the hill uh... in that idea uh... so when you think about the idea of american exceptionalism do you think that there's uh... kind of a journey back to maybe people in europe holistically but also in the ukraine kind of developing that idea of american exceptionalism back uh... kind of building that back up yeah i mean that's what i uh... my my colleague in the ukrainian embassy seems to disagree which is uh... welcome thing to hear uh... but my impression was that the notion of america being the land of some unique and sacred political sphere had been really tarnished not just by this latest in particular scandal involving uh... trump but but you know the whole myriad of the last you know twenty years of american foreign policy have done their own you know damage to to america uh... presenting itself as this unique uh... and kind of particular uh... saintly uh... state in world affairs but as concerns ukraine specifically uh... the way that the united states provoked uh... the united states political leadership provoked political scandal that has proved quite damaging to ukraine and that in its particulars was just very tawdry uh... i think has done damage this notion of american exceptionalism can can it be rebuilt or not uh... i don't know i mean i think that's a question larger than just american ukrainian relations right but ukraine will take its cues from how the u s acts in the world in a broader broader sense and you do see it interestingly the same kind of notion of america being uh... this unique uh... or home to unique political system among russian liberals as well that russia i should say in the community of russian liberals in moscow and other big cities you can also find this so much as a meeting in a phone booth right well yeah a big big big phone booth uh... but uh... yet not a hugely representative sample of the country at large but you know you can feel this this room a few times over uh... that's another place where you have i find uh... one of the i don't say totally outmoded that that is too sad but but you know the admiration of america you don't find uh... that widely in other places in europe right go to western europe but germany i don't think you'd find that same attitude uh... toward the u american political system like you can find in in ukraine and among uh... russian political liberals that really look to america as an example that actually reminds me of something uh... in understanding who urnst is we began this conversation as he narrated his own intellectual and political journey he said something very interesting which i think speaks to much wider experience of his generation which was he really stifled under the controls of the late soviet union he thought that the late soviet union was this totally bumbling you know inefficient uh... system on its last gas run by a bunch of you know wheezing grandpas and he assumed everything must be the polar opposite in the country and system that presented itself as the opposite to that system so in all the ways that the soviet union was running on fumes the united states must be this really vital energized place full of all sorts of uh... political dynamism but also cultural dynamism and he and his friends the other thing allowed them to think that is because of the iron curtain they never wedged the u.s. so it's much easier to create that fantasy in your mind we've never seen the real thing and as he narrated to me once uh... soviet union fell once he had the opportunity to travel more widely once the united states itself began to you know act on the world stage in the nineties in the two thousand the scale fell from his eyes as as he said and these uh... romantic fanciful notions about u.s. being a shining city on on the hill uh... were replaced by a rather cynical understanding of world affairs in which everybody's tainted no one no one state or system can claim superiority over any other and to do so is just hypocritical uh... positioning and and it was interesting to hear him narrate essentially the growth of his own cynicism which is very essential to his uh... how he sees himself and his job and i think is also representative of a wider swath of his generation which includes putin they're roughly the same age and i think putin's experience with the west would be relatively similar i mean listening to you and give that description i think it's a perfect you know sort of big note to close this on me you're describing it seems to me that a reputants view of uh... the united states and it's its role in the world as well which is uh... essentially a very real politic idea in which uh... you know no one country has any uh... claim to moral superiority over any other and we may cloak uh... our uh... goals in in noble sounding language but uh... essentially operate from the same base principles that he thinks everybody else does all right one final question and then uh... onto the reception so uh... right here in yeah thanks very much uh... thank you very much and uh... i came a bit late i apologize but what remarkable remarks uh... talking about wheezing grandpas and grandmas uh... so uh... i've i've worked in the arctic air region of uh... which includes uh... as we know russia and alaska and the nordics and uh... govich have made a comment about the arctic being his own a piece in cooperation so whichever generation and my question brings it uh... wonder your point of view in terms of i think and correct me if i'm wrong the recent uh... announcement that ukraine is going to uh... or by lizolensky that ukraine is going to engage in investigations regarding ambassador yovanovich and i guess it was some comments made by parnos in a recent interview and uh... i wonder with respect to the triangle of russia uh... u.s ukraine how do you see this dynamic what are the risks uh... and and what are the benefits uh... that could emerge out of this thank you uh... for my reporting in ukraine going back to the spring and early summer before the scandal broke it seems that lizolensky team really hoped to somehow convince a corral trump into taking more active uh... position in exactly that triangle and to kind of be the muscle in the room in negotiations with russia and uh... somehow lend uh... u.s power and credibility to making uh... to make ukraine's position itself more forceful in negotiations with russia of course it's hard for ukraine and russia to negotiate on their own in a room that power in balance is just objectively not equal but if the u.s is standing in the corner you know with its arms folded uh... then then zelensky's position would be that much stronger so that was the initial hope uh... it's clear that that's not gonna happen now for all sorts of reasons uh... trump is not gonna get involved in in that way if he ever was after the scandal broke and now impeachment you know trump is not gonna i think rush to the table to aid zelensky in in negotiations that would be politically impossible and just not fitting with trump's personality uh... and i think that's one of the reasons that zelensky became ready or understood that the window of opportunity was was had appeared for dealings with uh... directly but there's still a lot of iterations in this story to come the impeachment uh... stories maybe only just beginning as as susan alluded to at the beginning of our uh... talk and so how tenable the ukrainian position of we're not involved you know see nothing hear nothing uh... is you know maybe that's actually not uh... gonna work uh... for the duration of the impeachment scandal and maybe the indication uh... that they would look into an investigate the uh... suppose that alleged trailing of uh... for best you want to which is a sign that that position is evolving or being forced uh... to evolve all right well stay tuned i think it's the answer but uh... joshua what a well time conversation uh... again i really want to plug the book you'll be downstairs selling copies and signing them for you uh... there's free booze courtesy of our wonderful hosts at carnegie uh... and so i want to thank all of you for sharing some of your busy time with us and again congratulations joshua it's a great book and i hope you all read it that reception is downstairs by the way good job you are officially launched we did it thank you here uh... how did i do this uh...


Andre Rublev vs. Daniel Medvedev is the third match of the ATP Finals group stage for 2022 and both guys have had steady seasons to make it to another ATP Finals. Andre Rublev started the year off as the world number five but after a mid-season slump fell out of the top 10 briefly before regaining his spot at number seven in the rankings. His season record 49 wins 18 losses so again another successful season in the win-loss column. He actually made four finals this year and he won all of them taking home four titles so far in Marseille, Dubai, Belgrade and his recent title a couple of weeks ago in Gijon. His best win against the world number one Novak Djokovic on the clay of Belgrade, very impressive win he actually ended up winning the title and his worst loss was against the number 96 Nishioca in Washington during that mid-season slump that he was having. Daniel Medvedev started the season off as the world number two and as we know he was number one in the world a couple of times this year up until the US Open where Alcares took over and Medvedev dropped down the rankings before settling down at number five in the world heading into these finals. His win-loss record 43 wins 19 losses not as many wins as some of the other guys because he was out injured for most of the clay court season so didn't get a chance to play a lot of the matches while others did and he had a very tough time in finals this year. Two titles from the five finals that he played his only titles being in Los Carbos and Vienna a few weeks ago. His best win was against Devon on City Pass the world number four at the time at the Australian Open but his worst loss was against the 284th ranked Vavrenka who was on the comeback and that was in Metz. Been a very strange season for Medvedev some highs of being world number one but also some lows of missing opportunities. These guys have played five times before with Medvedev leading the head to head 4-1 but Rublev has won their last match which was in Cincinnati last year close three setter in the semi-finals. If Rublev's gonna win this one he's gonna have to be aggressive and push Medvedev around. We know that that is the case with Medvedev it's not easy to push him around but you've got to be the more aggressive player against Medvedev and I kind of hope that Medvedev's not having a good serving day because when Medvedev serves well it can be dangerous. If Medvedev's gonna play well he's gonna have to serve well just like I said before so if he does serve well he should be able to push Rublev around and maybe even frustrate him because we do know Rublev has a short temper once you get inside his head it's very hard for him to recover from that. It's gonna be a very fun match they haven't played for the entire of the season and they played a lot over their time five times with all of them being on hard courts. I'm gonna go with Medvedev I think Medvedev is just starting to come into some form late in the season I know he didn't have a great week in Paris a couple weeks ago but I think Medvedev's starting to look really good now and I feel like he's gonna have too much firepower for Rublev in the end but let me know down in the comments below who do you think is gonna win this first match.


Hey everyone, this is Mike Kramer of Mock capital with a weekly check and following CPI for the UK came in hotter than expected rising At 8.7 percent year over year 0.7 percent month over month both easily beat expectations core came in at 7.1 percent Easily beat expectations and was also higher than last month's reading So certainly when you look at this data point it certainly would indicate that the BOE is probably not done raising rates yet And in fact you're seeing this being reflected in the pricing by the market The terminal rate right now is priced to rise to 5.96 percent by February of 24 It's also important as the market is increasing the bets that the BOE actually raises by almost 50 basis points tomorrow It's obviously not a done deal because you can see the implied rate is a plus 32 basis points So that would imply just a little bit more than 25 But certainly this is a big change from where you know markets have been expecting just a couple of days ago When they were seeing just maybe a 25 basis point rate hike So this data certainly increases the odds that you could get a 50 basis point rate hike tomorrow And what we're seeing really taking place in the bond market is very telling you can see that the Front of the curve on the two years rising rather dramatically Back above the highs that we saw in September We're trading well above those levels now with the with the British two-year trading above 5% When we look at the momentum on the British two-year you can see that that has clearly been positive and it's very strong This would suggest that there's probably still further upside in the British to also you can see your your uptrend right here So this makes a fairly complex situation because Clearly the BOE is going to have to continue to put upward pressure on Rates but at some point how far the rates need to rise to get inflation down And what damage does that do to the economy? And you can see that playing out through the guilt curve with the British two-year up 11 the 10 year up 8 and the 30 year Up 8 and when you look at the 30 year on the technical chart You can see that this did not surpass the September and October highs yet and nor did the nor did the British 10 year and it's looks almost as if there's a Rising wedge pattern forming in the British 10 year which suggests that there's potentially a little bit more upside But also the risk for a reversal and a move down Seems to be forming and one reason why this may be is because if they can if the if the BOE continues to raise rates aggressively What does that mean for the long-term growth prospects of the country given that it probably increases the odds of Recession and maybe even stagflation really beginning to hit hard on the economy And this is something that we need to keep an eye on because if you continue to see rates on the short end Rise much faster than that on the long end Or you were to even see the long end begin to break down This will clearly be more of a recessionary signal and something that needs to be watched Because that wouldn't obviously be good for the equity market But what you are seeing right now again is that there is potential for some further upside in in the British to 10 year And there's also potentially some room for further upside in the British two year while you're watching your trend line here When you look at the British pound and see this initially rallied and then reversed hard against the US dollar again, this is a potentially a sign that The market is becoming a little bit more concerned about the potential for recession risk and is now beginning to look past the interest rate differentials Because clearly if you look at the US two year today, that's trading up as well, but only by Two basis points compared to it an 11 basis point increase and one would expect that given that the Rates in the in the UK are up substantially higher and the spread between the two or is widening That you would see the pound strengthening, but instead you're seeing the pound weakening And this is indicative of a market that perhaps is beginning to think about Recession odds and so what this means is that we're watching support levels and resistance levels very carefully because if you were to break below 126 on the pound or this 126 region right in here This would obviously set up a further drop to 125 or so Meanwhile, if you can hold the support zone between 126 it increases the likelihood of moving back up towards 128 but it also probably indicates that if You're beginning to see the pound weaken You're gonna likely see the UK footsie begin to weaken as well because that's gonna be indicative again of increasing recession risk due to high interest rates stifling the economy and Again, you can see here on the UK footsie There's a very very nice downtrend in place the RSI isn't quite oversold yet So momentum is clearly turned negative for the index itself with the RSI trending lower And you can see that the footsie is basically Continuing to just trace out along this downtrend after breaking through this flag pattern And what's also interesting is at this morning when the market initially opened there was a big drop We rally chop we rally back basically filled what would be it looks like a gap and now this sets up potentially the rest of the day because With the index breaking below this support level from the morning at 73 75 73 it sets up a potential retest of the 7560 zone Which would then open up an opportunity to go all the way back to the lows of the day Likewise a takeout of the 75 75 region increases the odds of going to about 75 84 and at least hitting and testing this downtrend But the problem again is that if you're watching how this market is trading it might it might come back down to you know How is the how is the pound trading because if the pound Continues to show signs of weakness against the dollar this would likely be indicative of the market beginning to say that hey You know what all these rate hikes all the rate hikes and the damage that are being caused by high inflation and the BOE's need To raise rates is going to have a significant long-term impact on the British economy And that may actually turn out to be a negative for stocks Which may reverse a trend of higher-rate stronger currency stronger currency brings down inflation stronger currency helps to increase earning power which would be a positive for stocks and that's here it seems to be Potentially reversing today At least this is a trend that you're gonna want to watch and see if this continues develop in the next few days and weeks Anyway, I hope this helps have a great rest of your day


to take you, walk you through today's lab work, what we are going to do today is basically create a web service and deploy it and then use that web service, call that web service in a client. So the functionality that the web service will provide is going to be similar to what we did yesterday in our exercise. We will kind of create an operation get secret code which was which was told to you yesterday. It will accept a group ID and it will return the secret code of the particular group. So what we can do is we can create the web service from scratch, write the whole code we wrote yesterday all over again, but instead what we will do is we will use yesterday's code inside our today's web service. That's what we do object oriented programming for. So let's start. As you can see this is our yesterday's lab project. You can use you can use the project you created if it is functional completely. In case it is not you can use the one we distributed yesterday through the pen drive as a zip file. Just make sure that the XML file and the XSD file from the zip are extracted on your local disk and the path of that XML file is edited in each of these parser Java files. Like you can see over here make sure that this path points to the XML you've copied on your local disk. After doing this for each of this my DOM parser, my Jaxby parser and my Sacksparser. You build the project and deploy it again. So now we'll start with our web service. We first have to create a new project. Anywhere you store that XML file has to that path as the specific wherever it is called. There's nothing automatic about anything there. So what happens is that the program itself is expecting that the file will be in a certain path. That's what we just showed you in the code, right? Now if the file is not in that path then there will be an exception thrown at that point in time. So wherever the file you can either create this path and store the file there or you store the file anywhere you want and specify that path here. So I don't know whether it will take the C colon backslash. For this particular application it is not required. So we proceed. We are creating a web application. We'll give some name like secret code web app. So now we actually are aiming to reuse yesterday's code. So we'll copy the package we created yesterday to this project. It's been copied because in my yesterday's project I have specified the path of the XML as SRC slash group details.xml. It's basically a relative path. So I need the XML in the relative path of the new project I've created also. So I'll have to copy the XML file as well in the new project. As sir has explained earlier there are two ways of creating a web service. You can create it from a Vizdel or from a Pojo. We'll follow the Vizdel method. So for the first step we need to do is create a Vizdel which will define the web service and the various operations in it. So we right click on the... Okay the Vizdel is not in this list. So we go to other. Was it there? Okay anyways in this window you can specify a name for a port type. You can specify the... And you can specify operations basically. So we are required to create one operation which will give us the secret code of the particular group ID.  So remember that in the morning's presentation we went through that the Vizdel would have an abstract part in the concrete form. The abstract part is a port type which is basically consisting of a list of operations. Every operation of a list of messages. That's the first part that we're doing in here. Yeah the input we are providing is basically a parameter. It will be a string which will have the group ID. You just change the name of that. We'll click next. In this window you can specify a name for the... You can specify a binding name. You can specify the different types of binding that are available. You can actually... Yeah you can do it later on. After you create the web service you can add more operations using the NetBeans ID. This wizard provides functionality only for one operation. Later on you can add more operations. I'll show you that. That's all. You are actually creating that operation. You are defining that operation. So you will add that data. You will add the data in the Vizdel as well. So we can specify a binding subtype. Now this web service name can also be provided. We'll keep it as default. So it has created a Vizdel. I'll show you the source of the Vizdel file. This is what it looks like. Now as you are saying if you need an extra operation. You can always... See this is the port type that is defined. Under this port type we have defined an operation get secret code through the wizard. If you want to add an operation right click on this add operation. You can define another operation create. So the other way of doing this you can hand write your Vizdel. Yeah you can hand write the whole source code. It's a good way of understanding how to do this if you hand write once. And ID is make things simpler. But if you could it doesn't have to come. These things give you all these wizards to help you create your Vizdel file. Okay so our Vizdel is ready. Now we'll move on to actually creating the web service using this Vizdel. We'll right click the project. New. And you can see here there's an option web service from Vizdel. You can specify a package. I'll give the package name as web service. And we have to specify the Vizdel we just created. So I'll go to the location of the project folder. The Vizdel we created just now. When the Vizdel is loaded it automatically extracts the port name and the service name. It can be sure. This was automatically extracted from the Vizdel. Look at finish. Yeah so what netmeans did it using the Vizdel it generated a class for the service. And the Vizdel defined one operation. So it has basically generated the code for that operation as well. Now basically the operation over here is just a skeleton. We have to implement some code in it. It will provide you with the skeleton. It will implement any kind of business logic you want to do. In our case our implementation would be returning a secret code. So here's the code that netmeans generated. So we want to reuse yesterday's code right. So we'll import that package into this Java file. Now we'll implement the operation. You can see it has already generated a skeleton for this get secret code. We'll remove this. Before we remove that there was a throw not supported except. You can simply compile this when you hit that particular operation. This exception will be thrown. But the end-to-end message cycle will be client to the web services impact. It's just to the operation that is not being implemented. The default implementation is that this point even without doing anything. You can deploy it versus that part end. So we'll now write our implementation. We cleared a string secret code. I'm going to use yesterday's parser class which is my Jaxby parser. I've created an object of the my Jaxby parser class. Now I can get secret code operation of the parser. The output sign to secret code. So I'll do parser dot get secret code. So all that pop-ups that you're seeing right. Say parser dot. The ID knows that the parser is of type my Jaxby parser. So it goes and looks at the class and it knows that this contains all these methods. So it knows that you're going to call one of those methods. So it will pop that list of. You can just select it instead of typing it. So now secret code will basically get the output of get secret code from the parser class. And we'll say return. Okay. Now the implementation is ready. We'll save this. Now we can see that our web service is complete. So we'll build this application and we need to deploy it on the server. So we'll make sure whether the Glassfish server is up. It's not up. So you need to go to services tab. Open the servers tree. Right click on Glassfish v2 and it start. Let's start it. We'll go and deploy. So our web service is now deployed at the Glassfish server. We now will create a consumer web application which will actually use that web service to display the result. Create a new project. This will again be a web application. We'll give it a name. Now in the consumer web application, we basically are calling the web service. So we need to generate some kind of references to those deployed web services. So for that, we'll have to create something called as a web service client. We right click on the project web service client for the Visdell of the web service. In our case, the Visdell is already there in the project folder. So we'll access it from this option. So as you can see over here, it has created a web service reference for secret code service. Now we'll use a web service client to call the web service. And we'll write that code in a JSP so that the result is displayed in the JSP. This index.JSP was created by default when we created a new web application. As you can see, it was created in the previous application also. We actually don't require index.JSP in secret code web application because the web service as such is not providing a GUI. It provides a machine-to-machine interface. So we actually don't require this index.JSP. You can delete it if you want. Now in the consumer web application, I'll write code in the JSP to display the result of the web service operation. So NetBeans provides us automated calling facility. You right click on the JSP page. There's an option web service client resources called web service operation. And you can actually select, it will give you the list of the operations provided by the web service and select one operation. Hit OK. It will generate code to actually call that operation. As you can see, it has created an object for the service, implemented the port and it has, using the port, it has called the get secret code operation. By default, the default generated code specifies group ID as null. We can provide it, say, I want the secret code for group ID 5. I'll just modify this bit. So the code says that the result is stored in this result variable. We'll just display it in a better way. We'll save this. Now our consumer web application is also ready. So we'll build it and deploy. The page through the NetBeans interface or open up a browser can specify a different port to the two different servers. The Tomcat is not. Yeah. We are using only Glassfish. The JSP hard port is the only JSP. Where? Not from exception. Ready that you're giving. Can you look at the JSP again? There's a group ID. There it is. Go down. Time up. Group details.xml. Group details.xml. Group details.xml. Look what it's searching. Let's see the whole part. Oh, this is not taking from application. Yeah. It's taking slash configs. Yeah. Program point last bit to make. This is not the part relative to where the application has been deployed. Okay. Dot slash. Try dot slash. There's nothing wrong with the code. You can see. This is the config slash. It's printed in our application name. This is our season hour application. Our project folder. This is the project folder. But last bit. It's okay. Let me see whether it gives a better... It won't work. It won't work. It just tells the group details.xml or the whole part details. Copy the file into this part that he's expecting. Relative to where the application has been deployed. Yeah. The root. Point the source. It's all right. It's still going to config slash. It's still going to config slash. It's still config to be the root. It's going to search from there. And it's saying source slash. That's all right. It's still config. Hold under config. One minute at a time. Config. I'm looking for under source. You have to change your file also. So the error which we were getting earlier was because of the fact which I had mentioned at the first step that group details.xml was not in the proper place. So he has a lesson. If you don't put it in a proper place, you might land up like this. So what had happened was in my yesterday's project, I have specified the location of the XML as a relative path. As you can see. Now what what NetBeans was Glassfish does it, if you deploy the if you deploy a web application through the NetBeans ID, it actually does not. It it just actually creates a reference. Reference to the what do you say, the project folder on the local file system in the in the web servers library. So it doesn't actually deploy the whole jar file. Solution. Yeah. You just put that double slash into a single slash. It will work. Double slash when you're searching. You just put a double slash into a single slash. When you're searching. No, it works. In the path you're saying before SRC. SRC same. Give two slash. No, that works for backslash. We are not using backslash. For this only. What is happening is. Over here, what is happening is it is trying to search group details.xml in the Glassfish domain. But the whole project folder is not deployed in the domain because we deployed the project using NetBeans ID. If you deployed the project using a war file, that war file would have been expanded in the Glassfish domain itself. In this case. Because that file object is not created here. The problem is with the argument which you are passing here that is SRC slash. I understand your point. Double slash will work. Yeah, that's what it will create that problem if I had used backslash. Because backslash is an escape character in Java. Suggesting you can try. Yeah, sure. Because I tried it, I was also getting unknown. Is this what you're suggesting? I just made that change, I got the result. Is this what you're suggesting? Yeah, this is what it is. Okay. Now the file is anyway being copied under the Glassfish domain. It's going to work anyway. No, I'll remove that. We can blow it away. Okay, we'll remove that xml file from the location. Just search it and configure it. No way, no way. Let us flesh this. No, but you know that SRC is there. Relative to what is the question?  It worked the first time, right? No, it did not work. Yeah, it worked the first time. I'll show you. No, just before this. Yeah, just before this. At that time it had SRC slash good details. But if you give only the file name, it will work. I'm not saying that. Group detail dot xml is very good. Now my question is, if you give an absolute path here, something in C... Yeah, it will work perfectly. It will not work perfectly. There you need to give this. Yeah, that's what I said. See, because if you give an absolute path, it won't search for the group details dot xml in the Glassfish domain. Because it is searching for... You've given a complete path. Because I've given a relative path, it was searching it in the domain, which I did not find. So basically, it tried to find out the SRC into the domain only? Yeah, it was trying to do that. Exactly. Exactly. Do you want me to rename the domain? Okay. Shall we do the second method? Yeah, that's all. That's all. You're not supposed to do the other method. That's all. Why not? The argument is incorrect. Pyroplastic is not created. We are getting no point of exception. It's not the point. We can fix it to find the point of exception. The point of the exercise mainly is to learn how to decode a web service. Hopefully we have done that, right? I think that is what's important. Yeah, purpose is so. Yeah, which is what's critical. So the handouts that you've received actually walks you through the steps that you just went through. Okay. So you can actually try this in the lab or on your laptop. It can be done locally without a network connection if your client is going to be local to the relative to the web service. Everything is a local host. You can try it on the laptop. What we actually wanted you to do in your original exercise we had planned was that each group would create a web service and another group would access that web service. Over the hand. Right? That was the notion which you can still do actually.  Right? As long as you know the IP address of that machine. What we are going to do is we are going to create a recording of the web. So it's just a recording of the tool called V. And the recording is a file that will be recording there with the exception fixing thing. Can we at least show a demo of that? We will show the demo. We will show a demo of that wing file that is still what you wanted to edit. It doesn't matter. I will have to create a live link right away. The wing file that you created that you said needs to be edited. We can show that file. I will have to create a new one right now. There is no wing file at all. It's not on this laptop. Okay. So this is what we wanted to do in today. It happens so often that we don't know how the file is going to work. The file can be created any number of times in the hard time. And you can repeat it at the same time. And hopefully the handout also illustrates which screenshots as to how you are supposed to make sure. I think that's enough. Largely. There are specific questions that we got. Sir, this secret for 9 years, you can do 5 years or 2 files. 5 years later. How much time do you want to give out? It's just a case. You can have a form. Pick it up from the form. We have 10, 2 files. You want to collect first 10 from the X7 file. Then you will select. Okay. Suppose there are 3, 2 files, 1 file and 7. From X7 file, all the 3 will come. And from there you will select. See the function as we have written on the other side. We have X7 file and we will have method that is available for you. The JASP function that we have created. Method available for you to call to run a group file. You get the secret code. Whatever group file you create. How do you get that parameter value? These are things. You can give it on command. Run it on command line. Give it on command line. You can come to JASP. You can take it as a parameter and give it. Right upon JASP. On the last day we will make some soft copy. But yesterday's code. The application for the server for son. It will serve. It will serve as a SOAP server. All the containers it has. Apache access is another server that you can use. Open source free. This is also free by the way. That you can download. Pretty much all the servers which were serving J2E content also serve SOAP today. Right. So WebLogic will serve. WebSphere will serve SOAP. All of them are SOAP 1.2 compliant. Yeah. Can you just explain this? Because this is important for them to understand. So there one thing that I would like you to pay some attention to is remember we said that the true promise of service orientation can be realized with dynamic binding. Right. That you can dynamically discover a wisdom and create a request for operations corresponding to that wisdom and dispatch that. Right. Here we have pre-created the stops in the first example that we saw. Right. So in the IDE we pre-created the stops by creating a web service client and then we built the application of the web service client that we had and then we deployed it. Here is an example of the dynamic invocation. Yeah. In this, in previous cases where we have seen we have created a stub and then we are calling, we are creating new service object and we are calling new service object from the stub which we have created and then we are calling a port, a method in a particular port. But here in this case when you are going to dynamically discover a service what you will do is you will maybe pass a query to a UDDI registry or some standard registry which is there and from that registry you will get service details. Maybe if you use UDDI they have their own data structure in which they store service details. In that case you will get a URL reference to Visdal wherever the Visdal is stored. Now here what we have done is service details dot get Visdal URL. If you look at this line service service equals to service dot create. It takes a Visdal URL and a service fully qualified name of service that is service queue name as a parameter and it will go and fetch that Visdal and in next line if you see string request this is your message which you want to send to the service. This is complete SOAP message. So you need to write SOAP message by your hand so you must know what kind of SOAP message is expected from the service at the other end. Since you don't know the Visdal, I mean program doesn't know the Visdal dynamically when you are writing the code you need to specify complete message whatever is expected by the service at other end and after that you create that message and you dispatch that message to the service endpoint. So dispatch method will automatically dispatch it to the point where service is deployed to the service endpoint. So here you need to only know the location at which your Visdal is by that location and by knowing the SOAP message you can dynamically invoke any service programmatically. The only requirement is you, number one, you should know the Visdal location. Number two, you should know what format or what SOAP message is expected by the service. Those are the only two things you should know. So, I think that explains. Okay, see this create dispatch is creating a dispatcher for service. So it takes a fully qualified port name as an input. Okay, so it will automatically fetch that port, qualified name of that particular port from the details which you will get from a, from querying a URIDI registry. Okay, so you will get all these details programmatically. I mean URIDI has a very well defined data structure in which you can store all these details. So the one who is creating the service will publish all these details for you. As a client, you will go and query URIDI registry. You will retrieve all this information programmatically. So since data structure is well defined, you can actually access all these details very easily programmatically, right? Because the data structure is standardized. So once you have these details, so you have fully qualified name of service, you have visual location and you have fully qualified name of the port. By knowing this, these details, you can create a new dispatcher. You can create a new dispatcher. And for this, you must know the SOAP message which is expected by the service. So in this case, my service was having an operation called register for notification or notification registration operation. Now this contains namespace declaration and then these are the parameters which are required. So condition, condition ID and context type, all these are the parameters which are expected by service which is providing you this method. So this message format must be known ahead of the time. When you are writing the code, you must know what format this message is expected. Exactly. See, current requirement of dynamic invocation. I mean, current state of art technology only provides you this flexibility that you must know the message. So the interface, if there are five travel reservation services, we assume that all of them have same interface or interface is known ahead of time. Let me address that. The ideal scenario is that you don't know the format and they all have different formats. And you can still, by reflection, figure out what the current format that you pick is and then construct that message in which case, here the string has been hard coded, you will construct that message dynamically. With the core bar dynamic invocation interface or DII, you could actually do that. They gave you reflection APIs to figure out what are the types of the parameters that were expected on the server side and the order of these parameters and then you constructed that message. Here it's not yet possible to do that, but we can write additional code to try and accomplish something like that. There is no API available. Well, at least the soap side of it is silent.  For core bar, the orb had a DII API, as it was called. So what we are going to go, we can head over to the lab now. We can take a break now. I think there is some T that is expected in five minutes or whatever. And then we'll head over to the lab and you can try this out. We'll be there to help you if you need help. I'd love you to just fill in bits and pieces of the class to call all the implementations that you might have. So this is how you would wrap up an existing service. So if you had some service that was written in Java, or DII, something else, to wrap up it, you would fill up this process. That way, it will show. It will come to that. Okay. To create the web service using the second method. Is it on? Yeah. When you write it, there's another option which says create a web service. You can give a web service name. I'll keep it as default. And there are two options over there. Create web service from scratch. And a package name for the same. Just creating web service from session B. Obviously, it's good to take advantage of J2E. So here the session B, you can just point it to the session B and say create a web service. Okay. It's a whole lot of stuff automatically. Yeah. So now even we haven't defined any visual. We are directly creating a web service. So the NetBeans IDE will generate a blank web service class. We'll have to define our own operation in that. We'll write an operation. Let's use the NetBeans UI to generate, create an operation. We have an operation. We have functionality over here to do that. The dialog box asks for a name. We'll write, let us say this operation returns a string. And it accepts something as a parameter. It accepts a name as a parameter. So the IDE has generated a skeleton for the operation. But it's not a visual which has told the IDE to generate this skeleton. You see who specified it right now. We'll implement the operation right here. You just say. You can start writing. Yeah. So notice that one of the things it has done when you generate the class in the first place, how you have an annotation to view web service one class, saying it is a web service class. It's a web method. So in other words, this will be an operation in your web service. It should be exposed up with a simple annotation saying, write the class without using any of these ideas.  That's obvious. How does the appropriate books to read and understanding annotations and then generate a visual for me? This is the other way. You're going the other way. Actually, you can also have a method. It's just a regular class. I've got to expose some of this as a web service. Some of it I want. It's just implementation helpers for me. Whatever. So those non-eposite web services. This will be appropriately generated. Is it possible to have a method, which is a web method, but you are not declaring this class as a web service? No. By default, if there's a web method, then it's a web service. Because this corresponds to an operation. A method corresponds to an operation. Okay. So we have implemented the operation. We build a web service and deploy it again. Now, when you build the web service, the ID itself generates the wisdom for the web service. As you see, the tooltip shows the location of the wisdom that has been deployed on the web server. To type in that location, you will actually see the generated wisdom. This is the generated wisdom. Notice one more thing. Keep turning this on now. So one more thing that you notice is that we picked up this wisdom from the server itself. So this was not a file that we picked up from the local file system. We contacted the server at 48080 and said, give me, this is exactly what should be done in a real situation where you would actually retrieve the wisdom from the server and then you would run your stock compiler, I mean stock generator over that and then it will generate the wisdom. We also created a client for this web service in our original consumer web app itself. I would like to add one thing here. In case you don't have a NetBeans ID and you still want to create stocks, first thing you have to do is you have to go to chatsevillus.dev. It comes with classes for you. It is similar to that for chatsevillus also. Moving on, we have the web service client dialog box over here. Earlier we specified the wisdom using pointing to the wisdom from another project. So now we will try to simulate a real life scenario. We will provide the URL of the wisdom which we have over here. We got this URL from the server itself. We had finished. The ID fetches the wisdom from the specified URL. It creates a web service client. Yeah, it's created. We will call this web service and our JSP to the same way. So we will select the operation and it's okay. By the way, that error was not 11 to our codes of action. We generated the code. Here it is. We provide the operation with some names, say siddharth and we are done. We will build this application and upload. Let's try to access the JSP page. Yeah. So it access the web service. The web service contacted it hello with the name and returned the result.