Comments (4)
Small typhos:
/**
* 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_FORWARDED_FOR'])) {
$hostname=$_SERVER['X_FORWARDED_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_FORWARDED_FOR'])) {
$hostname=$_SERVER['X_FORWARDE_FOR'];
}else{
$hostname =$_SERVER['SERVER_NAME'];
}
return 'http://'.$hostname.str_replace(basename($_SERVER['SCRIPT_NAME']),'',$_SERVER['SCRIPT_NAME']);
}
Original comment by [email protected]
on 24 Aug 2012 at 7:18
from php-wsdl-creator.
Now also as Patch file
On more issue found: Line764 cause at demo.php
//if(is_null($class)&&$this->IsOnlyGlobal()){
+ if(!isset($class)&&$this->IsOnlyGlobal()){
Tested with PHP Version 5.3.8, Apache, win7
Original comment by [email protected]
on 26 Aug 2012 at 12:55
Attachments:
from php-wsdl-creator.
I'd prefer to init the $class variable with NULL, but thanks anyway!
The XFF header (as all X-headers) is a very special thing - and it could be
faked, so I'd prefer to set the PhpWsdl->EndPoint and PhpWsdl->NameSpace
manually in this case. I had a look at the Apache documentation:
http://httpd.apache.org/docs/trunk/mod/mod_proxy.html
There the XFF header is described as "The IP address of the client"!? Are you
sure you receive the server name when accessing this header?
Original comment by [email protected]
on 26 Aug 2012 at 6:49
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from php-wsdl-creator.
http://httpd.apache.org/docs/trunk/mod/mod_proxy.html#forwardreverse
X-Forwarded-Host is correct not X-Forwarded-For
Still this works as expected now in our reverse Proxy scenario
I correct it to that, thanks
Original comment by [email protected]
on 26 Aug 2012 at 8:48
from php-wsdl-creator.
Related Issues (20)
- error parsing json server response HOT 1
- Missing built-in datatypes
- complex type: array of strings with own name produce error HOT 3
- Downloaded V2.3 demo will not work with PHP 5.3.8 HOT 1
- If text is already in UTF-8
- php-wsdl-creator doesn't work on systems which have SOAP_1_1 and SOAP_1_2 defined HOT 2
- Return of a ComplexType doesn't work without PhpWsdl caching HOT 2
- Classmap issue HOT 1
- Exception WDSL format incorrect
- WSDL and Readable WSDL return blank HOT 1
- Warning: Argument #1 is not an array in /php-wsdl-2.3/class.phpwsdlclient.php
- SQL - Result sending as xml response with complex types
- Adding multiple @service files results in "Function 'XXX' doesn't exist"
- pw_set before or after pw_element?
- WS-security HOT 1
- Return string array keys
- different port than 80 HOT 1
- phpwsdl is support Map Type: http://xml.apache.org/xml-soap.
- Document Style HOT 1
- Visual Studio C# : Complex Demo : error in XML file during deserialisation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-wsdl-creator.