• 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
SOAP responses of type number
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SOAP responses of type number


  • Subject: SOAP responses of type number
  • From: Jaime Magiera <email@hidden>
  • Date: Sat, 20 Sep 2008 00:21:25 -0400

Hello,

I've been revisiting projects that use SOAP and Applescript recently. I seem to have forgotten something basic, because I'm unable to get number responses properly through Applescript. Everything comes back as 0 when the SOAP response actually has integers such as 1234 and doubles such as 5.3. However, if I send a request to the same web app and class which returns a string, it's all good. Below are the details. The odd thing is that the *format* of the applescript return value is of the expected type (double, integer, etc.), depending on the method's return type. So, somehow it's understanding the expected type of the returned data, but not actually getting the value. Any thoughts? thanks!

Jaime


--------------------------- String Request/Response that works ---------------------------


set param1 to (1)
set param2 to ("mother")
set param3 to ("goose")

tell application "http://myserver.net:56474/cgi-bin/WebObjects/ThoughtConduitRemote.woa/ws/MediaService "

set the_result to (call soap {method name:"testStringMethod", method namespace uri:"http://webservices.server.thoughtconduit.net";, parameters:{groupID:param1, title:param2, synopsis:param3}, SOAPAction:""})

end tell


response: "it works"


--------------------------- Number Request/Response that doesn't work ---------------------------


tell application "http://ovid.sensoryresearch.net:56566/cgi-bin/WebObjects/ThoughtConduitRemote.woa/ws/MediaService "

set the_result to (call soap {method name:"testIntMethod", method namespace uri:"http://webservices.server.thoughtconduit.net";, parameters:{}, SOAPAction:""})

end tell


--

the_result: 0

The SOAP Response Text:

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ " xmlns:xsd="http://www.w3.org/1999/XMLSchema"; xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance "><soapenv:Body><ns1:testIntMethodResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ " xmlns:ns1="http:// webservices.server.thoughtconduit.net"><testIntMethodReturn href="#id0"/></ns1:testIntMethodResponse><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ " xsi:type="ns2:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/ " xmlns:ns2="http://www.w3.org/2001/XMLSchema";>3</multiRef></ soapenv:Body></soapenv:Envelope>


Java code:

	public static int testIntMethod() {
	    	System.out.println("yes, we are hitting the soap request");
	    	return 3;
	}	

------------------------

Jaime Magiera

Sensory Research
http://www.sensoryresearch.net

_______________________________________________
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
  • Prev by Date: RE: Exact word search-solved
  • Next by Date: Re: List of ITunes Applescript Commands
  • Previous by thread: Re: TimeMachine Information
  • Next by thread: "Accept all Changes" in Pages
  • Index(es):
    • Date
    • Thread