Reputation: 69
I am new to SOAP and trying to make my first request to https://nts.elwis.de/server/MessageServer.php?wsdl
I already made up a post call sending it to the SOAP endpoint at "https://nts.elwis.de/server/MessageServer.php". But it returns "Procedure 'get_messages_query' not present".
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nts="http://www.ris.eu/nts/3.0">
<soapenv:Header/>
<soapenv:Body>
<nts:get_messages_query>
</nts:get_messages_query>
</soapenv:Body>
</soapenv:Envelope>
If I read the specs in the link above, I cannot find any problem why the SOAP service could not find my function.
Do you have any ideas?
Best Karsti
Upvotes: 0
Views: 779
Reputation: 351
In case somebody needs a working request for the endpoint https://nts.elwis.de/server/MessageServer.php
Here is an example:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.ris.eu/nts.ms/1.0.3.0">
<SOAP-ENV:Body>
<ns1:get_messages_query>
<ns1:message_type>WRM</ns1:message_type>
<ns1:paging_request>
<ns1:offset>0</ns1:offset>
<ns1:limit>10</ns1:limit>
<ns1:total_count>true</ns1:total_count>
</ns1:paging_request>
</ns1:get_messages_query>
</SOAP-ENV:Body>
Upvotes: 2
Reputation: 29943
Use this simple script, written in PHP, which gives you enough information. Function and type lists will help you to make correct SOAP call. I'm not familiar with this SOAP service, so you need to pass correct values for parameters.
<?php
// SOAP
$soap = new SoapClient("https://nts.elwis.de/server/MessageServer.php?wsdl");
// List functions
echo 'Functions: '.'</br>';
$functions = $soap->__getFunctions();
foreach($functions as $item) {
echo $item.'</br>';
}
echo '</br>';
// List types
echo 'Types: '.'</br>';
$types = $soap->__getTypes();
foreach($types as $item) {
echo $item.'</br>';
}
echo '</br>';
// Consume SOAP
$params = array(
'message_type' => '',
'ids' => '',
'validity_period' => array (
'date_start' => date("Y-m-d"),
'date_end' => date("Y-m-d")
),
'dates_issue' => array (
'date_start' => date("Y-m-d"),
'date_end' => date("Y-m-d")
),
'paging_request' => array(
'offset' => 0,
'limit' => 0,
'total_count' => true
)
);
$responce = $soap->get_messages($params);
var_export($responce);
?>
Upvotes: 2