Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

ATL XML Web Service Server & Client

[es] :: C/C++ programiranje :: ATL XML Web Service Server & Client

[ Pregleda: 2680 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

mnesa
Nebojša Mihajlović
Software Engineer, PSTech
Zemun

Član broj: 4177
Poruke: 15
62.108.98.*

Sajt: www.nutricionisti.org


+1 Profil

icon ATL XML Web Service Server & Client04.06.2004. u 11:57 - pre 242 meseci
Radim u VS.NET 2003, WinXP SP1.
Napravio sam ATL Server projekat (XML Web Service) sa Unicode podrškom. Postavljen je na lokalni IIS i probom iz c#-a sam ustanovio da funkcioniše.

Međutim javlja se potreba da klijent bude napisan u ATL-u. Kreiram novi Atl Project, skinem Attributed i postavim Allow Merging proxy/stub code (sve ostalo ostavim po defaultu), i dodam Web Reference na pomenuti Web Service, i u ovom projektu je potrebno dodati podršku za Unicode.

Prilikom prvog pozivanja metode iz Web Service-a, prođe build-ovanje, ali prijavi sledeću grešku - WebServiceClient error PRJ0019: A tool returned an error code from "Performing registration".

Posle duze analize, i google-ovanja zaključak je da je problem u sledećem:
"FreeAddrInfoW and GetAddrInfoW are not exported from ws2_32.dll", i to s obzirom da koristim atlsoap.h, koja include-uje atlsocket.h, a ona ws2tcpip.h gde bi i trebalo da se nalaze ove funkcije.

Ovo je registrovan bug od strane Microsofta http://support.microsoft.com/default.aspx?scid=kb;en-us;822334

Moguća rešenja, koja nažalost kod mene nisu proradila su:

Citat:

http://www.codeproject.com/atl...0&select=651072#xx651072xx

Hello,

atlsoap.h specifies [ emitidl("restricted") ] which will prevent generation of idl and typelib. So when regsvr32 is called it returns "Error Loading TypeLib".

You can do the following in stdafx.h:
Code:

#include <atlsoap.h>
[ emitidl("true") ]

Hope that helps
Leon


Citat:

http://www.codeguru.com/forum/...ead.php?s=&threadid=269478
Assuming my ATL project name to be "TestATL"

Add following lines to the TestATL.rc file:

<1> Add following lines in the TEXTINCLUDE section just before the statement:
"#endif // APSTUDIO_INVOKE" (they appear at around Line 33)


3 TEXTINCLUDE
BEGIN
"1 TYPELIB ""_TestATL.tlb""\r\n"
"\0"
END


<2> Add following line in between
"#ifndef APSTUDIO_INVOKED" and
"#endif // not APSTUDIO_INVOKED" (they appear at the end of .rc file)


1 TYPELIB "_TestATL.tlb"


If by chance you come to know of any other solution, do post it.

Cheers,
Arun.


kao i
Citat:

http://www.codeproject.com/scr...1&select=745150#xx745150xx
Make sure you have included:
Ws2tcpip.h
and have added
Ws2_32.lib to the linker


Pomoć potrebna naravno što pre ;)
 
Odgovor na temu

mnesa
Nebojša Mihajlović
Software Engineer, PSTech
Zemun

Član broj: 4177
Poruke: 15
62.108.98.*

Sajt: www.nutricionisti.org


+1 Profil

icon Re: ATL XML Web Service Server & Client07.06.2004. u 12:47 - pre 242 meseci
Ako nekome ne daj Boze zatreba, a Microsoft ne izbaci patch do tada, ja nekako uradih ovo po sledecem uputstvu:

Citat:
Here are my solutions to the problem:

I. Do it all in MBCS

or

II. Try the following:

1. Back-up (!) all *.h and *.inl files that refer to the structure
ADDRINFOT.
2. Replace in all files ADDRINFOT with addrinfo
3. In the file atlsocket.inl replace all FreeAddrInfo with freeaddrinfo
4. In the file atlsocket.inl replace all GetAddrInfo with getaddrinfo
5. In the file atlsocket.inl(52) change the last line of the method
CSocketAddr::FindAddr from

return ::GetAddrInfo(szHost, szPortOrServiceName, &hints, &m_pAddrs);

to

USES_CONVERSION;
return ::getaddrinfo(T2CA(szHost), T2CA(szPortOrServiceName), &hints,
&m_pAddrs);

Got all to compile, link and load. :) All disclaimers about the above
you can think of do apply!

It is possible that some libraries wouldn't work (but they would't work
with the original code either).

or

III. (My favorite!) Take a vacation until MS releases patch(es).

Val


Doduse, nije proradilo iz prve, ima jos par sitnih ispravki, ali kome bude trebalo vec ce se nekako snaci. Naravno, treba poslusati covekov savet i primeniti resenje pod brojem 3 ;)
 
Odgovor na temu

[es] :: C/C++ programiranje :: ATL XML Web Service Server & Client

[ Pregleda: 2680 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.