jfroebe has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm trying to get the Pod::WSDL to produce a WSDL file. Specifically the attributes aren't being inserted into the WSDL file. I know I'm missing something simple.
wsdl.pl script:
#!/usr/bin/perl use strict; use warnings; use Pod::WSDL; my $pod = new Pod::WSDL(source => "./Demo2.pm", location => 'http://localhost/test/soap', pretty => 1, withDocumentation => 1); print( $pod->WSDL );
Demo2.pm
package Demo2; use XML::Generator::DBI; use XML::Handler::YAWriter; use DBI; =begin WSDL _IN hi $string A foo _DOC This is a test soap web service that prints a list of the + current DBAs _RETURN $string Returns a string containing the current DBAs =end WSDL sub hi { my $out_xml = "hi"; my $ya = XML::Handler::YAWriter->new(); # Stuff return $out_xml; } 1;
WSDL file that is generated:
<?xml version="1.0" encoding="UTF-8"?> <!-- WSDL for http://localhost/test/soap created by Pod::WSDL version: + 0.05 on Tue Jul 17 20:51:42 2007 --> <wsdl:definitions targetNamespace="http://localhost/Demo" xmlns:impl=" +http://localhost/Demo" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsd +l/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenc= +"http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3. +org/2001/XMLSchema" xmlns:tns1="http://localhost/Demo"> <wsdl:portType name="DemoHandler"> </wsdl:portType> <wsdl:binding name="DemoSoapBinding" type="impl:DemoHandler"> <wsdlsoap:binding style="rpc" transport="http://schema +s.xmlsoap.org/soap/http" /> </wsdl:binding> <wsdl:service name="DemoHandlerService"> <wsdl:port binding="impl:DemoSoapBinding" name="Demo"> <wsdlsoap:address location="http://localhost/t +est/soap" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
Notice that the WSDL file doesn't include the "_IN", "_DOC" or "_RETURN" information. I know it is just something simple I'm missing. Ideas?
Jason L. Froebe
Help find a cure for breast cancer! Net proceeds benefit the Susan G. Komen Breast Cancer Foundation and the National Philanthropic Trust. Help by donating - I'm walking 60 miles in 3 days in August 2007. (The day I return from TechWave is the first day of the Walk).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Having trouble with Pod::WSDL and need a brain
by GrandFather (Saint) on Jul 18, 2007 at 02:33 UTC | |
by jfroebe (Parson) on Jul 18, 2007 at 02:38 UTC | |
|
Re: Having trouble with Pod::WSDL and need a brain
by Anonymous Monk on Jul 18, 2007 at 06:47 UTC |