Nusoap "SOAP-ENV: Xml was empty, didn't parse" Message - php

I'm trying to implement a simple webservice using nusoap.
Server:
<?php
require_once "nusoaplib/nusoap.php";
class food {
public function getFood($type) {
switch ($type) {
case 'starter':
return 'Soup';
break;
case 'Main':
return 'Curry';
break;
case 'Desert':
return 'Ice Cream';
break;
default:
break;
}
}
}
$server = new soap_server();
$server->configureWSDL("foodservice", "urn:foodservice");
$server->register("food.getFood",
array("type" => "xsd:string"),
array("return" => "xsd:string"),
"urn:foodservice",
"urn:foodservice#getFood",
"rpc",
"encoded",
"Get food by type");
#$server->service($HTTP_RAW_POST_DATA);
?>
Client:
<?php
require_once "nusoaplib/nusoap.php";
$client = new nusoap_client("http://localhost/SOAPServer.php?wsdl", true);
$error = $client->getError();
if ($error) {
echo "<h2>Constructor error</h2><pre>" . $error . "</pre>";
}
$result = $client->call("food.getFood", array("type" => "Main"));
if ($client->fault) {
echo "<h2>Fault</h2><pre>";
print_r($result);
echo "</pre>";
} else {
$error = $client->getError();
if ($error) {
echo "<h2>Error</h2><pre>" . $error . "</pre>";
} else {
echo "<h2>Main</h2>";
echo $result;
}
}
// show soap request and response
echo "<h2>Request</h2>";
echo "<pre>" . htmlspecialchars($client->request, ENT_QUOTES) . "</pre>";
echo "<h2>Response</h2>";
echo "<pre>" . htmlspecialchars($client->response, ENT_QUOTES) . "</pre>";
?>
The wsdl file is generated by nusoap, which is the following:
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:foodservice" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:foodservice">
<types>
<xsd:schema targetNamespace="urn:foodservice">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/>
</xsd:schema>
</types>
<message name="food.getFoodRequest">
<part name="type" type="xsd:string"/>
</message>
<message name="food.getFoodResponse">
<part name="return" type="xsd:string"/>
</message>
<portType name="foodservicePortType">
<operation name="food.getFood">
<documentation>Get food by type</documentation>
<input message="tns:food.getFoodRequest"/>
<output message="tns:food.getFoodResponse"/>
</operation>
</portType>
<binding name="foodserviceBinding" type="tns:foodservicePortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="food.getFood">
<soap:operation soapAction="urn:foodservice#getFood" style="rpc"/>
<input>
<soap:body use="encoded" namespace="urn:foodservice" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="urn:foodservice" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="foodservice">
<port name="foodservicePort" binding="tns:foodserviceBinding">
<soap:address location="http://10.152.128.39/SOAPServer.php"/>
</port>
</service>
</definitions>
When accessing both the server file and the wsdl file, they both work, but I get the error message when I try to access the client:
[faultcode] => SOAP-ENV:Client
[faultactor] =>
[faultstring] => error in msg parsing:
xml was empty, didn't parse!
[detail] =>
Any suggestions what could be the problem?

In your nusoap. Server you should change:
This:
#$server->service($HTTP_RAW_POST_DATA);
for this:
#$server->service(file_get_contents("php://input"));
You may remove the # if you want to check notices and warnings.
Some explanation from http://php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data
This feature was DEPRECATED in PHP 5.6.0, and REMOVED as of PHP 7.0.0.
If set to TRUE, PHP will always populate the $HTTP_RAW_POST_DATA containing the raw POST data. Otherwise, the variable is populated only when the MIME type of the data is unrecognised.
The preferred method for accessing raw POST data is php://input, and $HTTP_RAW_POST_DATA is deprecated in PHP 5.6.0 onwards. Setting always_populate_raw_post_data to -1 will opt into the new behaviour that will be implemented in a future version of PHP, in which $HTTP_RAW_POST_DATA is never defined.
Regardless of the setting, $HTTP_RAW_POST_DATA is not available with enctype="multipart/form-data".

Related

How can I find an xml string using php in this case?

I want my php-script to download files from a specific link based on xml id's. I want it to ignore the rest of the xml-code, I want it to just look at the first id of every lib.
My xml looks like this:
**
<lib id="ITEM_I_WANT_TO_DOWNLOAD_1" revision="0000">
<part id="0000" type="ch"/>
<part id="0000" type="ls"/>
<part id="0000" type="rs"/>
<part id="0000" type="ch"/>
</lib>
<lib id="ITEM_I_WANT_TO_DOWNLOAD_2" revision="0000">
<part id="0000" type="ch"/>
<part id="0000" type="ls"/>
<part id="0000" type="rs"/>
<part id="0000" type="ch"/>
</lib>
**
My current PHP-script looks like this:
if (!defined('STDIN'))
{
echo 'Please run it as a cmd ({path to your php}/php.exe {path to badges.php} -f)';
exit;
}
define('BASE', 'https://randomtarget.com/');
$figuremap = get_remote_data('https://random/xmlfile-needed.xml/');
if (!file_exists('C:/outputfolder/')) {
mkdir('C:/outputfolder/', 0777, true);
echo "\n --------------> Output folder has been made... \n";
sleep(3);
$fp = fopen("C:/downloaded-xmlfile.xml", "w");
fwrite($fp, $figuremap);
fclose($fp);
echo "\n --------------> XML downloaded and placed into folder \n";
sleep(3);
}
$pos = 0;
while ($pos = strpos($figuremap, '<lib id="', $pos +1))
{
$pos1 = strpos($figuremap, '"', $pos);
$rule = substr($figuremap, $pos, ($pos1 -$pos));
$rule = explode(',', $rule);
$revision = str_replace('">', '', $rule[1]);
$clothing_file = current(explode('*', str_replace('"', '', $rule[2])));
if (file_exists('C:/outputfolder/'.$clothing_file.'.swf'))
{
echo 'Clothing_file found: '.$clothing_file."\r\n";
continue;
}
echo 'Download clothing_file: '.$clothing_file.' '.$revision."\r\n";
if (!#copy(BASE.'/'.$revision.'/'.$clothing_file.'.swf', 'C:/outputfolder'.$clothing_file.'.swf'))
{
echo 'Error downloading: '.$clothing_file."\r\n";
}
}
Beside this code I wrote a get_remote_data function so that's allright. I just want the strpos to grab all the id='' items to check if the files exist on the target-site.
How can I fix it?
There are some easy ways of processing XML files, the easiest (but less flexible) is SimpleXML, the following code should replace the main processing loop...
$xml = simplexml_load_string($figuremap);
foreach ( $xml->lib as $lib ) {
$clothing_file = (string) $lib['id'];
if (file_exists('C:/outputfolder/'.$clothing_file.'.swf'))
{
echo 'Clothing_file found: '.$clothing_file."\r\n";
continue;
}
echo 'Download clothing_file: '.$clothing_file.' '.$revision."\r\n";
if (!#copy(BASE.'/'.$revision.'/'.$clothing_file.'.swf', 'C:/outputfolder'.$clothing_file.'.swf'))
{
echo 'Error downloading: '.$clothing_file."\r\n";
}
}
The start point is to load the XML you have in $figuremap into SimpleXML, then to loop over the elements. This assumes an XML structure of something like...
<lib1>
<lib id="ITEM_I_WANT_TO_DOWNLOAD_1" revision="0000">
<part id="0000a" type="ch" />
<part id="0000" type="ls" />
<part id="0000" type="rs" />
<part id="0000" type="ch" />
</lib>
<lib id="ITEM_I_WANT_TO_DOWNLOAD_2" revision="0000">
<part id="00001" type="ch" />
<part id="0000" type="ls" />
<part id="0000" type="rs" />
<part id="0000" type="ch" />
</lib>
</lib1>
The actual name of the base element doesn't matter as long as the <lib> elements are 1 level down then you can use $xml->lib to loop over them.
Your posted xml string is actually invalid. It needs to be wrapped in a parent element to be repaired. I'm not sure if you are posting your exact xml string or just a section of it.
$xml = '<lib id="ITEM_I_WANT_TO_DOWNLOAD_1" revision="0000">
<part id="0000" type="ch"/>
<part id="0000" type="ls"/>
<part id="0000" type="rs"/>
<part id="0000" type="ch"/>
</lib>
<lib id="ITEM_I_WANT_TO_DOWNLOAD_2" revision="0000">
<part id="0000" type="ch"/>
<part id="0000" type="ls"/>
<part id="0000" type="rs"/>
<part id="0000" type="ch"/>
</lib>';
$xml = '<mydocument>' . $xml . '</mydocument>'; // repair invalid xml
https://stackoverflow.com/q/4544272/2943403
$doc = new DOMDocument();
$doc->loadXml($xml);
$xpath = new DOMXpath($doc);
foreach ($xpath->evaluate('//lib/#id') as $attr) {
$clothing_file = $attr->value;
// perform your conditional actions ...
}
//lib/#id says search for the id attribute of all <lib> elements, anywhere in the document.

Nusoap error "no operations defined in the WSDL document!"

Hi I'm getting an error:
no operations defined in the WSDL document!
I'm searching all possible ways that might answer my problem for almost a week but no luck I can't find it. I use nusoap library and here's my code:
<?php
include_once('lib/nusoap.php');
$username = 'xxxxx#username.com';
$password = 'xxxxxxx';
$endpoint = 'https://mail.xxxxxxxxx.com/ews/services.wsdl';
$wsdl = true;
$soapclient = new nusoap_client($endpoint, $wsdl);
$xml = '<wsdl:definitions targetNamespace="http://schemas.microsoft.com/exchange/services/2006/messages">';
$xml .= '<wsdl:message name="UploadItemsSoapIn">';
$xml .= '<wsdl:part name="request" element="tns:UploadItems"/>';
$xml .= '<wsdl:part name="Impersonation" element="t:ExchangeImpersonation"/>';
$xml .= '<wsdl:part name="MailboxCulture" element="t:MailboxCulture"/>';
$xml .= '<wsdl:part name="RequestVersion" element="t:RequestServerVersion"/>';
$xml .= '</wsdl:message>';
$xml .= '</wsdl:definitions>';
$operation = 'UploadItemsSoapIn';
$result = $soapclient->call($operation,$xml);
$soapclient->setCredentials($username, $password, 'ntlm');
if ($soapclient->fault) {
echo '<h2>Fault (Expect - The request contains an invalid SOAP body)</h2><pre>'; print_r($result); echo '</pre>';
} else {
$err = $soapclient->getError();
if ($err) {
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>';
}
}
and this is the view in services.wsdl link:
<wsdl:definitions targetNamespace="http://schemas.microsoft.com/exchange/services/2006/messages">
<wsdl:types>
<xs:schema>
<xs:import namespace="http://schemas.microsoft.com/exchange/services/2006/messages" schemaLocation="messages.xsd"/>
</xs:schema>
</wsdl:types>
<wsdl:message name="UploadItemsSoapIn">
<wsdl:part name="request" element="tns:UploadItems"/>
<wsdl:part name="Impersonation" element="t:ExchangeImpersonation"/>
<wsdl:part name="MailboxCulture" element="t:MailboxCulture"/>
<wsdl:part name="RequestVersion" element="t:RequestServerVersion"/>
</wsdl:message>
<wsdl:message name="UploadItemsSoapOut">
<wsdl:part name="UploadItemsResult" element="tns:UploadItemsResponse"/>
<wsdl:part name="ServerVersion" element="t:ServerVersionInfo"/>
</wsdl:message>
Sorry I'm just a newbie in soap. All I want is just to run the basic function and just display email or names of the login user. Thanks in advance!

PHP - Wrong date format

I am trying to communicate with a SOAP server and I am sending data to server however it is rejecting the date format that I am using. I have literally tried everything for the last two days and as far as I am seeing the format is correct. This is the code I am using to generate the date. I have read over similar questions but I cant seem to find an answer in any of them.
$_dateTo=date('Y-m-d');
Output
2015-01-28
This is the error that it generates.
SoapFault Object ( [message:protected] => Date to is in wrong format, should be: 'YYYY-MM-DD' [string:Exception:private]
This is the XML
<message name="webrequestRequest">
<part name="studentId" type="xsd:integer"/>
<part name="type" type="xsd:string"/>
<part name="dateFrom" type="xsd:date"/>
<part name="dateTo" type="xsd:date"/>
<part name="description" type="xsd:string"/>
<part name="extraField1" type="xsd:string"/>
<part name="extraField2" type="xsd:string"/>
<part name="extraField3" type="xsd:string"/>
</message>
Try the following and see if it gives you any errors
$dateFrom = new DateTime();
$dateTo = new DateTime();
$writer = new XMLWriter();
$writer->openMemory();
$writer->startDocument('1.0', 'UTF-8');
$writer->startElement('message');
$writer->startElement('part');
$writer->writeAttribute('name', 'studentId');
$writer->writeAttribute('type', 'xsd:integer');
$writer->Text();
$writer->endElement($studentId);
$writer->startElement('part');
$writer->writeAttribute('name', 'type');
$writer->writeAttribute('type', 'xsd:string');
$writer->Text($type);
$writer->endElement();
$writer->startElement('part');
$writer->writeAttribute('name', 'dateFrom');
$writer->writeAttribute('type', 'xsd:date');
$writer->Text($dateFrom->format('Y-m-d'));
$writer->endElement();
$writer->startElement('part');
$writer->writeAttribute('name', 'dateTo');
$writer->writeAttribute('type', 'xsd:date');
$writer->Text($dateTo->format('Y-m-d'));
$writer->endElement();
$writer->startElement('part');
$writer->writeAttribute('name', 'description');
$writer->writeAttribute('type', 'xsd:string');
$writer->Text($description);
$writer->endElement();
$writer->startElement('part');
$writer->writeAttribute('name', 'extraField1');
$writer->writeAttribute('type', 'xsd:string');
$writer->Text($extraField1);
$writer->endElement();
$writer->startElement('part');
$writer->writeAttribute('name', 'extraField2');
$writer->writeAttribute('type', 'xsd:string');
$writer->Text($extraField2);
$writer->endElement();
$writer->startElement('part');
$writer->writeAttribute('name', 'extraField3');
$writer->writeAttribute('type', 'xsd:string');
$writer->Text($extraField3);
$writer->endElement();
$writer->endElement(); // /message
$writer->endDocument();
$message = $writer->outputMemory(true);
Don't forget to set your values first.

How can I add custom elements to the detail section of a SoapFault using PHP's SOAP library

I am building a service against Sonos' Music API (SMAPI). Sometimes I have to send back a response in the following format:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>Client.NOT_LINKED_RETRY</faultcode>
<faultstring>Link Code not found retry...</faultstring>
<detail>
<ExceptionInfo>NOT_LINKED_RETRY</ExceptionInfo>
<SonosError>5</SonosError>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
I am building my service using the PHP SOAP library and for the above response I tried throwing a SoapFault like this:
throw new SoapFault('Client.NOT_LINKED_RETRY', 'Link Code not found retry...');
But when I try this the response that is sent back looks like this:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>Client.NOT_LINKED_RETRY</faultcode>
<faultstring>Link Code not found retry...</faultstring>
<detail>
<SonosError/>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Notice that there is no ExceptionInfo and that SonosError is empty. Is it possible to set ExceptionInfo and SonosError using SoapFault? I tried all kinds of things, but couldn't get it working, so as a work around I am doing this now:
http_response_code(500);
header("Content-type: text/xml");
$ret = '<?xml version="1.0" encoding="UTF-8"?>'."\n";
$ret .= '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">';
$ret .= '<SOAP-ENV:Body>';
$ret .= '<SOAP-ENV:Fault>';
$ret .= '<faultcode>Client.NOT_LINKED_RETRY</faultcode>';
$ret .= '<faultstring>Link Code not found retry...</faultstring>';
$ret .= '<detail>';
$ret .= '<ExceptionInfo>NOT_LINKED_RETRY</ExceptionInfo>';
$ret .= '<SonosError>5</SonosError>';
$ret .= '</detail>';
$ret .= '</SOAP-ENV:Fault>';
$ret .= '</SOAP-ENV:Body>';
$ret .= '</SOAP-ENV:Envelope>'."\n";
echo $ret; exit;
Not sure if it's relevant but the WSDL can be found here.
Update: when I try the suggestion below like this:
$detail = new StdClass();
$detail->SonosError = 5;
$detail->ExceptionInfo = 'NOT_LINKED_RETRY';
throw new SoapFault(
'Client.NOT_LINKED_RETRY',
'Link Code not found retry...',
NULL,
$detail
);
I get:
<detail>
<customFault>
<SonosError>5</SonosError>
<ExceptionInfo>NOT_LINKED_RETRY</ExceptionInfo>
</customFault>
</detail>
This is almost what I need, except for <customFault> tag. Is there a way to get rid of it and have SonosError and ExceptionInfo in <detail> directly?
The fact that you don't see the ExceptionInfo tag is because it is not defined in the wsdl. On the other hand SonosError is defined.
First thing first, in order to fill the SonosError you have to pass the arguments.
From here you can see that the constructor has more parameters
SoapFault('code', 'string', 'actor', 'detail', 'name', 'header');
In order to pass the SonosError call it like this
$detail = new StdClass();
$detail->SonosError = 5;
throw new SoapFault('Client.NOT_LINKED_RETRY', 'Link Code not found retry...', null, $details);
As for the ExceptionInfo, the wsdl must be changed. As it is now, the details tag is represented by this sections
<wsdl:message name="customFault">
<wsdl:part name="customFault" element="tns:SonosError"/>
</wsdl:message>
<xs:element name="SonosError" type="xs:int"/>
If you change the above sections with these, you will have what you need.
<wsdl:message name="customFault">
<wsdl:part name="customFault" type="tns:customFaultType" />
</wsdl:message>
<xs:complexType name="customFaultType">
<xs:sequence>
<xs:element name="SonosError" type="xs:int"/>
<xs:element name="ExceptionInfo" type="xs:string"/>
</xs:sequence>
</xs:complexType>
And of course you add the parameter and the array becomes like this
$detail = new StdClass();
$detail->SonosError = 5;
$detail->ExceptionInfo = 'NOT_LINKED_RETRY';

ASP.NET/C# client to consume a PHP/MYSQL web service (WSDL)

I am trying to access a webservice (two files below). The client is using ASP.NET/C# for their web architecture. I can add the web reference but somehow I cannot generate a proxy class for the wsdl file. The aim is to use the function in the server.php file so that I can use the xmlstring to display the data on the ASP.NET website. Any help would be very appreciated. Many Thanks
server.php file. This file has a php function which extracts data from a mysql db and the function returns the data as an XML string.
<?php
//WEB SERVICE FUNCTION TO EXTRACT DATA FROM CLIENT B INTO XML FORMAT
function getXML()
{
//CONNECT TO THE DATABASE SERVER
$dbserverIP = "xxxxxxx";
$dbusername = "xxxxxxx";
$dbpassword = "xxxxxxx";
$dbconnection = mysql_connect($dbserverIP,$dbusername,$dbpassword)
or die ("The connection to the database server failed.");
//CONNECT TO THE DATABASE
$dbname = "xxxxxxxx";
$dbselectok = mysql_select_db($dbname,$dbconnection)
or die ("The connection to the database failed.");
//QUERY THE DATABASE
$sqlquery = "SELECT * FROM videogames";
$sqlresult = mysql_query($sqlquery,$dbconnection)
or die ("Error in executing the SQL statement");
//CREATE XML STRING
$xmlstring = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
$xmlstring.= "<videogames>";
while ($row = mysql_fetch_array($sqlresult))
{
$xmlstring .= "\t<game>\r\n";
$xmlstring .= "\t\t<gametitle>" .$row["gametitle"]. "</gametitle>\r\n";
$xmlstring .= "\t\t<genre>" .$row["genre"]. "</genre>\r\n";
$xmlstring .= "\t\t<year>" .$row["year"]. "</year>\r\n";
$xmlstring .= "\t\t<platform>" .$row["platform"]. "</platform>\r\n";
$xmlstring .= "\t\t<agerating>" .$row["agerating"]. "</agerating>\r\n";
$xmlstring .= "\t\t<price>" .$row["price"]. "</price>\r\n";
$xmlstring .= "\t</game>\r\n";
}
$xmlstring.= "</videogames>";
//WRITE XML STRING TO EXTERNAL FILE
$filename = "videogames.xml";
$fileaccessmode = "w";
$fptr = fopen($filename,$fileaccessmode);
fwrite($fptr,$xmlstring);
fclose($fptr);
//FREE UP MEMORY
mysql_free_result($sqlresult);
mysql_close($dbconnection);
return $xmlstring;
}
//CODE TO DISABLE THE WSDLE CACHE
ini_set("soap.wsdl_cache_enabled","0");
//DEFINE SOAP SERVER INSTANCE AND RELATED WSDL FILE
//THE service.wsdl FILE IS IN THE SAME FOLDER AS THIS server.php FILE
$server = new SoapServer("service.wsdl");
//ADD FUNCTION TO THE SERVER INSTANCE
$server->addFunction("getXML");
//ACTIVATE THE SOAP HANDLER
$server->handle();
?>
This is the WSDL file linked to the server.php file.
<?xml version ='1.0' encoding ='UTF-8' ?>
<!-- ====================== DEFINITIONS ====================== -->
<definitions name="MyWebService"
targetNamespace="http://cet-apache-04.cet.bolton.ac.uk/student/mib1bee/CST3017/assignment/scenario1/service.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://cet-apache-04.cet.bolton.ac.uk/student/mib1bee/CST3017/assignment/scenario1/service.wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- ====================== TYPES ============================ -->
<!-- No need for type definitions as only xsd built-in ======= -->
<!-- data types are used -->
<!-- ========================================================= -->
<!-- ====================== MESSAGE ========================== -->
<message name="getXML_Request">
<part name="input" />
</message>
<message name="getXML_Response">
<part name="xmlString" type="xsd:string"/>
</message>
<!-- ====================== PORT TYPE ============================ -->
<portType name="myWebService_PortType">
<operation name="getXML">
<input message="tns:getXML_Request"/>
<output message="tns:getXML_Response"/>
</operation>
</portType>
<!-- ======================= BINDING ============================= -->
<binding name="myWebService_Binding" type="tns:myWebService_PortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getXML">
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<!-- ======================= SERVICE ============================= -->
<service name="myWebService_Service">
<port name="myWebService_Port" binding="tns:myWebService_Binding">
<soap:address location="http://cet-apache-04.cet.bolton.ac.uk/student/mib1bee/CST3017/assignment/scenario1/server.php"/>
</port>
</service>
</definitions>
You have to just go through this article and you will get a clear picture towards your answers
go to following links:
php web service to dot net
You need to fix your wsdl:
<operation name="getXML">
<soap:operation soapAction="urn:MyWebService#getXML"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
In the past I have had trouble getting .Net to consume web services created with the wsdl in rpc/literal format. Try converting your WSDL to document/literal format instead and you should have more luck.

Categories