Core Java| JSP| Servlets| XML| EJB| JEE5| Web Services| J2ME| Glossary| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
WSDL program 
 

Make a project in Netbeans.Develop an Simple WSDL document in rpc/literal using NetBeans WSDL Designer

 

WSDL program

                     

Project Requirement

Make a  project in Netbeans.Develop an Simple WSDL document in rpc/literal using NetBeans WSDL Designer.Create a operation for calculator named int add(int x, int y)
Solution

  • Develop  a web project
  • Take a WSDL file
  • Develop code for WSDL file

Create Project

  • Make a new web project
  • Give the project name as WSDL-project as given in below in Figure.1.

WSDL program

Figure. 1

  • Now select the server as the glassfish as give below in Figure. 2.

WSDL program

Figure. 2

Create WSDL file

  • Right-click on the project node WSDL-project -> New -> File/Folder
  • Then select xml. From xml tab select WSDL Document as given below in Figure.3.

WSDL program

                                                     Figure.3

  • Give the file name  as WSDL1 for the WSDL-project. as given below in Figure.4.

WSDL program

                                                                Figure.4

Click on the Browser Button and Select  the folder WSDL-project as given below in Figure5

WSDL program

                             Figure.5

  • Now in figure below change the input and output part name as given below in Figure.6.

WSDL program
                                                                     
                                                                   Figure.6

  • Give the input Message part name as x   with element or Type as xsd:int
  • Give the input Message part name as y   with element or Type as xsd:int
  • Give the output Message part name as result  with element or Type as xsd:int

             As given below in Figure.7

WSDL program

                                                   Figure.7

  • Now Click   on the Next
  • In the next step give Binding name as WSDL1Binding
  • Binding type as SOAP
  • Binding subtype as RPC Literal as shown below in Figure.8

WSDL program

                                      Figure.8

  • It  generates the WSDL  file as given in WSDL tab as shown below in Figure. 9.

WSDL program
                                                             Figure. 9

  • In the source view click
  • You will  find source generated
WSDL1.wsdl

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="WSDL1" targetNamespace="http://j2ee.netbeans.org/wsdl/WSDL1"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://j2ee.netbeans.org/wsdl/WSDL1" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types/>
    <message name="addRequest">
        <part name="x" type="xsd:int"/>
        <part name="y" type="xsd:int"/>
    </message>
    <message name="addResponse">
        <part name="result" type="xsd:int"/>
    </message>
    <portType name="WSDL1PortType">
        <operation name="add">
            <input name="input1" message="tns:addRequest"/>
            <output name="output1" message="tns:addResponse"/>
        </operation>
    </portType>
    <binding name="WSDL1Binding" type="tns:WSDL1PortType">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="add">
            <soap:operation/>
            <input name="input1">
                <soap:body use="literal" namespace="http://j2ee.netbeans.org/wsdl/WSDL1"/>
            </input>
            <output name="output1">
                <soap:body use="literal" namespace="http://j2ee.netbeans.org/wsdl/WSDL1"/>
            </output>
        </operation>
    </binding>
    <service name="WSDL1Service">
        <port name="WSDL1Port" binding="tns:WSDL1Binding">
            <soap:address location="http://localhost:${HttpDefaultPort}/WSDL1Service/WSDL1Port"/>
        </port>
    </service>
    <plnk:partnerLinkType name="WSDL1">
        <!-- A partner link type is automatically generated when a new port type is added. Partner link types are used by BPEL processes.
In a BPEL process, a partner link represents the interaction between the BPEL process and a partner service. Each partner link is associated with a partner link type.
A partner link type characterizes the conversational relationship between two services. The partner link type can have one or two roles.-->
        <plnk:role name="WSDL1PortTypeRole" portType="tns:WSDL1PortType"/>
    </plnk:partnerLinkType>
</definitions>

Download Code

                         
» View all related tutorials
Related Tags: c gui web ide netbeans ui service help services vi deploy id tool developer oo beans to developers bean e

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.