Web Service Question

I am hoping there is a simple fix for this. I created a web
service that I
can get to work fine with a cfinvoke:
<cfinvoke
webservice =
http://realitorToolBox/model/webservices/PropertySearch.cfc?wsdl"
method = "getCities"
refreshwsdl="true"
returnVariable = "listCities">
But when I switch to a function and use createObject:
<cffunction name="allCities" access="public"
returntype="query" output="no"
hint="I display all Cities for the home page search
engine">
<cfset CityGateway = createObject("webservice",
http://realitorToolBox/model/webservices/PropertySearch.cfc?wsdl")>
<cfset allCities = CityGateway.getCities()>
<cfreturn allCities>
</cffunction>
I get this error:
Web service operation getCities with parameters {} cannot be
found.
Any ideas why?
Here is the web function
<cffunction name="getCities" access="remote"
returntype="query"
output="false" hint="I return all the cities in the database
to search">
<cfquery name="listCities" datasource="datasource">
Select DISTINCT(City) FROM residential
ORDER BY City ASC
</cfquery>
<cfreturn listCities>
</cffunction>

Nevermind. I added the createObject to the controller and it
worked fine
instead of pointing it to another function.

Similar Messages

  • PL/SQL web service: question about stub

    hello,
    I'm currently learning how to work with PL/SQL Web Services.
    I have a question about stubs. The point is, I can deploy a web service to the OC4J server and it works. It also works when I create a stub following the WSDL I made with creating the PL/SQL web service. If I go to the endpoint in my webbrowser, the functionality is the same, with or without using a stub.
    My question is: what is the function of the stub?

    A stub is leveraged by a client application to communicate with a corresponding server side object (in this case, the web service implementation). If you think back to CORBA or RMI applications they follow a similar pattern.
    In the case of a web service you would use the stub to write a client application that could invoke the methods of the remote service and return the responses as java data types. The methods the stub class offers are the same as the methods of the web service interface. It's a common way for providing RPC like functionality.

  • Query as a web service question

    I have a QAAWS problem. BO XI 3.1, Xcelsius 2008 version 5.2.1.0
    I need to send 5 product names (user can select 1 to 5 products from a list) and display corresponding market share values I obtain from QAAWS.
    Created a query with Product names as prompt, returning market share. In prompt options, I selected
    "Prompt with list of values" and "Optional Prompt".
    in Xcelsius, when I created the connection, I select 5 columns as input from prompt (my product names). I selected the column from Input values, "Read From" and gave 5 columns in sequence.
    the problem:
    However, when I execute the query, I get only the market share of the first product returned.
    I know that QAAWS can take multiple prompt  from different columns. Is this because of Universe settings? or my option settings are in correct?
    Any help will be highly appreciated.
    Edited by: GopNair on Nov 11, 2009 8:26 PM

    Hi,
    I had the exact same issue.
    What you have to do is the following:
    In the Input Value section you have to select your Prompt from your query as a web service, then click the + sign - this will add multiple rows for your prompt - each of these row can then be pointed to each of your 5 colums/filter values individually. This will work.
    I asked almost the same question her:
    Query as a Web Service and In List
    Hth.,
    Jacob

  • A Web Service Question

    Hi everyone. I'm creating a WS using ADF, but I'm wondering if, despite what the documentation says about parameters, if is possible create a custom method in the AppModule that expect as parameter a custom class and return also a custom class???. It's there any simple or not way for do that or just can't be done?
    Using POJO can be solved the issue, but wont have all the facilities that offer ADF to make a WS.
    for example:
    public MyCustomClass methodName(){
    // Code
    Or
    public void methodName(MyCustomClass){
    //Code
    Regards and please advice me
    Dariel

    Hi,
    I had the exact same issue.
    What you have to do is the following:
    In the Input Value section you have to select your Prompt from your query as a web service, then click the + sign - this will add multiple rows for your prompt - each of these row can then be pointed to each of your 5 colums/filter values individually. This will work.
    I asked almost the same question her:
    Query as a Web Service and In List
    Hth.,
    Jacob

  • XML Web Service Question

    Hello, I have been asked to research a way to export data from the SAP BW into a remote application. I know nothing about SAP and I have a few questions. We would like to take data from SAP BW and put it in an XML file. Then we would like to automatically invoke a remote web service which will parse the data into the other applications database.
    My first questions is can SAP BW export some of its selected data into an XML file? If so how is this done (what tools, components, applications, etc. are necessary) and what is the level of complexity?
    My second question is can a remote web service be invoked automatically form the SAP BW and can the previously mentioned XML file be sent out to the web service for parsing and loading? If so how is this done (what tools, components, applications, etc. are necessary)and what is the level of complexity?
    Any help you can provide would be very much appreciated.
    Thanks in advance!
    Brett Lewinski

    This can be done in BW.
    Try the links given below, also there is a How to document available from SAP on this.
    http://help.sap.com/saphelp_bw33/helpdata/en/9f/9b8f3c855f0454e10000000a11405a/content.htm
    http://www.sapteched.com/presentations/session.asp?sid=140
    Thanks.

  • Siebel outbound web service  question

    I'm writing a customized 'SendMailing' outbound web service. I have tested my web service with stand alone client, and now I want to integrate it with siebel. My step is:
    1 configure the SendMailingService in Administration -> web services -> outbound web services, in Service Ports panel I set the Address of the 'SendMailing' to my Web service endpoint, such as http://myhost/Siebel/SendMailing?WSDL
    2 configure the Email Marketing Server (in 'Administration -> marketing ->servers), set 'SendMailing' (outbound web service port) to 'Email sending daemon(ESD)', and other parameters such as from address.
    3 create an email treatment which use the configured email marketing server as the delivery profile.
    4 create a campaign with the created treatment and assign a list to the campaign.
    5 load the campaign
    6 launch the campaign.
    after the 6th step is done, nothing happens - no error message, no logs found, the campaign status still remains 'in planning'.
    some other clues:
    1 when I do the 'test email' for the email treatment, the following error log is found:
    ObjMgrLog Error 1 000009ec4bf10fc5:0 2010-05-25 08:16:35 (httptransport.cpp (1631)) SBL-EAI-04117: HTTP Request error during 'Submitting Data SendHTTP request': 'Status code - 500'
    ObjMgrLog Error 1 000009ec4bf10fc5:0 2010-05-25 08:16:35 (httptransport.cpp (981)) SBL-EAI-04117: HTTP Request error during 'Submitting Data Send HTTP request': 'Status code - 500'
    ObjMgrLog Error 1 000009ec4bf10fc5:0 2010-05-25 08:16:35 (soapbinding.cpp (564)) SBL-EAI-04304: Unknown Part 'http://www.bea.com/servers/wls70/webservice/fault/1.0.0:stacktrace' for operation 'createMailing' exists in SOAP message.
    ObjMgrBusServiceLog Error 1 000009ec4bf10fc5:0 2010-05-25 08:16:35 (outdisp.cpp (209)) SBL-EAI-04308: Operation 'createMailing' of Web Service 'urn:xml-send-mailing.SendMailingService' at port 'SendMailing' failed with the following explanation: "[Server CodecHandler] Failed to decode
    -> Unable to find xml element for parameter: options
    I guess siebel does try to invoke the outbound web service for the 'test email', but it seems do nothing for regular campaign launch.
    Did I miss anything? please help! thanks in advance!

    I have known the reason of the error logs: the soap message sent by siebel lacks 2 parameters. The 2 parameters should be contained in the soap message with a value of null or empty if they are really empty, but the siebel removes these 2 parameters from the soap message. So the soap stack of my client refused the soap request. I think this should be a siebel bug.
    Now my question becomes why I can't launch a campaign? I followed the steps of 'create offer' -> create campaign -> associate the offer with campaign -> assign a list->allocate a list->load campaign -> launch campaign. but the campaign just keeps 'In planning'.
    Did I miss anything? Or where can I find some clues? such as logs...

  • Web service question [qualitative]

    .....The cross-platform nature of Java facilitates distributed applications running on multiple hardware and operating system platforms. If all of the components of a distributed application are written in Java, then using EJBs with Java RMI is a good choice. However, web services are a great choice for integrating applications that are written in various languages, because most major platforms have support for SOAP, which is the protocol used in web services for passing object data from one application to another. This enables, for example, an application developed in Java to use the web service operations of an application developed in Perl......
    the last statement "This enables, for example, an application developed in Java to use the web service operations of an application developed in Perl".
    i have a question on this last statement.
    does it mean perl professionals can also make web service ? but using what ?
    For example, java professional can make web service using soap.jar and the server APACHE AXIS.
    How perl professional can make their web service(is it possible at all ? but it seems they can do also from the above statement) ? can they use soap.jar ? can they use APACHE AXIS server ? umm....i dont know.
    same question for also .NET people.
    the question is basically whether web service developement is exclusive for only java professionals or not ?
    because when i see any web service tutorial i get to see APACHE AXIS, java,soap etc ......so , i started thinking that java poeple can only develope web service......... .NET,PERL people can not make it. if they really can make it whats the server do they use ?
    thanks

    you can implement web services in any language, has nothing to do with java, just google 'webservices' and 'perl'
    Iggy

  • How to send JSON data in HTTPService to PHP web service question

    I'm using Flex 4 and a mx:HTTPService to send a JSON request to a php web service. I'm not sure if I'm sending the request correctly. Could someone look at the code below to see what I'm doing wrong?
    thanks
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   width="100%" height="100%">
        <fx:Declarations>
            <mx:HTTPService id="service" url="https://my web service url/"
                            method="POST" resultFormat="text" result="onResult(event)" fault="onFault(event)">
            </mx:HTTPService>
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import com.adobe.serialization.json.JSON;
                import mx.collections.ArrayCollection;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.utils.Base64Encoder;
                [Bindable]private var username:String = "[email protected]";
                [Bindable]private var password:String = "the password";
                [Bindable]private var accountNumber:String = "49055";
                [Bindable]private var anticipatedDeliveryDate:Number = 20101115;
                [Bindable]private var purchaseOrder:String = "#123 for retailer";
                [Bindable]private var detailRecords:Array = new Array();
                [Bindable]private var key:String = "abc123";
                private function populateService():void {
                    populateProducts();   
                    setRequestHeader();
                    setRequestData();
                    service.send();   
                private function setRequestHeader():void {
                    var encoder:Base64Encoder = new Base64Encoder();
                    encoder.insertNewLines = false;
                    encoder.encode(key);               
                    service.headers["Authorization"] = "VIP " + key;
                    service.headers["Content-Type"] = "application/json";
                private function setRequestData():void {
                    service.request.username = username;
                    service.request.password = password;
                    service.request.accountNumber = accountNumber;
                    service.request.anticipatedDeliveryDate = anticipatedDeliveryDate;
                    service.request.purchaseOrder = purchaseOrder;
                    service.request.detailRecords = detailRecords;
                    // caching test
                    var rnd : Number = Math.round(Math.random()*1000);
                    service.request.cacheOff = rnd;
                private function populateProducts():void {
                    var prod1:Object = new Object();
                    prod1.itemCodeOrUPC = "00241";
                    prod1.itemDescription = "Budweiser Keg 1/2 BBL";
                    prod1.quantityOrdered = 2;
                    prod1.orderUOM = "Keg";
                    var prod2:Object = new Object();
                    prod2.itemCodeOrUPC = "00219";
                    prod2.itemDescription = "Budweiser 24/12 OZ CAN";
                    prod2.quantityOrdered = 4;
                    prod2.orderUOM = "Case";
                    detailRecords.push(prod1);
                    detailRecords.push(prod2);
                private function onResult(event:ResultEvent):void
                    var json:Object = JSON.decode(event.result as String);
                private function onFault(event:FaultEvent):void
                    trace("Fault: " + event.fault.faultString);
            ]]>
        </fx:Script>
        <mx:Panel width="95%" height="100%" color="#000000">
            <mx:HBox width="100%">
                <mx:Button label="Submit" click="{populateService()}"/>
            </mx:HBox>   
        </mx:Panel>
    </s:Application>

    Have you think abut using ActionScript in your Flex application? Or, you can write javascript to be proxy between your flash app and backend PHP web service?
    Also, it seems that you will allow every customer's flash player to have a copy of secret code. I think it is dangerous design because an flv file can be easity decompiled. Therefore, you secret code can be found if it is not input by your end user and it is populated on your serverside script.

  • Follow up to web services question:  How do I expose java components as web services on iPlanet 6.0 app server?

    My task - my company has several legacy PowerBuilder applications that access a variety of Sybase and MS SQL databases. Rather than re-inventing the wheel by re-writing these applications in Java, we would like to enable these applications to call java components (EJBs) that will provide new functionality. I would need a piece of software called CSXtend (from www.cynergysystems.com) to allow PowerBuilder to call a web service. However, I am not sure how to expose my business functions (EJBs) as web services on the iPlanet 6.0 App server. Thanks for all previous responses! Any additional info would be greatly appreciated! Mike

    I have used Glue (http://www.themindelectric.com/products/glue/glue.html) to expose some of our stuff as Web Services. I recently found this on serverside. It's pretty good.
    http://www.theserverside.com/resources/article.jsp?l=Systinet-web-services-part-1
    I believe that the middleware they use can be plugged into IPlanet. There is also an article in the knowledge base on the IPlanet site.
    Jon

  • 9.0.3 two web services questions

    OK, I'm trying to get web services to work and having two problems.
    The (hopefully) simple one: I want to install a web service on the local OC4J, and I can't seem to get the connection to work. Getting connection refused. Not sure why. Didn't see any problems like this with 9.0.2, but we mostly installed them on 9iAS.
    The more complex one: I started working with a PLSQL web service. While I can't execute it yet (see above), I can create one with a simple return type. For example, something like f_seq_to_name (i_seq in number) return varchar2. And the stub is pretty easy.
    But if I want to return a rowtype, for example
    f_seq_to_row (i_seq in number) return facility_table%rowtype,
    the routine is grayed out because JDev decides there is an out parameter of type "null". I could explicitly include each individual parameter, but that seems like a waste of developer effort. And this happens for both rowtypes and ref cursors, so it will be pretty hard to move any significant amount of data. So am I missing something, or is this a bug? If it's a bug, will it be fixed in 9.0.3 production?
    Of course, I can go over to BC4J and try this there with view objects. But I'm looking to see which of the tools are usable.
    -- jim

    Here is some pointers that might help:
    1. A PL/SQL Web Services Tutorial using Oracle9i JDeveloper 9.0.3 including the setup necessary to configure OC4J. As you will see you don't have to actually create a SOAP connection in JDev; for PL/SQL you simply need to have an app server connection as per the writeup. See:
    http://otn.oracle.com/tech/webservices/htdocs/series/plsql/content.html
    2. To see what data types are supported for PL/SQL take a look at:
    http://otn.oracle.com/docs/products/ias/doc_library/90200doc_otn/web.902/a95453/plsqlservices.htm#1030045
    ROWTYPE and REFCURSOR are not supported. This does not appear to change between 9.0.3 preview and 9.0.3 production. There are some other approaches to consider, though your milage may vary. For example, VARRAYS and abstract datatypes are supported - you can see the ADT support in the above tutorial and try VARRAYs by tweaking it to return an array of employees rather than a single employee.
    Hope this gets you going.
    Mike.

  • PI Web Service Question

    Hi,
    I'm currently working on a project that requires using Web Services to communicate with PI. I was able to import the web service, and tried running to run the app. However, I ran into this error message when the WS executed:
    "Exception on execution of web service with WSDL URL ... with operation ... in interface '...?
    The message is too generic, and am not sure if the Web Service has the problem or my coding has the problem.
    Did anyone encounter this as well? Would appreciate an input or two for this one.
    Thanks!

    Hi Manoj,
    Thanks for your reply.
    Mmm... I tried to modify some of my code a bit, and now it is returning this error:
    com.sap.tc.webdynpro.progmodel.context.ContextException: Node(GPWAppComp.Request_SI_OS_RetrieveListOfMappingRules): cannot fill a ModelNode automatically. Change the cardinality or use a supply function.
    Are you familiar with this error?
    Thanks again!

  • JDeveloper 10g 10.1.3 Web Service Question: java web service calls another

    I am looking for what I think should be a simple example/tutorial but so far no luck. I am using JDeveloper 10g 10.1.3 and the Oracle Application Server.
    I want to do this:
    - create a simple Java web service
    - deploy it
    - create another simple Java web service, that makes a call to a method on the first service
    - deploy it
    client->WSfront->WSback
    I want to keep this as basic as possible.
    Although I have found examples of how to create a web service proxy, there are no examples that I have found that show how to use that proxy in another web service:
    I did what I thought were the right things; generated a proxy for the first web service, and used that proxy in the second web service's source Java class. However when I deployed and tested many classes were missing: all the classes the proxy class depends on.
    I actually managed to get something like this working but had to manually create the .ear and .war files for WSfront, explode the archives, and manually add the missing classes to its WEB-INF/classes.
    I am comparing this to things like Weblogic Workshop in which doing this exercise is a snap.
    Is there a simple graphical way to do this in JDeveloper?

    Hello again,
    I am quite surprised I got no responses to my query below.
    Can anyone explain how I might do this?
    Please feel free to respond to [email protected]
    I am looking for what I think should be a simple
    example/tutorial but so far no luck. I am using
    JDeveloper 10g 10.1.3 and the Oracle Application
    Server.
    want to do this:
    create a simple Java web service
    deploy it
    create another simple Java web service, that makes a
    call to a method on the first service
    deploy it
    client->WSfront->WSback
    want to keep this as basic as possible.
    lthough I have found examples of how to create a web
    service proxy, there are no examples that I have
    found that show how to use that proxy in another web
    service:
    I did what I thought were the right things; generated
    a proxy for the first web service, and used that
    proxy in the second web service's source Java class.
    However when I deployed and tested many classes were
    missing: all the classes the proxy class depends
    on.
    I actually managed to get something like this working
    but had to manually create the .ear and .war files
    for WSfront, explode the archives, and manually add
    the missing classes to its WEB-INF/classes.

  • Web services question

    Hi!
    I am a bit confused about using web services with custom classes.
    I read it's a bad idea to use for example ResultSet as return type for a web service since non-java client implementations would not work and that the correct way is to create a Bean with setter and getter methods. Why is that? I thought that a good web services stack implementation (like Axis) would for example decompose the service in primitive datatypes thus allowing to use whatever class I wanted as a return type...
    Thx,
    A.

    You are correct.
    What is confusing is that the OEM deployment option combines the deployment of the Web services ear file with the registration in the UDDI registry. So, if you haven't installed the infrastructure database with its UDDI Registry the OEM console deployment will not work due to this coupling.
    However, you still can deploy your Web service, and in fact, you can deploy it independent of the UDDI Registry and then, later register in the UDDI registry too. Here's how:
    1. Rather than using OEM to deploy the Web service ear file, use DCMCTL, e.g.
    dcmctl deployApplication -file <your ear file>.ear -a <your ear file app name>
    If your Web service is built on top of an EJB, OEM will happily deploy that before you do the
    associated Web service ear file.
    2. The UDDI Registry once installed also has a standalone JSP user interface independent of OEM that lets you inquire and publish to it. In fact, OTN will soon be having a live UDDI registry using this UI in a number of weeks.
    Finally, for those not using Oracle9iAS but OC4J stand-alone, the standard:
    java -jar admin.jar ormi://127.0.0.1:23791 <admin account> <password> -deploy ...
    commands work fine for Web service ear files.
    Mike.

  • Java - rest web services question.

    Hi all,
    I am new to SOAP and Rest based web services.
    In my current standalone application, the request and response payload of a query are in the form of a xml document. This application needs to be accessed by several applications that are written in diffrent programming languages(.net, python etc).
    Thus I want my application to be exposed as a web service. Some web services need to be SOAP based and others need not be.
    I understand that I need to follow the below steps to make Rest based web service :
    1a) I would expose my application interface description and business methods as URIs in a html/xml document.
    1b) If client wants to retrieve data, how will he programatically access the associated URI and set the method parameters (if any)?
    Also how does he send the request back to my application and how will my application understand it?
    1d) Can the code to understand the client request be written in any programming language since Rest does not restrict usage of specific tools.
    1f) It looks like the key feature of Rest is to have URIs in the reponse payload xml.
    Is this always required? In other words, can the reponse xml be one long xml without URIs to the embedded resources?
    Please let me know if Java has any API/tutorials to support the above requirements.
    Your input is highly appreciated.
    Thanks in advance for your valuable time and interest.

    You will be interested in JSR 311 JAX-RS: The JavaTM API for RESTful Web Services. This JSR is in the very early stages. The SWDP (Sun Web Developers Pack) 1.0 contains a very preliminary implementation of RESTBeans which is the basis for this JSR. Download the SWDP and look at the docs/samples in the rest-impl directory. http://developers.sun.com/web/swdp/. Here is a link to some docs on the REST APIs http://developers.sun.com/docs/web/swdp/r1/rest-impl/docs/getting-started.html

  • Java web service question

    I am trying to create a java web service using the wizard in Jdeveloper, but I am not able to pick up the java class I want. I already setup the classpath and library to include the java class files. but seems the wizard doesn't look at the classpath. what's the right way to do it?
    Is there any demo or tutorial code about how to create java web service ?

    Hello again,
    I am quite surprised I got no responses to my query below.
    Can anyone explain how I might do this?
    Please feel free to respond to [email protected]
    I am looking for what I think should be a simple
    example/tutorial but so far no luck. I am using
    JDeveloper 10g 10.1.3 and the Oracle Application
    Server.
    want to do this:
    create a simple Java web service
    deploy it
    create another simple Java web service, that makes a
    call to a method on the first service
    deploy it
    client->WSfront->WSback
    want to keep this as basic as possible.
    lthough I have found examples of how to create a web
    service proxy, there are no examples that I have
    found that show how to use that proxy in another web
    service:
    I did what I thought were the right things; generated
    a proxy for the first web service, and used that
    proxy in the second web service's source Java class.
    However when I deployed and tested many classes were
    missing: all the classes the proxy class depends
    on.
    I actually managed to get something like this working
    but had to manually create the .ear and .war files
    for WSfront, explode the archives, and manually add
    the missing classes to its WEB-INF/classes.

Maybe you are looking for