Skip to Content
 [PartI | Real World Composites I – Visual Composer], PartII  (Real World Composites II – Composite Application Framework)We +could+ do the following:Go to the project view on the left and click through the project tree  (LocalDevelopment)> modeled-> Application Services-> GetEmployeeData. Now right click on the  Service and choose Expose service as WebService.  Give a name to the service like WSGetEmployeeListByQueryEmpName. Choose the method of the bean that should be exposed to the outside, which is GetEmployeeListByQueryEmpName and click OK. The service will be built.   h3. Deploy to a Server In the context menu of the project (left click on you find the option for Generate Application, Build Application, and Deploy Application. Click on them one after another. Once you reach the deployment action you might run into an error as the Studio does not reach the server. There are two things to check: * Does your server run? If you haven’t started it, it does not.  How to act in the first case is documented  ( However, if you miss how to get an instance number (or you’re not even aware what this is!) read on.  If the server does not run you can start it since this release from the inside of Developer Studio. For this switch to the SAP Management Console perspective via menu Windows-> Open Perspective-> Other… and choose the perspective from the Window. In case the environment ie new to you: don’t worry that your whole work seems to go away! All used perspectivesare listed in the upper right corner behind the “>>. Just clicking there and chosing the Composite Designer will bring you back. In the management console you can see your system in a tree on the left side. If it’s not green it is not running. A right click on the system (usually named CE1) opens the context menu and the start option. Unfortunately, if the server does not run, it is also not shown in the tree. You first have to add an instance, regardless whether it is set in Prefrerences already (I’d call this a bug), but you can easyily go around this by right-clicking on SAP System and add the instance (try 0 and localhost). Then it shows the whole system and from there the Start option works. Be aware that for starting you call a Windows system service, which means that user and password are your Windows user and password! And don’t forget the domain name…ManageConsoleBe aware that it will take a couple of minutes until the server is running (10 minutes is a good number to wait) | h3. Why is the SAP Java Server so Slow ? This is a dangerous question. Don’t dare to ask! Well, if you are a customer, this protects you. And I will answer: because this is not a  plain Java server, not even a Java EE serve. This is a full Java EE 5 server, portal, RAD frontend development, service modeling, security included, backend connection ready, and-a-hundred-other-things. And this will not start in three seconds. Of course, your next question is: but why do I have to load all of this? And the answer to this is: You don’t have to!  | Since version 7.1 this is configurable in a minute. I explained this in another blog “The Smallest Possible NetWeaver Java Server”  (The Smallest Possible NetWeaver Java Server). With that you +can+ have a pure Java EE server. And in +this+ configuration it +is+ starting in 3 minutes.  Maybe you guessed it already: No Composite Application Framework then. No fun.  Once the server is running the deployment now should work. It will ask you for the server password/user (you have given that at installation time) and then start to deploy. You can follow the actions on the lower right in the Deploy View Console tab. h3. Declare Destinations This seemed a little bit odd for me at first, until I got the explanation from my colleague Volker Stiehl (who wrote a book about all of this too). But lets first see what we have to do. Once the server runs we can call it’s main page with “http://localhost:50000” in our development environment. From there you can click the NetWeaver Administrator link or go directly there with “http://localhost:50000/nwa“. The NWA appears and you select SOA Management from the menu there. After this select Destination Template Management (You’ve been here before, configuring the necessary destinations for the service registry of esworkplace). What we now need to do is to define the external services that we want to call as destinations. Click on Create Destination and change Destination Type to WSDL. Then fill in the values for Destination Name and the URL. For WorkAgreementSimpleByElements this is and for EmployeeBasicDataByEmployee it is  In the Authentication part use the Basic Http Authentication and the standard user/ password for ES Workplace (sruser/ eswork123).Destination TemplateAnd don’t forget the second service. Very nice, but where do you get the WSDL URL’s for other services?  Good question. The {code:html}service respository{code} we use, also has an HTML front end. Playing around with it you might have seen it already. Searching services works almost same as from the Developer Studio and clicking on a service shows information about it, including the WSDL URL.I know what you think and you’re right! (I +love+ this sentence).   But let’s think a little bit further: you surely will have test systems, development systems and productive systems that run services. And you don’t want them to interfere. This would mean you have to name your services somehow to distinguish them from the productive ones – and of course  you have to use those names when you call such services and then switch all the names when moving to production. And this with maybe thousands of services. A nightmare.  Instead some clever architects prethought about this and introduced this redirection. This way, service names don’t have to be changed and just need to be redeployed to a productive system (in fact, more comfortable with even a transport system). h4. Yes, but… … talking about several thousands of services, won’t it become a nightmare to do the Destination Templates for such a number of services? Yes.  Mass configuration for services is already under development. I’m not sure when this will arrive but it is important to us.    h3. Test The Service For testing I recommend to use the Web Services Navigator, as the internal testing facility of the Developer Studio is less good than this one. For this you point your browser to http://localhost:50000  and choose the link there to Web Services Navigator. From here you search through to the service you just wrote and configured and then start it. What is so good about the Navigator is the fact that you get the real XML that is send backwards and forwards. In our case the servers answer is too big to show it on screen, therefore   adownload of the answer is offered.  Testing Overview But you also can go through the structure of the answer and find out if any useful data came back. Obviously this was the case.  TestingDetail   Great! We have made a service and it delivers useful data. Now we have to back to Visual Composer to give that thing a fancy front end (Yes, it could also be done with Web Dynpro, but you will see that way we are much faster – and use Web Dynpro framework anyways…) h3. Back to Visual Composer Now we can go back to Visual Composer and make a new Model. Once this appears you just go to search and check Search In. If GetEmployeeData does not appear there, remember that it had to be declared in Destination Templates and it appears under the name you entered there. Once you select that service the only method we exposed will appear and you can drag and drop it on to the project pane. Two more drags from Input and EmpList signs let you choose the input and output forms (a form and a list) and here we are.   It is a good idea to uncheck most of the values when the EmpList Define Data window appears and then check only a few useful values. As you might have seen before, this structure is +huge+.   final Model You can either check the design or immediately run the Deploy command. After that  is through you can call the application and get th result.    Service Result
To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Former Member
    Thanks for a great series that ties together all the steps required and the quirks that can be ironed out. This will definitively have a high value for many customers in the future.


    1. Benny Schaich-Lebek Post author
      I looked there. It’s quite a specialized tool. I think, if you are on manufacturing anyways, you are on the right side to use it for this also.

      From the code side, here happened something I feared: most of the code you can see in this example is generated- so you don’t have to write it. I refrained from hiding it away so for a real BPX this looks unpleasant.

      The work to hide the code is under way- promised.



Leave a Reply