Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is wrong with the way I am using SOAP in this specic MATLAB example?
    primarykey
    data
    text
    <p>I am trying to connect to an example soap server at <a href="http://www.webservicex.net/" rel="nofollow">http://www.webservicex.net/</a> using the following MATLAB code:</p> <pre><code>% createSoapMessage(NAMESPACE,METHOD,VALUES,NAMES,TYPES,STYLE) creates a SOAP message. % VALUES, NAMES, and TYPES are cell arrays. m = createSoapMessage('http://www.webserviceX.NET', 'GetCitiesByCountry', ... {'Australia'}, {'CountryName'}, { '{http://www.w3.org/2001/XMLSchema}string' }, 'rpc') % callSoapService(ENDPOINT,SOAPACTION,MESSAGE) sends the MESSAGE, % a Java DOM, to the SOAPACTION service at the ENDPOINT. response = callSoapService('http://www.webservicex.net/globalweather.asmx?WSDL', ... 'http://www.webserviceX.NET/GetCitiesByCountry', m); </code></pre> <p>I get the following response (with line endings inserted for viewing):</p> <pre><code>val = &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; &lt;soap:Body&gt; &lt;soap:Fault&gt; &lt;faultcode&gt;soap:Server&lt;/faultcode&gt; &lt;faultstring&gt;System.Web.Services.Protocols.SoapException: Server was unable to process request. ---&amp;gt; System.Data.SqlClient.SqlException: Procedure or function 'getWCity' expects parameter '@CountryName', which was not supplied. at WebServicex.GlobalWeather.GetCitiesByCountry(String CountryName) --- End of inner exception stack trace --- &lt;/faultstring&gt;&lt;detail /&gt; &lt;/soap:Fault&gt; &lt;/soap:Body&gt; &lt;/soap:Envelope&gt; </code></pre> <p>I know that the server is responding. I can interrogate it with Python and suds like this:</p> <pre><code>from suds.client import Client url = 'http://www.webservicex.net/globalweather.asmx?WSDL' client = Client(url) result = client.service.GetCitiesByCountry('Australia') </code></pre> <p>My simple question is what am I doing wrong? </p> <p>I would also like to know how to view the DOM object that createSoapMessage creates and how to view the xml that MATLAB sends and receives.</p>
    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.
 

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