Português Português English English
http://freerepresentationunit.org.uk/intranet/skins/p247x.php
free young porn tubes
shemales tube
horse tube
free lesbian porn tube
boys video tube
xtube.com/matthewlush
http://freerepresentationunit.org.uk/intranet/skins/p32x.php
boob tube
asian porn tube
www red tubecom
http://freerepresentationunit.org.uk/intranet/skins/map.php
retro porn tube
porn tube amateur
tubesex.com
free mature tube porn
free frot videos
shushtube
Radio tube gas
vintage sex tubes
free psp tubes adult
tube365 com
Fk tube
www.nude tube.com
tubegals.com
Tiavas movies tube
zhu zhu pet garage
http://freerepresentationunit.org.uk/intranet/skins/p132x.php
Tube 365
maple tree taps
Yuo tube cepillin
redtubes
Pinktube
zhu zhu tracker
incest sex tubes
http://freerepresentationunit.org.uk/intranet/skins/p79x.php
Tuberose essential oil
tree grow tube
http://freerepresentationunit.org.uk/intranet/skins/p137x.php
asian red tube
panty pissing xtube
Free adult xxx videos
fourtube
free teen porn tube
maturepussytube
Tube ass
big brother nude
www zoo tube com
Porn redtube
http://freerepresentationunit.org.uk/intranet/skins/p83x.php
yuo tube porno
http://freerepresentationunit.org.uk/intranet/skins/p9x.php
GAY MOVIES TUBE
ZOO ANIMAL SEX TUBE
youporne
xtube ball
uporntube.com
crushfetishtube
zoo porn tube
beach xtube
http://freerepresentationunit.org.uk/intranet/skins/p30x.php
One tube oscillators
nudetube.com
http://freerepresentationunit.org.uk/intranet/skins/p145x.php
8 telescope tube assembly
gexo xtube
uporntube
yuvutube
rockettube.com
yutube glasba
solar tube lighting
Http://freerepresentationunit.org.uk/intranet/skins/p248x.php
tube8.c0m
dance tube
Cheap test tubes
yourtube
TUBE 8 PORN
Free porn tube8
besttube
sextube videos
ube 8
xxx tube
free porn tube fisting
free porn tubes
http://freerepresentationunit.org.uk/intranet/skins/p26x.php
pantypissing xtube
SPANKINGTUBE UK
studded tube manufacturers
Http://freerepresentationunit.org.uk/intranet/skins/p178x.php
dirtytube porn
xtube nudist beach
http://freerepresentationunit.org.uk/intranet/skins/p161x.php
tittube
old woman tube porn
zoo tube.com
Reded tube
free black porn tubes
college tube
zootube 365
black milf tube
Ebony teen porn tube
Young tube free tube
redtube
red tube com
tubehentai.com
eskimotube ov
Utube enema viedo
http://freerepresentationunit.org.uk/intranet/skins/p33x.php
XXX SEX TUBE 8
http://freerepresentationunit.org.uk/intranet/skins/p136x.php
best porn tube sites
www.filthtube
animaal sex tube
xtube cumming
nudetube videos
Xxxtubes products
english porn tube
tube8com
Blue tube porn
http://freerepresentationunit.org.uk/intranet/skins/p183x.php
http://freerepresentationunit.org.uk/intranet/skins/p2x.php
adult tube online tv ksex m90 porn tube
my tube
maturetube.com
hairy teen tubes
pornotubexxx
beast tube xxx horse
http://freerepresentationunit.org.uk/intranet/skins/p207x.php
http://freerepresentationunit.org.uk/intranet/skins/p149x.php
sluttube
xnudetube
sex xtube
yotube
red tube.
4tube babestv
rdetube
bestiality tubes
Sex tube8
Www.tube8com
First tube
Zoosex tube
innertube
free porn tube red hub
zoo sex tube 365
poohtube
zoo369
free gay tube porno sites
rude tube videos
tubeyou
jeans pissing xtube
free bbw tubes
http://freerepresentationunit.org.uk/intranet/skins/p58x.php
wanktube
skimtube.com
Rawtube.com
Http://freerepresentationunit.org.uk/intranet/skins/p95x.php
tube tube
http://freerepresentationunit.org.uk/intranet/skins/p36x.php
hardcore tube
saving xtube videos
arianna lubetube
twinks xtube
FREE EXTREME RAPE
turkish porn tube
http://freerepresentationunit.org.uk/intranet/skins/p214x.php
yoytube.com
shemale porn tubes
float tube replacement tube
bdsm rape tube
Free hd sex tubes
redtube competition digg
http://freerepresentationunit.org.uk/intranet/skins/p98x.php
http://freerepresentationunit.org.uk/intranet/skins/p223x.php
EBONY FREE PORN TUBES
http://freerepresentationunit.org.uk/intranet/skins/p81x.php
dudetubeonline
Amatuer boob tube
hardsextube
young milf tube
tree tube
gay pain tube
http://freerepresentationunit.org.uk/intranet/skins/p187x.php
http://freerepresentationunit.org.uk/intranet/skins/p73x.php
chubby mature porn tube
Forced japanese tube
bang tube
beach sex tubes
hqtube.com
Stars of porn tube
pornotube
lube tube cum face
tube top
redtubed
free music videos downloads
pornhub.com/bigtits
xxx porn tubes
Tiviastube
best free porn website
Http://freerepresentationunit.org.uk/intranet/skins/p68x.php
Bang tube videos
http://freerepresentationunit.org.uk/intranet/skins/p35x.php
sextube.com
Redtube.eu
tube peg
Xxx tube
fucktube.es
lolita undressing tube
Top porn tube
porn tube8
hong kong girls
free sex videos tube
Fat asian porn
http://freerepresentationunit.org.uk/intranet/skins/p54x.php
http://freerepresentationunit.org.uk/intranet/skins/p127x.php
http://freerepresentationunit.org.uk/intranet/skins/p4x.php
milf porn tube
milf porn tube
Free male porn tube
fetish porn tube
tube teens
crushfetishtube
shockingtube
gaytubevideos.com
teen tube
hqtubecom
nikki blond file tube
amature tube porn
Youngest teen porn tube
snake tube xxx
xnxx.com
hot tub cover sale
adult u tube sites
japanesetube
http://freerepresentationunit.org.uk/intranet/skins/p174x.php
anonymous redtube
Wife fuck tube
Http://freerepresentationunit.org.uk/intranet/skins/p114x.php
yu tube sexs
reed tube
HTTP://FREEREPRESENTATIONUNIT.ORG.UK/INTRANET/SKINS/P16X.PHP
you tube red tube
tuberculosis bacterium
Anihentaitube.com
forms for softball llc
sexytubevideo.com
http://freerepresentationunit.org.uk/intranet/skins/p244x.php
http://freerepresentationunit.org.uk/intranet/skins/p189x.php
Jiss tube
diy vacuum tubes
free video downloads
Http://freerepresentationunit.org.uk/intranet/skins/p78x.php
orgy tube8

WSDL + PHP = WSDLDocument

This post was made to release the WSDLDocument, a WSDL generator in PHP to webservices.

The way how some subjects are saying about TI hides the expert developer that exists inside a lot of professionals from our area. One of these subjects is webservices. It’s easy to do a client in PHP. But to do a server it’s necessary more work because the WSDL generation. Of course there are others things to look at during the development with webservices.

WSDLDocument

Why is to make WSDL in PHP difficult? A variable in PHP change its type during the script running. The webservices needs you declare the returns’ and arguments’ type.

The goal is look out it to generate the WSDL. To do this isn’t easy, but this isn’t as hard as find mustache on Elephant. So dear, the WSDL generation may be made with two steps:

  1. Find out the type of the parameters and returns of the services;
  2. Generate the XML.

The developer who implemented each service must to describe any where the types information. No more magic, ok? We’re not mage, we’re TI professionals. A good place to put it is the method documentation. The notations help us to solve this problem and keep our code well documented. With the types information we can generate the WSDL. The WSDL generation must to follow W3C stardards.

I release today the WSDLDocument!

This library isn’t a new thing. I did it - only - to improve my knowledges and to understand the WSDL structure. Some another libraries:

As someone may see the WSDLDocument extends DOMDocument. You create a instance of this and… go planet! You have a XML in your hand. You may - for example - link a XSLT file to show a bit beautiful on the browser. I didn’t want to be intrusive and oblige you change your framework. This have to be saw as a library to be put inside your application.

Above a sample how to use this library.

<?php

// generating the wsdl
$class "MyWebserviceClass";
$url "http://mydomain.com/?class=" $class;
$wsdl = new WSDLDocument$class$url );

// showing the wsdl
echo $wsdl->saveXml();

<?php

class MyWebserviceClass
{
    
    
/**
     * Transfering complex type.
     *
     * @param Person
     * @return integer
     */
    
public function anyMethodPerson $type )
    {
        
// ...
        
return 100;
    }
    
    
/**
     * Transfering array of complex type.
     *
     * @param integer
     * @return Person[]
     */
    
public function another$quantity )
    {
        
$list = array();
        for ( 
$i 0$i $quantity$i++ )
        {
            
array_push$list, new Person() );
        }
        return 
$list;
    }
    
}

class 
Person
{
    
    
/**
     *
     * @var string
     */
    
public $name "";
    
    
/**
     *
     * @var integer
     */
    
public $children "";
    
}

I will try keep this library updated. I’m busiest this time, because this I don’t know what it’ll happen.

download the WSDLDocument here

Posted in Development, PHP

8 Comments so far

Subscribe to Comments RSS or TrackBack 'WSDL + PHP = WSDLDocument'.

  1. Jul 29, 2008 at 3:10 am

    Webservice says,

    Now, if you wish to update your PHP then the best way will be to upgrade PHP, using the old configuration (php. Webservice

  2. Aug 6, 2008 at 2:17 pm

    Cláudio Esperança says,

    Olá Renan.

    Obrigado por esta biblioteca… Faz precisamente o que disseste e de forma não intrusiva, excelente para o módulo de webservices que estou a desenvolver para o Moodle.

    Tomei a liberdade de fazer algumas (pequenas) modificações na biblioteca: a primeira prende-se com a utilização do @method para documentar o que cada método de uma classe faz e inserir essa informação do wsdl; a segunda foi a inclusão da possibilidade de associar um xslt com o wsdl para que o navegador formate o output de acordo com este ficheiro.

    Tomei a liberdade de colocar os ficheiros modificados no endereço http://rapidshare.com/files/135322692/WSDLDocument.tar.bz2 para que possas analisar se as alterações te interessam. Se não conseguires descarregar o ficheiro ou tiveres dúvidas sobre as modificações, envia-me uma mensagem de correio electrónico para endereço de email que associei a este comentário.

    Obrigado mais uma vez por esta biblioteca.

    Um abraço

  3. Aug 6, 2008 at 4:11 pm

    Renan de Lima says,

    Legal Cláudio,

    Eu inclusive também já alterei algumas coisas, em breve deve sair a 0.2 Os métodos estáticos estão indo pro wsdl. Outra novidade que virá é a documentação do método e da classe que serão incluídos no wsdl.

    Quanto a folha de estilo xsl eu fiz assim:

    # gera wsdl
    $oWsdl = new WSDLDocument( “Classe”, “url” );

    # aplica estilo
    $oEstilo = $oWsdl->createProcessingInstruction( “xml-stylesheet”, “type=\”text/xsl\” href=\”url.xsl\”" );
    $oWsdl->insertBefore( $oEstilo, $oWsdl->firstChild );

    dessa forma não precisei alterar a classe

    vou dar uma olhada nas suas alterações, vamos conversar pra incluir suas novidades e outras funcionalidades na biblioteca

  4. Aug 19, 2008 at 9:48 am

    Daniel Costa says,

    Renan,

    Porque você não divulga essa classe no PHP Classes?

    Inclusive por lá eu poderia acompanhar as atualizações que você venha a fazer nela.

    Fica a sugestão,
    Um abraço!

  5. Aug 19, 2008 at 10:04 am

    Renan de Lima says,

    Daniel e demais, optei por hospedar o projeto no GoogleCode. A url é:

    http://code.google.com/p/wsdldocument

    Lá tem todas as versões, documentação e dicas de uso da biblioteca.

    Obrigado pela sugestão.

  6. Apr 12, 2009 at 11:46 am

    Herbert says,

    mas a instância da classe servidor, ficaria como?
    eu tentei assim:
    $server = new SoapServer(”http://meusite.com.br/webservice/teste_wsdldocument.php?wsdl”, array(
    ‘uri’ => ‘http://’.$_SERVER["HTTP_HOST"].’/loja/webservice’,
    ‘encoding’=>’ISO-8859-1′)
    );
    tá certo assim?
    sendo que o arquivo “teste_wsdldocument.php” contém o código de geração do Xml:
    saveXml();
    ?>

  7. Apr 12, 2009 at 8:26 pm

    Renan de Lima says,

    Hebert,

    o jeito que você está correto, só que não é necessário indicar o option “uri” no array enviado como segundo parâmetro do construtor do SoapServer

    você ainda pode deixar o wsdl gerfado e indicar somente um caminho para o arquivo no servidor, sem a necessidade de uma requisição http, mesmo que seja localhost

    obrigado pelo contato

  8. Aug 7, 2009 at 3:36 pm

    Thiago Mata says,

    sugiro a adicao do seguinte método

    public function handle()
    {
    header (”content-type: text/xml”);
    if( $_SERVER[ "REQUEST_METHOD" ] == “POST” )
    {
    $objServer = new SoapServer( null , array( “uri” => $_SERVER[ "SERVER_NAME" ] . $_SERVER[ "REQUEST_URI" ] ) );
    $objServer->setClass( $this->oClass->getName() );
    $objServer->handle();
    }
    else
    {
    echo $this->saveXml();
    }
    }

    pois o codigo na chamada

    $objServer = new WSDLDocument( “MinhaClasseWS” );
    $objServer->handle();

    Pode então lidar tanto com o wsdl quanto com as requisições ;)

Leave a Comment

Please be polite and on topic. Your e-mail will never be published.

BrasilMato GrossoRondôniaDistrito Federal