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).

Blog, Tech Blog


In reply to Having trouble with Pod::WSDL and need a brain by jfroebe

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.