Recent

Author Topic: Web Service  (Read 2366 times)

luca

  • Jr. Member
  • **
  • Posts: 83
Web Service
« on: April 28, 2017, 09:46:34 am »
Hi.
I'm try to develop a simple Web Service in Lazarus using Web Service Toolkit.
I followed all the indications and test the service by using test http server.

I'll try to make a request by using SOAPUI and I see the reply:
Code: Pascal  [Select][+][-]
  1. <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  2.    <SOAP-ENV:Body>
  3.       <functionresponse xmlns:ns1="lib">
  4.          <result>3</result>
  5.       </functionresponse >
  6.    </SOAP-ENV:Body>
  7. </SOAP-ENV:Envelope>
  8.  
If I try to call this service from JAVA:
- I can see in the http server log the request in the rigth format
- The server reply but
 
I received this error in JAVA Application:

Code: Pascal  [Select][+][-]
  1. Exception in thread "main" com.sun.xml.internal.ws.streaming.XMLStreamReaderException: tag XML error.
  2. Expected: {lib}functionresponse, Found: {null}functionresponse


Hope you can help
Regards
Luca

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Web Service
« Reply #1 on: May 02, 2017, 09:12:02 am »
I think you forgot the "<?xml ...>" tag. See this: https://www.w3schools.com/xml/default.asp
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

 

TinyPortal © 2005-2018