Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

Creating Web Services

Use your existing WSDL to generate a Service Control

You can create a Java Page Flow application in BEA WebLogic Workshop that utilizes a Service control generated from a Web service.

This article uses the example of an external Web service listed on the XMethods.net site. We will import the WSDL for the Web service into BEA WebLogic Workshop and see the custom Service control that is generated. We will then consume this control within a simple Page Flow application. We can also create a sample JWS file that allows you to quickly test the control.

Getting the WSDL File from XMethods.net
Visit the XMethods.net site. It lists a number of Web services. My example uses the "Dead Or Alive" Web service. The description (taken right from the listing) is, "includes methods to search the DeadOrAlive database by name, and search for people born on or died on a date (dd/mm). Also a method to get today's birthdays."

According to the listing, this Web service runs on .NET technology. The URL to the WSDL is www.abundanttech.com/webservices/deadoralive/deadoralive.wsdl.

There is a link to this WSDL from the Web service listing on the XMethods site. Feel free to use another Web service from that site as you apply this article. You will need the URL to the WSDL file to create the Service control. Or, you can download the WSDL file to your local machine and import it into the Workshop environment. However, in general that is not a good idea as you will not know if the WSDL changes in the future.

Starting WebLogic Workshop
The next step is to set up BEA WebLogic Workshop. I assume that you have basic familiarity with the tool and have the latest release of BEA WebLogic Platform 8.1 installed. If not, you will need to download and install that from the BEA Web site. Launch Workshop and create a new application. Within the application create a new Web project.

Generating the Service Control from the WSDL File/URI
Create a folder in which to store this control. In my example, I named the folder "ServiceControls". Now, create a new Java control and then select Web services. The wizard will prompt you to name the control. Give your control a name like "DeadOrAliveCtrl". The next step is to enter the URI for the Web service. You can point to the URI or to a local copy of the WSDL file. That's it. You're done. WebLogic Workshop will generate a control that consumes this Web service. Figure 1 shows the Service control that is generated for you. If you are interested in it, click the source tab to see the source code.


If you have a different Web service as an example, you will see the corresponding control. The same applies if you want to leverage any other Web service, such as the Amazon.com or Google.com Web services within WebLogic Workshop.

You can now use this control as part of any other WebLogic Workshop application. For this article, we will generate a Java Page Flow from this control. Since this is an automated step, it is a quick and easy way to test the consumption of the Web service and the control generated by Workshop.

Generating a Java Page Flow
This is a one-step process. Right-click on your control and select "Generate Page Flow". Use the wizard to give your page flow a name such as "DeadOrAlive", or based on the Web service you selected. Figure 2 shows the generated Java Page Flow.


The Page Flow can be used to test your control. Click on the "Start" button from your debug menu. This will start an instance of the BEA WebLogic Server; build and deploy your application, and then load a test browser that allows you to test the operations. Play around a little bit and test the different operations that your control supports. Figure 3 shows the test browser.


One thing you will notice is that the results displayed are meaningless. By default, the index.jsp displays something like

[email protected]

for the results. This doesn't help much. You will need to change the Page Flow code to correct this problem.

Generating a Web Service from the Service Control
Another quick way of testing your control is to use the "Generate Test JWS file" option. This option is available by right-clicking on the control and will generate a simple Web service. Once you have generated the JWS file, select it and then click on "Start" from the Debug menu. This will once again bring up the test browser with the Web service. Click on "Start TestDrive" and then "Continue this conversation". This is like a handshake between the Web services and now you can execute operations on the Web service you are consuming, from your Web service (see Figure 4).


In this article I showed you how BEA WebLogic Workshop can be used to consume Web services that are running on other machines. All you need to know is the location of the WSDL file. From that, Workshop can generate everything you need to consume that Web service, in a matter of minutes. This shows you the power, not only of BEA WebLogic Workshop, but of Web services, which enable tools such as Workshop to automate and provide this capability.


  • Workshop Help: http://edocs.bea.com/workshop/docs81/doc/en/core
  • More Stories By Kunal Mittal

    Kunal Mittal is a consultant for implementation and strategy for Web services and services-oriented architectures. He has co-authored and contributed to several books on Java, WebLogic and Web services.

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

    @ThingsExpo Stories
    Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.
    Poor data quality and analytics drive down business value. In fact, Gartner estimated that the average financial impact of poor data quality on organizations is $9.7 million per year. But bad data is much more than a cost center. By eroding trust in information, analytics and the business decisions based on these, it is a serious impediment to digital transformation.
    Predicting the future has never been more challenging - not because of the lack of data but because of the flood of ungoverned and risk laden information. Microsoft states that 2.5 exabytes of data are created every day. Expectations and reliance on data are being pushed to the limits, as demands around hybrid options continue to grow.
    The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
    As IoT continues to increase momentum, so does the associated risk. Secure Device Lifecycle Management (DLM) is ranked as one of the most important technology areas of IoT. Driving this trend is the realization that secure support for IoT devices provides companies the ability to deliver high-quality, reliable, secure offerings faster, create new revenue streams, and reduce support costs, all while building a competitive advantage in their markets. In this session, we will use customer use cases...
    Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
    Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
    DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City. Digital Transformation (DX) is a major focus with the introduction of DXWorldEXPO within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of bus...
    With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO and DXWorldEXPO are two of the most important technology events of the year. Since its launch over eight years ago, @CloudEXPO and DXWorldEXPO have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, we provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading...
    DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.
    DXWorldEXPO LLC announced today that ICOHOLDER named "Media Sponsor" of Miami Blockchain Event by FinTechEXPO. ICOHOLDER give you detailed information and help the community to invest in the trusty projects. Miami Blockchain Event by FinTechEXPO has opened its Call for Papers. The two-day event will present 20 top Blockchain experts. All speaking inquiries which covers the following information can be submitted by email to [email protected] Miami Blockchain Event by FinTechEXPO also offers s...
    DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
    Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
    Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
    Cloud-enabled transformation has evolved from cost saving measure to business innovation strategy -- one that combines the cloud with cognitive capabilities to drive market disruption. Learn how you can achieve the insight and agility you need to gain a competitive advantage. Industry-acclaimed CTO and cloud expert, Shankar Kalyana presents. Only the most exceptional IBMers are appointed with the rare distinction of IBM Fellow, the highest technical honor in the company. Shankar has also receive...
    The best way to leverage your Cloud Expo presence as a sponsor and exhibitor is to plan your news announcements around our events. The press covering Cloud Expo and @ThingsExpo will have access to these releases and will amplify your news announcements. More than two dozen Cloud companies either set deals at our shows or have announced their mergers and acquisitions at Cloud Expo. Product announcements during our show provide your company with the most reach through our targeted audiences.
    The IoT Will Grow: In what might be the most obvious prediction of the decade, the IoT will continue to expand next year, with more and more devices coming online every single day. What isn’t so obvious about this prediction: where that growth will occur. The retail, healthcare, and industrial/supply chain industries will likely see the greatest growth. Forrester Research has predicted the IoT will become “the backbone” of customer value as it continues to grow. It is no surprise that retail is ...
    Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
    DXWorldEXPO LLC announced today that "Miami Blockchain Event by FinTechEXPO" has announced that its Call for Papers is now open. The two-day event will present 20 top Blockchain experts. All speaking inquiries which covers the following information can be submitted by email to [email protected] Financial enterprises in New York City, London, Singapore, and other world financial capitals are embracing a new generation of smart, automated FinTech that eliminates many cumbersome, slow, and expe...
    Cloud Expo | DXWorld Expo have announced the conference tracks for Cloud Expo 2018. Cloud Expo will be held June 5-7, 2018, at the Javits Center in New York City, and November 6-8, 2018, at the Santa Clara Convention Center, Santa Clara, CA. Digital Transformation (DX) is a major focus with the introduction of DX Expo within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive ov...