dimanche 26 avril 2015

How to generate xml description for each function using nusoap in php?


I have developed a soap api using nusoap in php. I have created some function for that. I have created a file service.php & when i hit this file on url i get a document for all functions. like this! My nusoap DOC

But i want to have a xml like description for my functions.Like this REQUIRED OUTPUT

Please tell me how to do it

This is my code for service.php

<?php
require_once "lib/nusoap.php";
require_once "functions.php";
$server=new nusoap_server();
$server->configureWSDL("SOAP", "urn:soapn");
$server->register("addRecord",
        array("fname"=>"xsd:string","lname"=>"xsd:string","buis_name"=>"xsd:string","phone_num"=>"xsd:int","city"=>"xsd:string","state"=>"xsd:string",           "zipcode"=>"xsd:int","email"=>"xsd:string"
        ,"w_store"=>"xsd:string","con_store"=>"xsd:string","ind_store"=>"xsd:string","gas_staion"=>"xsd:string","other"=>"xsd:string"),
        array("return" => "xsd:string"),
        "urn:soap",
       "urn:soap#addRecord",
       "rpc",
       "encoded",
      "Add user information to database");
 $server->register("checkLogin",
        array("email"=>"xsd:string","password"=>"xsd:string"),
        array("return" => "xsd:string"),
        "urn:soap",
       "urn:soapn#checkLogin",
       "rpc",
       "encoded",
      "Verify UserLogin"); 
$HTTP_RAW_POST_DATA=isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);


?> 

Please help me out.


Aucun commentaire:

Enregistrer un commentaire