|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: |
// ==== soap/service.php ===============================================
<?php
class Service
{
/**
* Saves form data into database
*
* @param string $data
* @return string
*/
public function getMessage($data)
{
$h = mysql_connect('localhost', 'user', 'pass');
mysql_select_db('dbname', $h);
mysql_query("INSERT INTO infopath SET inf_text = '{$data}11'");
return ' ';
}
}
ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache
$server = new SoapServer("service.wsdl");
$server->setClass('Service');
$server->handle();
// ==== soap/client.php ===============================================
<?php
ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache
$client = new SoapClient("http://localhost/mysite/soap/service.wsdl");
$return = $client->getMessage('19283');
var_dump($return);
// ==== soap/service.wsdl ============================================
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://localhost/mysite/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://localhost/mysite/soap/service.php" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://localhost/mysite/soap/service.php">
<s:element name="getMessage">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="data" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="getMessageResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="getMessageResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="getMessageSoapIn">
<wsdl:part name="parameters" element="tns:getMessage" />
</wsdl:message>
<wsdl:message name="getMessageSoapOut">
<wsdl:part name="parameters" element="tns:getMessageResponse" />
</wsdl:message>
<wsdl:portType name="ServiceSoap">
<wsdl:operation name="getMessage">
<wsdl:input message="tns:getMessageSoapIn" />
<wsdl:output message="tns:getMessageSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getMessage">
<soap:operation soapAction="http://localhost/mysite/soap/service.php#getMessage" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getMessage">
<soap12:operation soapAction="http://localhost/mysite/soap/service.php#getMessage" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Service">
<wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
<soap:address location="http://localhost/mysite/soap/service.php" />
</wsdl:port>
<wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
<soap12:address location="http://localhost/mysite/soap/service.php" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
|
Advertisement
| Hall of Fame |