
Zerenobsky
Novice
Jul 22, 2009, 8:27 AM
Post #1 of 1
(181 views)
|
|
Soap::WSDL sample example request
|
Can't Post
|
|
I have my sample code here: ------------- #!perl -w use SOAP::WSDL; // Using SOAP::Lite approach I can get the appropriate result but I need to show one example using SOAP::WSDL; $inputTemperature = shift; my $WSDL = "http://webservices.daehosting.com/services/TemperatureConversions.wso?WSDL"; my $soap = SOAP::WSDL->new( wsdl => $WSDL); print $soap->call('CelciusToFahrenheit',$inputTemperature); __________ And the test WSDL is: **************** <definitions name="TemperatureConversions" targetNamespace="http://webservices.daehosting.com/temperature"> − <types> − <xs:schema elementFormDefault="qualified" targetNamespace="http://webservices.daehosting.com/temperature"> − <xs:element name="CelciusToFahrenheit"> − <xs:complexType> − <xs:sequence> <xs:element name="nCelcius" type="xs:decimal"/> </xs:sequence> </xs:complexType> </xs:element> − <xs:element name="CelciusToFahrenheitResponse"> − <xs:complexType> − <xs:sequence> <xs:element name="CelciusToFahrenheitResult" type="xs:decimal"/> </xs:sequence> </xs:complexType> </xs:element> − <xs:element name="FahrenheitToCelcius"> − <xs:complexType> − <xs:sequence> <xs:element name="nFahrenheit" type="xs:decimal"/> </xs:sequence> </xs:complexType> </xs:element> − <xs:element name="FahrenheitToCelciusResponse"> − <xs:complexType> − <xs:sequence> <xs:element name="FahrenheitToCelciusResult" type="xs:decimal"/> </xs:sequence> </xs:complexType> </xs:element> − <xs:element name="WindChillInCelcius"> − <xs:complexType> − <xs:sequence> <xs:element name="nCelcius" type="xs:decimal"/> <xs:element name="nWindSpeed" type="xs:decimal"/> </xs:sequence> </xs:complexType> </xs:element> − <xs:element name="WindChillInCelciusResponse"> − <xs:complexType> − <xs:sequence> <xs:element name="WindChillInCelciusResult" type="xs:decimal"/> </xs:sequence> </xs:complexType> </xs:element> − <xs:element name="WindChillInFahrenheit"> − <xs:complexType> − <xs:sequence> <xs:element name="nFahrenheit" type="xs:decimal"/> <xs:element name="nWindSpeed" type="xs:decimal"/> </xs:sequence> </xs:complexType> </xs:element> − <xs:element name="WindChillInFahrenheitResponse"> − <xs:complexType> − <xs:sequence> <xs:element name="WindChillInFahrenheitResult" type="xs:decimal"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> </types> − <message name="CelciusToFahrenheitSoapRequest"> <part name="parameters" element="tns:CelciusToFahrenheit"/> </message> − <message name="CelciusToFahrenheitSoapResponse"> <part name="parameters" element="tns:CelciusToFahrenheitResponse"/> </message> − <message name="FahrenheitToCelciusSoapRequest"> <part name="parameters" element="tns:FahrenheitToCelcius"/> </message> − <message name="FahrenheitToCelciusSoapResponse"> <part name="parameters" element="tns:FahrenheitToCelciusResponse"/> </message> − <message name="WindChillInCelciusSoapRequest"> <part name="parameters" element="tns:WindChillInCelcius"/> </message> − <message name="WindChillInCelciusSoapResponse"> <part name="parameters" element="tns:WindChillInCelciusResponse"/> </message> − <message name="WindChillInFahrenheitSoapRequest"> <part name="parameters" element="tns:WindChillInFahrenheit"/> </message> − <message name="WindChillInFahrenheitSoapResponse"> <part name="parameters" element="tns:WindChillInFahrenheitResponse"/> </message> − <portType name="TemperatureConversionsSoapType"> − <operation name="CelciusToFahrenheit"> − <documentation> Converts a Celcius Temperature to a Fahrenheit value </documentation> <input message="tns:CelciusToFahrenheitSoapRequest"/> <output message="tns:CelciusToFahrenheitSoapResponse"/> </operation> − <operation name="FahrenheitToCelcius"> − <documentation> Converts a Fahrenheit Temperature to a Celcius value </documentation> <input message="tns:FahrenheitToCelciusSoapRequest"/> <output message="tns:FahrenheitToCelciusSoapResponse"/> </operation> − <operation name="WindChillInCelcius"> − <documentation> Windchill temperature calculated with the formula of Steadman </documentation> <input message="tns:WindChillInCelciusSoapRequest"/> <output message="tns:WindChillInCelciusSoapResponse"/> </operation> − <operation name="WindChillInFahrenheit"> − <documentation> Windchill temperature calculated with the formula of Steadman </documentation> <input message="tns:WindChillInFahrenheitSoapRequest"/> <output message="tns:WindChillInFahrenheitSoapResponse"/> </operation> </portType> − <binding name="TemperatureConversionsSoapBinding" type="tns:TemperatureConversionsSoapType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> − <operation name="CelciusToFahrenheit"> <soap:operation soapAction="" style="document"/> − <input> <soap:body use="literal"/> </input> − <output> <soap:body use="literal"/> </output> </operation> − <operation name="FahrenheitToCelcius"> <soap:operation soapAction="" style="document"/> − <input> <soap:body use="literal"/> </input> − <output> <soap:body use="literal"/> </output> </operation> − <operation name="WindChillInCelcius"> <soap:operation soapAction="" style="document"/> − <input> <soap:body use="literal"/> </input> − <output> <soap:body use="literal"/> </output> </operation> − <operation name="WindChillInFahrenheit"> <soap:operation soapAction="" style="document"/> − <input> <soap:body use="literal"/> </input> − <output> <soap:body use="literal"/> </output> </operation> </binding> − <service name="TemperatureConversions"> − <documentation> Visual DataFlex Web Service to convert temperature values between Celcius and Fahrenheit </documentation> − <port name="TemperatureConversionsSoap" binding="tns:TemperatureConversionsSoapBinding"> <soap:address location="http://webservices.daehosting.com/services/TemperatureConversions.wso"/> </port> </service> </definitions> **************** How can I make it work using SOAP::WSDL? Thank you.
|