CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Soap::WSDL sample example request

 



Zerenobsky
Novice

Jul 22, 2009, 8:27 AM

Post #1 of 1 (372 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">
&#8722;
<types>
&#8722;
<xs:schema elementFormDefault="qualified" targetNamespace="http://webservices.daehosting.com/temperature">
&#8722;
<xs:element name="CelciusToFahrenheit">
&#8722;
<xs:complexType>
&#8722;
<xs:sequence>
<xs:element name="nCelcius" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
&#8722;
<xs:element name="CelciusToFahrenheitResponse">
&#8722;
<xs:complexType>
&#8722;
<xs:sequence>
<xs:element name="CelciusToFahrenheitResult" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
&#8722;
<xs:element name="FahrenheitToCelcius">
&#8722;
<xs:complexType>
&#8722;
<xs:sequence>
<xs:element name="nFahrenheit" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
&#8722;
<xs:element name="FahrenheitToCelciusResponse">
&#8722;
<xs:complexType>
&#8722;
<xs:sequence>
<xs:element name="FahrenheitToCelciusResult" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
&#8722;
<xs:element name="WindChillInCelcius">
&#8722;
<xs:complexType>
&#8722;
<xs:sequence>
<xs:element name="nCelcius" type="xs:decimal"/>
<xs:element name="nWindSpeed" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
&#8722;
<xs:element name="WindChillInCelciusResponse">
&#8722;
<xs:complexType>
&#8722;
<xs:sequence>
<xs:element name="WindChillInCelciusResult" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
&#8722;
<xs:element name="WindChillInFahrenheit">
&#8722;
<xs:complexType>
&#8722;
<xs:sequence>
<xs:element name="nFahrenheit" type="xs:decimal"/>
<xs:element name="nWindSpeed" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
&#8722;
<xs:element name="WindChillInFahrenheitResponse">
&#8722;
<xs:complexType>
&#8722;
<xs:sequence>
<xs:element name="WindChillInFahrenheitResult" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</types>
&#8722;
<message name="CelciusToFahrenheitSoapRequest">
<part name="parameters" element="tns:CelciusToFahrenheit"/>
</message>
&#8722;
<message name="CelciusToFahrenheitSoapResponse">
<part name="parameters" element="tns:CelciusToFahrenheitResponse"/>
</message>
&#8722;
<message name="FahrenheitToCelciusSoapRequest">
<part name="parameters" element="tns:FahrenheitToCelcius"/>
</message>
&#8722;
<message name="FahrenheitToCelciusSoapResponse">
<part name="parameters" element="tns:FahrenheitToCelciusResponse"/>
</message>
&#8722;
<message name="WindChillInCelciusSoapRequest">
<part name="parameters" element="tns:WindChillInCelcius"/>
</message>
&#8722;
<message name="WindChillInCelciusSoapResponse">
<part name="parameters" element="tns:WindChillInCelciusResponse"/>
</message>
&#8722;
<message name="WindChillInFahrenheitSoapRequest">
<part name="parameters" element="tns:WindChillInFahrenheit"/>
</message>
&#8722;
<message name="WindChillInFahrenheitSoapResponse">
<part name="parameters" element="tns:WindChillInFahrenheitResponse"/>
</message>
&#8722;
<portType name="TemperatureConversionsSoapType">
&#8722;
<operation name="CelciusToFahrenheit">
&#8722;
<documentation>
Converts a Celcius Temperature to a Fahrenheit value
</documentation>
<input message="tns:CelciusToFahrenheitSoapRequest"/>
<output message="tns:CelciusToFahrenheitSoapResponse"/>
</operation>
&#8722;
<operation name="FahrenheitToCelcius">
&#8722;
<documentation>
Converts a Fahrenheit Temperature to a Celcius value
</documentation>
<input message="tns:FahrenheitToCelciusSoapRequest"/>
<output message="tns:FahrenheitToCelciusSoapResponse"/>
</operation>
&#8722;
<operation name="WindChillInCelcius">
&#8722;
<documentation>
Windchill temperature calculated with the formula of Steadman
</documentation>
<input message="tns:WindChillInCelciusSoapRequest"/>
<output message="tns:WindChillInCelciusSoapResponse"/>
</operation>
&#8722;
<operation name="WindChillInFahrenheit">
&#8722;
<documentation>
Windchill temperature calculated with the formula of Steadman
</documentation>
<input message="tns:WindChillInFahrenheitSoapRequest"/>
<output message="tns:WindChillInFahrenheitSoapResponse"/>
</operation>
</portType>
&#8722;
<binding name="TemperatureConversionsSoapBinding" type="tns:TemperatureConversionsSoapType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
&#8722;
<operation name="CelciusToFahrenheit">
<soap:operation soapAction="" style="document"/>
&#8722;
<input>
<soap:body use="literal"/>
</input>
&#8722;
<output>
<soap:body use="literal"/>
</output>
</operation>
&#8722;
<operation name="FahrenheitToCelcius">
<soap:operation soapAction="" style="document"/>
&#8722;
<input>
<soap:body use="literal"/>
</input>
&#8722;
<output>
<soap:body use="literal"/>
</output>
</operation>
&#8722;
<operation name="WindChillInCelcius">
<soap:operation soapAction="" style="document"/>
&#8722;
<input>
<soap:body use="literal"/>
</input>
&#8722;
<output>
<soap:body use="literal"/>
</output>
</operation>
&#8722;
<operation name="WindChillInFahrenheit">
<soap:operation soapAction="" style="document"/>
&#8722;
<input>
<soap:body use="literal"/>
</input>
&#8722;
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
&#8722;
<service name="TemperatureConversions">
&#8722;
<documentation>
Visual DataFlex Web Service to convert temperature values between Celcius and Fahrenheit
</documentation>
&#8722;
<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.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives