My first comment is about the occasion, everyone welcome to the forum!
Since 1992 write programs in Clipper language, and met two years ago in the Harbor Minigui.
Just learning techniques for web and a SOAP server should communicate.
Irish parameter errors in the program, and got stuck there.
Does anyone have any ideas?
I appreciate any help.
Regards,
Zoltan
Sorry for my English, google translator
Connect to SOAP Server
Moderator: Rathinagiri
- miszler.zoltan
- Posts: 22
- Joined: Sun May 26, 2013 12:37 pm
- Location: Hungary
- Contact:
Connect to SOAP Server
- Attachments
-
- soap.zip
- (942.15 KiB) Downloaded 478 times
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Connect to SOAP Server
You do not need a security layer? I mean missing OPENSSL
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Connect to SOAP Server
Hi Zoltan:
reviewing the code that went up to the forum I find errors in test 2 test.
reviewing and improving the code I find that has a link to http://www.west-wind.com/wsdlgenerator
and reading about SOAP is not available for my Windows 7 Home Premium 64 and is declared obsolete.
New Code Test :
you can use HBTIP or HMG scritp as tools to connect to remote URL.
reviewing the code that went up to the forum I find errors in test 2 test.
reviewing and improving the code I find that has a link to http://www.west-wind.com/wsdlgenerator
and reading about SOAP is not available for my Windows 7 Home Premium 64 and is declared obsolete.
New Code Test :
you can use HBTIP or HMG scritp as tools to connect to remote URL.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- miszler.zoltan
- Posts: 22
- Joined: Sun May 26, 2013 12:37 pm
- Location: Hungary
- Contact:
Re: Connect to SOAP Server
Dear Daniel!
Thank you for your help and guidance!
Meanwhile, it turned out that authentication is required to access the SOAP server. The client header of each message you need to put the data necessary for authentication.
It uses Digest authentication method: Password_digest = Base64 (SHA - 1 (Nonce + Created + Password))
Example of SOAP request header to send authentication
The following example is to identify the "root" user name contains "System" password.
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/ ... xt-1.0.xsd">
<wsu:Timestamp
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/ ... 00401-wss-
wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1">
<wsu:Created>2010-08-10T10:52:42Z</wsu:Created>
<wsu:Expires>2010-08-10T10:57:42Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken>
<wsse:Username>root</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-
wss-username-token-profile-1.0#PasswordDigest">
EVpXS/7yc/vDo+ZyIg+cc0fWdMA=</wsse:Password>
<wsse:Nonce>tKUH8ab3Rokm4t6IAlgcdg9yaEw=</wsse:Nonce>
<wsse:Created>2010-08-10T10:52:42Z</wsse:Created>
</wsse:UsernameToken>
</wsse:Security>
In a bash script to generate the sample header authentication for testing:
#!/bin/sh
dd if=/dev/urandom of=/tmp/nonce_binary count=20 bs=1 &> /dev/null
CURDATE=‘date -u +"%FT%TZ"‘
EXPDATE=‘date -u -d "1 hour" +%FT%TZ‘
NONCE=‘cat /tmp/nonce_binary | base64‘
cat /tmp/nonce_binary > /tmp/gen
echo -n $CURDATE >> /tmp/gen
echo -n $2>> /tmp/gen
DIGEST=‘openssl dgst -binary -sha1 /tmp/gen | base64‘
echo -n "<SOAP-ENV:Header>"
echo -n "<wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-wssecurity-secext-1.0.xsd\" SOAP-ENV:mustUnderstand=\"1\">"
echo -n "<wsu:Timestamp xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-wssecurity-utility-1.0.xsd\" wsu:Id=\"Timestamp-1\">
<wsu:Created>$CURDATE</wsu:Created><wsu:Expires>$EXPDATE</wsu:Expires>
</wsu:Timestamp>"
echo -n "<wsse:UsernameToken><wsse:Username>$1</wsse:Username>"
echo -n "<wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-username-token-profile-1.0#PasswordDigest\">$DIGEST</wsse:Password>"
echo -n "<wsse:Nonce>$NONCE</wsse:Nonce><wsse:Created>$CURDATE</wsse:Created>"
echo "</wsse:UsernameToken></wsse:Security></SOAP-ENV:Header>"
rm -rf /tmp/gen /tmp/nonce_binary
This example script uses the OpenSSL encryption. I use the Harbour hbssl library or need to download other dll's?
Best regards,
Zoltan
Thank you for your help and guidance!
Meanwhile, it turned out that authentication is required to access the SOAP server. The client header of each message you need to put the data necessary for authentication.
It uses Digest authentication method: Password_digest = Base64 (SHA - 1 (Nonce + Created + Password))
Example of SOAP request header to send authentication
The following example is to identify the "root" user name contains "System" password.
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/ ... xt-1.0.xsd">
<wsu:Timestamp
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/ ... 00401-wss-
wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-1">
<wsu:Created>2010-08-10T10:52:42Z</wsu:Created>
<wsu:Expires>2010-08-10T10:57:42Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken>
<wsse:Username>root</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-
wss-username-token-profile-1.0#PasswordDigest">
EVpXS/7yc/vDo+ZyIg+cc0fWdMA=</wsse:Password>
<wsse:Nonce>tKUH8ab3Rokm4t6IAlgcdg9yaEw=</wsse:Nonce>
<wsse:Created>2010-08-10T10:52:42Z</wsse:Created>
</wsse:UsernameToken>
</wsse:Security>
In a bash script to generate the sample header authentication for testing:
#!/bin/sh
dd if=/dev/urandom of=/tmp/nonce_binary count=20 bs=1 &> /dev/null
CURDATE=‘date -u +"%FT%TZ"‘
EXPDATE=‘date -u -d "1 hour" +%FT%TZ‘
NONCE=‘cat /tmp/nonce_binary | base64‘
cat /tmp/nonce_binary > /tmp/gen
echo -n $CURDATE >> /tmp/gen
echo -n $2>> /tmp/gen
DIGEST=‘openssl dgst -binary -sha1 /tmp/gen | base64‘
echo -n "<SOAP-ENV:Header>"
echo -n "<wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-wssecurity-secext-1.0.xsd\" SOAP-ENV:mustUnderstand=\"1\">"
echo -n "<wsu:Timestamp xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-wssecurity-utility-1.0.xsd\" wsu:Id=\"Timestamp-1\">
<wsu:Created>$CURDATE</wsu:Created><wsu:Expires>$EXPDATE</wsu:Expires>
</wsu:Timestamp>"
echo -n "<wsse:UsernameToken><wsse:Username>$1</wsse:Username>"
echo -n "<wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-username-token-profile-1.0#PasswordDigest\">$DIGEST</wsse:Password>"
echo -n "<wsse:Nonce>$NONCE</wsse:Nonce><wsse:Created>$CURDATE</wsse:Created>"
echo "</wsse:UsernameToken></wsse:Security></SOAP-ENV:Header>"
rm -rf /tmp/gen /tmp/nonce_binary
This example script uses the OpenSSL encryption. I use the Harbour hbssl library or need to download other dll's?
Best regards,
Zoltan