I have created a simple web service using PP Resource. It's working correctly but the only thing is unavailable, it is to add the default XML attribute to the feedback tag.
Here is the copy of the response:
Here is the code:
& lt; Php require_once ('nusoap.php'); // set namespace $ ns = 'mynamspace'; // set up soap server $ server = new soap_services (); $ Server- & gt; Configure WSDL ('testervice', $ ns); $ Server- & gt; Wsdl-> Schematic namespace = $ ns; // Define New User Data Type // Define $ server- & gt; Wsdl-> AddComplexType ('Customer', 'complex type', 'structure', '', '', array ('customer' => array 'name' = & gt; 'customer', 'type' => XSD: string '))); $ Server- & gt; Wsdl-> AddComplexType ('Register', 'Complex type', 'Structure', '', '', Array ('Register' => Array ('name' => 'Register' type '= & gt;' TNS : Customers'))); $ Server- & gt; Wsdl-> AddComplexType ('Login Rational', 'Complex Type', 'Structure', '', '', Array ('LoginRisalt' => Array ('name' = & gt; 'LoginResult', 'Type' = & Gt; TNS: Register '))); // register login function $ server- & gt; Register ('login', // method name array ('username' = & gt; 'xsd: string', 'password' = & gt; 'xsd: string'), // input parameter array ('LoginResult' = ' & Gt; 'TNS: Register'), // Output Parameters 'vase: mynamespace', // namespace 'vase: mynamespaceAction', // soapaction 'document', // style 'literal', / 'login to test' Service '); // Documentation function login ($ username, $ password) {if (isset ($ user name) and issue ($ password)) {$ hash = MD5 ($ user name); Returns array ('LoginResult' = & gt; array ('register' => array ('customer' => hash));}} // service request (try $ $) $ HTTP_RAW_POST_DATA = isset ($ HTTP_RAW_POST_DATA)? $ HTTP_RAW_POST_DATA: ''; $ Server- & gt; Service ($ HTTP_RAW_POST_DATA);? & Gt; Any help is greatly appreciated .
I do not claim that it is particularly elegant but has worked in my case :
I went to nusoap.php and commented this line (line 5925 for me):
/ / $ ElementNS = "xmlns = \" \ "";
directly after this: if ($ ineligible and amp; $ use == 'literal') {
Comments
Post a Comment