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
Create Project

Figure. 1

Figure. 2
Create WSDL file

Figure.3

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

Figure.5

Figure.6
As given below in Figure.7

Figure.7

Figure.8

Figure. 9
<?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>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: WSDL program
Post your Comment