SOAP in Harbour

1,589 views
Skip to first unread message

Jacek Kubica

unread,
Dec 18, 2012, 6:48:36 AM12/18/12
to harbou...@googlegroups.com
Hi Friends!

I want to ask you about your experiences
with SOAP WebService technology with Harbour.

I can see only 2 simple sample
in /contrib/hbwin/tests/testole.prg
but I need to send xml document as a complex request
to webservice, and receive xml document as response (WS).

Any help or samples will be very appreciated.

--
Regards
Jacek Kubica

marek.h...@interia.pl

unread,
Dec 18, 2012, 7:22:54 AM12/18/12
to harbou...@googlegroups.com
Hi,

"Jacek Kubica" <inte...@o2.pl> pisze:
> Hi Friends!
>
> I want to ask you about your experiences
> with SOAP WebService technology with Harbour.

Can you read mail from Alexander Czajczyński from 11-06-2012 titled :

[harbour] release candidate of hbamf library with initial WebSockets support

or from Claudia Neumann : 08-08-2012 titled : [harbour-users] Webservices (with examples)

??

Regards,
Marek Horodyski

Clippero

unread,
Dec 19, 2012, 5:25:18 AM12/19/12
to harbou...@googlegroups.com, integra1
[Esp]

Exactamente Claudia Neumann me dió una mano muy grande con esto del SOAP puedes leer sus post y si aún necesitas ayuda tengo una función usando la libcurl según indicaciones de Claudia.
Actualmente estoy trabajando con ws yendo y viniendo con los .xml

Fermín

[Eng]

Exactly Claudia Neumann gave me a hand with this big of SOAP can read your post and if you still need help I have a function using libcurl as directed by Claudia.
I am currently working with ws going back and forth with. Xml

Jacek Kubica

unread,
Dec 19, 2012, 7:42:05 AM12/19/12
to harbou...@googlegroups.com
Hi Friends,

>> Hi Friends!
>>
>> I want to ask you about your experiences
>> with SOAP WebService technology with Harbour.

mhip> Can you read mail from Alexander Czajczyński from 11-06-2012 titled :
mhip> [harbour] release candidate of hbamf library with initial WebSockets support
mhip> or from Claudia Neumann : 08-08-2012 titled : [harbour-users] Webservices (with examples)
mhip> ??
mhip> Regards,
mhip> Marek Horodyski

Thank you very much Marek and Clippero for your good advises.

Special thanks for Claudia for excellent SOAP examples !.

After resolving my problems with curl(+ Openssl and zlib)
compilation under BCC5.5
Claudias sample works just fine for me
but my work yet not ;-(

Maybe a problem is in https (secure connection) to Webservice ??

Initialy I`v got error message :
"Peer certificate cannot be authenticated with known CA certificates"

I found on WWW additional param for curl to disable this check

curl_easy_setopt(curlHandle, HB_CURLOPT_SSL_VERIFYPEER, 0)

I create header and xml data from soapUI _working_ project log
and now I receive answer:

<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>unknown</faultstring>
<detail />
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

and don`t know yet how to solve this.

Regards
Jacek Kubica







--
Pozdrawiam
Jacek
mailto:inte...@o2.pl

Jacek Kubica

unread,
Dec 19, 2012, 7:58:27 AM12/19/12
to Jacek Kubica
Hi Friend,

All is OK and now it works!

Problem was in case-senivity of envelope schemas

After changing in my cXml code soapenv:body to soapenv:Body
and soapenv:header to soapenv:Header I have now
proper response with required data.

Thanks!

Jacek Kubica

JK> Hi Friends,

>>> Hi Friends!
>>>
>>> I want to ask you about your experiences
>>> with SOAP WebService technology with Harbour.

mhip>> Can you read mail from Alexander Czajczyński from 11-06-2012 titled :
mhip>> [harbour] release candidate of hbamf library with initial WebSockets support
mhip>> or from Claudia Neumann : 08-08-2012 titled : [harbour-users] Webservices (with examples)
mhip>> ??
mhip>> Regards,
mhip>> Marek Horodyski

JK> Thank you very much Marek and Clippero for your good advises.

JK> Special thanks for Claudia for excellent SOAP examples !.

JK> After resolving my problems with curl(+ Openssl and zlib)
JK> compilation under BCC5.5
JK> Claudias sample works just fine for me
JK> but my work yet not ;-(

JK> Maybe a problem is in https (secure connection) to Webservice ??

JK> Initialy I`v got error message :
JK> "Peer certificate cannot be authenticated with known CA certificates"

JK> I found on WWW additional param for curl to disable this check

JK> curl_easy_setopt(curlHandle, HB_CURLOPT_SSL_VERIFYPEER, 0)

JK> I create header and xml data from soapUI _working_ project log
JK> and now I receive answer:

JK> <?xml version='1.0' encoding='UTF-8'?>
JK> <soapenv:Envelope
JK> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
JK> <soapenv:Body>
JK> <soapenv:Fault>
JK> <faultcode>soapenv:Server</faultcode>
JK> <faultstring>unknown</faultstring>
JK> <detail />
JK> </soapenv:Fault>
JK> </soapenv:Body>
JK> </soapenv:Envelope>

JK> and don`t know yet how to solve this.

JK> Regards
JK> Jacek Kubica







JK> --
JK> Pozdrawiam
JK> Jacek
JK> mailto:inte...@o2.pl

JK> --

Miraš Ćirović

unread,
Dec 19, 2012, 1:24:22 PM12/19/12
to harbou...@googlegroups.com
Hi Jacek,
Studying sending xml to the web service I am novice and I meet with lot of proble and I could use any help.
I can not read messages from Claudia. Would you could send me examples of XML and SOAP.

Best Regard,
Miraš

2012/12/19 Jacek Kubica <inte...@o2.pl>
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users




Jacek Kubica

unread,
Dec 19, 2012, 3:35:27 PM12/19/12
to Miraš Ćirović
Hi Miraś,

I forward to you, on priv, message from Claudia Neuman with sample and detailed
explanation how to deal with xml and webservice using hbcurl.lib

Regards
Jacek Kubica

MĆ> Hi Jacek,
MĆ> Studying sending xml to the web service I am novice and I meet
MĆ> with lot of proble and I could use any help.
MĆ> I can not read messages from Claudia. Would you could send me examples of XML and SOAP.
MĆ>
MĆ> Best Regard,
MĆ> Miraš

MĆ> 2012/12/19 Jacek Kubica <inte...@o2.pl>

MĆ> Hi Friend,
MĆ>
MĆ> All is OK and now it works!
MĆ>
MĆ> Problem was in case-senivity of envelope schemas
MĆ>
MĆ> After changing in my cXml code soapenv:body to soapenv:Body
MĆ> and soapenv:header to soapenv:Header I have now
MĆ> proper response with required data.
MĆ>
MĆ> Thanks!
MĆ>
MĆ> Jacek Kubica
MĆ>
JK>> Hi Friends,
MĆ>

>>>> Hi Friends!

>>>> I want to ask you about your experiences
>>>> with SOAP WebService technology with Harbour.
MĆ>
mhip>>> Can you read mail from Alexander Czajczyński from 11-06-2012 titled :
mhip>>> [harbour] release candidate of hbamf library with initial WebSockets support
mhip>>> or from Claudia Neumann : 08-08-2012 titled : [harbour-users] Webservices (with examples)
mhip>>> ??
mhip>>> Regards,
mhip>>> Marek Horodyski
MĆ>
MĆ>
JK>> Thank you very much Marek and Clippero for your good advises.
MĆ>
JK>> Special thanks for Claudia for excellent SOAP examples !.
MĆ>
JK>> After resolving my problems with curl(+ Openssl and zlib)
JK>> compilation under BCC5.5
JK>> Claudias sample works just fine for me
JK>> but my work yet not ;-(
MĆ>
JK>> Maybe a problem is in https (secure connection) to Webservice ??
MĆ>
JK>> Initialy I`v got error message :
JK>> "Peer certificate cannot be authenticated with known CA certificates"
MĆ>
JK>> I found on WWW additional param for curl to disable this check
MĆ>
JK>> curl_easy_setopt(curlHandle, HB_CURLOPT_SSL_VERIFYPEER, 0)
MĆ>
JK>> I create header and xml data from soapUI _working_ project log
JK>> and now I receive answer:
MĆ>
JK>> <?xml version='1.0' encoding='UTF-8'?>
JK>> <soapenv:Envelope
JK>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
JK>> <soapenv:Body>
JK>> <soapenv:Fault>
JK>> <faultcode>soapenv:Server</faultcode>
JK>> <faultstring>unknown</faultstring>
JK>> <detail />
JK>> </soapenv:Fault>
JK>> </soapenv:Body>
JK>> </soapenv:Envelope>
MĆ>
JK>> and don`t know yet how to solve this.
MĆ>
JK>> Regards
JK>> Jacek Kubica
MĆ>
MĆ>
MĆ>
MĆ>
MĆ>
MĆ>
MĆ>
JK>> --
JK>> Pozdrawiam
JK>> Jacek
JK>> mailto:inte...@o2.pl
MĆ>
JK>> --
MĆ>

MĆ>
MĆ>
MĆ> --
MĆ> Pozdrawiam
MĆ> Jacek
MĆ> mailto:inte...@o2.pl
MĆ>
MĆ> --
MĆ> --
MĆ> You received this message because you are subscribed to the Google
MĆ> Groups "Harbour Users" group.
MĆ> Unsubscribe: harbour-user...@googlegroups.com
MĆ> Web: http://groups.google.com/group/harbour-users
MĆ>
MĆ>
MĆ>
MĆ>




MĆ> --

Claudia Neumann

unread,
Dec 19, 2012, 5:25:19 PM12/19/12
to harbou...@googlegroups.com, Miraš Ćirović
Hi Miras,

here again my SOAP example.

HTH

Claudia
soap-example.zip

Clippero

unread,
Dec 20, 2012, 6:07:17 AM12/20/12
to harbou...@googlegroups.com, integra1
[Eng]

People, I'm getting the error attached someone can give me a hint ?

[Esp]

Gente, estoy teniendo el error que adjunto, alguien me puede dar una pista ?


  <?xml version="1.0" encoding="UTF-8" ?>
  <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SOAP-ENV:Body>
  <ImpWSMovimiento.ExecuteResponse xmlns="GAM">
  <SOAP-ENV:Fault>
  <faultcode>SOAP-ENV:Client</faultcode>
  <faultstring>Error reading lib:ImpWSMovimiento.Execute</faultstring>
  <detail>1</detail>
  </SOAP-ENV:Fault>
  </ImpWSMovimiento.ExecuteResponse>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

Jacek Kubica

unread,
Dec 20, 2012, 7:29:32 AM12/20/12
to Clippero
Hi,

Hard to help without origin whole xml message sent to WS

<faultstring>Error reading lib:ImpWSMovimiento.Execute</faultstring>

It can be WS problem or problem with query you sent to WS

Did you try your query using SoapUI tool ??

Regards
Jacek Kubica M.D

C> [Eng]
C> People, I'm getting the error attached someone can give me a hint ?
C> [Esp]
C> Gente, estoy teniendo el error que adjunto, alguien me puede dar una pista ?
C> <?xml version="1.0" encoding="UTF-8" ?>
C> <SOAP-ENV:Envelope
C> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
C> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
C> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
C> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
C> <SOAP-ENV:Body>
C> <ImpWSMovimiento.ExecuteResponse xmlns="GAM">
C> <SOAP-ENV:Fault>
C> <faultcode>SOAP-ENV:Client</faultcode>
C> <faultstring>Error reading
C> lib:ImpWSMovimiento.Execute</faultstring>
C> <detail>1</detail>
C> </SOAP-ENV:Fault>
C> </ImpWSMovimiento.ExecuteResponse>
C> </SOAP-ENV:Body>
C> </SOAP-ENV:Envelope>
C> --

Miraš Ćirović

unread,
Dec 20, 2012, 7:57:44 AM12/20/12
to harbou...@googlegroups.com
Hi Claudia and Jacek,

Thanks 
for your help.

To me as a new to this any help is appreciated.

Best Regards,
Miraš


Clippero

unread,
Dec 21, 2012, 7:24:48 AM12/21/12
to harbou...@googlegroups.com, integra1
[Esp]

Es cierto si, di muy pocos datos, mil perdones.
De todos modos buscando un poco en internet, encontré algo que puede ser útil para muchos.
Es una explicación que habla sobre el funcionamiento del sistema de error de un ws

Les dejo el link:

http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383507

En mi caso particular me sirvió para darme cuenta que el error estaba de mi lado (al menos así parecía ser según el mensaje de error del ws)

Con ese dato, invoqué nuevamente al link del constructor, o sea el wsdl

Y ahí me di cuenta que el ws había cambiado y ya no era como yo lo estaba consumiendo.

Hablé con quienes lo desarrollaron y en efecto habían hecho cambios sin avisarme.

Ahora funciona todo perfectamente.

[Eng]

Is true if, say very little data, a thousand pardons.
Anyway a little internet searching, I found something that can be useful for many.
It is an explanation that introduces the operation of error of ws

Here is the link:

http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383507

In my case it helped me realize that the error was on my side (at least it seemed to be as the error message ws)

With this information, I called again to link the builder, (the wsdl)

And then I realized that ws had changed and it was not like I
was consuming.

I talked to those who had actually developed and made ​​changes
without telling me.

Now everything works perfectly.
Reply all
Reply to author
Forward
0 new messages