Search Results

Search found 13 results on 1 pages for 'soapserver'.

Page 1/1 | 1 

  • How to catch a Microsoft.SharePoint.SoapServer.SoapServerException?

    - by JL
    I am a bit perplexed on how to catch a specific error type of Microsoft.SharePoint.SoapServer.SoapServerException, I'll explain why, and I've included a code sample below for you guys to see. As you know there are 2 ways to interact with MOSS. The object model (only runs on MOSS Server) Web Services (can be run on a remote machine querying the MOSS server) So as per code sample I'm using web services to query MOSS, because of this I don't have sharepoint installed on the remote server running these web services and without MOSS installed its impossible to reference the SharePoint DLL to get the specific error type : Microsoft.SharePoint.SoapServer.SoapServerException. If I can't reference the DLL then how the heck am I supposed to catch this specific error type? System.Xml.XmlNode ndListView = wsLists.GetListAndView(ListName, ""); string strListID = ndListView.ChildNodes[0].Attributes["Name"].Value; string strViewID = ndListView.ChildNodes[1].Attributes["Name"].Value; System.Xml.XmlDocument doc = new System.Xml.XmlDocument(); System.Xml.XmlElement batchElement = doc.CreateElement("Batch"); batchElement.SetAttribute("OnError", "Continue"); batchElement.SetAttribute("ListVersion", "1"); batchElement.SetAttribute("ViewName", strViewID); batchElement.InnerXml = "<Method ID='1' Cmd='Update'>" + "<Field Name='DeliveryStatus'>" + newStatus.ToString() + "</Field>" + "<Where><Eq><FieldRef Name='ID' /><Value Type='Text'>" + id + "</Value></Eq></Where></Method>"; try { wsLists.UpdateListItems(strListID, batchElement); return true; } catch (Microsoft.SharePoint.SoapServer.SoapServerException ex) { }

    Read the article

  • Complex class using PHP soapserver mapclass

    - by user559343
    Hi all, I need to create a server for processing SOAP requests. I have the wsdl and xml specifications, but I have a doubt: the xml elements are pretty complex, they are not simple type, but they have parent/child relationships (e.g. I have a Book class with an author subclass). How can I map this to PHP classes? In this example, should I create an author class i.e.: class Author { public $name; public $surname; } and then class Book { public $author; } will $author be a class of type Author? Or a typed array? Any help will be appreciated Thanks and happy new year!

    Read the article

  • About Web service ,how to use Ajax to call a specific member function of a class?

    - by Liu chwen
    I'm trying to build a web service by PHP. In my case, I called the getINFO(), but the return value on client side always null. Have no idea to solve this problem.. Here's the SOAPserver code(WS.WEB_s.php): require("WEB_s.php"); ini_set("soap.wsdl_cache_enabled", 0); $server = new SoapServer('wsdl/WEB_s.wsdl'); $server->setClass("WEB_s"); $server->handle(); Where the main Class is(WEB_s.php): final class WEB_s { public function getINFO(){ $JsonOutput = '{"key":"value",...}'; return $JsonOutput; } public function setWAN($setCommand,$newConfigfilePath){ $bOutput; return $bOutput; } } And Client side: $(document).ready(function(){ $('#qqq').button().click(function(){ var soapMessage = LoginSoap($('#uid').val(),$('#pwd').val()); alert('soapMessage'); $.ajax({ //url: 'libraries/WS.WEB_s.php/WEB_s/getINFO',//success , return null //url: 'libraries/WS.WEB_s.php/', //success , return null url: 'libraries/WS.WEB_s.php/getINFO',//success , return null type: 'GET', timeout: (10* 1000), contentType: "text/xml", dataType: "xml", success: function( data,textStatus,jqXHR){ alert('Server success(' + data+')('+ textStatus + ')(' + jqXHR + ')'); }, error: function (request, status, error) { alert('Server Error(' + status+')->'+error); }, complete: function (jqXHR, textStatus) { alert('Server success(' + jqXHR+')('+ textStatus + ')'); } }); }); }); The following is the corresponding WSDL file : http://codepaste.net/95wq9b

    Read the article

  • Is it possible to run a php soap api operation in a web browser

    - by user294873
    In axis2 on Java it's possible to run operations in the browser by the way you send the url for example localhost:8080/axis2/services/SimpleService?wsdl could have operations implemented by writing urls like so localhost:8080/axis2/services/SimpleService/hello?param0=xxx My Question is can you do the same in PHP5 SoapServer where the url is as below? localhost/soaptest/index.php?wsdl Thanks

    Read the article

  • What exactly happens when I call a web service method using PHP::SOAP?

    - by Bedwyr Humphreys
    Say I have a simple client/server scenario with one method: // client code $client = new SoapCLient("service.wsdl"); $result = $client.getPi(); ... // server code function getPi(){ return 3.141; } $server = new SoapServer("service.wsdl"); $server.addFunction("getPi"); $server.handle(); Am I right in thinking that when the client makes a call to the getPi() method the addfunction() gets called everytime? Is this really how PHP SOAP web services work? Or is there some caching going on? Thanks.

    Read the article

  • How to handle sharepoint web services exceptions

    - by Royson
    Hi, I have developed an application of share point. I am using web services for that. the problem is that while working with my app sometimes i get some exceptions. like, Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown. Stack Strace :: at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at ......... my methods From this exception i cannot understand the main problem. While developing i can debug the code, but now my application is getting launched..i can get error log file from my client which contains this type of excetions. But how to catch exact error.??? Thanks.

    Read the article

  • XMLPULLPARSEREXCEPTION...in KSOAP2

    - by aka47
    iam using KSOAP2 for web services. my client is BlackBerry Phone and Server is KeyRingLabs.com. i am using php page for connection...i have taken this code form a Forum.and modified it according to my requirements...but I am having XMLPULLPARSER EXCEPTION...can any body help??? here is my code.... import net.rim.device.api.ui.; import net.rim.device.api.ui.component.; import net.rim.device.api.ui.container.; import net.rim.device.api.system.; import java.util.; import org.ksoap2.; import org.ksoap2.serialization.; import org.ksoap2.transport.; import java.io.IOException; import org.ksoap2.SoapEnvelope; import org.ksoap2.SoapFault; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransport; import org.xmlpull.v1.XmlPullParserException; final class StockQuoteDemo extends UiApplication { public static void main (String[] args) { StockQuoteDemo theApp = new StockQuoteDemo (); theApp.enterEventDispatcher (); } public StockQuoteDemo () { pushScreen (new StockQuoteScreen ()); //doSOAP(); } final class StockQuoteScreen extends MainScreen { public static final String action = "http://keyringlabs.com/Login"; public static final String namespaceRoot = "bbpointofsale.com"; //public static final String webroot = "http://192.168.1.2/bbpointofsale.com/"; public static final String webroot = "http://192.168.0.35/"; //public static final String webroot = "http://www.bbpointofsale.com"; public String errorMessage; public String key; public String transactionID; private HttpTransport transport; private SoapSerializationEnvelope envelope; public StockQuoteScreen () { //transport = new HttpTransport(webroot + "bb/service/index.php"); transport = new HttpTransport(webroot+"Disk/rashid11/index4.php"); transport.debug = true; envelope = new SoapSerializationEnvelope(SoapEnvelope.VER12); key = null; envelope.encodingStyle = SoapSerializationEnvelope.XSD1999; ProcessLogin("[email protected]","123456"); //Dialog.alert("GEN 1"); //Dialog.alert("Warr Gai Vai!!!"); } public boolean onClose () { Dialog.alert ("Goodbye!"); System.exit (0); return true; } public boolean ProcessLogin(String email, String password) { System.err.println("Starting The Process"); errorMessage = ""; String namespace = "urn:" + namespaceRoot + ":login"; //System.err.println("LINK:"+namespace); // SoapObject message = new SoapObject(namespace, "login"); SoapObject message = new SoapObject(namespaceRoot, "login"); message.addProperty("email", email); message.addProperty("password", password); envelope.bodyOut = message; // System.err.println("KSOAP:"+ envelope.toString()); //String soapAction = namespace + "#login"; String soapAction = "http://bbpointofsale.com/login"; // System.err.println("Action : "+soapAction); try { //transport.setXmlVersionTag(""); transport.call(soapAction, envelope); } catch (IOException e) { e.printStackTrace(); System.out.println("error: "+e.getMessage()); errorMessage = e.getMessage(); System.out.println("response1: "+transport.responseDump); return false; } catch (XmlPullParserException e) { e.printStackTrace(); errorMessage = e.getMessage(); System.out.println("request2: "+transport.requestDump); System.out.println("response2: "+transport.responseDump); return false; } try { SoapObject result = (SoapObject) ((SoapObject)envelope.getResponse()).getProperty(0); key = hackToGetResponse("serviceToken", result.toString()); if (key.length() > 0) { System.out.println("KEY:" + key); return true; } else { } } catch (SoapFault e) { errorMessage = e.getMessage(); System.out.println("response3: "+transport.responseDump); return false; } catch (Exception e) { errorMessage = e.getMessage(); System.err.println("response4: "+transport.responseDump); return false; } return false; } public String hackToGetResponse(String key, String response) { System.out.println("hackToGetResponse:" + response); String start = "anyType{key=" + key + "; value="; String end = "; }"; if (response.indexOf(start) == -1 || response.indexOf(end) == -1) return ""; System.out.println("hackToGetResponse:" + "response.substring(0, " + response.indexOf(start) + ").substring(0, " + response.indexOf(end) + ");"); response = response.substring(response.indexOf(start) + start.length()); response = response.substring(0, response.indexOf(end)); if (response.indexOf("anyType{}") != -1) return ""; return response; } } } //******************PHP FILE************************ $server = new SoapServer(null, array('uri' = "urn:keyringlabs.com")); //$server = new SoapServer(null, array('uri' = "urn: bbpointofsale.com")); $server-addFunction("login"); //$email='[email protected]'; //$pass='123456'; function login($email, $pass) { if (strlen($email) == 0) { return Array('serviceToken' => ''); } elseif (strlen($pass) == 0) { return Array('serviceToken' => ''); } else { $objMerchant = Merchant::LoadByEmailPassword($email, $pass); if ($objMerchant == null || $objMerchant->Id &lt==1) { return Array('serviceToken' => ''); } else { $key = uniqid(); $objSess = new Merchantsessions(); $objSess->MerchantID = $objMerchant->Id; $objSess->ServiceToken = $key; $objSess->Save(); } } $result = Array('serviceToken' => $key); //print $result; return $result; } ? ///**************************************** is there any need of an XML page or something..to run it perfectly...please help thank you for your time!

    Read the article

  • Why does Sharepoint 2010 Web Reference work, but Service Reference does not

    - by Darien Ford
    Sharepoint is setup to use NTLM authentication. When I reference http://myserver/Sites/Ops/_vti_bin/Lists.asmx?WSDL as a Web Reference, I can call the methods and get valid responses. When I reference the same url as a Service Reference, the server throws an exception when calling methods. My account is admin on the Sharepoint Farm. This is the app.config for the service reference (mostly auto generated): <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> </configSections> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="ListsSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Ntlm" /> </security> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://myserver/Sites/Ops/_vti_bin/Lists.asmx" binding="basicHttpBinding" bindingConfiguration="ListsSoap" contract="SharepointLists.ListsSoap" name="ListsSoap" /> </client> </system.serviceModel> </configuration> Saddly, the only information the exception provides is this: "Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown." No other details. The code that I'm using is: public ListClass() { _Client = new SharepointLists.ListsSoapClient(); } public System.Xml.Linq.XElement GetTaskList() { return _Client.GetList("Tasks"); } Any thoughts? I would like to use the Service Reference rather than the Web Reference. UPDATE: I tried Rob's suggestion and got this error: HTTP GET Error URI: http://myserver/Sites/Ops/_vti_bin/Lists.asmx The document at the url http://myserver/Sites/Ops/_vti_bin/Lists.asmx was not recognized as a known document type. The error message from each known type may help you fix the problem: - Report from 'http://myserver/Sites/Ops/_vti_bin/Lists.asmx' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'. - Report from 'DISCO Document' is 'There was an error downloading 'http://myserver/_vti_bin/Lists.asmx?disco'.'. - The request failed with HTTP status 404: Not Found. - Report from 'WSDL Document' is 'The document format is not recognized (the con tent type is 'text/html; charset=utf-8').'. - Report from 'XML Schema' is 'The document format is not recognized (the conten t type is 'text/html; charset=utf-8').'.

    Read the article

  • Strange problems with PHP SOAP (private variable not persist + variables passed from client not work

    - by Tamas Gal
    I have a very strange problems in a PHP Soap implementation. I have a private variable in the Server class which contains the DB name for further reference. The private variable name is "fromdb". I have a public function on the soap server where I can set this variable. $client-setFromdb. When I call it form my client works perfectly and the fromdb private variable can be set. But a second soap client call this private variable loses its value... Here is my soap server setup: ini_set('soap.wsdl_cache_enabled', 0); ini_set('session.auto_start', 0); ini_set('always_populate_raw_post_data', 1); global $config_dir; session_start(); /*if(!$HTTP_RAW_POST_DATA){ $HTTP_RAW_POST_DATA = file_get_contents('php://input'); }*/ $server = new SoapServer("{$config_dir['template']}import.wsdl"); $server-setClass('import'); $server-setPersistence(SOAP_PERSISTENCE_SESSION); $server-handle(); Problem is that I passed this to the server: $client = new SoapClient('http://import.ingatlan.net/wsdl', array('trace' = 1)); $xml=''; $xml.=''; $xml.=''; $xml.=''; $xml.='Valaki'; $xml.=''; $xml.=''; $xml.=''; $xml.=''; $tarray = array("type" = 1, "xml" = $xml); try{ $s = $client-sendXml( $tarray ); print "$s"; } catch( SOAPFault $exception){ print "--- SOAP exception :{$exception}---"; print "LAST REQUEST :"; var_dump($client-_getLastRequest()); print "---"; print "LAST RESPONSE :".$client-_getLastResponse(); } So passed an Array of informations to the server. Then I got this exception: LAST REQUEST : <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><type>Array</type><xml/></SOAP-ENV:Body></SOAP-ENV:Envelope> Can you see the Array word between the type tag? Seems that the client only passed a reference or something like this. So I totaly missed :(

    Read the article

  • How to add a new item in a sharepoint list using web services in C sharp

    - by Frank
    Hi, I'm trying to add a new item to a sharepoint list from a winform application in c# using web services. As only result, I'm getting the useless exception "Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown." I have a web reference named WebSrvRef to http://server/site/subsite/_vti_bin/Lists.asmx And this code: XmlDocument xmlDoc; XmlElement elBatch; XmlNode ndReturn; string[] sValues; string sListGUID; string sViewGUID; if (lstResults.Items.Count < 1) { MessageBox.Show("Unable to Add To SharePoint\n" + "No test file processed. The list is blank.", "Add To SharePoint", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } WebSrvRef.Lists listService = new WebSrvRef.Lists(); sViewGUID = "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"; // Test List View GUID sListGUID = "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"; // Test List GUID listService.Credentials= System.Net.CredentialCache.DefaultCredentials; frmAddToSharePoint dlgAddSharePoint = new frmAddToSharePoint(); if (dlgAddSharePoint.ShowDialog() == DialogResult.Cancel) { dlgAddSharePoint.Dispose(); listService.Dispose(); return; } sValues = dlgAddSharePoint.Tag.ToString().Split('~'); dlgAddSharePoint.Dispose(); string strBatch = "<Method ID='1' Cmd='New'>" + "<Field Name='Client#'>" + sValues[0] + "</Field>" + "<Field Name='Company'>" + sValues[1] + "</Field>" + "<Field Name='Contact Name'>" + sValues[2] + "</Field>" + "<Field Name='Phone Number'>" + sValues[3] + "</Field>" + "<Field Name='Brand'>" + sValues[4] + "</Field>" + "<Field Name='Model'>" + sValues[5] + "</Field>" + "<Field Name='DPI'>" + sValues[6] + "</Field>" + "<Field Name='Color'>" + sValues[7] + "</Field>" + "<Field Name='Compression'>" + sValues[8] + "</Field>" + "<Field Name='Value % 1'>" + (((float)lstResults.Groups["Value 1"].Tag)*100).ToString("##0.00") + "</Field>" + "<Field Name='Value % 2'>" + (((float)lstResults.Groups["Value 2"].Tag)*100).ToString("##0.00") + "</Field>" + "<Field Name='Value % 3'>" + (((float)lstResults.Groups["Value 3"].Tag)*100).ToString("##0.00") + "</Field>" + "<Field Name='Value % 4'>" + (((float)lstResults.Groups["Value 4"].Tag)*100).ToString("##0.00") + "</Field>" + "<Field Name='Value % 5'>" + (((float)lstResults.Groups["Value 5"].Tag)*100).ToString("##0.00") + "</Field>" + "<Field Name='Comments'></Field>" + "<Field Name='Overall'>" + (fTotalScore*100).ToString("##0.00") + "</Field>" + "<Field Name='Average'>" + (fTotalAvg * 100).ToString("##0.00") + "</Field>" + "<Field Name='Transfered'>" + sValues[9] + "</Field>" + "<Field Name='Notes'>" + sValues[10] + "</Field>" + "<Field Name='Resolved'>" + sValues[11] + "</Field>" + "</Method>"; try { xmlDoc = new System.Xml.XmlDocument(); elBatch = xmlDoc.CreateElement("Batch"); elBatch.SetAttribute("OnError", "Continue"); elBatch.SetAttribute("ListVersion", "1"); elBatch.SetAttribute("ViewName", sViewGUID); strBatch = strBatch.Replace("&", "&amp;"); elBatch.InnerXml = strBatch; ndReturn = listService.UpdateListItems(sListGUID, elBatch); MessageBox.Show(ndReturn.OuterXml); listService.Dispose(); } catch(Exception Ex) { MessageBox.Show(Ex.Message + "\n\nSource\n" + Ex.Source + "\n\nTargetSite\n" + Ex.TargetSite + "\n\nStackTrace\n" + Ex.StackTrace, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); listService.Dispose(); } What am I doing wrong? What am I missing? Please help!! Frank

    Read the article

  • Need help debugging a PHP 5 SOAP hello world application

    - by WarDoGG
    I've been trying to get PHP 5 SOAP extension to work after reading every tutorial there is on the web, but to no avail. This has been very frustrating and i would really appreciate it if someone could point out where i am going wrong and why. Thanks for your help in advance, and any more details needed i'll oblige. The WSDL is as follows : <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions name="test" 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://tempuri.org/" xmlns:s1="http://microsoft.com/wsdl/types/" 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://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/"> <s:import namespace="http://microsoft.com/wsdl/types/" /> <s:element name="getUser"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" /> </s:sequence> </s:complexType> </s:element> <s:element name="getUserResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="getUserResult" type="tns:bookUser" /> </s:sequence> </s:complexType> </s:element> <s:complexType name="bookUser"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="GUID" type="s1:guid" /> <s:element minOccurs="0" maxOccurs="1" name="login" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="pass" type="s:string" /> </s:sequence> </s:complexType> </s:schema> </wsdl:types> <wsdl:message name="getUserSoapIn"> <wsdl:part name="parameters" element="tns:getUser" /> </wsdl:message> <wsdl:message name="getUserSoapOut"> <wsdl:part name="parameters" element="tns:getUserResponse" /> </wsdl:message> <wsdl:portType name="test"> <wsdl:operation name="getUser"> <wsdl:input message="tns:getUserSoapIn" /> <wsdl:output message="tns:getUserSoapOut" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="testBinding" type="tns:test"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="getUser"> <soap:operation soapAction="http://tempuri.org/getUser" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="testService"> <wsdl:port name="testPort" binding="tns:testBinding"> <soap:address location="http://127.0.0.1/index.php" /> </wsdl:port> </wsdl:service> </wsdl:definitions> The code for the server : <?php function getUser($param) { return array( 'bookUser'=>array ( 'ID'=>1, 'GUID'=>2, 'login'=>$param->username, 'pass'=>$param->password ) ); } ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache $server = new SoapServer("http://127.0.0.1/1.wsdl"); $server->addFunction("getUser"); $server->handle(); ?> and the code for the client : $client = new SoapClient("http://127.0.0.1/index.php?wsdl", array('exceptions' => 0)); try { $arr_data = array ( array ( 'username'=>'xyz', 'password'=>'abc' ) ); print_r($client->__soapCall("getUser",$arr_data)); } catch (SoapFault $result) { print_r($result); }

    Read the article

  • Need help debugging a very basic PHP SOAP Hello world app

    - by WarDoGG
    I have been breaking my head at this, reading almost every article and tutorial there is on the web, but nothing doing.. i still cannot get my first web service application to work. I would really appreciate it if anyone could debug this code for me and provide me with a good explanation as to what is wrong and why. This will help indeed ! Thanks ! I have pasted below the entire codes that i am using making it easier to debug. I'm using the PHP5 SOAP extension. Here is my WSDL: <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions name="testWebservice" 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://tempuri.org/" xmlns:s1="http://microsoft.com/wsdl/types/" 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://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/"> <s:import namespace="http://microsoft.com/wsdl/types/" /> <s:element name="getUser"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" /> </s:sequence> </s:complexType> </s:element> <s:element name="getUserResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="getUserResult" type="tns:userInfo" /> </s:sequence> </s:complexType> </s:element> <s:complexType name="userInfo"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="authkey" type="s:int" /> </s:sequence> </s:complexType> </s:schema> </wsdl:types> <wsdl:message name="getUserSoapIn"> <wsdl:part name="parameters" element="tns:getUser" /> </wsdl:message> <wsdl:message name="getUserSoapOut"> <wsdl:part name="parameters" element="tns:getUserResponse" /> </wsdl:message> <wsdl:portType name="testWebservice"> <wsdl:operation name="getUser"> <wsdl:input message="tns:getUserSoapIn" /> <wsdl:output message="tns:getUserSoapOut" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="testWebserviceBinding" type="tns:testWebservice"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="getUser"> <soap:operation soapAction="http://tempuri.org/getUser" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="testWebserviceService"> <wsdl:port name="testWebservicePort" binding="tns:testWebserviceBinding"> <soap:address location="http://127.0.0.1/nusoap/storytruck/index.php" /> </wsdl:port> </wsdl:service> </wsdl:definitions> and here is the PHP Code i use to setup the server: <?php function getUser($user,$pass) { return array('ID'=>1); } ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache $server = new SoapServer("http://127.0.0.1/mywsdl.wsdl"); $server->addFunction('getUser'); $server->handle(); ?> and the code for the client: <?php $client = new SoapClient("http://127.0.0.1/index.php?wsdl", array('exceptions' => 0)); try { $result = $client->getUser("username","pass"); print_r($result); } catch (SoapFault $result) { print_r($result); } ?> Here is the ERROR output i am getting on the browser : SoapFault Object ( [message:protected] => Error cannot find parameter [string:Exception:private] => [code:protected] => 0 [file:protected] => C:\xampp\htdocs\client.php [line:protected] => 6 [trace:Exception:private] => Array ( [0] => Array ( [function] => __call [class] => SoapClient [type] => -> [args] => Array ( [0] => getUser [1] => Array ( [0] => username [1] => pass ) ) ) [1] => Array ( [file] => C:\xampp\htdocs\client.php [line] => 6 [function] => getUser [class] => SoapClient [type] => -> [args] => Array ( [0] => username [1] => pass ) ) ) [previous:Exception:private] => [faultstring] => Error cannot find parameter [faultcode] => SOAP-ENV:Client )

    Read the article

1