Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with NUSOAP server Response. #23

Open
FPais2017 opened this issue Dec 28, 2017 · 3 comments
Open

Problem with NUSOAP server Response. #23

FPais2017 opened this issue Dec 28, 2017 · 3 comments

Comments

@FPais2017
Copy link

FPais2017 commented Dec 28, 2017

Hello.
I need to make a Web Service Server to comunicate with a application. I use PHP and discover de NUSOAP to help me to do the Web Service.
I create a method with the name «NewInitialDocForLocalApp» and the class NUSOAP generate a WSDL Request and Response with a message «NewInitialDocForLocalAppRequest» and «NewInitialDocForLocalAppResponse».

The application that receive my response has a validation (in Data Power) that need it «NewInitialDocForLocalAppInput» and «NewInitialDocForLocalAppOutput» instead. So it blocks my response because don't has the structure they want.

How I could solve this problem with NUSOAP class?

I register my method with this code:

$server->register( 
'NewInitialDocForLocalApp', // method name 
array( 
'idApp' => 'xsd:string', 
'idProcApp' => 'xsd:string', 
'nIF' => 'xsd:string', 
'codServico' => 'xsd:string', 
'idDocFileNet' => 'xsd:string', 
'tipoDocFileNet' => 'xsd:string', 
'idTipoDoc' => 'xsd:string', 
'dataRegisto' => 'xsd:string', 
'dataDocumento' => 'xsd:string', 
'idProcessoGPS' => 'xsd:string', 
'classNacional' => 'xsd:string', 
'nomeContribuinte' => 'xsd:string', 
'nIFApresentante' => 'xsd:string', 
'nomeApresentante' => 'xsd:string', 
'nIFEntExterna' => 'xsd:string', 
'nomeEntExterna' => 'xsd:string', 
'assunto' => 'xsd:string', 
'referencia' => 'xsd:string', 
'codServOrigem' => 'xsd:string', 
'observacoes' => 'xsd:string'	
), // input 
array( 
'codResultado' => 'xsd:string', 
'codDetalheResultado' => 'xsd:string', 
'descResultado' => 'xsd:string', 
'idProcApp' => 'xsd:string', 
'idFuncionario' => 'xsd:string' 
), // output 
$namespace, // namespace 
$namespace.'#NewInitialDocForLocalApp', 
'rpc', // style 
'literal', // 'encoded', // use 
'' // documentation 
); 

and XML WSDL response is (That is block it):

<SOAP-ENV:Body> 
<ns1:NewInitialDocForLocalAppResponse xmlns:ns1="http://sugar101.ritta.local/COMUM/ws/"> 
<codResultado>0</codResultado> 
<codDetalheResultado>0 - Associado</codDetalheResultado> 
<descResultado/> 
<idProcApp>104-2017-D</idProcApp> 
<idFuncionario/> 
</ns1:NewInitialDocForLocalAppResponse> 
</SOAP-ENV:Body> 

Response need it will be:

<SOAP-ENV:Body> 
<ns1:NewInitialDocForLocalAppOutput xmlns:ns1="http://sugar101.ritta.local/COMUM/ws/"> 
<codResultado>0</codResultado> 
<codDetalheResultado>0 - Associado</codDetalheResultado> 
<descResultado/> 
<idProcApp>104-2017-D</idProcApp> 
<idFuncionario/> 
</ns1:NewInitialDocForLocalAppOutput> 
</SOAP-ENV:Body> 

Thanks for your help.

@f3l1x
Copy link
Member

f3l1x commented Jan 1, 2018

Hi. Well I use NuSOAP only for the client side. If I figure it out right the only problem is change Response to Output? Could you please investigate it more in the code? I'm sure there must be some Response literal. Let me know.

@FPais2017
Copy link
Author

Hi f3l1x... Do you have some example code for WebService Server without NuSOAP. I try to find something in «google» but always find with NuSOAP class.
Thanks.

@f3l1x
Copy link
Member

f3l1x commented Apr 16, 2018

Hi. Take a look at examples in master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants