Search This Blog

Tuesday, March 19, 2013

Asynchronous Web Service Calls over HTTP with the .NET Framework

very informative article , contains description and several implantation Asynchronous Web Service Calls over HTTP with the .NET Framework: "Asynchronous Web Service Calls over HTTP with the .NET Framework"

on the same subject

Calling Web Services Asynchronously 



Saturday, March 16, 2013

AXIS C++ - starter kit for client on windows- WS from C++

To call Webservice from C++ (VC6 in may case) consider using AXIS C++ - gSoap is also a good option.

before starting your code , its very important to set the axis c++ correctly, i get many "system exception" until i figure out that i need to set the environment  properly.

after downloading your version  (axis-c-1.6b-Win32-trace-bin) and extract it.
set the this environment  variable:
  • AXISCPP_DEPLOY=D:\MyStuff\axis-c++\axis-c-1.6b-Win32-trace-bin\ -- [ your path]
  • add %AXISCPP_DEPLOY%\bin to your PATH.
  • download  - xerces 2.2  , grab the dll from the bin directory and put it in the %AXISCPP_DEPLOY%\bin directory.
  • Create file axiscpp.conf at %AXISCPP_DEPLOY%
in the file set the next rows - use full path:
#ClientLogPath is for axis trace - leave empty in case you dont want
ClientLogPath:D:\MyStuff\axis-c++\axis-c-1.6b-Win32-trace-bin\logs\AxisLog.txt
XMLParser:D:\MyStuff\axis-c++\axis-c-1.6b-Win32-trace-bin\bin\AxisXMLParserXerces.dll
Transport_http:D:\MyStuff\axis-c++\axis-c-1.6b-Win32-trace-bin\bin\HTTPTransport.dll
Channel_HTTP:D:\MyStuff\axis-c++\axis-c-1.6b-Win32-trace-bin\bin\HTTPChannel.dll
Channel_HTTP_SSL:D:\MyStuff\axis-c++\axis-c-1.6b-Win32-trace-bin\bin\HTTPSSLChannel.dll

you are done - its configured properly.
to create your C++ classes from WSDL:
  • get the wsdl 
  • open cmd windows
  • set the classpath 
    • e.g set CLASSPATH=D:\MyStuff\axis-c++\axis-c-1.6b-Win32-trace-bin\lib\axis\wsdl2ws.jar;D:\MyStuff\axis-c++\axis-c-1.6b-Win32-trace-bin\lib\axisjava\axis.jar;D:\MyStuff\axis-c++\axis-c-1.6b-Win32-trace-bin\lib\axisjava\commons-discovery.jar;D:\MyStuff\axis-c++\axis-c-1.6b-Win32-trace-bin\lib\axisjava\commons-logging.jar;D:\MyStuff\axis-c++\axis-c-1.6b-Win32-trace-bin\lib\axisjava\jaxrpc.jar;D:\MyStuff\axis-c++\axis-c-1.6b-Win32-trace-bin\lib\axisjava\saaj.jar;D:\MyStuff\axis-c++\axis-c-1.6b-Win32-trace-bin\lib\axisjava\wsdl4j.jar
  • run the command 
    • java org.apache.axis.wsdl.wsdl2ws.WSDL2Ws any_wsdl.wsdl -lc++ -sclient
you should see your header/cpp files in the directory.

happy coding 
Yaniv Tzanany

Wednesday, March 6, 2013

Usefull MQ command

here are some usefull comand to use when working with MQ
command to display the queuestatus of a queue:
dis qs() type(handle) all 

command to display the queuestatus of a queue (and only display the pid) :
dis qs() type(handle) pid 

command to display the queuestatus of a queue (and display the applicationtag and the pid) :
dis qs() type(handle) appltag pid
display all the queues that contains more then 0 messages: dis ql(*) where (curdepth gt 0) 

start an api trace:
strmqtrc -m [QM]  -t api
(the -t has several options. Logs are written to: /trace)

end a trace:
endmqtrc -m [QM]


on windows you can read the TRC files via text viewer.

Enjoy 
Yaniv Tzanany