Live developerWorks chat transcript, August 2, 2007 Topic: Building SOA applications with WebSphere Integration Developer Moderators: Richard Gregory (SOATestGuy) and Randy Giffen ----------------------------- tomyoung: Hello everyone! My name is Tom Young, and on behalf of developerWorks, I want to thank you all for joining today's tech chat with Richard Gregory and Randy Giffen. The chat will focus on the basics of developing service-oriented applications (SOA) using WebSphere Integration Developer. I'll turn it over to Rich and Randy to introduce themselves, and then they'll be open for questions. Randy Giffen: Hi this is Randy Giffen. I manage the 2 WID development teams in Ottawa. For the past 8 months I have also been leading a WID usability team. I have experience with BPEL, BSM, Visual Snippets, and Lotus Forms integration. SOATestGuy: Hi, I'm Richard Gregory, I'm a developer on the WID team. I work with the test client that you might have seen while using WID. sunildumpala: Hi Randy and Richard. I have read most of your articles. They are awesome. Keep them coming. SOATestGuy: Hi sunildumpala, Thanks! are there any future topics you would like to see? And do you have any questions for us? Fluidity: Trying to quickly go over the topics you covered in your tech journal series so I don't ask a question you have already covered. sunildumpala: Yes, would like to see some topics on Logging in WPS .. you can call me sunil. paulH: I have heard that best practice is to put one service in each module. But that creates a lot of exports and import which are a performance hit. So where is the balance point? SOATestGuy: Thanks sunil. Are you looking for logging in the sense of Java APIs, or something along the lines of CEI? sunildumpala: Logging in sense of how we use log4j in traditional J2EE.. Basically instead of writing logs to System.out I am looking for a mechanism to write logs of different applications to different log files and ability to control that from an xml or admin console (basically withount any change of code). Randy Giffen: Hi paulH. There are several factors to consider. If the services are small and "similar" and are all being developed by the same person then you could consider having more than one per module. But, certainly a best practice I have seen is to make use SCA imports/exports to modularize the application. paulH: Thanks, that answered the question. sunildumpala: Adding to Paul's comment, that is especially true with regards to Mediation modules. Each mediation module can have only one mediation flow and it seems that XSLT primitive is still not completely evolved and for almost every mediation I had to create a Custom mediation. So I end up creating lots of mediation modules. Well that could be partly because I am still new to WID. Fluidity: I tend to gravitate toward Java snippets. Is there a significant reason why I should use visual snippets instead? Randy Giffen: Hi Fluidity: You should use whatever is most productive for you. Even if you know java well Visual snippets can occasionally be faster as a single node can sometimes be replace several lines of code. I've also head that users who understand programming, but not Java syntax can read and understand the visual snippets easier. So that might be an issue if others need to read your code. paulH: Is 6.0.1 the most current version? dwu: when i start the server, the status shows as "Starting..." when in fact it has already started. reason for this? DanZrobok: 602(.2) now SOATestGuy: Hi Paul, Good question. The latest version actually just came out - it's 6.0.2.2. SOATestGuy: Hi dwu, that's one question that I get asked a lot - why the server status shows as "Starting..." when in fact it has already started. I found out recently that this problem, including a list of causes and solutions, is documented here: http://www-1.ibm.com/support/docview.wss?rs=2308&context=SSQQFK&dc=DB520&dc=D600&dc=DB530&dc=D700&dc=DB500&dc=DB540&dc=DB510&dc=DB550&q1=server+state&uid=swg21264397&loc=en_US&cs=utf-8&lang=en sunildumpala: Is it advisable to use WID for EJB development? or are there better ways? DanZrobok: Are we going to see first class support for the XSD spec anytime soon? sunildumpala: I have a feeling that Java snippet performs better than visual snippet. Any comments? Randy Giffen: Hi Dan. In the 6.1 release we are working on improving the XSD support. SOATestGuy: Hi Sunil, WID inherits most capabilities from RAD. You can enable the J2EE development capabilities in the preferences. However, if that's all you're interested in, then WID might have a lot of features that you don't need. SOATestGuy: Hi Fluidity, we have just released 6.0.2.2 but the 6.1 dates have not been announced yet. Randy Giffen: Hi Sunil: I think it depends. If for example you are creating a series of BO's in the snippet, you will notice that each node does a lookup of the required service. But, generally the generated code is fairly clean (although with more local variables than a developer would use). dwu: In your series, you guys gave some examples of calling other components in a module, but what if I have a web service that I want to call? Fluidity: Is there a way of logging an outgoing SOAP message? (not using the TCP/IP monitor) Randy Giffen: Hi Fluidity. There is a logging node in Mediation Flows would that be of use? SOATestGuy: Hi dwu, that's a good point. It wasn't covered in detail in the series, but if your component needs to call a Web Service, just import the WSDL for the service into your module (the interface will show up under the Interfaces category in the BI view) and then drag it onto the assembly diagram. Then you choose Import with Web Service Binding when the message pops up after adding it to the diagram. Now you can just wire your components to it and use that Web Service just like you would use another component. To go the other way, and expose a component as a Web Service, just right-click it, and select Generate Export -> Web Service Binding. A Web Project will be created that contains the necessary artifacts such as the WSDL containing the service definition. Now other applications can call your component as they would call any other Web Service. Fluidity: Yes and no... I think that may indirectly answer my question. Say I had an existing module that contained a web service import - I'd have to have it communicate with a mediation flow to log that message, yes? sunildumpala: Hi dwu, There is a web service tutorial online. I found it helpful http://www.webagesolutions.com/knowledgebase/waskb/waskb023/index.html DanZrobok: Is there a way to generate rpc/encoded exports? SOATestGuy: Hi Dan, currently the only choice of export style you have is soap over http and soap over JMS. DanZrobok: Sorry, I meant WSDL wrapping style.. some legacy systems don't send doclit/wrapped. SOATestGuy: RIght Dan, both protocols are Doc Lit Wrapped for exports. But for imports it doesn't matter since WID supports that. i.e. it can consume rpc encoded, but it can't author them. Randy Giffen: Hi Fluidity: Yes, I using a mediation module is one option. I've heard one could write a jax-rpc handler, but that means java code. Note that the message logger node will write the entire smo message to a database. sunildumpala: Following are some more topics I would like to see articles on. sunildumpala: 1. Articles on how to create Ant (or similar scripting tool) scripts to do the builds. 2. Articles on using Mediation modules for complex data mapping. (Example: Reading from flat file having multiple records and mapping to BO. Mapping BOs of entirely different structure, source could be flat and destination could be complex with nested arrays). sunildumpala: Are there any plans to schedule a similar chatting session in near future? Randy Giffen: Hi Sunil: You had a question earlier about logging. I've been told that java.util.logging is the easy way just create the logger. Logger logger = Logger.getLogger(name),then call logger.debug(...), or whatever that will log to the SystemOut file if its an info or error message. if it's debug, you will find your logger in the normal websphere trace facility. So go to change detail levels, it will be there. That list is built dynamically by all registered loggers. sunildumpala: Thanks Randy Fluidity: Thanks Randy, Thanks SOATestGuy DanZrobok: Thanks Randy & Richard. SOATestGuy: Hi Sunil, we are always trying to get as much information out as we can, so I will pass along your requests. Don't forget that you can ask us questions in the forum any time and we will try our best to answer them all. SOATestGuy: You're welcome! tomyoung: Sorry to say it, but we're pretty much out of time. I'd like to thank everyone for joining, and thanks to Rich and Randy for hosting the discussion today. The transcript for this chat will be posted at http://www.ibm.com/developerworks/websphere/library/chats/0707_gregory/0707_gregory.html. ----End of transcript----