Public Method Details |
nusoap_base |
public void nusoap_base()
|
|
constructor: loads schema version and namespace array
|
Returns |
void |
|
getError |
public boolean getError()
|
|
returns error string if present
|
Returns |
boolean $string error string |
|
serialize_val |
public string serialize_val( $val, boolean $name, boolean $type, boolean $name_ns, boolean $type_ns, boolean $attributes)
|
|
serializes PHP values in accordance w/ section 5
|
Parameter |
|
|
$val |
|
|
Warning: documentation is missing. |
|
|
boolean |
$name |
|
|
Warning: documentation is missing. |
|
|
boolean |
$type |
|
|
Warning: documentation is missing. |
|
|
boolean |
$name_ns |
|
|
Warning: documentation is missing. |
|
|
boolean |
$type_ns |
|
|
Warning: documentation is missing. |
|
|
boolean |
$attributes |
|
|
Warning: documentation is missing. |
|
Returns |
string |
|
serializeEnvelope |
public string serializeEnvelope(string $body, [ boolean $headers, array $namespaces ])
|
|
serialize message
|
Parameter |
|
|
|
boolean |
$headers |
= >>false<< |
|
|
|
|
array |
$namespaces |
= >>array()<< |
|
|
|
Returns |
string message |
|
soapclient |
public void soapclient(string $endpoint, [ string $wsdl, string $portName ])
|
|
constructor
|
Parameter |
|
string |
$endpoint |
|
|
SOAP server or WSDL URL |
|
|
string |
$wsdl |
= >>""<< |
|
optional, set to true if using WSDL |
|
|
string |
$portName |
= >>""<< |
|
optional portName in WSDL document |
|
Returns |
void |
|
call |
public mixed call(string $operation, [ array $params, string $namespace, string $soapAction, boolean $headers ])
|
|
calls method, returns PHP native type
|
Parameter |
|
string |
$operation |
|
|
SOAP server URL or path |
|
|
array |
$params |
= >>array()<< |
|
array of parameters, can be associative or not |
|
|
string |
$namespace |
= >>""<< |
|
optional method namespace |
|
|
string |
$soapAction |
= >>""<< |
|
optional SOAPAction value |
|
|
boolean |
$headers |
= >>false<< |
|
optional array of soapval objects for headers |
|
Returns |
mixed |
|
getOperationData |
public array getOperationData(string $operation, [ string $bindingType ])
|
|
returns an associative array of data necessary for calling an operation
|
Parameter |
|
string |
$operation |
|
|
, name of operation |
|
|
string |
$bindingType |
= >>"soap"<< |
|
, type of binding eg: soap |
|
Returns |
array |
|
send |
public string send(string $data, [ integer $timeout ])
|
|
send the SOAP message via HTTP 1.0
|
Parameter |
|
string |
$data |
|
|
message data |
|
|
integer |
$timeout |
= >>0<< |
|
set timeout in seconds |
|
Returns |
string data |
|
parseResponse |
public object SOAPx4 parseResponse(string $data)
|
|
processes SOAP message returned from server
|
Parameter |
|
string |
$data |
|
|
response data from server |
|
Returns |
object SOAPx4 soapval object |
|
setHeaders |
public void setHeaders(string $headers)
|
|
set the SOAP headers
|
Parameter |
|
|
Returns |
void |
|
getHeaders |
public mixed getHeaders()
|
|
get the parsed headers
|
Returns |
mixed object SOAPx4 soapval object or empty if no headers |
|
setHTTPProxy |
public void setHTTPProxy(string $proxyhost, string $proxyport)
|
|
set proxy info here
|
Parameter |
|
|
|
|
Returns |
void |
|
setCredentials |
public void setCredentials(string $user, string $pass)
|
|
if authenticating, set user credentials here
|
Parameter |
|
|
|
|
Returns |
void |
|
getProxy |
public object soap_proxy getProxy()
|
|
dynamically creates proxy class, allowing user to directly call methods from wsdl
|
Returns |
object soap_proxy object |
|
soapval |
public void soapval([ string $name, boolean $type, mixed $value, boolean $element_ns, boolean $type_ns, boolean $attributes ])
|
|
constructor
|
Parameter |
|
string |
$name |
= >>"noname"<< |
|
optional value name |
|
|
boolean |
$type |
= >>false<< |
|
optional type name |
|
|
mixed |
$value |
= >>-1<< |
|
optional content of value |
|
|
boolean |
$element_ns |
= >>false<< |
|
optional namespace of value |
|
|
boolean |
$type_ns |
= >>false<< |
|
optional namespace of type |
|
|
boolean |
$attributes |
= >>false<< |
|
associative array of attributes to add to element serialization |
|
Returns |
void |
|
serialize |
public void serialize()
|
|
serialize a fault
|
Returns |
void |
|
decode |
public mixed decode()
|
|
decodes a soapval object into a PHP native type
|
Returns |
mixed |
|
soap_parser |
public void soap_parser(string $xml, [ string $encoding ], string $method)
|
|
constructor
|
Parameter |
|
|
|
string |
$encoding |
= >>"UTF-8"<< |
|
character encoding scheme of message |
|
|
string |
$method |
|
|
Warning: documentation is missing. |
|
Returns |
void |
|
get_response |
public object SOAPx4 get_response()
|
|
get the parsed message
|
Returns |
object SOAPx4 soap_val object |
|
setSOAPAction |
public void setSOAPAction(string $soapaction)
|
|
set the soapaction value
|
Parameter |
|
|
Returns |
void |
|
setProxy |
public void setProxy(string $proxyhost, string $proxyport)
|
|
set proxy info here
|
Parameter |
|
|
|
|
Returns |
void |
|
sendHTTPS |
public string sendHTTPS(string $data, [ integer $timeout ])
|
|
send the SOAP message via HTTPS 1.0 using CURL
|
Parameter |
|
string |
$data |
|
|
message data |
|
|
integer |
$timeout |
= >>0<< |
|
set timeout in seconds |
|
Returns |
string data |
|
soap_server |
public void soap_server([ boolean $wsdl ])
|
|
constructor
|
Parameter |
|
boolean |
$wsdl |
= >>false<< |
|
path or URL to a WSDL file |
|
Returns |
void |
|
service |
public void service(string $data)
|
|
processes request and returns response
|
Parameter |
|
string |
$data |
|
|
usually is the value of $HTTP_RAW_POST_DATA |
|
Returns |
void |
|
add_to_map |
public void add_to_map(string $methodname, string $in, string $out)
|
|
add a method to the dispatch map
|
Parameter |
|
|
|
string |
$in |
|
|
array of input values |
|
|
string |
$out |
|
|
array of output values |
|
Returns |
void |
|
register |
public void register(string $name, [ boolean $in, boolean $out, boolean $namespace, boolean $soapaction, boolean $style ])
|
|
register a service with the server
|
Parameter |
|
|
|
boolean |
$in |
= >>false<< |
|
array of input values |
|
|
boolean |
$out |
= >>false<< |
|
array of output values |
|
|
boolean |
$namespace |
= >>false<< |
|
|
|
|
boolean |
$soapaction |
= >>false<< |
|
|
|
|
boolean |
$style |
= >>false<< |
|
(rpc|literal) |
|
Returns |
void |
|
fault |
public void fault(string $faultcode, string $faultactor, [ string $faultstring, string $faultdetail ])
|
|
create a fault. this also acts as a flag to the server that a fault has occured.
|
Parameter |
|
|
|
|
|
string |
$faultstring |
= >>''<< |
|
|
|
|
string |
$faultdetail |
= >>''<< |
|
|
|
Returns |
void |
|
XMLSchema |
public void XMLSchema([ string $schema, string $xml ])
|
|
constructor
|
Parameter |
|
string |
$schema |
= >>""<< |
|
schema document URI |
|
|
string |
$xml |
= >>""<< |
|
xml document URI |
|
Returns |
void |
|
parseFile |
public boolean parseFile(string $xml, string $type)
|
|
parse an XML file
|
Parameter |
|
string |
$xml |
|
|
, path/URL to XML file |
|
|
string |
$type |
|
|
, (schema | xml) |
|
Returns |
boolean |
|
serializeSchema |
public void serializeSchema()
|
|
serialize the schema
|
Returns |
void |
|
getPHPType |
public mixed getPHPType(string $type, string $ns)
|
|
get the PHP type of a user defined type in the schema
PHP type is kind of a misnomer since it actually returns 'struct' for assoc. arrays
returns false if no type exists, or not w/ the given namespace
else returns a string that is either a native php type, or 'struct'
|
Parameter |
|
string |
$type |
|
|
, name of defined type |
|
|
string |
$ns |
|
|
, namespace of type |
|
Returns |
mixed |
|
getLocalPart |
public string getLocalPart(string $str)
|
|
returns the local part of a prefixed string
returns the original string, if not prefixed
|
Parameter |
|
|
Returns |
string |
|
getPrefix |
public mixed getPrefix(string $str)
|
|
returns the prefix part of a prefixed string
returns false, if not prefixed
|
Parameter |
|
|
Returns |
mixed |
|
getNamespaceFromPrefix |
public mixed getNamespaceFromPrefix(string $prefix)
|
|
pass it a prefix, it returns a namespace
or false if no prefixes registered for the given namespace
|
Parameter |
|
|
Returns |
mixed |
|
getPrefixFromNamespace |
public mixed getPrefixFromNamespace(string $ns)
|
|
returns the prefix for a given namespace
returns false if no namespace registered with the given prefix
|
Parameter |
|
|
Returns |
mixed |
|
getTypeDef |
public mixed getTypeDef(string $type)
|
|
returns an array of information about a given type
returns false if no type exists by the given name
typeDef = array(
'elements' => array(), // refs to elements array
'restrictionBase' => '',
'phpType' => '',
'order' => '(sequence|all)',
'attrs' => array() // refs to attributes array
)
|
Parameter |
|
|
Returns |
mixed |
|
serializeTypeDef |
public mixed serializeTypeDef(string $type)
|
|
returns a sample serialization of a given type, or false if no type by the given name
|
Parameter |
|
string |
$type |
|
|
, name of type |
|
Returns |
mixed |
|
typeToForm |
public string typeToForm(string $name, string $type)
|
|
returns HTML form elements that allow a user
to enter values for creating an instance of the given type.
|
Parameter |
|
string |
$name |
|
|
, name for type instance |
|
|
string |
$type |
|
|
, name of type |
|
Returns |
string |
|
wsdl |
public void wsdl([ string $wsdl ])
|
|
constructor
|
Parameter |
|
string |
$wsdl |
= >>""<< |
|
WSDL document URL |
|
Returns |
void |
|
getOperations |
public array getOperations([ string $bindingType ])
|
|
returns an assoc array of operation names => operation data
NOTE: currently only supports multiple services of differing binding types
This method needs some work
|
Parameter |
|
string |
$bindingType |
= >>"soap"<< |
|
eg: soap, smtp, dime (only soap is currently supported) |
|
Returns |
array |
|
serializeType |
public string serializeType(string $name, string $type, mixed $value)
|
|
serializes a PHP value according a given type definition
|
Parameter |
|
string |
$name |
|
|
, name of type |
|
|
string |
$type |
|
|
, type of type, heh |
|
|
mixed |
$value |
|
|
, a native PHP value |
|
Returns |
string serialization |
|
timestamp_to_iso8601 |
public void timestamp_to_iso8601(string $timestamp, boolean $utc)
|
|
convert unix timestamp to ISO 8601 compliant date string
|
Parameter |
|
string |
$timestamp |
|
|
Unix time stamp |
|
|
boolean |
$utc |
|
|
Warning: documentation is missing. |
|
Returns |
void |
|
iso8601_to_timestamp |
public void iso8601_to_timestamp(string $datestr)
|
|
convert ISO 8601 compliant date string to unix timestamp
|
Parameter |
|
string |
$datestr |
|
|
ISO 8601 compliant date string |
|
Returns |
void |
|