Anda di halaman 1dari 7

WSDL FILE

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<!-Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Metro/2.1 (branches/2.1-6728; 2011-02-03T14:14:58+0000) JAXWS-RI/2.2.3 JAXWS/2.2. --> <!-Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Metro/2.1 (branches/2.1-6728; 2011-02-03T14:14:58+0000) JAXWS-RI/2.2.3 JAXWS/2.2. --> <definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/wspolicy"xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam ="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.x mlsoap.org/wsdl/soap/"xmlns:tns="http://pack1/" xmlns:xsd="http://www.w3.org/ 2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="htt p://pack1/" name="MyWebService"> <types> <xsd:schema> <xsd:import namespace="http://pack1/" schemaLocation="http://localhost:8080/W ebService1/MyWebService?xsd=1"/> </xsd:schema> </types> <message name="Square_root"> <part name="parameters" element="tns:Square_root"/> </message> <message name="Square_rootResponse"> <part name="parameters" element="tns:Square_rootResponse"/> </message> <message name="hello"> <part name="parameters" element="tns:hello"/> </message> <message name="helloResponse"> <part name="parameters" element="tns:helloResponse"/> </message> <message name="Fahrenheit"> <part name="parameters" element="tns:Fahrenheit"/> </message> <message name="FahrenheitResponse"> <part name="parameters" element="tns:FahrenheitResponse"/> </message> <message name="palindrome"> <part name="parameters" element="tns:palindrome"/> </message> <message name="palindromeResponse"> <part name="parameters" element="tns:palindromeResponse"/> </message> <portType name="MyWebService"> <operation name="Square_root"> <input wsam:Action="http://pack1/MyWebService/Square_rootRequest" message="tn s:Square_root"/>

<output wsam:Action="http://pack1/MyWebService/Square_rootResponse" message=" tns:Square_rootResponse"/> </operation> <operation name="hello"> <input wsam:Action="http://pack1/MyWebService/helloRequest" message="tns:hell o"/> <output wsam:Action="http://pack1/MyWebService/helloResponse" message="tns:he lloResponse"/> </operation> <operation name="Fahrenheit"> <input wsam:Action="http://pack1/MyWebService/FahrenheitRequest" message="tns :Fahrenheit"/> <output wsam:Action="http://pack1/MyWebService/FahrenheitResponse" message="t ns:FahrenheitResponse"/> </operation> <operation name="palindrome"> <input wsam:Action="http://pack1/MyWebService/palindromeRequest" message="tns :palindrome"/> <output wsam:Action="http://pack1/MyWebService/palindromeResponse" message="t ns:palindromeResponse"/> </operation> </portType> <binding name="MyWebServicePortBinding" type="tns:MyWebService"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="documen t"/> <operation name="Square_root"> <soap:operation soapAction=""/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="hello"> <soap:operation soapAction=""/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="Fahrenheit"> <soap:operation soapAction=""/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="palindrome"> <soap:operation soapAction=""/> <input> <soap:body use="literal"/> </input>

<output> <soap:body use="literal"/> </output> </operation> </binding> <service name="MyWebService"> <port name="MyWebServicePort" binding="tns:MyWebServicePortBinding"> <soap:address location="http://localhost:8080/WebService1/MyWebService"/> </port> </service> </definitions>

Temperature Example package pack1;

import javax.jws.WebService; import javax.jws.WebMethod; import javax.jws.WebParam;

/** * * @author mind_freak */ @WebService(serviceName = "MyWebService") public class MyWebService {

/** * Web service operation */ @WebMethod(operationName = "Fahrenheit")

public String Fahrenheit(@WebParam(name = "Fahr") int Fahr) { int cel=(Fahr-32)/9*5; String str= Integer.toString(cel); return "Celsius: " +str+ "!"; } }

Palindrome.java /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package pack2;

import javax.jws.WebService; import javax.jws.WebMethod; import javax.jws.WebParam;

/** * * @author mind_freak */ @WebService(serviceName = "MyWebService1") public class MyWebService1 {

/** * Web service operation */ @WebMethod(operationName = "palindrome") public String palindrome(@WebParam(name = "mystring") String mystring) { String original, reverse=""; original=mystring; int length=original.length(); for ( int i = length - 1 ; i >= 0 ; i-- ) reverse = reverse + original.charAt(i); if (original.equals(reverse)) return "String is Palindrom"; else return "Entered String is not palindrome"; } }

Square_root.java /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package pack3;

import javax.jws.WebService; import javax.jws.WebMethod; import javax.jws.WebParam;

/** * * @author mind_freak */ @WebService(serviceName = "MyWebService2") public class MyWebService2 {

/** * Web service operation */ @WebMethod(operationName = "square_root") public String square_root(@WebParam(name = "number") String number) { //TODO write your implementation code here: double c=Double.parseDouble(number); double epsilon=1e-15; double t=c; while (Math.abs(t - c/t) > epsilon*t) { t = (c/t + t) / 2.0; }

String s= Double.toString(t); return "Square Root: "+s+"!!"; } }

WSDL FILE IS SAME FOR ALL THE THREE PROGRAMS ,ITS JUST I HAVE MADE THREE DIFFERENT PROGRMA FOR THREE OF US.

Paste this program with WDSL in three of ours file with screenshots I am sending you.

Anda mungkin juga menyukai