Esempio n. 1
0
<?php

// php2wsdl from phpclasses.org
require "php2wsdl/WSDLCreator.php";
$wsdlgen = new WSDLCreator("LibraryWSDL", "http://localhost/ws/intro/wsdl");
$wsdlgen->addFile("library2.php");
$wsdlgen->addURLToClass("Library", "http://localhost/ws/intro/soap-server2.php");
$wsdlgen->createWSDL();
$wsdlgen->saveWSDL("wsdl");
<?php

require_once "../WSDLCreator.php";
//header("Content-Type: application/xml");
$test = new WSDLCreator("WSDLExample1", "http://www.yousite.com/wsdl");
//$test->includeMethodsDocumentation(false);
$test->addFile("example_class.php");
$test->addFile("example_class2.php");
$test->setClassesGeneralURL("http://protung.ro");
$test->addURLToClass("example1", "http://protung.ro/examplewsdl");
$test->addURLToTypens("XMLCreator", "http://localhost/php2swdl");
$test->ignoreMethod(array("example1_1" => "getEx"));
$test->createWSDL();
$test->printWSDL(true);
// print with headers
//print $test->getWSDL();
//$test->downloadWSDL();
//$test->saveWSDL(dirname(__FILE__)."/test.wsdl", false);
Esempio n. 3
0
<?php

require_once "php2wsdl/WSDLCreator.php";
$test = new WSDLCreator("NEWT-RTLS", "http://rtls.gg/ws/");
$test->addFile("lib/RTLSSOAP.class.php");
$test->setClassesGeneralURL("http://rtls.gg/ws/");
$test->addURLToClass("RTLSSOAP", "http://rtls.gg/ws/");
$test->addURLToTypens("Person[]", "http://rtls.gg/ws/");
$test->addURLToTypens("Event[]", "http://rtls.gg/ws/");
$test->addURLToTypens("Tag[]", "http://rtls.gg/ws/");
$test->createWSDL();
$test->saveWSDL("/home/labadmin/eclipse-workspace/newt-rtls/ws.wsdl", true);
Esempio n. 4
0
<?php

require_once "wsdl_creator/WSDLCreator.php";
//header("Content-Type: application/xml");
$test = new WSDLCreator("WSDLExample1", "http://localhost/phpmaster/phpmaster/api/soap-server.php");
//$test->includeMethodsDocumentation(false);
$test->addFile("ServiceFunctions.php");
//$test->addFile("example_class2.php");
$test->setClassesGeneralURL("http://localhost/");
//$test->addURLToClass("example1", "http://localhost/");
//$test->addURLToTypens("XMLCreator", "http://localhost/");
//$test->ignoreMethod(array("example1_1"=>"getEx"));
$test->createWSDL();
$test->printWSDL(true);
// print with headers
//print $test->getWSDL();
//$test->downloadWSDL();
//$test->saveWSDL(dirname(__FILE__)."/wsdl.xml", false);
Esempio n. 5
0
<?php

require_once "../WSDLCreator.php";
header("Content-Type: application/xml");
$test = new WSDLCreator("RockPaperScissors", "http://www.bcmoney-mobiletv.com/services/games/rps/rps.wsdl");
$test->includeMethodsDocumentation(false);
$test->addFile("../../server.php");
$test->setClassesGeneralURL("http://bcmoney-mobiletv.com");
$test->addURLToTypens("rps", "http://bcmoney-mobiletv.com/services/games/rps/");
//$test->addURLToClass("XMLCreator", "http://localhost/php2swdl");
$test->ignoreMethod(array("rps" => "__construct"));
$test->createWSDL();
$test->printWSDL(true);
// print the WSDL to screen (with headers)
#print $test->getWSDL(); //return the WSDL as a string so you can save it in a variable
#$test->downloadWSDL(); //force you to download a copy of the generated WSDL
#$test->saveWSDL(dirname(__FILE__)."/test.wsdl", false); //save the WSDL to the file location specified
<?php

// extrai_wsdl.php
error_reporting(E_ALL & ~E_NOTICE);
require_once "php2wsdl-2009-05-15/WSDLCreator.php";
// Cria um WSDL para a classe WSNoticia. O segundo argumento aponta
// para ESTE arquivo mesmo
$test = new WSDLCreator("WSNoticia", "http://localhost/advancedI/extrai_wsdl.php");
// adiciona o arquivo da Classe WSNoticia
$test->addFile("ws_noticias.php");
// firula... adiciona a URI, que o cokinha adora!
$test->setClassesGeneralURL("http://phprime.com.br");
// Define qual a URL do arquivo de servidor para este WebService
$test->addURLToClass("WSNoticia", "http://localhost/advancedI/ex_ws_server.php");
// gera o arquivo
$test->createWSDL();
// mostra o arquivo na tela. O 1° argumento indica que é para adicionar
// o header informando que é XML
$test->printWSDL(true);
Esempio n. 7
0
<?php

require_once "../WSDLCreator.php";
header("Content-Type: application/xml");
$test = new WSDLCreator("WSDLExample1", "http://www.yousite.com/wsdl");
$test->includeMethodsDocumentation(false);
$test->addFile("example_class.php");
$test->addFile("example_class2.php");
$test->setClassesGeneralURL("http://protung.ro");
$test->addURLToClass("example1", "http://protung.ro/examplewsdl");
$test->addURLToTypens("XMLCreator", "http://localhost/php2swdl");
$test->ignoreMethod(array("example1_1" => "getEx"));
$test->createWSDL();
$test->printWSDL(true);
// print with headers
print $test->getWSDL();
$test->downloadWSDL();
$test->saveWSDL(dirname(__FILE__) . "/test.wsdl", false);