Я пытаюсь получить данные из моего веб-сервиса SOAP (используя WAMPSERVER и php) на мое устройство.
Я использую Jdeveloper 12c.
Когда я запускаю приложение, я получаю эту ошибку:
код HTTP
200 Внутренняя ошибка сервера: HTTP-сервер обнаружил непредвиденное состояние, которое не позволило ему выполнить запрос.
Вот логи:
[SEVERE - oracle.adfmf.framework - HttpServiceConnection - log] Erreur de connexion : 500
D/JVM (23519): [SEVERE - oracle.adfmf.framework - HttpTransport - parseResponse] Réponse [Erreur : 500] : <?xml version="1.0" encoding="utf-8"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
D/JVM (23519): xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
D/JVM (23519): xmlns:xsd="http://www.w3.org/2001/XMLSchema"
D/JVM (23519): xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
D/JVM (23519): xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
D/JVM (23519): <SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode><faultactor xsi:type="xsd:string"></faultactor><faultstring xsi:type="xsd:string">error in msg parsing:
D/JVM (23519): xml was empty, didn't parse!</faultstring><detail xsi:type="xsd:string"></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
My Connection.xml:
<Reference name="gcmService" className="oracle.adf.model.connection.webservice.impl.WebServiceConnectionImpl"xmlns="">
<Factory className="oracle.adf.model.connection.webservice.api.WebServiceConnectionFactory"/>
<RefAddresses>
<XmlRefAddr addrType="WebServiceConnection">
<Contents>
<wsconnection description="http://192.168.1.3/gcm/myservice.php?wsdl" service="{urn:MyService}MyService">
<model name="{urn:MyService}MyService" xmlns="http://oracle.com/ws/model">
<service name="{urn:MyService}MyService">
<port name="MyServicePort" binding="{urn:MyService}MyServiceBinding">
<soap addressUrl="http://192.168.1.3/gcm/myservice.php" xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
<operation name="insertUserRegistrationId">
<soap soapAction="urn:MyServicewsdl#saveNewRegisterUser"xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
<input name=""/>
<output name=""/>
</operation>
<operation name="getHistoriqueNotification">
<soap soapAction="urn:MyServicewsdl#getHistoriqueNotification"xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
<input name=""/>
<output name=""/>
</operation>
<operation name="disconnect">
<soap soapAction="urn:MyServicewsdl#disconnect" xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
<input name=""/>
<output name=""/>
</operation>
</port>
</service>
</model>
</wsconnection>
</Contents>
</XmlRefAddr>
</RefAddresses>
</Reference>
</References>
И мой service.php, реализующий веб-сервис SOAP:
<?php
// Pull in the NuSOAP code
require_once('lib/nusoap.php');
require_once 'config.php';
require_once 'database.php';
// Create the server instance
$server = new soap_server();
// Initialize WSDL support
$server->configureWSDL('MyService', 'urn:MyService');
// Character encoding
$server->soap_defencoding = 'utf-8';
//-------------------------------------------------
//Register function
$server->register('insertUserRegistrationId',
array('$user'=>'xsd:string','$mdp'=>'xsd:string','$registration_id'=>'xsd:string'),
array('return' =>'xsd:boolean'),
'urn:MyServicewsdl',
'urn:MyServicewsdl#saveNewRegisterUser',
'rpc',
'encoded',
'Some comments about function 1'
);
$server->register('getHistoriqueNotification',
array('$registration_id'=>'xsd:string'),
array('return' =>'xsd:string'),
'urn:MyServicewsdl',
'urn:MyServicewsdl#getHistoriqueNotification',
'rpc',
'liternal',
'Some comments about function 2'
);
$server->register('disconnect',
array(),
array(),
'urn:MyServicewsdl',
'urn:MyServicewsdl#disconnect',
'rpc',
'literal',
'Some comments about function 3'
);
//-------------------------------------------------
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA)
? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
?>
Задача ещё не решена.
Других решений пока нет …