Note that there are some explanatory texts on larger screens.

plurals
  1. POSilverlight and NuSoap
    primarykey
    data
    text
    <p>EDIT: After some research, I found the answer to the problem (at least it works for my particular situation). Instead of the register call noted down below, I am now using the following call:</p> <pre><code>$soap-&gt;register( 'MyFunction', array('inputData' =&gt; 'xsd:string'), array('outputData' =&gt; 'xsd:string'), $namespace, $namespace . "#MyFunction", "rpc", "literal", "My description."); </code></pre> <p>I guess the "rpc" and "literal" arguments are the key to the success. Hopefully this will help some other users facing the same problem.</p> <hr> <p>I have a problem with a new project, where a silverlight application is to request data from a NuSoap-service. As this integration is rather new to me and unfortunately not many resources concerning this topic can be found on the internet (none addressing my problem at least), I hope that someone can point me into the correct direction.</p> <p>The NuSoap-part is implemented like this:</p> <pre><code>&lt;?php require_once('../soap/nusoap/nusoap.php'); $namespace = "http://127.0.0.1/adminSoap"; $soap = new Soap_Server(); $soap-&gt;configureWSDL('MyService', $namespace); $soap-&gt;wsdl-&gt;schemaTargetNameSpace = $namespace; $soap-&gt;soap_defencoding = 'utf-8'; $soap-&gt;register( 'MyFunction', array('inputData' =&gt; 'xsd:string'), array('outputData' =&gt; 'xsd:string'), $namespace ); $soap-&gt;service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : ''); function MyFunction($inputData) { return "ok"; } ?&gt; </code></pre> <p>I then add a web reference to this service and get the dialog where I can select the service, its ServicePortType as well as "MyFunction".</p> <p>If I generate the reference however, I would assume to find automatically generated asynchronous messages for MyFunction (i.e. MyFunctionAsync and the MyFunctionCompleted.event). These do not exist.</p> <p>What could I be doing wrong. Here's the code that sets up the client:</p> <pre><code>ServiceReference4.MyServicePortTypeClient client = new SilverlightTest1.ServiceReference4.MyServicePortTypeClient(); </code></pre> <p>Any ideas why the asynchronous method is not available?</p> <p>Here's the generated WSDL, if that's of any help, btw (hyphens due to copy/paste from IE):</p> <pre><code>&lt;definitions targetNamespace="http://127.0.0.1/adminSoap"&gt; − &lt;types&gt; − &lt;xsd:schema targetNamespace="http://127.0.0.1/adminSoap"&gt; &lt;xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/&gt; &lt;xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/&gt; &lt;/xsd:schema&gt; &lt;/types&gt; − &lt;message name="MyFunctionRequest"&gt; &lt;part name="affiliate" type="xsd:string"/&gt; &lt;/message&gt; − &lt;message name="MyFunctionResponse"&gt; &lt;part name="result" type="xsd:string"/&gt; &lt;/message&gt; − &lt;portType name="MyServicePortType"&gt; − &lt;operation name="MyFunction"&gt; &lt;input message="tns:MyFunctionRequest"/&gt; &lt;output message="tns:MyFunctionResponse"/&gt; &lt;/operation&gt; &lt;/portType&gt; − &lt;binding name="MyServiceBinding" type="tns:MyServicePortType"&gt; &lt;soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/&gt; − &lt;operation name="MyFunction"&gt; &lt;soap:operation soapAction="http://127.0.0.1/magento/adminSoap/SoapStatsService.php/MyFunction" style="rpc"/&gt; − &lt;input&gt; &lt;soap:body use="encoded" namespace="http://127.0.0.1/adminSoap" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/&gt; &lt;/input&gt; − &lt;output&gt; &lt;soap:body use="encoded" namespace="http://127.0.0.1/adminSoap" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/&gt; &lt;/output&gt; &lt;/operation&gt; &lt;/binding&gt; − &lt;service name="MyService"&gt; − &lt;port name="MyServicePort" binding="tns:MyServiceBinding"&gt; &lt;soap:address location="http://127.0.0.1/magento/adminSoap/SoapStatsService.php"/&gt; &lt;/port&gt; &lt;/service&gt; &lt;/definitions&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload