SOAP message

SOAP message

Postby clemerson » Tue Apr 04, 2006 9:10 pm

Would he like to connect a server, and possible Fwh?

https://200.214.130.41:9443/farmaciahom ... icitacaoWS

in the manual he says:

The requests will be made under the form of services web (Web Services), being used of the protocol HTTPS goes
transmission of the dates and SOAP 1.2 (Simple Object Acess available Protocol in the ranch - www.w3.org/TR/soap /) the
I record of change of dates among the applications. These services will be described under the form of cribs her
electronic in the format WSDL 1.1 (Web Service Description Language version 1.1 available in the ranch
http://www.w3.org/TR/wsdl).

Clemerson
User avatar
clemerson
 
Posts: 58
Joined: Fri Mar 10, 2006 8:13 pm
Location: Brazil

Postby clemerson » Wed Apr 05, 2006 6:22 pm

Hi,

I got to set up this way below, I think and the road...

This giving this mistake in the return of the function GetLastError () =12007:
If HttpSendRequest(hRequest, "",0,sBuffer,Alltrim(Str(Len(sBuffer)))) == 0
? "error3",GetLastError ()
Endif

ERROR_INTERNET_NAME_NOT_RESOLVED
12007
The server name could not be resolved.

example:


sBuffer:=""
oTxt:=tTxtFile():New("c:\Autorizador.wsdl")
For x=1 to oTxt:Reccount()
sBuffer:=sBuffer+Alltrim(oTxt:readline())+chr(13)+chr(10)
otxt:Skip()
Next
oTxt:END()

xError :=LoadLib32("Kernel32.dll")
xdllnet:=LoadLib32("WinINet.Dll")

hOpen:=InternetOpen("Sysfar", INTERNET_OPEN_TYPE_DIRECT,"","",0)

if (hConect:=InternetConnect(hOpen,"https://200.214.130.41:9443/farmaciahomologa/services/ServicoSolicitacaoWS";
,4,"","",3,0,0)) == 0
msginfo("Não consegue conectar com servidor, conectar Internet e executar novamente o envio do arquivo ..."+str(Getlasterror()))
endif

hRequest:=HttpOpenRequest(hConect,"POST","","","","","INTERNET_FLAG_SECURE",0)
If hRequest==0
? "error1",GetLastError()
Endif

If HttpSendRequest(hRequest,"",0,sBuffer,Alltrim(Str(Len(sBuffer)))) == 0
? "error3",GetLastError()
Endif

hFile:=InternetOpenUrl(hOpen,"https://200.214.130.41:9443/farmaciahomologa/services/ServicoSolicitacaoWS",,0,,0)

If empty(hFile)
? "Não foi possivel conectar."
else
//InternetWriteFile(hFile, @sBuffer, 3200, @Ret)

sBuffer:= Space(3200)
InternetReadFile(hFile, @sBuffer, 3200, @Ret)

InternetCloseHandle(hFile)
InternetCloseHandle(hOpen)

If Empty(sBuffer)
MsgStop("Erro conectar servidor ...","Informação !!!")
else
MsgInfo("Retorno recebito com Sucesso, em desenvolvimento ...","Informação")
? sBuffer
Endif
Endif

FreeLib32(xdllnet)
FreeLib32(xError)

---------------------
Dll32 Function InternetReadFile(hFile As 7, @sBuffer As 8, lNumBytesToRead As 7, @lNumberOfBytesRead As 7) As 7 PASCAL Lib xdllnet
Dll32 Function InternetWriteFile(hFile As 7, @sBuffer As 8, lNumBytesToWrite As 7, @lNumberOfBytesWrite As 7) As 7 PASCAL Lib xdllnet
Dll32 Function InternetOpenUrl(hInternetSession As 7, lpszUrl As 8, lpszHeaders As 8, dwHeadersLength As 7, dwFlags As 7, dwContext As 7) As 7 FROM "InternetOpenUrlA" PASCAL Lib xdllnet
DLL32 FUNCTION InternetOpen( cApp as LPSTR, n1 AS DWORD, n2 AS LPSTR, n3 AS LPSTR,n4 AS DWORD ) AS LONG PASCAL FROM "InternetOpenA" LIB xDllNet
DLL32 FUNCTION HttpSendRequest(hRequest As 7,@lpszHeaders as LPSTR,dwHeadersLength as DWORD,@lpOptional as VOID,dwOptionalLength as DWORD) AS LONG FROM "HttpSendRequestA" PASCAL LIB xDllNet
DLL32 FUNCTION HttpOpenRequest(hConnect As 7,lpszVerb as LPSTR,lpszObjectName as LPSTR,lpszVersion as LPSTR,lpszReferer as LPSTR,lpszAcceptTypes as LPSTR,dwFlags as DWORD,dwContext as DWORD) AS LONG FROM "HttpOpenRequestA" PASCAL LIB xDllNet
DLL32 FUNCTION InternetConnect( hSession AS LONG, cHost AS LPSTR, nPort AS LONG,cUserName AS LPSTR, cPassword AS LPSTR, n4 AS DWORD, n5 AS DWORD,n6 AS DWORD ) AS LONG PASCAL FROM "InternetConnectA" LIB xDllNet
DLL32 FUNCTION GetLastError() AS LONG PASCAL LIB xError
DLL32 FUNCTION HttpAddRequestHeaders(HINTERNET as 7,lpszHeaders AS LPSTR,dwHeadersLength as DWORD,dwModifiers as DWORD) AS LONG PASCAL FROM "HttpAddRequestHeadersA" LIB xDllNet


Clemerson
User avatar
clemerson
 
Posts: 58
Joined: Fri Mar 10, 2006 8:13 pm
Location: Brazil

Soap

Postby byron.hopp » Tue May 09, 2006 2:38 pm

Have you gotten this to work? How do you pass parameters in the soap message?

Byron...
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: Soap

Postby clemerson » Tue May 09, 2006 2:45 pm

byron.hopp wrote:Have you gotten this to work? How do you pass parameters in the soap message?

Byron...


It would be the content of the otxt that I would order and to receive the return, more it ties today didn't still get to work.

Clemerson
User avatar
clemerson
 
Posts: 58
Joined: Fri Mar 10, 2006 8:13 pm
Location: Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 41 guests