Web Services and Parameters - Problem

I have 2 web services I set up. One takes no parameters and
works fine. The
other takes arguments and it tells me the method cannot be
found. What am I
missing? What is the magic bullet to invoke a web service
that takes
arguments and have it work? I have all the web service's
arguments set to
'required="yes"' and I set up another 'no argument function'
in the
SearchProperty.cfc to make sure it also works and it did
fine, so I know the
web service exists and is accessible.
I tried both createObject in my contoller and cfinvoke. Both
work fine for
the web service that takes no arguments and neither work for
the one that
does.
Here is my controller blocks (please excuse the Model-Glue)
This works fine
<!---Get All Cities For Search Engine--->
<cffunction name="getCities" access="public"
returntype="void"
output="false" hint="I displays all the cities for the front
page">
<cfargument name="event" type="ModelGlue.Core.Event"
required="yes">
<cfset Cities = createObject("webservice",
http://74.86.90.210/realitorToolBox/model/webservices/CityGateway.cfc?wsdl")/>
<cfset allCities = Cities.getCities() />
<cfset arguments.event.setValue("getAllCities",
allCities)/>
</cffunction>
This cannot be found:
<!---Search Residentual Properties--->
<cffunction name="SearchProperties" access="public"
returntype="void"
output="false" hint="I displays all the cities for the front
page">
<cfargument name="event" type="ModelGlue.Core.Event"
required="yes">
<cfset userID = 555555>
<cfset bedrooms =
arguments.event.getValue("bedrooms")/>
<cfset bathrooms =
arguments.event.getValue("bathrooms")/>
<cfset footage = arguments.event.getValue("footage")/>
<cfset minprice =
arguments.event.getValue("minprice")/>
<cfset maxprice =
arguments.event.getValue("maxprice")/>
<cfset basement =
arguments.event.getValue("basement")/>
<cfset garage = arguments.event.getValue("garage")/>
<cfset CITIES = arguments.event.getValue("CITIES")/>
<cfset Search = createObject("webservice",
http://74.86.90.210/realitorToolBox/model/webservices/SearchProperty.cfc?wsdl")/>
<cfset searchAll = Search.SearchProperty(#userID#,
#bedrooms#,
#bathrooms#, #footage#, #minprice#, #maxprice#, #basement#,
#garage#,
#CITIES#) />
<cfset arguments.event.setValue("Results",
searchAll)/>
</cffunction>
Any ideas? My client is getting anxious and I hope to offer
this service to
other developers to use for their client's site.

Ok, I will make this simplier. Couple questions.
Is it possible to use cfargument in a web service?
I looked at the samples out there and they all just have
queries that take a
form variable (#form.name#) since it was being passed by a
form.
Is it possible to have one web service function invoke
another function in
the same cfc?
If you have one function that calls another to first validate
the user and
then invoke another to get the search results, do all have to
be remote or
can you have the search be private since you dont want it
invoked remotely.
I.E.
<cffunction name="search" access="remote"
returntype="query">
<cfset authenticate = authenticateUser(#username#)>
<cfif authenticate EQ 'yes'>
<cfset myResults = searchProperty(#mlsnumber#)>
</cfif>
<cfreturn my Results>
</cffunction>
I tried a simple city search and tried to pass a variable
argument.
<cfinvoke
webservice="
http://74.86.90.210/realitorToolBox/model/webservices/CityGateway.cfc?wsdl"
method="findCity" city = "clinton" returnvariable="aQuery"/>to:
<cffunction name="findCity" access="remote"
returntype="query"> <cfquery name="getCities"
datasource="MLSListings"> Select city FROM residential WHERE
city = '#city#' </cfquery> <cfreturn getCities>
</cffunction>And I still get a function cannot be found, even
though I used the cfcexplorer to verify that it does exist on the
remote server.Any ideas?

Similar Messages

  • Envy 100 410A Web Services and Ipod problems

    Hi,
    I purchased the Envy 410A and I'm having a few problems.  I have two Macbooks and a 4th gen Ipod Touch setup on a wireless network with a Linksys WRT100 router.  First, what's working:
    I successfully installed the printer on both computers through USB and I can print wirelessly from each without any difficulties.  (I set a fixed IP address for the printer to avoid having to 'find' it each time it got a new address by DHCP.)
    Here are my problems:
    1) On setup, the printer successfully connected to the HP web service and printed out a code for ePrinting.  I entered this code and was able to print via email.  However, sometime between last night and today (and after I installed 6 updates) the printer reported that it no longer had an email address.  I turned off Web Services to troubleshoot, but now when I try to enable it I get the "Problem Connecting to the Web Services Server" error.  Powercycling the router and/or printer does not fix this.  Nor does turning off the printer's wireless functions for 5 minutes.  I've tried restoring factory defaults, but it did not actually restore anything.  How can I fix this?  Is the server down, or is something screwed up?
    2) My iPod Touch is completely updated to iOS 4.2, bluetooth is turned off, and I've verified that it's on the same network as the printer, but I cannot detect the printer on my iPod either through Apple's AirPrint or through the HP iPhoto App 3.0.  Both just say "No printers found".  This is really frustrating since I bought this with printing from mobile devices in mind.  Any advice?
    Thanks for your help,
    Dave

    I am glad your first problem is resolved. When it comes to iPod having OS 4.2, the device supports AirPrint which is new from Apple.
    For more information on how to use the AirPrint on your iPod refer to below link:
    http://h10025.www1.hp.com/ewfrf/wc/document?lc=en&dlc=en&cc=us&docname=c02623193
    If the iPod still does not find the printer, try unchecking the option "Enable Multicast Streams" in the router EWS page and see if it works or not. Contact your router support for more info.
    Say "Thanks" by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"

  • Problem with MDM web services and webdynpro

    Hi MDMguru,
    I have created web services from SDN example: it reads the MDM version.
    If I use J2ee Navigator Web Services and I try  mywebservices, it works very well.
    I have created a webdynpro (from this SDN Example https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/creating%20an%20email-client%20using%20web%20dynpro%20and%20web%20services.pdf).
    I have followed step by step the example.
    But when run webdynpro and it calls my webservices it not works because it throws this exception:
    javax.xml.rpc.soap.SOAPFaultException: Exception in method getVersion. , Debug ,  , com.enel.sap.ws.component.WSComponent.VersionMDM , sap.com/tcwddispwda , J2EE_GUEST
    Can someone help me?

    It appears that %ROWTPYE is not supported directly, and that we need to create a TYPE to wrap the return data
    Thanks to Marc Thompson for the details (http://marc-on-oracle.blogspot.co.uk/2007/12/11g-database-installation-and-native.html)
    PD

  • Quick questions on the topic of Web Services and EJB POJOs

    I have been reading about Web Services and the data types that are aloud as operation parameters and return types. I was wondering what the standard practice for return types; is it to use the Entity classes straight and customize the WSDL instead of letting the EE container do it (avoid cyclic problems in the schema that can occur when using entity 1-to-many and many-to-1 mappings) or; is it to off load the data into a DTO/VO/Bean and let the EE container take care of all the schema mapping for the WSDL? I look at the EE tutorial and bought a EE book both use very basic examples that do not include connecting to a database or using EJB3 for the data store.
    Thanks for any information

    bump

  • ADFMobile - Web service data control problem for android

    Hi,
    I created an application for android and testing it on an emulator.
    I am able to create web service data control for a jax-ws web service. But when I invoke the web service and the call comes to the web service host, there are no namespaces in some of the parameters. Typically, the tags which do not have the namespace are complexTypes. All the values of the parameters come properly. I have tried executing the data control in three different manners but still no luck.
    AdfmfJavaUtilities.invokeDataControlMethod(..);
    AmxMethodActionBinding.execute();
    +#{bindings.invokeMethod.execute}+
    Thanks.

    Hi there,
    Can you try to generate a sample JAX-WS the generates a similar complex structure that can help you and us to isolate the issue? I created a jax-ws service using simple complex type on Ubuntu and also a client mobile application getting no problems running it. But, perhaps you are using a more complex structure, hence an standalone would be very useful.
    Juan C.
    Edited by: Juan Camilo Ruiz on Dec 10, 2012 4:00 PM

  • Pl/Sql web service and collections not working

    Hello
    I'm trying to create a web service from a function in a package which returns a collection. The creation of the web service and its deployment seem to work correctly. I do get the following warning :
    WARNING: OWS-00077 The Value Type class: pxWsLang.PamLanguagerecordBase does not have a valid JAVA Bean pattern
    but I don't think this is the source of the problem.
    When I try to test the web service using the endpoint in the wsdl I get the following answer in the browser:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>env:Server</faultcode><faultstring>Error creating target: pxWsLang.WsLangUser</faultstring><faultactor></faultactor></env:Fault></env:Body></env:Envelope>
    In the DOS window for the OC4J I get the following error :
    2006-11-15 09:21:25.852 ERROR OWS-04005 An error occurred for port: {http://pxWs
    Lang/WsLang.wsdl}wsLangSoapHttpPort: javax.xml.rpc.JAXRPCException: Error creati
    ng target: pxWsLang.WsLangUser.
    The PL/SQL code is as follows :
    Object:
    CREATE OR REPLACE TYPE PAM_LanguageRecord as OBJECT
    NR NUMBER(3),
    SYMBOL VARCHAR2(2)
    Collection:
    CREATE OR REPLACE Type PAM_LanguageTable as Table of PAM_LanguageRecord;
    Package body :
    create or replace package body PAM_TEST is
    function CursorTest return Pam_LanguageTable is
    Res_LangTable PAM_LanguageTable;
    cursor cur is select * from stc_languages;
    begin
    Res_LangTable := new PAM_LanguageTable();
    for Rec in cur loop
    Res_LangTable.Extend(1);
    Res_LangTable(cur%ROWCOUNT) := new PAM_LanguageRecord
    (Rec.NR,
    Rec.SYMBOL
    end loop;
    Return Res_LangTable;
    end;
    end;
    I'm using JDeveloper version 10.1.3.1.0.3984
    How can I get this to work ? (without using Apache Axis or other tools :-)
    Is it supposed to work ?
    Many Thanks
    Paul

    Hi,
    for the "error creating target" problem I found the solution here:
    [WS from a PL/SQL package]: Error creating target
    Hope this helps.
    Regards,
    Patrik

  • Web service and servlets in the same project...web.xml?

    Hello, I have a problem with my web service.
    I have a server, which displays a web service. I programmed this service with JAXRPC.
    I have a client, in another directory. I succeded in compiling, deploying and running the web service.
    The problem is that after I tried to integrate this service in an existing project. This project contains servlets. In these servlets, I'm using sessions.
    These servlets are on the same side as the server of the web service. Because of the implementation of my code, I'd like to use in the class that represents the server of the service, the same session as the one I'm using in the servlets.
    But of course, it's not working by itself. I know there's something to do with the web.xml files.
    The thing is that I created a web.xml file for the service, and another for the servlets.
    I was thinking of joining both of them in one xml file, but everything crashes then...
    Could someone tell me how to create a project with a web service and servlets, and mostly how to configure the xml file??
    Thanks for any help
    Philippe

    Hello, I have a problem with my web service.
    I have a server, which displays a web service. I programmed this service with JAXRPC.
    I have a client, in another directory. I succeded in compiling, deploying and running the web service.
    The problem is that after I tried to integrate this service in an existing project. This project contains servlets. In these servlets, I'm using sessions.
    These servlets are on the same side as the server of the web service. Because of the implementation of my code, I'd like to use in the class that represents the server of the service, the same session as the one I'm using in the servlets.
    But of course, it's not working by itself. I know there's something to do with the web.xml files.
    The thing is that I created a web.xml file for the service, and another for the servlets.
    I was thinking of joining both of them in one xml file, but everything crashes then...
    Could someone tell me how to create a project with a web service and servlets, and mostly how to configure the xml file??
    Thanks for any help
    Philippe

  • PL/SQL Web Service Optional Parameters

    I have created a PL/SQL web service and deployed successfully using Jdeveloper 10.1.3.5. The database is 9.2.0.8.
    When the web service request is made, all is well if all parameters are passed.
    I have been told that the request might come with some but not necessarily all of the parameters expected by the PL/SQL procedure.
    Is it possible when deploying through JDeveloper to indicate that all parameters might not be present?
    This is my first web service. Thanks in advance for your assistance.

    Parameters relate to procedures. Web Services require XML messages.
    Where are the parameters coming from? You cannot pass a dynamic number of parameters into a procedure, but you can pass a structured type as a parameter which can contain multiple values, whether that is an array/collection type or an XML document itself.
    Just package up the values into the XML and pass it to the web service.
    If this doesn't answer your question, please post more information, with some example data and code. Read the FAQ: {message:id=9360002}

  • Web Service - Complex Parameters

    Hi, I'm trying to get a specific Web Service working by
    calling the appropriate parameters and I can't seem to get it
    working properly in Flex.. I have this Web Service working just
    fine in Microsoft's InfoPath product. When I call the Web Service
    and trace I notice the parameters returned are in the wrong order
    and the complex parameter doesn't show the sub tags (MS Infopath
    does). Also, the parameters I leave empty return with "[Object
    Object]" (MS Infopath doesn't do this). So it looks like flex isn't
    doing something right with my Webservice. Here's what I am
    passing.. If I'm doing something wrong please let me know.. Any
    ideas or opinions are greatly appreciated!
    <mx:request>
    <Infoprovider></Infoprovider>
    <Parameter>
    <item>
    <Name></Name>
    <Value></Value>
    </item>
    </Parameter>
    <Query>ZG_PUR_104E</Query>
    <ViewId></ViewId>
    </mx:request>

    Me to, and i use Axis for web services (and WebSphere
    WebServices).
    And, if you use bind from text input you get [object Object]
    in general case
    <mx:request>
    <value>{entry1.text}</value>
    </mx:request>
    <mx:TextInput x="23" y="101" text="" id="entry1"/>
    if you enter any text at textinput and delete it you DONT get
    "[object Object]" at web service....
    if you dont enter text you get "[object Object]" at web
    service...
    if you use variable or other elements its the same.
    Any help?
    TIA

  • Missing Web Service Input Parameters

    Hi,
    I am creating a form on web services. The source of the webservice is BEPL.
    When I register the webservice, I see the in and the out parameters.
    Operations      
    Operation Name     process
    Input Parameters
    Operation     Parameter Name     Parameter Type
    process     Data_source     string
         Data_URI     string
         Token     string
    But when I continue to create a form on the service, the next screen shows this message:
    * Item Finder
    Web Service Input Parameters      
    no data found
    Any idea what may be going on here?
    Thanks
    -SJ

    Hello,
    Are you sure it's a public webservice or that you put in the right username/password?
    Also if you call the webservice just from an url, does that work for you?
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • EJB Web Service Interface parameters name changed

    Hi, all,
    I create a simple Session EJB 3.0 with Web Service interface in Jdeveloper 10.1.3.4. and I deployed it into the embedded OC4J server.
    The question is I found that the web service operator parameters is changed to "String_1" (actually the parameter in EJB method is String ss). And I found the WSDL file is also String_1.
    How to create the real parameter name in WSDL from EJB Web Service interface? Any help on that?
    Best Regards,
    Bill

    if you do a lookup for the name "java:comp/env/ejb/queryProc" in the servlet, the deployment descriptor of your web-archive must contain an ejb-reference with the ref-name 'ejb/queryProc'.

  • Web Service Job Parameters with Job Actions

    I have a set of web service jobs for which I am supplying input parameters. This works fine when defined against a single particular job but i have a need to insert this job based upon a job event and pull some information off of the job the had the event condition occur (i.e. Completed Abnormally). When defining the Job Action to launch the job, the default and override parameter fields are not editable. Has anyone had any luck with this? I didn't notice anything in the documentation but I could have just overlooked this. Any help would be appreciated.
    Thanks,
    kyle

    Me to, and i use Axis for web services (and WebSphere
    WebServices).
    And, if you use bind from text input you get [object Object]
    in general case
    <mx:request>
    <value>{entry1.text}</value>
    </mx:request>
    <mx:TextInput x="23" y="101" text="" id="entry1"/>
    if you enter any text at textinput and delete it you DONT get
    "[object Object]" at web service....
    if you dont enter text you get "[object Object]" at web
    service...
    if you use variable or other elements its the same.
    Any help?
    TIA

  • Web services and control characters

    Hi,
    We are using JAXWS and JAXB to create web services. We have a problem with our current data because it sometimes contains "bad" characters, such as control characters. Is there a nice way for us to remove these characters when creating the messages or when retrieving the data from the database? We use java persistence / hibernate to retrieve the data from the database.
    I would prefer a method that doesn't include having to "clean" each string manually...
    Thanks!

    hi, i�m doing something like you but in jbuilder that is another IDE, i don�t know if it is useful for you but i entered to the help of jbuilder and i wrote in the index "web services" and then i found a topic called : "export classes as webservices" and in that place i can see some steps to follow, may be in eclipse you can find something like this.

  • Web service client JAR problem

    I have a .NET Web Service and I made a client JAR with the WebLogic Workshop. When I try to have data from the Web Service the WebLogic console shows me this error
    web service invoke failed: javax.xml.soap.SOAPException: failed to serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://tempuri.org/JobPosting/FacadeJobPosting']:getCountries}; nested exception is:
         javax.xml.soap.SOAPException: failed to serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://tempuri.org/JobPosting/FacadeJobPosting']:getCountries}
    If want to know in which layer is the problem or what is the problem.
    Thanks

    I'm only just scrapping on the surface of SOAP myself, but I have a little Java knowledge.
    I think your error message is saying, that your trying to send a java object over SOAP to the other computer, but this object has not implemented the serialize interface (where objects are written and extracted to a stream)
    Just a thought I could be wrong - but have a look at what object is being sent over SOAP - is it a custom object? does it need to implement serialize?
    Good luck
    martin

  • Web service empty relationship problem

    hi all,
    I have a pretty simple web service. Two entities, a citizen and a business. A citizen is able to register 0..n businesses. There is a WS which reads the citizen. When the business key list in citizen is empty the web service wont return the citizen (portal request failed could not execute web service operation). When at least one relation is defined all works fine.
    I've tested the web service. The problem occurs only with VC.
    thanks for your help,
    regards, felix

    Hi Ankur,
    no, not exactly...
    The webservice is tested with an id as input and returns some string values (name, firstname...) and a list of references to other objects. When this list is empty...(depending on the back end system)
    part of the SOAP message:
    <ns1:businessRef xmlns:ns1='urn:com.sap.bureg001.core.besrv.citizen' xmlns:pns='urn:java/lang'></ns1:businessRef>
    ... visual composer returns an error.
    when this list is not empty (again depending on database entries in the back end)
    part of the SOAP message:
    <ns1:businessRef xmlns:ns1='urn:com.sap.bureg001.core.besrv.citizen' xmlns:pns='urn:java/lang'><pns:String>c22bc900-dec3-11db-cdce-00505625e523</pns:String>
    </ns1:businessRef>
    ... visual composer does not return an error but returns the values like the service is supposed to do.
    Testing the web service with Web Services Navigator both scenarios are working without problems.
    thanks for your fast response,
    felix

Maybe you are looking for

  • To call smartform in QC22

    In our project , Business want the layout of QC22 to be same as QC20. In QC20 , we have used the smartform .So inorder to fullfill the requirement of teh business we ahve to call the smartform in QC22. Is there any possiblity to call the smartform in

  • How to defer the primary key validation to commit time

    Hi Is it possible to defer the primary key validation to commit time? I don't know why the framework checks for the unique key constraint immediately after inserting the row and before committing it. This causes "Too many objects match the primary ke

  • My little brothers Ipod  is disabled and it is locked what do i do

    I cant get into itunes because it is locked.

  • Java Status info Unavailable RC=100

    Hi All Facing issue with java start up in a dual stack system. In MMC its shows Java status info unavailable. When restarting only Java stack , i am getting this kind of error ========== [Thr 6132] Fri Jul 17 07:06:48 2009 [Thr 6132] ***LOG Q0I=> NiP

  • Photoshop keeps failing to install

    My IT just reinstalled my OS windows 7, creative cloud desktop works however photoshop fails to install? Ive tried may different ways restarting, from a different link etc etc. It suggested turning off my firewall and antivirus, and I have still no l