Setup project
1. Create new project in eclipse.
2. Right click on project and create new file (with extension .wsdl).
It will open WSDL in design view.
Add services to a WSDL & Add ports to a service [1:*]
1. Right click and choose "Add service".
2. It will create a service with single port.
Multiple ports can be added to service by right click.
Multiple ports can be added to service by right click.
3. Edit the service name (Ex: "myService").
Edit the port name (Ex: "myPort").
Edit the endpoint URL
Enter anything as there is no meaning of this URL.
Final WSDL endpoint URL will obtained after deploying it on the server
Add binding to port & PortType to binding [1:1]
1. Right click on port and choose Set binding > New Binding.
Edit the binding name (Ex: "myBinding").
It will create a binding symbol with an arrow from URL to this binding.
2. Right click on binding and choose Generate binding content...
Select Protocol (Ex: SOAP/HTTP)
Select SOAP binding options (Ex: document/rpc)
3. Right click on binding and choose Set PortType > New PortType.
Edit the PortType name (Ex: "myPortType").
It will create a PortType with single opeartion.
Multiple operations can be added to PortType by right click on it.
Multiple operations can be added to PortType by right click on it.
Add operations to PortType [1:*]
1. An operation have operation name and I/O parameters.
Edit operation name (Ex: "myOperation")
2. To configure input parameters, Click on arrow in front of input parameter.
There will be single input parameter [by default] associated with Input object.
Example. "in"-string
Example. "in"-string
3. Edit the parameter name. (Ex: "in1")
Change the parameter type.
Example. boolean/date/datetime/double/float/hexBinary/int/string/time
If you want to use other simple types, click browse... and choose the type.
Using complex type
1. If you want to use complex type, click new... and provide complex type name
Example. myType
Example. myType
Double click on operation. It will open operation and its associated complex types.
2. Right click on complex type and choose Add Element... option
Use multiple times to add more elements
Use multiple times to add more elements
Edit the element name and type. (Ex: name - string / age - int)
Do the same process to configure onput parameters of the operations.
At the end, save the file.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.