< previous
index

beautified Dumper

next >

The beautified Dumper output of $operation from the previous slide, shows the excellent work of XML::Compile::Schema. The schema which defines WSDL is used to process the WSDL files for this interface. The extensive use of "any" (dirty!) makes the translation process a step-by-step process. The next step is shown on one of the next pages.

   $VAR1 = bless(
   { kind    => 'request-response'

     # about the services
   , service =>
     { name    => 'StockQuoteService'
     , port    => [
         { name    => 'StockQuotePort'
         , binding => '{http://example.com/stockquote/service}StockQuoteSoapBinding'
         , '{http://schemas.xmlsoap.org/wsdl/soap/}address' => [ XMLNODE ]
         } ]
     }

     # define service transport and content connection
   , binding =>
     { name => 'StockQuoteSoapBinding'
     , type => '{http://example.com/stockquote/definitions}StockQuotePortType'
     , operation => [
        { name   => 'GetLastTradePrice'
        , input  => { '{http://schemas.xmlsoap.org/wsdl/soap/}body' => [ XMLNODE ] }
        , output => { '{http://schemas.xmlsoap.org/wsdl/soap/}body' => [ XMLNODE ] }
        , '{http://schemas.xmlsoap.org/wsdl/soap/}operation' => XMLNODE
        } ]
     , '{http://schemas.xmlsoap.org/wsdl/soap/}binding' => [ XMLNODES ]
     }

     # defines content
   , portType =>
     { name      => 'StockQuotePortType'
     , operation => [
        { name   => 'GetLastTradePrice'
        , input  => { message =>
             '{http://example.com/stockquote/definitions}GetLastTradePriceInput' }
        , output => { message =>
             '{http://example.com/stockquote/definitions}GetLastTradePriceOutput' }
        } ],
     }

   , port          => $VAR1->{service}{port}[0]
   , bindOperation => $VAR1->{binding}{operation}[0]
   , portOperation => $VAR1->{portType}{operation}[0]

   , soap_ns       => 'http://schemas.xmlsoap.org/wsdl/soap/'
   }, 'XML::Compile::SOAP::Operation' );

Looks nice, but gladly hidden for you!


YAPC::EU 2007 Vienna, Presentation of XML::Compile second part, by Mark Overmeer.