NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
how can i remove "ns + random number" in the tagna


Joined: 28 Jun 2008
Posts: 1
Reply with quote
I would like to create this request

Code:
POST /Services/UserService/UserService.asmx HTTP/1.1
Host: leadtools.net
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://myserver/Services/UserService/IsUserValid"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <IsUserValid xmlns="http://myserver/Services/UserService">
      <userName>test</userName>
      <password>test1</password>
    </IsUserValid>
  </soap:Body>
</soap:Envelope>


But if I try it with this php-code

Code:
<?php
require_once("nusoap-0.7.2/lib/nusoap.php");

$params['userName'] = "test";
$params['password'] = "test1";

$client = new soapclient("http://myserver/Services/UserService/IsUserValid.asmx", true);
$client->soap_defencoding = 'UTF-8';

$SOAPresult= $client->call("IsUserValid", $params, "http://myserver/Services/UserService", "http://myserver/Services/UserService/IsUserValid");

echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
?>


... I get this ...

Code:
POST /Services/UserService/IsUserValid.asmx HTTP/1.0
Host: myserver
User-Agent: NuSOAP/0.7.2 (1.94)
Content-Type: text/xml; charset=UTF-8
SOAPAction: "http://myserver/Services/UserService/IsUserValid"
Content-Length: 620

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 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/">
<SOAP-ENV:Body>
<ns9882:IsUserValid xmlns:ns9882="http://myserver/Services/UserService">
<userName xsi:type="xsd:string">test</userName>
<password xsi:type="xsd:string">test1</password>
</ns9882:IsUserValid>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


How can i remove this ns9882-prefixes/suffixes? It seems to be a random number because a value is not set. where can I define this?

Thanks!
View user's profileFind all posts by janSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I'm not sure what you're trying to achieve. Ns9882 is not a prefix/suffix but a namespace. Please read XML standards first and you'll see why _ANY_ valid prefix should work.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
how can i remove "ns + random number" in the tagna
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic