Giter VIP home page Giter VIP logo

php-wsdl-creator's Issues

complex type: array of strings with own name produce error

this code:


/**
 * Array of strings
 *
 * @pw_complex ArrayOfstring[] string an array of strings
 */

produces this error:
otice: Uninitialized string offset: -1 in 
D:\dev\Apache2\htdocs\ScannyDummyServer\php-wsdl\class.phpwsdlformatter.php on 
line <i>158</i>

Original issue reported on code.google.com by [email protected] on 8 Nov 2012 at 10:04

Exception WDSL format incorrect

W3 validator throws: Invalid per cvc-complex-type.1.4: required attribute 
{None}:name not present
http://www.w3.org/2001/03/webdata/xsv?docAddrs=http%3A%2F%2Fwan24.de%2Ftest%2Fph
pwsdl2%2Fdemo.php%3FWSDL&style=xsl#

PHP Soapclient throws:
Fatal error: SOAP-ERROR: Parsing WSDL: Missing name for  of 'methodName' in...

Solvable by changing line 140 of class.phpwsdlmethod.php to:
$res[]='<wsdl:fault name="'.$this->Name.'Exception" 
message="tns:'.$this->Name.'Exception" />';

Original issue reported on code.google.com by [email protected] on 9 Apr 2013 at 1:49

soap_version in SoapServerOptions

What steps will reproduce the problem?
1. Calling a remote method
2. Getting the attached error on response from server :D

What is the expected output? What do you see instead?
I expect to run the procedure I am calling but I get error instead.

What version of the product are you using? On what operating system?
2.3, Windows 7 32bit and Apache 2.2.20 with SSL mode and PHP 5.3.8

Please provide any additional information below.
File class.phpwsdl.php on line 434:
when I set soap_version to just one of the versions (SOAP_1_1 or SOAP_1_2, not 
SOAP_1_1 | SOAP_1_2) the error is gone.

Original issue reported on code.google.com by [email protected] on 19 Sep 2011 at 8:24

Attachments:

Compatibility with Firefox SOA client plugin

I wanted to test the php-wsdl-creator using a nifty Firefox SOA plugin (which 
you can find here: https://addons.mozilla.org/en-us/firefox/addon/soa-client/)

The above mentioned plugin uses the WSDL to auto discover the SOAP features and 
it can then generate a "form" with which to test your SOAP server.

However, I quickly ran into trouble as the plugin wouldn't create any of the 
input fields. It seems that it requires a strict compliance with the xmlns name 
for the XSD namespace. The php-wsdl-creator by default simply uses 's' where 
the standard seem to lean towards 'xsd'.

You will notice this when looking at fields such as:
<wsdl:part name="SomeField" type="s:string">

The Firefox plugin expects:
<wsdl:part name="SomeField" type="xsd:string">

It seems that the problem can be resolved adding the following configuration 
line just after calling PhpWsdl::CreateInstance():
PhpWsdl::$Config['xsd'] = 'xsd';

I am using version 2.3 of the PHP WSDL library and hope that this information 
might help someone.

Original issue reported on code.google.com by [email protected] on 28 Aug 2012 at 2:52

If text is already in UTF-8

What steps will reproduce the problem?
1. If text is already in UTF-8, Do not need utf8_encode() function.
2. htmlentities() vs htmlspecialchars()
   The problem occurs in utf-8 Text
   Why not just use htmlspecialchars?

   htmlentities($p->Docs, ENT_QUOTES | ENT_IGNORE, 'UTF-8');

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.

http://www.youtu.kr/lab/soapDemo/youtuService.php
http://www.youtu.kr/lab/soapDemo/youtuService.php?WSDL&readable

Original issue reported on code.google.com by maximus.kr on 7 Dec 2012 at 6:50

Attachments:

change wsdl client

when no option is given to the client, then i get et array_merge error on line 
240-241 of file class.phpwsdlclient.php.

You can change line 173 (PhpWsdlClient declaration) to 


    public function PhpWsdlClient($wsdlUri,$options=Array(),$requestHeaders=Array(),$clientOptions=Array()){


$options and $requestHeaders as Array().

solve the problem


Original issue reported on code.google.com by [email protected] on 23 Oct 2012 at 4:28

Missing built-in datatypes

What steps will reproduce the problem?
1. Some standard built-in datatypes are missing so you can't use them...

What is the expected output? What do you see instead?
N/A

What version of the product are you using? On what operating system?
OS/System independent.

Please provide any additional information below.
Could you add the all the data types defined in: 
http://www.w3.org/TR/xmlschema-2/#built-in-datatypes

For your convenience I collected them here (just copy&paste to 
class.phpwsdl.php):

public static $BasicTypes=Array(
 'anyType',
 'anyURI',
 'base64Binary',
 'boolean',
 'byte',
 'date',
 'decimal',
 'double',
 'duration',
 'dateTime',
 'float',
 'gDay',
 'gMonthDay',
 'gYearMonth',
 'gYear',
 'hexBinary',
 'int',
 'integer',
 'long',
 'NOTATION',
 'number',
 'QName',
 'short',
 'string',
 'time',

 'nonNegativeInteger',
 'unsignedLong',
 'unsignedInt',
 'unsignedShort',
 'unsignedByte',
 'positiveInteger',
 'nonPositiveInteger',
 'negativeInteger',
 'normalizedString',
 'token',
 'language',
 'NMTOKEN',
 'Name',
 'NCName',
 'ID',
 'IDREF',
 'ENTITY'
);

Original issue reported on code.google.com by [email protected] on 24 Oct 2012 at 10:13

Enums donot work at PHP5.3.8

What steps will reproduce the problem?
1. Use php-wsdl-creator Commit 43
2. Use http://sourceforge.net/projects/soapui/files/soapui/ 4.5 or 4.51
3. Apache 2.2.21, PHP 5.3.8

What is the expected output? What do you see instead?
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
         <faultcode>WSDL</faultcode>
         <faultstring>SOAP-ERROR: Parsing WSDL: Missing name for &lt;fault> of 'DemoEnum'</faultstring>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

What version of the product are you using? On what operating system?


Please provide any additional information below.

demo.php: Comment out
//PhpWsdlMethod::$DefaultException='SoapFault';// This will set SoapFault as 
exception type for all methods
makes demp.php sample working

Original issue reported on code.google.com by [email protected] on 26 Aug 2012 at 1:11

Return string array keys

Hi,

Is there a way I can retrieve string keys instead of int keys on the response? 

Thank you in advance!

Original issue reported on code.google.com by [email protected] on 19 Sep 2013 at 5:53

php-wsdl-creator doesn't work on systems which have SOAP_1_1 and SOAP_1_2 defined

version 2.3 uses the following code to set the Soap Server options:

...
433  $this->SoapServerOptions=Array(
434      'soap_version' => SOAP_1_1|SOAP_1_2, 
435      'encoding'     => 'UTF-8',
436      'compression'  => SOAP_COMPRESSION_ACCEPT|SOAP_COMPRESSION_GZIP|9
437  );

The expression SOAP_1_1|SOAP_1_2, which I think is meant to evaluate to to the 
maximum available soap version, actually evaluates to 1|2 => 3. This is not a 
valid version and the server fails 

Original issue reported on code.google.com by [email protected] on 16 Jan 2013 at 3:07

Other port than 80/443 (standard port)

Hi,

I am having an issue, when the webserver is not responding on the standard http 
or https port. In the DetermineEndPoint function there is not check on the 
port. So I've added it ;-)


public function DetermineEndPoint(){
    // HTTP / HTTPS
    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
        $protocol = 'https';
    } else {
        $protocol = 'http';
    }

    // PORT
    if (isset($_SERVER['SERVER_PORT'])) {
        if (($protocol == 'https' && $_SERVER['SERVER_PORT'] != 443) ||
            ($protocol == 'http'  && $_SERVER['SERVER_PORT'] != 80)) {
            $port = ':'. $_SERVER['SERVER_PORT'];
        }
    }

    return $protocol .'://'. $_SERVER['SERVER_NAME'] . $port . $_SERVER['SCRIPT_NAME'];
}

Original issue reported on code.google.com by [email protected] on 10 Apr 2012 at 7:29

SQL - Result sending as xml response with complex types

What steps will reproduce the problem?
1. How can I send a associative array (result of a sql-query) as response   
   back to the client.

What I made is:
Create a class.complexTypeproject.php
create a class.project.php
create a server.php --> generate the soap server

All works fine but I when I try send an sql request with more result rows back 
to the client I'm not able to get a fine xml response.

The SQL-Statement is ok. If I have only one Result the xml response is ok and I 
can manage it with ksoap2 for android. 

<SOAP-ENV:Envelope 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Bod
y><ns1:ComplexTypeArrayProjectResponse><return 
SOAP-ENC:arrayType="xsd:string[6]" xsi:type="ns1:stringArray"><item 
xsi:type="xsd:string">0</item><item xsi:type="xsd:string">Erstes 
Projekt</item><item xsi:type="xsd:string">300</item><item 
xsi:type="xsd:string">1</item><item xsi:type="xsd:string">Zweites 
Projekt</item><item 
xsi:type="xsd:string">2000</item></return></ns1:ComplexTypeArrayProjectResponse>
</SOAP-ENV:Body></SOAP-ENV:Envelope>




What is the expected output? What do you see instead?

<SOAP-ENV:Envelope 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Bod
y><ns1:ComplexTypeArrayProjectResponse><return 
SOAP-ENC:arrayType="xsd:string[2]" xsi:type="ns1:stringArray"><item 
xsi:type="xsd:string">stdClass Object
(
    [idget] => 0
    [projectname] => Testprojekt 1
    [budget] => 3300

)
</item><item xsi:type="xsd:string">stdClass Object
(
    [idget] => 1
    [projectname] => Testprojekt 2
    [budget] => 5300
)
</item></return></ns1:ComplexTypeArrayProjektResponse></SOAP-ENV:Body></SOAP-ENV
:Envelope>


What version of the product are you using? On what operating system?
php-wsdl 2.3

Please provide any additional information below.



Original issue reported on code.google.com by [email protected] on 15 Jul 2013 at 12:04

Adding multiple @service files results in "Function 'XXX' doesn't exist"

What steps will reproduce the problem?
1. Default configuration php-wsdl 2.3
2. Copy class.soapdemo.php to class.soapdemo2.php
3a. Change @service in docblock to "@service SoapDemo2"
3b. rename class to "class SoapDemo2"
3c. Remove all functions, except SayHello. Rename this to "SayHello2"

What is the expected output? What do you see instead?
- I'd expect I could call the SayHello2 method on the server
- calling $client->SayHello($_GET['name']) results in client-errormessage 
"Function 'SayHello2' doesn't exist"

What version of the product are you using? On what operating system?
- Default configuration php-wsdl 2.3
- OSX
- lamp configuration on shared server

Please provide any additional information below.
- the "interface description" in the Endpoint URI shows all methods from *both* 
files
Public methods:

ComplexTypeArrayDemo
- DemoMethod
- GetComplexType
- PrintComplexType
- SayHello
- SayHello2
- getName

Original issue reported on code.google.com by [email protected] on 16 Jul 2013 at 8:21

Not able to extend this class

Hi,

I was unable to extend the PhpWsdl class because of the CreateInstance function 
which is currently fixed on creating an instance of PhpWsdl (which I extended).

So I had to change your code for extending (not needing to change your code) 
this super class - which I had to do to change the behaviour of the 
DetermineEndpoint function to support mod_rewrite (the script is not called 
directly, instead it is called via index.php?querystring, which comes from an 
mod_rewrite rule.

Line 534..:


    // hook for extending this class...
    $class = get_called_class();
    $obj=new $class($nameSpace,$endPoint,$cacheFolder,$file,$name,$methods,$types,$outputOnRequest,$runServer);

instead of:

    $obj=new PhpWsdl($nameSpace,$endPoint,$cacheFolder,$file,$name,$methods,$types,$outputOnRequest,$runServer);

Original issue reported on code.google.com by [email protected] on 10 Apr 2012 at 7:34

Visual Studio C# : Complex Demo : error in XML file during deserialisation

What steps will reproduce the problem?

1. Visual Studio C# (target NET3.5 and NET4.0), Windows OS
2. Add webreference to demo.php
3. call SayHello() : success, C# gets the Response as string
4. call GetComplexType() : Fails, error in XML file 


This is my C# function to test demo.php:


   private void button1_Click(object sender, EventArgs e)
        {
            WebRef.SoapDemo demo = new WebRef.SoapDemo();

            string response;
            response = demo.SayHello("Steve");

            WebRef.ComplexTypeDemo c;
            c =  demo.GetComplexType();
        }

During call of GetComplexType() I get exception "Error in XML-Dokument (2,694)"

What is going wrong ? Did I miss something ?

Thank you very much to release php-wsdl-generator to the public.
Could you please add some C# example code snippets ?

Cheers
Carsten

Original issue reported on code.google.com by [email protected] on 21 Oct 2014 at 5:49

Test case at https://code.google.com/p/php-wsdl-creator-test-cases/source/browse/

What steps will reproduce the problem?
Use Test cases from 
https://code.google.com/p/php-wsdl-creator-test-cases/source/browse/
1.SayHello OK
2.SayHellotoAll Missing input array
3.SayHellotoAllOnebyOne Missing input array

What is the expected output? What do you see instead?
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:soap="http://bretterhofer.at/soaptest/">
   <soapenv:Header/>
   <soapenv:Body>
      <soap:SayHello soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <name xsi:type="xsd:string">?</name>
      </soap:SayHello>
   </soapenv:Body>
</soapenv:Envelope>

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:soap="http://bretterhofer.at/soaptest/">
   <soapenv:Header/>
   <soapenv:Body>
      <soap:SayHelloToAll soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
   </soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:soap="http://bretterhofer.at/soaptest/">
   <soapenv:Header/>
   <soapenv:Body>
      <soap:SayHelloToAllOnebyOne soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
   </soapenv:Body>
</soapenv:Envelope>

What version of the product are you using? On what operating system?
Tests with SoapUI 4.5/4.51 Windows or Allinkl PHP5.3

Please provide any additional information below.

You can call me skype:grzchr15

Original issue reported on code.google.com by [email protected] on 26 Aug 2012 at 11:33

WSDL and Readable WSDL return blank

When I visit server.php the interface description page shows normally, and the 
soap client generates properly.
However, the wsdl returns a blank page with no errors.

I am unsure if this is an error on my part, an error in the system, or some 
combination.
All php_wsdl files are in "/php_wsdl" and no extensions are being used.

It looks like no work has been done on this project since 2011, but it appears 
that this is an excellent library and very useful for me. So, I appreciate all 
the work you've done and any help you may be able to offer.

Thanks!
- Alex Davis

Original issue reported on code.google.com by [email protected] on 28 Jun 2013 at 11:44

Attachments:

Downloaded V2.3 demo will not work with PHP 5.3.8

What steps will reproduce the problem?
1. Copy downloaded file to server and try to run demos


What is the expected output? What do you see instead?
Soap Version fatal error, array_merge error


What version of the product are you using? On what operating system?
V2.3 PHP 5.3.8

Please provide any additional information below.
The following changes fix the problems:
1. line 434 in class.wsdlphp.php changed to:
'soap_version'  =>  SOAP_1_1,

2. line 166 in class.wsdlphpclient.php changed to:
    public function PhpWsdlClient($wsdlUri,$options=array(),$requestHeaders=array(),$clientOptions=Array()){

3. line 173 in class.wsdlphpclient.php changed to:
'soap_version'  =>  SOAP_1_1,

Original issue reported on code.google.com by [email protected] on 22 Nov 2012 at 6:58

WS-security

V2.4

Have you or anyone implemented WS-security ontop of php-wsdl-creator?  Very 
interested in figuring this out as it seem a area lacking in php soap and 
trying to avoid re-inventing the wheel if this already exists.  Especially if I 
can do it within php-wsdl-creator as it's working brilliantly for me :-)

Thanks in advance,

Chris.

Original issue reported on code.google.com by [email protected] on 25 Jul 2013 at 12:23

DetermineNameSpace and DetermineEndPoint enhanced to be used behind reverse Proxy

What steps will reproduce the problem?
1. Use php-wsdl-creater behind a Apache Reverse Proxy
2.
3.

What is the expected output? What do you see instead?
Use Reverse Proxy instead of App server name

What version of the product are you using? On what operating system?
SVN Trunk 20120812, Any ( win7-64/win7-32, windows 2003/windows 2008r2

Please provide any additional information below.

Code Fragment to enhance your code:
    /**
     * Determine the endpoint URI
     */
    public function DetermineEndPoint(){
    // HTTP / HTTPS
    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
        $protocol = 'https';
    } else {
        $protocol = 'http';
    }

    // PORT
    if (isset($_SERVER['SERVER_PORT'])) {
        if (($protocol == 'https' && $_SERVER['SERVER_PORT'] != 443) ||
            ($protocol == 'http'  && $_SERVER['SERVER_PORT'] != 80)) {
            $port = ':'. $_SERVER['SERVER_PORT'];
        }else{
            $port =$_SERVER['SERVER_PORT'];
        }
    }
    // SERVER_NAME
    if (isset($_SERVER['X_FORWARDE_FOR'])) {
        $hostname=($_SERVER['X_FORWARDE_FOR'];
    }else{
        $hostname =$_SERVER['SERVER_NAME'];
    }
    return $protocol .'://'. $hostname . $port . $_SERVER['SCRIPT_NAME'];
}

    /**
     * Determine the namespace
     */
    public function DetermineNameSpace(){
            // SERVER_NAME
        if (isset($_SERVER['X_FORWARDE_FOR'])) {
            $hostname=($_SERVER['X_FORWARDE_FOR'];
        }else{
            $hostname =$_SERVER['SERVER_NAME'];
        }
        return 'http://'.$hostname.str_replace(basename($_SERVER['SCRIPT_NAME']),'',$_SERVER['SCRIPT_NAME']);
    }

Original issue reported on code.google.com by [email protected] on 23 Aug 2012 at 2:37

Multidimensional return of a mysql result

What steps will reproduce the problem?
1. Get data from mysql within the service:
/**
     * Gets the files for the specific version
     * 
     * @param string $v Current version of the application
     * @return stringArray array of files
     */
    public function GetFilesByVersion($v)
    {
        $version = ltrim(str_replace(".","",$v));
        $query = "SELECT v.Version, d.Name, d.Description, f.Extension FROM Versions v INNER JOIN Downloads d ON d.FK_Version_ID = v.ID INNER JOIN Filetypes f ON d.FK_FileType_ID = f.ID WHERE replace(v.Version,'.','') >= '".$version."'";
        $result = mysql_query($query);


        while ($row = mysql_fetch_assoc($result))
        {
            $rows[] = $row;
        };

        return ($rows); 
    }


What is the expected output? What do you see instead?
In visual studio i got 3 items in the array with the value "Array", not the 
entire data


What version of the product are you using? On what operating system?
php-wsdl 2.3, visual studio 2010 and .net 4 (c#)


Please provide any additional information below.
Is it possible to return a multidimensional array (like a result in mysql with 
more than one row) to c#?
If it's possible, please provide some stuff.
I've already tried it with the complextype:

/**
 * @pw_complex RowArray An array of Row
*/

/**
* This is needed to get multidimensional data from the database
*
* @pw_element stringArray A string with a value
* @pw_complex Row Defines an 2 dimensional array
*/
class Row{
    public $array=array();
}

and returning it like @return RowArray. But this doesn't work.
Thanks in advance for your help. 

(Zur Not können wir auch deutsch reden ;))

Original issue reported on code.google.com by [email protected] on 28 Dec 2011 at 1:40

error parsing json server response

error in parsing json because of wrong regexp in server 

change line 1275 of class.phpwsdl.servers.php to 
        $json=preg_replace('/([^\\\])\\n/','\\n',$json);

add one more \ before ] in regexp

Original issue reported on code.google.com by [email protected] on 24 Oct 2012 at 8:03

Classmap issue

I have an complex array structure but the class name is not mapped correctly.
I'm not sure how to apply the PHP class on the WSDL class

================================================================================
====================================
class.ShopList.php:
class CustomerClass{
  /**
   * Retrieve shop list
   *
   * @param string $CardId is the card identifier string
   * @param string $RegisterId is the card identifier string
   * @return ShopListArray The results the items in the list
   */
  public function RetrieveShopList($CardId,$RegisterId) {
    global $DB;
    $CardId = $DB->real_escape_string(utf8_decode($CardId));
    $Result = new ShopListArray();
    $SQL = "some sql";
    if($RetrieveShopListResult = $DB->query($SQL)) {
      $Counter = 0;
      $TotalValue = 0;
      while($row = $RetrieveShopListResult->fetch_assoc()) {
        $Result->ShopListArray[$Counter]  = new ShopList(SOAP_ENC_ARRAY);
        $Counter++;
      }
      return $Result;
    } else {
      return $DB->error;
    }
  }

class ShopList{
  /**
   * A complex type ShopList
   *
   * @pw_element integer $ProductNumber A integer Product number
   * @pw_complex ShopList
   */
  public $ProductNumber=1;
}

  /**
   * A complex type ShopList
   *
   * @pw_complex ShopListArray Array The complex type name definition
   */

================================================================================
====================================

soap.php:
// Include the demonstration classes
require_once('class.ShopList.php');

// Initialize the PhpWsdl class
require_once('class.phpwsdl.php');
$soap=PhpWsdl::CreateInstance(
  null,                          // PhpWsdl will determine a good namespace
  null,                          // Change this to your SOAP endpoint URI (or keep it NULL and PhpWsdl will determine it)
  null,                          // Change this to a folder with write access
  Array(                        // All files with WSDL definitions in comments
    'class.ShopList.php',
  ),
  null,                          // The name of the class that serves the webservice will be determined by PhpWsdl
  null,                          // This demo contains all method definitions in comments
  null,                          // This demo contains all complex types in comments
  true,                          // Don't send WSDL right now
  true);                        // Don't start the SOAP server right now

// Disable caching for demonstration
ini_set('soap.wsdl_cache_enabled',0);    // Disable caching in PHP
PhpWsdl::$CacheTime=0;                  // Disable caching in PhpWsdl

// Run the SOAP server
if($soap->IsWsdlRequested())            // WSDL requested by the client?
  $soap->Optimize=false;                // Don't optimize WSDL to send it human readable to the browser
//$soap->ParseDocs=false;                // Uncomment this line to disable the 
whole documentation features
//$soap->IncludeDocs=false;              // Uncomment this line to disable 
writing the documentation in WSDL XML
//$wsdl=$soap->CreateWsdl();            // This would save the WSDL XML string 
in $wsdl
//$php=$soap->OutputPhp(false,false);    // This would save a PHP SOAP client 
as PHP source code string in $php
//$html=$soap->OutputHtml(false,false);  // This would save the HTML 
documentation string in $html
$soap->RunServer();                      // Finally, run the server
$DB->close();

================================================================================
====================================


I have the same issue as http://yetanotherprogrammingblog.com/node/11 but don't 
know how to define/solve in phpwsdl class.

Original issue reported on code.google.com by [email protected] on 13 Mar 2013 at 6:19

different port than 80

When I'd invoke webservice on virtual host with different port  than 80, web 
service didn't run. It's because, function DetermineEndPoint and 
DetermineNameSpace don't set $_SERVER['SERVER_PORT']. I've changed 
class.phpwsdl.php and all's Ok :). 

Original issue reported on code.google.com by [email protected] on 25 Oct 2013 at 10:12

Attachments:

php namespaced class error

For autoload purpose I have to use namespace for my web service classes. Things 
go well until I try to generate (Netbeans) a java client from the generated 
wsdl. 

I got bad elapsed character error due to the fact that phpwsdl put something 
like "\name\space\WSClass" for the service name. Java fail building a string 
from that. "\\name\\space\\WSClass" may work. 
But I think it will be better that phpwsdl put just the class name in the 
generated wsdl. i.e "WSClass" instead of "\name\space\WSClass".

Exemple namespaced ws code

<?php
namespace name\space;
// This bootstrapper may serve any SOAP webservice with PhpWsdl,
// if your methods and classes are commented. I developed and
// tested with Visual Studio 2010 and SoapUI 4.0.0. It seems to
// work pretty good...

// Include the demonstration classes
//require_once('class.WSClass.php');
require_once('class.complextype.php');

// Initialize the PhpWsdl class
require_once('class.phpwsdl.php');
\PhpWsdl::$UseProxyWsdl=false;
$soap = \PhpWsdl::CreateInstance(
    null,                               // PhpWsdl will determine a good namespace
    null,                               // Change this to your SOAP endpoint URI (or keep it NULL and PhpWsdl will determine it)
    null,                           // Change this to a folder with write access
    Array(                              // All files with WSDL definitions in comments
        'class.WSClass.php',
        'class.complextype.php'
    ),
    name\space\WSClass,                     // The name of the class that serves the webservice will be determined by PhpWsdl
    null,                               // This demo contains all method definitions in comments
    null,                               // This demo contains all complex types in comments
    false,                              // Don't send WSDL right now
    false);                             // Don't start the SOAP server right now

// Disable caching for demonstration
ini_set('soap.wsdl_cache_enabled',0);   // Disable caching in PHP
\PhpWsdl::$CacheTime=1;         // Disable caching in PhpWsdl

// Run the SOAP server
if($soap->IsWsdlRequested())            // WSDL requested by the client?
    $soap->Optimize=false;              // Don't optimize WSDL to send it human readable to the browser
//$soap->ParseDocs=false;               // Uncomment this line to disable the whole 
documentation features
//$soap->IncludeDocs=false;             // Uncomment this line to disable writing the 
documentation in WSDL XML
$wsdl = $soap->CreateWsdl();            // This would save the WSDL XML string in $wsdl
//$php=$soap->OutputPhp(false,false);   // This would save a PHP SOAP client as 
PHP source code string in $php
//$html=$soap->OutputHtml(false,false); // This would save the HTML 
documentation string in $html
$soap->RunServer(); 
?>


not working wsdl service part

<wsdl:service name="name\space\WSClass">
    <wsdl:port name="name\space\WSClassSoap" binding="tns:name\space\WSClassSoap">
        <soap:address location="http://localhost/test/name/space/WSClass.php"/>
    </wsdl:port>
</wsdl:service>

working wsdl service part (not well tested)

<wsdl:service name="WSClass">
    <wsdl:port name="WSClassSoap" binding="tns:WSClassSoap">
        <soap:address location="http://localhost/test/name/space/WSClass.php"/>
    </wsdl:port>
</wsdl:service>


Original issue reported on code.google.com by [email protected] on 5 Apr 2012 at 4:40

Document Style

How can I serve my xml in document style, instead of RPC?

Thanks a lot so far.

Original issue reported on code.google.com by [email protected] on 24 Feb 2014 at 6:27

If useing Arrays of Types how to setup minoccurs and minoccurs

What steps will reproduce the problem?
1.Use stringArray
2.
3.

What is the expected output? What do you see instead?
 minoccurs=1  maxoccur=1 is at wsdl

What version of the product are you using? On what operating system?
latest from 2012/Sept/02

Please provide any additional information below.

Any Documentation hints how to do it?

Original issue reported on code.google.com by [email protected] on 2 Sep 2012 at 4:18

Warning: Argument #1 is not an array in /php-wsdl-2.3/class.phpwsdlclient.php

What steps will reproduce the problem?
1. Default installation
2. Run /php-wsdl-2.3/demo6.php?name=you
3. Shows 2 warnings, and result from call

What is the expected output? What do you see instead?
- output without warnings
- ( ! ) Warning: array_merge() [function.array-merge]: Argument #1 is not an 
array in /php-wsdl-2.3/class.phpwsdlclient.php on line 233
Call Stack
#   Time    Memory  Function    Location
1   0.0000  50248   {main}( )   ../demo6.php:0
2   0.0015  210824  PhpWsdlClient->SayHello( )  ../demo6.php:17
[cut]

( ! ) Warning: array_merge() [function.array-merge]: Argument #1 is not an 
array in /php-wsdl-2.3/class.phpwsdlclient.php on line 234
Call Stack
#   Time    Memory  Function    Location
1   0.0000  50248   {main}( )   ../demo6.php:0
2   0.0015  210824  PhpWsdlClient->SayHello( )  ../demo6.php:17
[cut]

What version of the product are you using? On what operating system?
- 2.3 (no plugins)

Please provide any additional information below.
- can be fixed by changing default null:
 public function PhpWsdlClient($wsdlUri,$options=null,$requestHeaders=null,$clientOptions=Array()){
into Array():
 public function PhpWsdlClient($wsdlUri,$options=Array(),$requestHeaders=Array(),$clientOptions=Array()){

Original issue reported on code.google.com by [email protected] on 12 Jul 2013 at 8:55

.NET complextype error if not using caching

If you use a .NET client to access your PHP WSDL webservice with complextypes, 
you NEED to use caching on your server!! Make sure to enable it, otherwise you 
get a .net error like "Error in xml document".

Original issue reported on code.google.com by [email protected] on 22 May 2012 at 11:58

Where is enum support?

If you open http://wan24.de/test/phpwsdl2/demo.php?WSDL Definition for DemoEnum 
is shown, but if I run the demo.php from the latest trunk there is no enum 
shown, neither is it found in the source code.

If you download the file http://wan24.de/test/phpwsdl2/demo.php?PHPSOAPCLIENT 
DemoEnum is defined there.

How to get enum support?

Original issue reported on code.google.com by [email protected] on 14 Jun 2012 at 1:50

Return of a ComplexType doesn't work without PhpWsdl caching

What steps will reproduce the problem?
1. add a method that returns a ComplexTypeDemo object in class.soapdemo.php
2. disable PhpWsdl caching with the PhpWsdl::CreateInstance third parameter set 
to null (i.e, in demo3.php)
3. call this method with a test script, dump result and xml response

What is the expected output? What do you see instead?

The complextype should be returned in the soap message (so that the soap client 
create the right object)
The returned type is SOAP-ENC:Struct instead of the complextype, then the 
returned object is stdClass in php

What version of the product are you using? On what operating system?

php-wsdl-2.3 ; php 5.3.3

Please provide any additional information below.

Same problem with RunQuickMode() because it doesn't use PhpWsdl cache i guess

Original issue reported on code.google.com by [email protected] on 23 Jan 2013 at 3:38

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.