Welcome Guest, Not a member yet? Register   Sign In
Error in server NuSoap and using Java JAX-WS Client
#1

[eluser]Unknown[/eluser]
Hi, to start I must say it was very difficult to achieve the interoperability between Java Client and Server NuSoap.
I made ​​simple data communication, but when I check the data model in CodeIgniter, just begins to fail. On the client I get the following error: The server sent HTTP status code 200: OK

Below hit the server code:
Code:
<?php

if ( ! defined('BASEPATH')) exit('No se permite el acceso directo a las páginas de este sitio.');

class Servidor_nusoap extends CI_Controller{
    
   function  __construct() {
     parent::__construct();
        
      // Integrar la clase NuSoap con CI
      $this->load->library('nu_soap');

      // Instanciamos la clase servidor de nusoap
      $this->NuSoap_server = new nusoap_server();

      $end_point = base_url().index_page().'/servidor_nusoap/index/wsdl';
      
      // Indicamos cómo se debe formar el WSDL
      $this->NuSoap_server->configureWSDL('UsuariosWSDL', 'urn:UsuariosWDSL', $end_point, 'document');

      $this->NuSoap_server->register(
              // crear en forma de clase (controller..nombre del método)
              'Servidor_nusoap..obtenerUsuario'    # El nombre de la función PHP: Clase.método ó Clase..método
              , array('id' => 'xsd:string')           # Qué datos recibe
               , array('return' => 'xsd:string')  # Qué datos regresa,
              , 'urn:UsuariosWSDL'                 # El elemento namespace de nuestro método
              , 'urn:UsuariosWSDL#obtenerUsuario'  # La acción u operación de nuestro método
              , 'rpc'                              # El estilo del XML opcional: 'rpc' | 'document'
              , 'literal'                          #  'literal' | 'encode' : I should change it to literal to make communication easier with JAX-WS

              , "Provee el nombrede un usuario del cual se conoce su ID." # Texto de ayuda        
      );
   } // end Constructor

   function index() {
      $_SERVER['QUERY_STRING'] = '';

      if ( $this->uri->segment(3) == 'wsdl' ) {
         $_SERVER['QUERY_STRING'] = 'wsdl';
      } // endif
     // $this->obtenerFechaActualMeteor();
      $this->NuSoap_server->service(file_get_contents('php://input'));
   }  // end function

function obtenerUsuario($operacion) {    
switch ($operacion) {
   case "usuario":
      $CI =& get_instance();
      $CI->load->model('mod_usuarios');
      $resp = $CI->mod_usuarios->traer_nombre($id_usuario);
       break;
   default:
       $resp="Operacion_No_Determinada";
       break;
}          
      return $resp;
   } // end function

} // end Class

Something is wrong when I call function or even a global variable using $ this->
Hopefully they can give me a hint on which to find the solution.

Thank you.

dariojr
#2

[eluser]PravinS[/eluser]
check below given URL to create SOAP server in codeigniter

http://www.php-guru.in/2013/soap-server-...p-library/
#3

[eluser]Unknown[/eluser]
Thanks PravinS, now I see




Theme © iAndrew 2016 - Forum software by © MyBB