Nusoap use existing WSDL how to?

后端 未结 1 1568
猫巷女王i
猫巷女王i 2021-01-23 06:36

so I have a WSDL I\'ve been giving as documentation for a soap service. I need to implement this service exactly as defined and I don\'t want to rewrite the wsdl using nusoap. I

1条回答
  •  无人共我
    2021-01-23 07:17

    $WSDL = '/path/to/wsdl/file'; $nusoap_server = new soap_server($WSDL);

    The only problem with this is that nusoap may not create the response correctly, but it will host the wsdl file.

    I had to customize my xml responses.

    Which you can tell nusoap to do but you will need to modify the library.

    fuze_debug(array('test',$this->fuze_print_s($this->methodreturn)),'soap_server_debug.log');
                        $this->debug('Entering serialize_return methodname: ' . $this->methodname . ' methodURI: ' . $this->methodURI);
                        // if fault
                        if (isset($this->methodreturn) && is_object($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) {
                                $this->debug('got a fault object from method');
                                $this->fault = $this->methodreturn;
                                return;
                                // for some reason with code ignitor this doesnot get set correctly
                        } elseif ($this->methodreturnisliteralxml) {
                                //$this->fuze_debug(array('literal xml is : ',$this->fuze_print_s($this->methodreturnisliteralxml)),'soap_server_debug.log');
                                $return_val = $this->methodreturn;
                        // returned value(s)
                        } else {
    

    This above code is in the nusoap library as you can see $this->methodreturnisliteralxml

    If you set that to true then you can customize the xml you return from the function you define for nusoap to handle the soap request.

    To me nusoap seams to be out of date.

    I do not think I would use nusoap again for new projects.

    0 讨论(0)
提交回复
热议问题