On Aug 26, 3:51 pm, Matthew Woodward <[email protected]> wrote:
>
> Some test code would be helpful.
>

dummy.cfc
<cfcomponent output="false">
<cffunction name="getSomething" access="remote">
        <cfoutput>Something</cfoutput>
</cffunction>
</cfcomponent>

test.cfm
<cfhttp charset="utf-8" method="post" result="res" url="http://
#server_name#:#server_port#/dummy.cfc?method=getSomething">
<cfhttpparam type="body"   value=''>
</cfhttp>
<cfdump var="#res#">

With Railo and CF I get 'Something' in cfhttp.filecontent and 200 Ok,
but openBD gives me:

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault>
<faultcode xmlns:ns1="http://xml.apache.org/
axis/">ns1:Client.NoSOAPAction</faultcode> <faultstring>no SOAPAction
header!</faultstring> <detail> <ns2:hostname xmlns:ns2="http://
xml.apache.org/axis/">D-SV</ns2:hostname> </detail> </soapenv:Fault> </
soapenv:Body> </soapenv:Envelope>
plus a 500 server error.

I have tried various combinations, but it seems that as soon as I do a
POST with just a BODY and no formfields, OpenBD assumes it is a web
service call. I don't think it should.

Background info

In my real component I have a jsonstring in the post body, like:
<cfhttpparam type="body" value='{"id":
1,"method":"getComments","params":{"oid":48409,"start":1,"count":
10},"jsonrpc":"2.0"}'>
this is sent to a 'smdrequest' method which is parsing the json and
invokes the requested method

<cffunction name="smdRequest" access="remote" description="Executes a
method in THIS object" returntype="void"  >
<cfset var content = '#trim(toString(GetHttpRequestData().content))#'>
<cfset var args = DeserializeJSON(content)>
...
...
<cfinvoke method="#args.method#" returnvariable="local.result"
argumentcollection="#args.params#" />

Note: I do not actually use <cfhttp> of course, the request is done
via JSON-RPC which gives me a functionality much like cfajaxproxy. I
have a smd.cfc with which I extend my remote components so that they
have the functionality needed, like getSMD().

http://en.wikipedia.org/wiki/JSON-RPC

Thanks
Stefan
--~--~---------~--~----~------------~-------~--~----~
Open BlueDragon Public Mailing List
 http://groups.google.com/group/openbd?hl=en
 official site @ http://www.openbluedragon.org/

!! save a network - trim replies before posting !!
-~----------~----~----~----~------~----~------~--~---

Reply via email to