× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Can I change the soap response from the IWS Web Service process.

Currently the response is like this example

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>
<soap:Body>
<ns2:msd100rResponse xmlns:ns2="http://webservice01.wsbeans.iseries/
">
<return>
<POUTDATA>
<length>518</length>
<string>{"messages":["success",1,""]} --- Omitted data
---</string>
</POUTDATA>
</return>
</ns2:msd100rResponse>
</soap:Body>
</soap:Envelope>

The POUTDATA is the output parameter defined in my program. I believe IBM
is generating the <return> tags ?

The consumer of this web service is using PHP and says they get an error
because of the <return> ... </return>
They say that "return" is a reserved PHP word. (I don't really understand
that as I would not expect it to be causing the issue)

But in deploying the web service through IWS I can see no way to change
this ?

This was the response from the eternal PHP programmer trying to consume
the web service

I am having issues with the response from the webservice as return is a
keyword in PHP. (https://www.php.net/manual/en/reserved.keywords.php)
User error: "return" is an invalid render array key in
Drupal\Core\Render\Element::children() (line 97 of
/web/xnet/public_html/web/core/lib/Drupal/Core/Render/Element.php)

Is it possible to change this element?

Here is the PHP function the external client is using; (I believe the
issue is when they are calling get_object_vars but I am waiting on
confirmation of that)

function ids_userform_checkerp($userid){

$wsdl = '
http://10.100.0.218:10010/web/services/WebService01Service/WebService01?wsdl'
;
$header = new \SoapHeader('http://webservice01.wsbeans.iseries/',
'Header', array());
$soap = new \SoapClient($wsdl);
//$soap->__setSoapHeaders($header);
$length = 52 + strlen($userid);

// build request and send
$params[] = array('arg0'=> array(
'PFUNCTION' => '*USRDATA',
'PINDATA' => '<length>'. $length .'</length>
<string>{"token":"1111111111111111","request_user":"' . $userid .
'"}</string>'
));
$response = $soap->__soapCall('msd100r',$params);
$responseCode = get_object_vars($response);
\Drupal::messenger()->addMessage($responseCode);

return;
}

There are no problems with calling the soap service. The issue is with the
response, which is received though unable to access the data.

Any suggestions appreciated.

Thanks

Don


--
This email has been scanned for computer viruses. Although MSD has taken reasonable precautions to ensure no viruses are present in this email, MSD cannot accept responsibility for any loss or damage arising from the use of this email or attachments..

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.