|
From: "Don Brown via MIDRANGE-L" <midrange-l@xxxxxxxxxxxxxxxxxx>http://webservice01.wsbeans.iseries/
To: midrange-l@xxxxxxxxxxxxxxxxxx
Cc: "Don Brown" <DBrown@xxxxxxxxxx>
Date: 12/15/2021 02:35 AM
Subject: [EXTERNAL] IWS Web service response - can I change the
return tag to return_data or something else
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx>
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="
">IBM
<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
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>understand
They say that "return" is a reserved PHP word. (I don't really
that as I would not expect it to be causing the issue)u=https-3A__www.php.net_manual_en_reserved.keywords.php&d=DwICAg&c=jf_iaSHvJObTbx-
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. (INVALID URI REMOVED
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=DZb3cLoHfWUBq9hkHG9HN8rDxaCfFvEUDrUgaVs6SRo&s=ivtUM6_XcxMyl13DCBhFnFLI_hQSyhICLFcqNB9pX6k&e=
)218-3A10010_web_services_WebService01Service_WebService01-3Fwsdl&d=DwICAg&c=jf_iaSHvJObTbx-
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 = '
INVALID URI REMOVED.
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=DZb3cLoHfWUBq9hkHG9HN8rDxaCfFvEUDrUgaVs6SRo&s=bOGdurNqi846U2D5DO9-42QFLLFwtBd9C4bopmO87a0&e=
ew&m=DZb3cLoHfWUBq9hkHG9HN8rDxaCfFvEUDrUgaVs6SRo&s=mAGcznCCoM-
S1mDmF1Wsq4ywOcTC8KDaCdsO6m1kuWM&e= '
;
$header = new \SoapHeader('https://urldefense.proofpoint.com/
v2/url?
u=http-3A__webservice01.wsbeans.iseries_&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-
',the
'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
response, which is received though unable to access the data.list
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..
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxxu=https-3A__lists.midrange.com_mailman_listinfo_midrange-2Dl&d=DwICAg&c=jf_iaSHvJObTbx-
To subscribe, unsubscribe, or change list options,
visit: INVALID URI REMOVED
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=DZb3cLoHfWUBq9hkHG9HN8rDxaCfFvEUDrUgaVs6SRo&s=cfL0Rwmpa6U59FrTk7v589KeLCmy6WKhbmHG6g_lEXc&e=
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxxew&m=DZb3cLoHfWUBq9hkHG9HN8rDxaCfFvEUDrUgaVs6SRo&s=gmGYc7OgAl3W9kCznSq8bBXVEnAXbWiYxnIVqZO099g&e=
Before posting, please take a moment to review the archives
at INVALID URI REMOVED
u=https-3A__archive.midrange.com_midrange-2Dl&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-
.link:
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.
Help support midrange.com by shopping at amazon.com with our affiliate
INVALID URI REMOVED
u=https-3A__amazon.midrange.com&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-
ew&m=DZb3cLoHfWUBq9hkHG9HN8rDxaCfFvEUDrUgaVs6SRo&s=QFdXMBF4VUZl0Tkx8-
wkbP2OVqTjACRqohgstBEPdao&e=
As an Amazon Associate we earn from qualifying purchases.
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.