• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: XML-RPC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XML-RPC


  • Subject: Re: XML-RPC
  • From: Takaaki Naganoya <email@hidden>
  • Date: Tue, 06 Oct 2015 10:28:47 +0900

I did! 

<AppleScript>
-- Created 2015-10-06 by Takaaki Naganoya
-- 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"
use framework "XMLRPC"
--XMLRPC.framework
--https://cocoapods.org/pods/xmlrpc
--Cocoa XML-RPC Framework © 2011 Divisible by Zero
--v2.3.4

set aRes to my callXMLRPC("http://yubin.senmon.net/service/xmlrpc/", "yubin.getMaxFetchCount", missing value)
log aRes

set bRes to my callXMLRPC("http://yubin.senmon.net/service/xmlrpc/", "yubin.getVersion", missing value)
log bRes

on callXMLRPC(paramURL, aMethod, aParamList)


set aURL to current application's |NSURL|'s URLWithString:paramURL
set aReq to current application's XMLRPCRequest's alloc()'s initWithURL:aURL
aReq's setMethod:aMethod withParameter:aParamList
set aRes to current application's XMLRPCConnection's sendSynchronousXMLRPCRequest:aReq |error|:(missing value)


set errF to (aRes's isFault()) as boolean


if errF = true then
set xmlRPCres to faultCode of aRes
set xmlRPCbody to faultString of aRes
else
set xmlRPCres to aRes's object()
set xmlRPCbody to aRes's body()
end if


return {xmlRPCres, xmlRPCbody}


end callXMLRPC
</AppleScript>

--
Takaaki Naganoya
email@hidden
http://piyocast.com/as/

2015/10/05 17:20、Takaaki Naganoya <email@hidden> のメール:

2015/10/05 11:31、Shane Stanley <email@hidden> のメール:
On 5 Oct 2015, at 2:34 AM, Takaaki Naganoya <email@hidden> wrote:
What’s wrong with me?

The real question is: What's wrong with me? It looks like you're trying to run the script in ASObjC Explorer. Under 10.11, App Transport Security stops apps making unsecured HTTP connections by default. The next release of Explorer will turn this limitation off.

Thanks Shane!

I could not filter out the troubled layer. It was very lucky for us that you have information about this matter.

Layer 3---AppleScript Code (my Bug)
Layer 2---Script Editor / ASObjC Explorer 4 / Script Debugger 5 
Layer 1—XMLRPC.framework
Layer 0—OS X

Shane pointed out the layer 2 problem (between the layer 1 and 2). And it will be cleared soon.
The layer 1 and 3 are doubtful, too… 

--
Takaaki Naganoya
email@hidden
http://piyocast.com/as/


Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users This email sent to email@hidden
  • Follow-Ups:
    • Re: XML-RPC
      • From: Shane Stanley <email@hidden>
References: 
 >XML-RPC (From: Takaaki Naganoya <email@hidden>)
 >Re: XML-RPC (From: Shane Stanley <email@hidden>)
 >Re: XML-RPC (From: Takaaki Naganoya <email@hidden>)

  • Prev by Date: El Capitan Mail - Rule-Based Reply
  • Next by Date: Re: XML-RPC
  • Previous by thread: Re: XML-RPC
  • Next by thread: Re: XML-RPC
  • Index(es):
    • Date
    • Thread