Webservice CFC wierdness

I am writing a webservice and have to use specific names
(part of an industry standard). When I use the required "namespace"
the webservice stops working and does not return anything. In this
case the namepsace is "urn:SpotBuySpot.Gateway". Using that with
the other parameters for cfcomponent it breaks. But I can do
something as small as misspell Gateway.. (ie: 'Gatewey') or put
anything else in that field and the webservice works as expected.
Something in the namespace parameter causes a clash with something
else.
Any ideas?

Can you test it by calling it as a component not as a
webservice?
nivla17 wrote:
> Here is my CFC - easy enough, returns xml...
>
> <cfcomponent displayname="DemoRanges" output="false"
hint="returns ranges for
> dropdown">
>
> <cffunction name="dropRanges" returntype="xml"
output="false" access="remote">
> <!---<cfargument name="whatRange" type="string"
required="yes" />--->
> <cfprocessingdirective suppresswhitespace="Yes">
> <cfxml variable="xmlContent" caseSensitive="yes">
> <dropRanges>
> <ageValue>99</ageValue>
> </dropRanges>
> </cfxml>
> </cfprocessingdirective>
> <cfreturn xmlContent>
>
>
> </cffunction>
>
> </cfcomponent>
>
>
> Everytime I request it I get the folling error:
>
> Could not perform web service invocation
""dropRanges"".Here is the fault
> returned when invoking the web service
operation:<br> <pre>AxisFault faultCode:
> {
http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
> faultString: org.xml.sax.SAXException: Bad types
(interface
> org.w3c.dom.Document -> class java.lang.String)
faultActor: faultNode:
> faultDetail: {
http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException:
> Bad types (interface org.w3c.dom.Document -> class
java.lang.String) at
>
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:286)
at
>
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationCont
> ext.java:1035) at
>
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at
>
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141
> ) at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
at
>
org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at... The
> specific sequence of files included or processed is:
> C:\websites\flex.dmail.lsadv.com\www\data\test.cfm,
line: 9
>
>
>
WHAT THE HECK AM I DOING WRONG!!!
>

Similar Messages

  • "java.lang.ClassNotFoundException" when creating a CFC instance inside a webservice

    This question is also up on stack overflow: http://stackoverflow.com/questions/10089962/coldfusion-web-service-failing-to-see-componen t
    I've got a CFC that I'm going to access with ?wsdl as a SOAP webservice.
    If I call the CFC directly in a browser, my results render fine:
        http://server/webservice/calc.cfc?method=doStuff&foo=bar
    If I try to access it as a web service:
        ws = CreateObject("webservice", 'http://server/webservice/calc.cfc?wsdl');
        result = ws.doStuff('bar');
    I get an error:
    Cannot perform web service invocation doStuff.
    The fault returned when invoking the web service operation is:
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: coldfusion.xml.rpc.CFCInvocationException:
    [coldfusion.xml.rpc.CFCInvocationException : [java.lang.ClassNotFoundException :
    com.calculations.calc][java.lang.NullPointerException : null]]
    faultActor:
    faultNode:
    faultDetail:
        {http://xml.apache.org/axis/}stackTrace:coldfusion.xml.rpc.CFCInvocationException:          [coldfusion.xml.rpc.CFCInvocationException : [java.lang.ClassNotFoundException :    
    com.calculations.calc][java.lang.NullPointerException : null]]
        at     coldfusion.xml.rpc.CFComponentSkeleton.__createCFCInvocationException(CFComponentSkeleton.java:733)
        at coldfusion.xml.rpc.CFComponentSkeleton.__convertOut(CFComponentSkeleton.java:359)
        at webservice.calc.doStuff(/var/www/vhosts/server/httpdocs/webservice/calc.cfc)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.r... ''
    The problem is because the doStuff function is declaring an instance of a CFC inside it:
    remote struct function doStuff(foo) {
      var objReturn = {};
        objReturn.msg = 'A message';
        // do a calculation
        var objCalc = new com.calculations.calc(foo);
        objReturn.calc = objCalc;
      return objReturn;
    So my CFC that I'm using as a webservice has got another CFC being declared inside a function. Browsing directly to my webservice CFC works fine, but trying to call it using the CreateObject/webservice route fails, as it can't create an instance of the **com.calculations.calc** component.
    It doesn't error, wierdly, if I comment out the objReturn.calc = objCalc line. So it seems I can create the instance, but the error isn't thrown till I assign it to my return struct.
    Also I've found, If I refresh the page a few times, sometimes the error changes to:
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: coldfusion.xml.rpc.CFCInvocationException:
        [coldfusion.xml.rpc.CFCInvocationException : [java.lang.ClassNotFoundException :    
        com.calculations.calc][coldfusion.xml.rpc.CFCInvocationException :
        returnType must     be defined for remote CFC functions.]]
         faultActor:
         faultNode:
         faultDetail:
        {http://xml.apache.org/axis/}stackTrace:coldfusion.xml.rpc.CFCInvocationException:
        [coldfusion.xml.rpc.CFCInvocationException : [java.lang.ClassNotFoundException :
        com.calculations.calc][coldfusion.xml.rpc.CFCInvocationException :
        returnType must be defined for remote CFC functions.]]
        at coldfusion.xml.rpc.CFComponentSkeleton.__createCFCInvocationException(CFComponentSkeleton.java:733)
    at coldfusion.xml.rpc.CFComponentSkeleton.__convertOut(CFComponentSkeleton.java:359)
    at webservices.TaxCalc.feed.getTaxCalc(/var/www/vhosts/server/httpdocs/webservice/calc.cfc)
    at sun.reflect.Nat... ''
    Message was edited by: PeteComcar - impvoed code formatting and added returntype update

    Dear All Technology Expert's,
    I have a query related to Coldfusion SOAP services, that is most commonly asked in all the forum's but NONE of them has got answer.
    If there is NO solution so I think Adobe has to come up with some patches so developer can able to do some customization.
    I like to share with you all, in all other language ( PHP, JAVA, .NET etc) this option is available and you can customize the error.
    Ok let me again explain the very basic error:
    SOAP Request:
    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Header/>
       <soapenv:Body>
       </soapenv:Body>
    </soapenv:Envelope>
    SOAP Response:
      <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>soapenv:Server.userException</faultcode>
             <faultstring>java.lang.Exception: Body not found.</faultstring>
             <detail>
                <ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/">java.lang.Exception: Body not found.
      at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:121)...</ns1:s tackTrace>
                <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">Coldfusion Error</ns2:hostname>
             </detail>
          </soapenv:Fault>
       </soapenv:Body>
    </soapenv:Envelope>
    HOW we can customize the error, in all other languages you can simple customize the error like
    Other languages SOAP response:
      <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>BODY_NOT_FOUND</faultcode>
             <faultstring>Body is missing in your request</faultstring>
          </soapenv:Fault>
       </soapenv:Body>
    </soapenv:Envelope>
    But the same is NOT possible in Coldfusion, right?
    AS you know it is vulnerability to display exception messages in the response.
    We are developing this web service to access  from other language website (PHP, .NET).
    We are also planning to upgrade server the Coldfusion 11, but do you think there is any solution with latest Coldfusion version.
    Please response only if you know about these issue's or solution. 
    Thanks
    Niyaz

  • Webservice: Flex to CFC

    Hi
    I'm triing to send a complex Object (AS) from Flex to a
    simple test Webservice CFC.
    If I create an Object in ActionScript an send this to my
    Webservice, the Object will not be received from the CFC ( return
    String is "NO").
    How can I send a complex Object to my CFC and read the
    variables ?
    Thx for any help.
    Sonix
    Code:
    CFC:
    <cffunction name="writeTimerChange" output="false"
    access="remote" returntype="String">
    <cfargument required="no" name="Gewinnzeit"
    type="any">
    <cfset ret = #isdefined("Gewinnzeit")#>
    <cfreturn ret>
    </cffunction>
    AS:
    public class Gewinnzeit {
    public var ID:int;
    public var timestamp:Date;
    public var gewinnzahl:int;
    public var count:int;
    public var gewinner:String;
    public var gewinnerID:int;

    Can you post the mxml/as you are using to invoke the
    webservice too. From what I can see here, what you are doing should
    work. The AS Class should come into CF as a struct and back out as
    a struct or generic AS Object() (if you returned it).
    ---nimer

  • Webservice invocation

    Need help in invoking these webservices..
    There are two webservices that I am trying to invoke one
    after the other:-
    1) first web service "setupwebsession" sets a session. Here I
    have setup the session.webuserUI to a component.
    2) second service tries to get a profile but displays an
    error
    Here is the webservice consuming:-
    <cfinvoke webservice="
    http://localhost:8050/WebServices.cfc?wsdl"
    method="setUpWebUserSession"
    returnVariable="soo">
    <cfinvokeargument name="userName"
    value="[email protected]">
    <cfinvokeargument name="applicationToLogIn"
    value="atccWeb">
    </cfinvoke>
    <cfoutput> #soo# </cfoutput>
    <cfdump var="#Session.SessionID#">
    <cfinvoke webservice="
    http://localhost:8050/WebServices.cfc?wsdl"
    method="getProfileHTML" returnvariable="profilehtml">
    </cfinvoke>
    <cfoutput>#getProfileHTML#</cfoutput>
    I am trying to consume both these webservices but it displays
    a following error.
    Cannot perform web service invocation getProfileHTML.
    The fault returned when invoking the web service operation
    is:
    AxisFault
    faultCode: {
    http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString:
    [line 1, column 8] [--Catch Data--]
    type: Application
    tagname: CFOUTPUT
    template:
    C:/jboss-eap-4.3/jboss-as/server/atcc/tmp/deploy/tmp48291CTiWebServicesAPI.ear-contents/C TiWebServicesAPI-exp.war/CTiWebServicesAPI.cfc
    Line: 75; Column: 3
    ErrorCode:
    message: session.WebUserUI.getWebProfileHTML() doesn't exist.
    detail: Error at line 1, column 8
    faultActor:
    faultNode:
    faultDetail:
    http://xml.apache.org/axis/}hostname:124426-SECOM1
    The error occurred in
    C:\ColdFusion8\wwwroot\selfprojects\webservices1.cfm: line 10
    8 : <cfdump var="#Session.SessionID#">
    9 : <cfinvoke webservice="
    http://localhost:8050/webervices.cfc?wsdl"
    10 : method="getProfileHTML" returnvariable="profilehtml">
    11 : </cfinvoke>
    12 : <cfoutput>#getProfileHTML#</cfoutput>
    Resources:
    Check the ColdFusion documentation to verify that you are
    using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1;
    .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET
    CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
    Remote Address 127.0.0.1
    Referrer
    http://localhost:8500/selfprojects/
    Date/Time 19-Mar-09 04:27 PM
    Stack Trace (click to expand)
    at
    cfwebservices12ecfm1268558828.runPage(C:\ColdFusion8\wwwroot\selfprojects\webservices1.cf m:10)
    coldfusion.xml.rpc.ServiceProxy$ServiceInvocationException:
    Cannot perform web service invocation getProfileHTML.
    at
    coldfusion.xml.rpc.ServiceProxy.invokeImpl(ServiceProxy.java:230)
    at
    coldfusion.xml.rpc.ServiceProxy.invoke(ServiceProxy.java:143)
    at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2222)
    at
    coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:417)
    at
    cfwebservices12ecfm1268558828.runPage(C:\ColdFusion8\wwwroot\selfprojects\webservices1.cf m:10)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)
    at
    coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)
    at
    coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
    at
    coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279)
    at
    coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
    at
    coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
    at
    coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
    at
    coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
    at
    coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
    at
    coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at
    coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
    at
    coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at
    coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.CfmServlet.service(CfmServlet.java:175)
    at
    coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
    at
    coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )
    at
    coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
    at jrun.servlet.FilterChain.service(FilterChain.java:101)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
    at
    jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    quote:
    Originally posted by:
    shafiur
    Need help in invoking these webservices..
    There are two webservices that I am trying to invoke one
    after the other:-
    1) first web service "setupwebsession" sets a session. Here I
    have setup the session.webuserUI to a component.
    2) second service tries to get a profile but displays an
    error
    Here is the webservice consuming:-
    <cfinvoke webservice="
    http://localhost:8050/WebServices.cfc?wsdl"
    method="setUpWebUserSession"
    returnVariable="soo">
    <cfinvokeargument name="userName"
    value="[email protected]">
    <cfinvokeargument name="applicationToLogIn"
    value="atccWeb">
    </cfinvoke>
    <cfoutput> #soo# </cfoutput>
    <cfdump var="#Session.SessionID#">
    <cfinvoke webservice="
    http://localhost:8050/WebServices.cfc?wsdl"
    method="getProfileHTML" returnvariable="profilehtml">
    </cfinvoke>
    <cfoutput>#getProfileHTML#</cfoutput>
    You are trying to output the function name instead of the
    returnvariable.

  • How can I display all records as a end user?

    I am applying for jobs with the state and every week they publish a list of new positions that have just been posted on the following link: https://forms.spb.ca.gov/bulletins/weekly.cfm
    and also at http://jobs.spb.ca.gov/wvpos/search_p_ejv.cfm?classcode=5393&criteria=associate%20governme ntal
    It is a .cfm but only displays 15 records at a time, I was wondering if there is a tag or way to have it display all 300 something records at once?  My ultimate goal is to get just the full table into a excel spreadsheet while retaining the HTML formatting so the links still work.
    My thought is that the state has set it up this way to only display a set number of records at a time, the data is not private or protected, I am simply seeking a easier way to access it in aggregate.
    Thank you in advance for your suggestions and help!

    I think your best hope is to ask the author of the CFM whether they provide any web service that can get you that data when you call it.  like.
    https://forms.spb.ca.gov/webservice.cfc?method=getJobsPostings&key={key_goes_here}
    There's a chance they may be regulating performance on the resultset, and don't want to return that many records at a time, pagination or not.

  • Getting an error in the "Partner Link" when specifying an https-base wsdl

    Hi friends,
    this is Hari. I'm getting an error in the "Create Partner Link" dialogue when specifying an https-based wsdl url. The non-ssl wsdl url works fine, but I need it to work for ssl (https). The specific errror reads:
    Error:Failed to read wsdl file at "https://serverstuff/webservice.cfc?wsdl", caused by: javax.net.ssl.SSLHandshakeException. :sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    i need to invoke secure service(https).what should i do for taht?
    Regards,
    hari

    http://orasoa.blogspot.com/2007/09/compile-error-bpel-against-ssl.html
    marc

  • OnError() function in web service: impossible?

    Hi,
    Context: A ColdFusion web service with application.cfc and OnError() function.
    I want the OnError function to log and email me when exceptions occur in web service but for some reason OnError() is never fired in such a case.
    It's weird because it works if a .cfm page is called instead of a .cfc!
    Is it a standard behaviour with CF webservice? Is there a workaround?
    Thanks

    Hi Dan,
    Thank you for reading and suggesting. The fact is I would like to use onError() for what it is supposed to provide - and also to understand the mechanism.
    My onRequestStart() sets request variables to bar.cfc so application.cfc globally plays fine with the webservice cfcs. Well... except for error handling
    I found that if exception occurs in application.cfc it is actually caught by onError().
    But if exception occurs in webservice cfcs then it is not caught by onError() and a ugly SOAP error is sent to consumer instead.
    Here are my application.cfc and bar.cfc webservice components. They are pretty simple so I don't see why onError() is not fired:
    <cfcomponent displayname="Application" output="false">
        <cfscript>
            this.Name                = "foo";
            this.applicationTimeOut    = CreateTimeSpan(0,1,0,0);
            this.sessionManagement    = false;
            this.setClientCookies    = false;
            this.clientManagement    = false;
            this.scriptProtect        = "all";
        </cfscript>
        <cffunction name="onApplicationStart" access="public" output="false">
            <cfset application.foo= "foo" />
        </cffunction>
        <cffunction name="onRequestStart" access="public" output="true">
            <cfargument name="targetPage" type="string" required="true" />
        </cffunction>
        <cffunction name="onError" access="public" returnType="void" output="true">
            <cfargument name="Exception" required="true" />
            <cfargument name="EventName" type="string" required="true" />
            <cfmail from="toto" to="[email protected]" subject="error">
                error
            </cfmail>
        </cffunction>
    </cfcomponent>
    <cfcomponent displayname="bar">
        <cffunction name="test" access="remote" returntype="cpTest" output="false">
         <!--- Throws an exception as b does not exist. This must be caught by onError() but it is not --->                   
         <cfset a = b />
         </cffunction>
    </cfcomponent>
    Any clue?
    -Salvo

  • Partner Link https (SSL) wsdl url

    I'm getting an error in the "Create Partner Link" dialogue when specifying an https-based wsdl url. The non-ssl wsdl url works fine, but I need it to work for ssl (https). The specific errror reads:
    Error:Failed to read wsdl file at "https://serverstuff/webservice.cfc?wsdl", caused by: javax.net.ssl.SSLHandshakeException. :sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    What do I need to do to get the https wsdl to validate? I'm using jDev 10.1.3.2. When I deploy the BPEL, will I need to do anything on the app server? I've seen a lot of similar questions on this forum with no definitive answers. Also, the BPEL dev guide does not address SSL.

    Hi dharmendra,
    Yeah I copied server certificate into the relevant folders. Do i copy the .cer file into that folder or place it another folder and copy the same to <ORACLE_SOA_HOME>/jdk/jre/lib/security folder?
    My Jdev_JRE_HOME and ORACLE_SOA_HOME are pointing to the same jdk.
    What do you mean by by importing the certificate to Oracle BPEL and Jdeveloper? Is it importing into 'cacert'? Yeah I did that too.
    Actually in the blog the step for generating the SSL based axis webservice is just not quite informative,since following the steps I am not able to actually properly generate axis 2 SSL enabled webservice.That's Y i couldn't generate the server certificate properly. Can you give some more detailed steps for generating the SSL service?
    Thanks.

  • Pdfs, cfcs and webservices

    Hopefully someone can help me with this so I figure out what
    I'm doing
    wrong.
    I have a cfc that is using cffile to grab pdfs, avis, mpegs,
    etc. and
    returning it to the user. For some reason can't get it
    through to the user.
    On the "invoking page" I'm using cfheader and cfcontent to
    try and send the
    file as an attachment to the user, but it won't work. If I
    cfdump the
    variable I get data, but I'm never prompted to open/save the
    file. Using
    regular cfm pages I have no problems. I have tried read,
    readbinary,
    toBinary with no luck.
    Also I need this function to accessible as a webservice and
    trying that
    keeps returning an error about an invalid wsdl file and
    couldn't create
    stubs, but calling it from the same site results in the issue
    above but no
    wsdl error.
    CFC Code
    <cffunction name="getFile" access="remote"
    displayname="Get File" hint="I
    get a file based on the passed id.">
    <cfargument name="docID" type="string" required="yes">
    <cfset var doc = '' />
    <cfset var filePath = expandPath('../Web_Support_Doc/')
    & arguments.docID
    />
    <cffile action="readbinary" file="#filePath#"
    variable="doc" />
    <cfreturn doc>
    </cffunction>
    Invocation Code
    <cfsilent>
    <cfset docFile =
    createObject('component','_cfcs.file').getFile('1255KITG.pdf')
    />
    </cfsilent>
    <cfheader name="Content-Disposition" value="attachment;
    filename=1255KITG.pdf">
    <cfcontent type="application/unknown" file="#docFile#">
    Web Service invocation code
    <cfset docFile =
    createObject('webservice','
    http://innet/_cfcs/file.cfc?method=getFile&docID=#url.docID#')
    />
    I'm using the same cfheader/cfcontent code from above to send
    to user.
    Any help would be greatly appreciated.
    Bryan Ashcraft (remove brain to reply)
    Web Application Developer
    Wright Medical Technologies, Inc.
    Macromedia Certified Dreamweaver Developer
    Adobe Community Expert (DW) ::
    http://www.adobe.com/communities/experts/

    Nevermind had a Acrobat Reader install acting up for some
    reason. Reinstall
    seems to have fixed it.
    Thanks Again for all the help Ian!
    Bryan Ashcraft (remove brain to reply)
    Web Application Developer
    Wright Medical Technologies, Inc.
    Macromedia Certified Dreamweaver Developer
    Adobe Community Expert (DW) ::
    http://www.adobe.com/communities/experts/
    "Bash **AdobeCommunityExpert**"
    <[email protected]> wrote in message
    news:[email protected]...
    > Apparently this is an IE issue as it works fine FF.
    >
    > --
    > Bryan Ashcraft (remove brain to reply)
    > Web Application Developer
    > Wright Medical Technologies, Inc.
    >
    > Macromedia Certified Dreamweaver Developer
    > Adobe Community Expert (DW) ::
    http://www.adobe.com/communities/experts/
    >
    >
    > "Bash **AdobeCommunityExpert**"
    <[email protected]> wrote in message
    > news:[email protected]...
    >> Apparently these servers just don't like me. I get
    the binary data dumped
    >> on the page using your method.
    >>
    >> Basically I get a lot of this stuff:
    >>
    >> %PDF-1.2 %?? 12 0 obj << /Length 13 0 R
    /Filter /FlateDecode >> stream
    >> H?????????%=??6$Y`'??`gl??? ???\V????
    >> TF??=O??2#fS??(?X?o??1#???&k????z?@v
    >> ?'?8??5`qo!.?=??7???+????????Rf??
    >> ????h?????�f?w??L!????????2{WwU??
    \??fkB???]???!????? iw??]???Cg?
    >> ?? sf???;?P???0????~Ig3h??
    >>
    >> --
    >> Bryan Ashcraft (remove brain to reply)
    >> Web Application Developer
    >> Wright Medical Technologies, Inc.
    >>
    >> Macromedia Certified Dreamweaver Developer
    >> Adobe Community Expert (DW) ::
    http://www.adobe.com/communities/experts/
    >>
    >>
    >> "Ian Skinner" <[email protected]>
    wrote in message
    >> news:[email protected]...
    >>> Well if one tries hard enough one can do most
    anything. The following
    >>> code is serving up PDF files from a web service!
    For some reason, I
    >>> could not get this to work by sending the data
    directly to the client
    >>> with the cfcontent tag, but by writing the data
    to a temp file and then
    >>> sending that file to the client with cfcontent
    worked.
    >>>
    >>> Hopefully you can build on this to solve your
    problem.
    >>>
    >>> fileServing.cfm
    >>> ---------------
    >>> <cfset myFile="test.pdf">
    >>>
    >>> <cfheader name="Content-Type" value="pdf">
    >>> <cfheader name="Content-Disposition"
    value="attachment;
    >>> filename=#Myfile#">
    >>>
    >>> <cfset testObj = createObject("webservice",
    >>> "
    http://playground/probono/fileServing.cfc?wsdl")>
    >>>
    >>> <cffile action="write"
    file="g:\playground\probono\tempServe.pdf"
    >>>
    output="#BinaryDecode(testObj.serveFile(myFile),'Base64')#"
    >>> addnewline="No" >
    >>>
    >>> <cfcontent type="application/pdf"
    >>> file="g:\playground\probono\tempServe.pdf"
    reset="no">
    >>>
    >>>
    >>> fileServing.cfc
    >>> ---------------
    >>> <cfcomponent>
    >>> <cffunction name="serveFile" access="remote"
    returntype="string">
    >>> <cfargument name="fileToServe" required="yes"
    type="string">
    >>>
    >>> <cfset var fileObj = "">
    >>> <cfset var returnVar = "">
    >>> <cfset var file = "">
    >>>
    >>> <cffile action="readBinary"
    >>>
    file="g:\playground\probono\#arguments.fileToServe#"
    variable="fileObj">
    >>> <cfset returnVar =
    binaryEncode(fileObj,"Base64")>
    >>>
    >>> <cfreturn returnVar>
    >>> </cffunction>
    >>> </cfcomponent>
    >>
    >>
    >
    >

  • Send Array to CFC Webservice ?

    Hi, want to be able to send my coldfusion webservice an array
    that I have in flex. Kinda like a shopping cart.
    I have the array working in Flex, add remove so forth.....
    but i cant figure out how to take this data and get it to the
    server.
    Hopefully I dont needs FDS for this. Any help would be
    greatly appreciated.
    Stephan
    onTapMedia

    Hi ericbelair,
    This error occurs because of anyType. I have tested this, you need to change widgets type to 'xml' and soap request should be like this:
    <Widgets>
       <item xsi:type="xsd:anyType">
         <item>
          <NameTxt>Available Cash</NameTxt>
          <WidgetIdNmb>3</WidgetIdNmb>
         </item>
       </item>
      </Widgets>
    OR you can change widgets type to 'struct' then your soap request should be like this:
    <Widgets xsi:type="x-:Map" xmlns:x-="http://xml.apache.org/xml-soap">
                <!--Zero or more repetitions:-->
                <item xsi:type="x-:mapItem">
    <![CDATA[
                   <item>
          <NameTxt>Available Cash</NameTxt>
          <WidgetIdNmb>3</WidgetIdNmb>
         </item>
    ]]>
                </item>
             </Widgets>
    ericbelair if you are just making soap request then better you can just think either Widgets can be xml OR struct and can format your request accordingly.
    Please check and let me know if you want anything.

  • WebService Wierdness

    I have a WebService instance created via ActionScript. If I
    call an operation on the WebService immediately after the WSDL is
    loaded the operation will fail with the error "not
    resolvable...WSDL.BadElement. However if I put a delay of 100
    milliseconds in, the operation will succeed. Any suggestions? See
    the code below:
    public function newService():void
    this._service = new mx.rpc.soap.WebService();
    this._service.useProxy = false;
    this._service.wsdl = kWSDLUrl;
    this._service.addEventListener(LoadEvent.LOAD,
    onWsdlLoaded);
    this._service.addEventListener(FaultEvent.FAULT, onFault);
    this._service.loadWSDL();
    public function onWsdlLoaded(event:LoadEvent):void
    var service:WebService = this._service;
    function _delay():void
    service.doSomething();
    // This will fail
    service.doSomething();
    // However this will succeed
    setTimeout(_delay, 100);
    public function onFault(event:FaultEvent):void
    if(null != event.fault) Alert.show(event.fault.message);

    Timing issues are pretty common when working with the Flash
    Player. the "callLater()" function is often a better solution that
    setInterval or timer.
    I would not have expected such a problem with your code, but
    what do I know? maybe someone else will be more help.
    Tracy

  • ResultFormat="object" in webservice. Flawed or is it me??

    <mx:WebService id="getListTargs"
    wsdl="myurl/dropper.cfc?wsdl" useProxy="false">
    <mx:operation result="testRet();" name="dropRanges"
    fault="Alert.show(event.fault.message)" resultFormat="object"/>
    </mx:WebService>
    When I get the XML back from that webservice it comes back as
    a string and not an object. Is something wierd with resultFormat or
    do I have to do some kind of conversion to get it into an
    object????

    The code below is working to populate a class with the values
    returned from a web service, ofcourse you have to create the class
    and create the callback function but I believe you have to create
    the class even with the full blown FDS Java implementation so it's
    a trivial task.
    This code is all AS, as I personally dont like using the
    tags.
    These are two load functions in a custom ArrayCollection, so
    ignore the this. calls as they are just calling super class
    functions.
    public function LoadAllModules():void
    var ws:WebServices = WebServices.Instance;
    var op:AbstractOperation =
    ws.Service.getOperation("GetAllModules");
    op.addEventListener("fault", ws.Fault_Callback);
    op.addEventListener("result", this.LoadAllModules_Callback);
    op.send();
    private function
    LoadAllModules_Callback(result:ResultEvent):void
    this.disableAutoUpdate();
    for (var s:String in result.result)
    var m:MyClass = new MyClass();
    m.ModuleID = result.result[s].ModuleID;
    m.Name = result.result[s].Name;
    m.BaseName = result.result[s].BaseName;
    m.AssemblyName = result.result[s].AssemblyName;
    m.AssemblyNamespace = result.result[s].AssemblyNamespace;
    m.Active = result.result[s].Active;
    m.RemoteFiles = result.result[s].RemoteFiles;
    this.Add(m);
    this.itemUpdated(m);
    this.enableAutoUpdate();
    }

  • Consuming a webservice - 2

    Ok - so through the whole thread of the original post out the
    window.
    As it turns out Crystaltech does not allow you to call the
    cfc directly
    from their server. It MUST be invoked from another file.
    Which is why
    the error when browsing
    http://www.femsa.org/cfc/getMembers.cfc.
    Ok so that is odd - maybe secure -dunno.
    So now I have mad the cfc as simple as possible and I have
    confirmed
    that you can invoke it from the same server, another server
    in their
    network, and in fact a server outside their network.
    Now to the troubles at hand..........
    The cfc contains the following code - EXACTLY
    <cfcomponent hint="Returns minimal member data for
    consumption">
    <cffunction name="members" access="remote"
    returntype="string">
    <cfreturn "DevNet is great!">
    </cffunction>
    <cffunction name="firstws" access="remote"
    returntype="string">
    <cfreturn "DevNet is great!">
    </cffunction>
    </cfcomponent>
    If I call the cfc using the firstws function - the results
    are expected
    - yahoo it works..
    <cfinvoke webservice="
    http://www.femsa.org/cfc/getMembers.cfc?wsdl"
    method="firstws"
    returnvariable="returnedText">
    <cfoutput>
    #variables.returnedText#
    </cfoutput>
    HOWEVER - If I call the members function - it spits up at me.
    <cfinvoke webservice="
    http://www.femsa.org/cfc/getMembers.cfc?wsdl"
    method="members"
    returnvariable="returnedText">
    <cfoutput>
    #variables.returnedText#
    </cfoutput>
    Spit up =
    Web service operation "members" with parameters {} could not
    be found.
    The error occurred in
    C:\Domains\echowebs.com\wwwroot\gac\consumefemsa.cfm: line 2
    1 : <cfinvoke webservice="
    http://www.femsa.org/cfc/getMembers.cfc?wsdl"
    2 : method="members"
    3 : returnvariable="returnedText">
    4 :
    Any idea why the EXACT same function - differing only in name
    - would
    work one way but not the other? In order to rule out an
    application
    issue, there is a new application.cfm file in the cfc folder
    with the
    simple contents of <cfset mebe=""> - nothing else.
    HELP!
    Chris Luksha
    Echo Web Services
    Making Your Website Resound
    603-831-0099
    http://www.echowebservices.com/
    CAN-SPAM Compliant Email Newsletters - only $.05 per
    Subscriber
    http://www.echowebservices.com/email

    Hi,
    As reply to his blog DuraiRaj Athavan Raja has provided the following information.Thank you Raja.
    http_client->receive - Communication failure obtained
    2006-07-18 22:29:04 Durairaj Athavan Raja [Reply]
    do you connect to internet via proxy? if yes you have to either code proxy authentication or simply maintain it in transaction SICF.
    go to
    SICF->client->proxy settings
    go to http_log tab
    host name: proxyhost.domain.com
    port: <portno>
    user - > proxy user id
    pwd -> proxy pwd and save it .
    and this setting is per client , so you have to do that for all clients.
    Regards
    Raja
    I am working on getting the proxy settings completed and will update the post when i am through with all the findings.

  • 401 Unauthorized error when calling a webservice

    Have ColdFusion 11 installed, I have created a hello web service and I am trying to call it.  Each time I try to call the web service I get an error 401 Unauthorized.  I am not sure if I need to configure something more on the ColdFusion server, IIS or something else.
    <cfcomponent displayname="Hello">
    <cffunction name="helloWorld" returntype="string" access="remote">
         <cfreturn "Hello World!">
        </cffunction>
    </cfcomponent>
    <cfinvoke
      webservice="http://MyServer/Hello.cfc?wsdl"
      method="helloWorld"
      returnvariable="ws" refreshwsdl="yes">
    </cfinvoke>
    <cfdump var="#ws#">

    It appears that you have inadvertently enforced HTTP authentication. If so, you will have to include the attributes, username="your_username" and password="your_password" in the cfinvoke tag.

  • How  to get soap request in webservices (WSDL in java)

    hi ,,
    i did one helloworld app using soap protocol. In that , one soap client invokes the webservices(old java class with WSDL ).Now i want to get the soap document in the web service for to process the soap envelope and parsing and generating the o/p and append to the response then create the soap document for response. plz let me know how to do?
    Thanks in advance.

    Let me see whether I understand. Are you attempting to achieve something like this:
    test.cfc
    <cfcomponent output="no">
    <cffunction name="testFunction" returntype="any" access="remote">
    <cfargument name="soapInput">
    <cfset var inputXML = arguments.soapInput>
    <cfset var soapBodyText="">
    <cfset var noBodyTextError="">
    <cftry>
        <cfset soapBodyText = xmlSearch(inputXML,"//soapenv:Body/text()")[1].xmlValue>
        <cfsavecontent variable="noBodyTextError"><?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>soapenv:Server.userException</faultcode> <faultstring>java.lang.Exception: Body not found.</faultstring></cfsavecontent>
        <cfif trim(soapBodyText) is "">
        <cfthrow>
        </cfif>
        <cfreturn inputXML>
    <cfcatch type="any">
    <cfreturn noBodyTextError>
    </cfcatch>
    </cftry>
    </cffunction>
    </cfcomponent>
    tester.cfm
    <cfxml variable="mydata">
            <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wor="https://www.worldmilesafrica.com">
       <soapenv:Header/>
       <soapenv:Body>
       </soapenv:Body>
    </soapenv:Envelope>
    </cfxml>
    <cfinvoke webservice = "http://127.0.0.1:8500/workspace/wsTest/test.cfc?wsdl"
              method = "testFunction"
               returnVariable = "result">
           <cfinvokeargument name="soapInput" value="#trim(mydata)#" >
    </cfinvoke>
    <cfdump var="#result#">

Maybe you are looking for

  • [Solved]Glassfish's updatetool

    Hello, I can't run updatetool, because I am missing some 32 bit libraries, but IDK what libraries I'm exactly missing. Could anyone help? [cybuch@MedeiS bin]$ sh updatetool WX import error. Verify the WX widgets are in the PYTHONPATH. The following c

  • Setting Cursor position

    Pls help me for the following query: how to set cursor position at the beginning of text field(JTextField) after setting text inside it.

  • UCM 11.1.1.4 installer required

    UCM 11.1.1.4 installer is not available on oracle links. Can anyone tell me from where can i download this version. Thanks Regards, V.I.D Team Edited by: VID on Mar 29, 2012 5:22 AM

  • Design Question (Database Polling)

    Hi, I need to write a program that will basically look for any records being added in a Database table e.g. Requests. If there are any records picks them up one by one and calls a Web Service gets a response and inserts in some other table e.g Respon

  • Retrieving and removing Messages and Activities

    Hi, In our project we would like to create alerts and simple workflow. We would like to base our implementation on the existing B1 infrustructure. For that we need to manipulate messages and activities (i.e. contacts). Alas I did not find for SAPbobs