- 华软网


  • 授权方式: 金币下载
  • 支付金币: 1个
  • 金币充值: 点击查看
  • 下载方法: 点击查看
  • 源码大小: 6 KB
  • 评分等级: ★★★
  • 源码类别: 金币下载
  • 运行环境: WinXP/NT/Vista/Win7
  • 整理录入: 昕晨
  • 更新时间: 2009/12/1 8:29:00


PocketSoap interface for Pocket PowerBuilder
This external DLL provides a simple access to the PocketSoap package.

The model for the API is that first the service object is created and you are given the access handle. Then you can set the various attributes in whatever order you desire. Internally, the attributes are simply stored for later use. Then you make the SOAP call. This uses the previously set attributes. Finally, you destroy the service object, which cuts away all the previously created COM objects.

Pocket Soap Project
All this is built on top of the PocketSoap system. Retrieve from and install both on the desktop and CE machines.
This has been tested with PocketSoap version 1.4.2


Making Available To Pocket PowerBuilder
All these can be made accessible from PocketBuilder as a global external function. In the "Application object", select "(Declare)" and the "Global External Functions".
Paste this into the editor (may need to be changed for your requirements and any interface drift):

// External Functions all in library "PKSoapif.DLL"
FUNCTION integer PocketSoap_Create( boolean fInProc, REF long lHandle ) library "PKSoapif.dll"
FUNCTION integer PocketSoap_Destroy( long lHandle ) library "PKSoapif.dll"

FUNCTION integer PocketSoap_SetProxy( long lHandle, readonly string pszProxyServer, long iProxyPort )  library "PKSoapif.dll"
FUNCTION integer PocketSoap_SetProxyAuthentication( long lHandle,  readonly string pszUsername, readonly string  pszPassword )  library "PKSoapif.dll"
FUNCTION integer PocketSoap_SetAuthentication( long lHandle,  readonly string pszUsername, readonly string pszPassword )  library "PKSoapif.dll"
FUNCTION integer PocketSoap_SetMaxRedirects( long lHandle,  long cRedirects )  library "PKSoapif.dll"
FUNCTION integer PocketSoap_SetTimeout( long lHandle,  long cSeconds )  library "PKSoapif.dll"
FUNCTION integer PocketSoap_SetEndPoint( long lHandle, readonly string  pszEndPointURL )  library "PKSoapif.dll"
FUNCTION integer PocketSoap_SetSoapAction( long lHandle, readonly string  pszAction )  library "PKSoapif.dll"
FUNCTION integer PocketSoap_GetHTTPStatus( long lHandle, REF long lStatus ) library "PKSoapif.dll"

// Actually make the SOAP call
FUNCTION integer PocketSoap_SimpleCall( long lHandle, &
 readonly string   pszNameSpaceURI, &
 readonly string   pszMethodName, &
 readonly string   pszArgName,  &
 readonly string   pszArgValue ) library "PKSoapif.dll"

FUNCTION integer PocketSoap_Call( long lHandle, &
 readonly string   pszNameSpaceURI, &
 readonly string   pszMethodName, &
 readonly string   pszArgString ) library "PKSoapif.dll"

// All the get result calls have a caller (PB) allocated buffer.
FUNCTION integer PocketSoap_GetResult( long lHandle, &
 long     cRetBufLen, REF string pszReturnValue ) library "PKSoapif.dll"
FUNCTION integer PocketSoap_GetResults( long lHandle, &
 long     cRetBufLen, REF string pszReturnValue ) library "PKSoapif.dll"


Pocket PowerBuilder Sample
A sample to retrieve a single stock quote...

 string sMethod = "getQuote"
 string sEndPoint  = ""
 string sNameSpace = "urn:xmethods-delayed-quotes"
 int    cRetBufLen = 128
 string sArgs
 string sResult
 long   lHandle
 int    iRet

 iRet = PocketSoap_Create( true, REF lHandle )
 iRet = PocketSoap_SetEndPoint( lHandle, sEndPoint )

 // preallocate the result string
 sResult = Space( cRetBufLen )

 // make a "simple call"
 iRet =  PocketSoap_SimpleCall( lHandle, sNameSpace, sMethod, "symbol", "SY" )
 iRet =  PocketSoap_GetResult( lHandle, cRetBufLen, REF sResult )

 lb_1.addItem( "Value: [" + sResult + "]" )

 iRet =  PocketSoap_Destroy( lHandle )




  • pocketsoap_api手册


  • 为防止盗链,本站资源部分有解压密码,解压密码点击查看
  • 如果您发现该资源不能下载,请通知管理员;
  • 为了保证您快速的下载,推荐使用迅雷或网际快车等专业工具下载;
  • 为确保所下资源能正常使用,请使用WinRAR v3.80或以上版本解压本站资源;
  • 本站所收集的下载资源均来源于网络,如果有侵犯您的版权,请来信告知,我们会马上处理;
  • 本站所提供的资源仅供学习和研究,请勿用于商业用途,请在下载后24小时内删除;
  • 本站不承担用户因使用这些下载资源对自己和他人造成任何形式的损失或伤害!