[Lazarus] Web-services

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Thu Jul 19 17:23:03 CEST 2012



On Thu, 19 Jul 2012, Ian Godman wrote:

>
> On 19/07/12 14:28, michael.vancanneyt at wisa.be wrote:
>>
>>
>> On Thu, 19 Jul 2012, Ian Godman wrote:
>>
>>> Hi
>>>
>>> I am trying to get Lazarus to connect to a Java based web service. The
>>> web service is in Java because its on an existing webserver and will
>>> provide information and services etc from that site.
>>>
>>> I am using Apache CXF and Jersey for the web services. With Jersey I
>>> have a working restful webservice, with CXF I have been able to build
>>> the service but not the client.
>>>
>>> I have used WST to generate the classes from the WSDL which appears to
>>> work well.
>>>
>>> However when I try to run the client I get the following exception:
>>>
>>> Project webservice raised exception class 'EserviceConfigException' with
>>> message invalid parameter: 'AProtocolData'
>>>
>>> Searching Google I found that the solution was to add soap_formatterto
>>> my uses which I have done but still get the same error.
>>>
>>> I have changed to use the wst_CreateInstance_HelloWorldEasy (always
>>> start with 'hello world' :-) ) and teh invalid parameter error goes away
>>> to be replaced with
>>>
>>> Project webservice raised exception class 'EXMLReadError' with message:
>>> in 'stream:' (line 1 pos 145): root element is missing
>>
>> Can you post the response from the server ?
>>
>> You can make the response visible on the console by adding the
>> logger_extension
>> unit to your uses clause.
>>
>> Michael.
>>
>> --
>> _______________________________________________
>> Lazarus mailing list
>> Lazarus at lists.lazarus.freepascal.org
>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>>
> The service is not being called, Lazarus code is failing before the
> request is made so there is no server response.

Well, you get a read error. 
Reading is normally done only when you get a response.

Did you specify an end point (address) when you create the service ?

Michael.




More information about the Lazarus mailing list