Using CFHTTP to call a web service
We use a CF5 server and will not update to MX anytime soon. I need to call a web service and understand that I can do that with CFHTTP. Can someone direct me to any docs or give me examples of how to do that?Answered my own question. The problem I had was returning complex data types. CFHTTP. FILECONTENT actually returned as WDDX MX web service, so I was able to use the CFWDDX tag to transform a structure of SOAP in a CF structure, and it works perfectly.
Tags: ColdFusion
Similar Questions
-
Hello
I am new to the development of native applications from BB using JDE. I'm testing Simulator. From my native BB app, I connect a remote URL and call a Web service method to extract some basic result XML.
I need to write a login code remote URL to achieve? If so, how?
So, how can I use this connection object to call the Web service from this URL remotely.
Please help me out of it...
Many thanks in advance...
What i am doing is, On clicking the "Login" button i want to call the webservice method like below mentioned code... Here WaveServices is a class and getAllCinemas() is a static method inside which a webservice method call is made.. loginButtonField.setChangeListener(new FieldChangeListener() { public void fieldChanged(Field paramField, int paramInt) { WaveServices.getAllCinemas(); } });
Indeed, the question was raised and answered here:
-
Dear all,
When I call the SOAP using APEX_WEB_SERVICE Web services. MAKE_REQUEST, so I'm able to get the response from the web service. Character, however all the German are replaced by those of the JUNK. However the data just fine when I test web services using SOAP UI.
To resolve this problem, I tried to call the web service using UTL_HTTP. However when I use UTL_HTTP, then I get following error.
ORA-24247: access denied by network access control list
Can someone advise me...
< Li > why German characters are replaced with the data side when calling WebService from APEX, while it works very well in SOAP UI
< Li > when can I access web service successfully using APEX_WEB_SERVICE, then why he throws error ORA-24247 when I call using UTL_HTTP?
DB: Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
APEX: 4.0.2.00.07
Web server: EPG
Kind regardsSELECT * FROM NLS_DATABASE_PARAMETERS; PARAMETER VALUE ------------------------------ ---------------------------------------- NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CURRENCY $ NLS_ISO_CURRENCY AMERICA NLS_NUMERIC_CHARACTERS ., NLS_CHARACTERSET AL32UTF8 NLS_CALENDAR GREGORIAN NLS_DATE_FORMAT DD-MON-RR NLS_DATE_LANGUAGE AMERICAN NLS_SORT BINARY NLS_TIME_FORMAT HH.MI.SSXFF AM NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR NLS_DUAL_CURRENCY $ NLS_COMP BINARY NLS_LENGTH_SEMANTICS BYTE NLS_NCHAR_CONV_EXCP FALSE NLS_NCHAR_CHARACTERSET AL16UTF16 NLS_RDBMS_VERSION 11.2.0.1.0 20 rows selected
HariThe solution was...
I just put following line before making the call to the web service by using APEX_WEB_SERVICE. MAKE_REQUEST.
/*In my case DB character-set is AL32UTF8, so I set it to UTF-8. */ UTL_HTTP.SET_BODY_CHARSET ('UTF-8');
More information see SET_BODY_CHARSET procedures
If I do not set this, it uses the as ISO-8859-1 character set, which is the cause of my problem.
Kind regards
Hari -
Calling a web service using SSL from a client that runs as a web application.
I have the keystore containing the certificates to call a web service through a two-way ACE by using SSL. If I create a stand-alone java application and using the following parameters, I'm able to hit the web service:
System.setProperty("javax.net.ssl.keyStore","C:/bea/JDK150~1/jre/lib/security/SFCRM.jks");
System.setProperty ("javax.net.ssl.keyStorePassword", "changeit");
System.setProperty("javax.net.ssl.trustStore","C:/bea/JDK150~1/jre/lib/security/SFCRM.jks");
System.setProperty ("javax.net.ssl.trustStorePassword", "changeit");
Also, if I use these same 4 lines of code in my web application to call the web service, I successful as well.
The problem is, in the real world, you can't hardcode your keystore/truststore path access and password in your application like this.
What is the right way to configure these client parameters? I do somewhere in the logical Web administration console? I tried to configure the Keystore and SSL tabs for my server using the administration console, but he can't seem to find the private key file. I get an exception that is prohibited by the web service as soon as I leave the System.setProperty lines.
The tab of keystore, I use a Custom Keystore and Java Standard Trust store. My custom identity keystore path is C:/bea/JDK150~1/jre/lib/security/SFCRM.jks, type jks keystore, and I updated the password changeit. On the SSL tab, I've specified the alias of the private key to use for the web service as well as the password (there is no password, so I put in changeit, the keystore password).
It does not work. I even tried using a Custom Keystore and trust stores custom and by setting the C:/bea/JDK150~1/jre/lib/security/SFCRM.jks path for both. Still does not work.
I have a feeling that these tabs are intended for the configuration server SSL only.
How to set the path of the keystore for customers running as web apps on my web server of logic?SSL-> advanced
Use server certificates:
"Determines whether the customer should use server certificates/keys as the identity of the client during the initialization of a connection via https."
-
call a Web Service of JavaFX running als WebStart to incorporate in a browser or
Call a Web Service from a JavaFX running as an application all right.
Wenn execute the same JavaFX as integrate WebStart or browser, I get a runtime exception:
=================================
Java plug-in 10.7.2.10
JRE-Version use 1.7.0_07 - b10 Microsoft Client Java VM
Benutzer-home-Verzeichnis = C:\Users\Olaf
----------------------------------------------------
c: Konsolenfenster löschen
f: objects in Finalisierungs-tail finalisieren
g: garbage collection
h: sharp Hilfemeldung ads
l: class Loader-list ausgeben
m: Speicherauslastung print
o: logging auslosen
q: Konsole ausblenden
r: policy configuration loaded neu
s: System-und deployment-Akbulak ausgeben
t: Threadliste ausgeben
v: the ausgeben thread stack
x: Class-Loader-Cache leeren
0-5: trace-ebony auf < n > set
----------------------------------------------------
Correspondence: beginTraversal
Match: digest selected JREDesc: JREDesc [version 1.6 +, heap =-1-1, args = null, href = http://java.sun.com/products/autodl/j2se, salt = false, null, null], JREInfo: JREInfo of index 0:
the platform is: 1.7
product: 1.7.0_07
location: http://java.sun.com/products/autodl/j2se
path is: C:\Program Files (x86)\Java\jre7\bin\javaw.exe
args is:
is native platform: Windows x 86 (x 86, 32-bit)
JavaFX runtime is: JavaFX 2.2.0 found at C:\Program Files (x 86) \Java\jre7\
the Enabled argument is: true
saved is: false
system is: true
Match: ignoring maxHeap:-1
Match: ignoring InitHeap:-1
Match: digestion vmargs: null
Match: digested vmargs: [JVMParameters: isSecure: true, args:]
Match: JVM args after accumulation: [JVMParameters: isSecure: true, args:]
Match: Digest LaunchDesc: file:/C:/Users/Olaf/Documents/NetBeansProjects/JavaFXApplication4/dist/JavaFXApplication4.jnlp
[Match: Digest properties:]
Match: JVM args: [JVMParameters: isSecure: true, args:]
Match: endTraversal...
Match: JVM args final:
Correspondence: Correspondence of Running JREInfo Version: 1.7.0.07 == 1.7.0.07
Match: Running JVM args match: I: <>satisfy fault: <>
CacheEntry[file:/C:/Users/Olaf/Documents/NetBeansProjects/JavaFXApplication4/dist/JavaFXApplication4.jar]: updateAvailable = true, lastModified = Tue Sep 04 21:16:35 CEST 2012, length = 39432
java.lang.ExceptionInInitializerError
at com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver (unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL (unknown Source)
to com.sun.xml.internal.ws.client.WSServiceDelegate. < init >(Unknown Source)
to com.sun.xml.internal.ws.client.WSServiceDelegate. < init >(Unknown Source)
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate (unknown Source)
to javax.xml.ws.Service. < init >(Unknown Source)
to javafxapplication4.ws.NewWebService_Service. < init > (NewWebService_Service.java:42)
to javafxapplication4. JavaFXApplication4.start (JavaFXApplication4.java:25)
to com.sun.javafx.applet.FXApplet2$ 1.run(FXApplet2.java:131)
to com.sun.javafx.application.PlatformImpl$ 4.run(PlatformImpl.java:173)
at com.sun.glass.ui.win.WinApplication._runLoop (Native Method)
in com.sun.glass.ui.win.WinApplication.access$ 100 (WinApplication.java:29)
to com.sun.glass.ui.win.WinApplication$ $2 1.run(WinApplication.java:67)
at java.lang.Thread.run (unknown Source)
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" 'xml.catalog.ignoreMissing', 'read')
at java.security.AccessControlContext.checkPermission (unknown Source)
at java.security.AccessController.checkPermission (unknown Source)
at java.lang.SecurityManager.checkPermission (unknown Source)
the impossible (unknown Source)
the impossible (unknown Source)
to com.sun.org.apache.xml.internal.resolver.CatalogManager. < init >(Unknown Source)
to com.sun.org.apache.xml.internal.resolver.CatalogManager. < clinit >(Unknown Source)
... 14 more
======================================================
Any hint for me.
THX
OLAFSign your application.
http://docs.Oracle.com/JavaFX/2/deployment/deploy_overview.htm#CEGJGHDA
-
Matter of business for OSB 10.3.1 when to call the web service from SAP ECC 710
Hello
1. I was a unit test for a business service that calls a web service from SAP ECC 710 (this service is published directly to a RFC function via SOA Manager module);
2. the problem is when I use the OSB test console, which generates the request below message:
< soapenv:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv >
* < soap: Header xmlns:soap = 'http://schemas.xmlsoap.org/soap/envelope/' > *.
* < / soap: Header > *.
< soapenv:Body >
< xmlns:urn urn: Zmmjf503 = "urn: sap - com:document:sap:soap:functions:mc - style" >
string of < ContractInfo > < / ContractInfo >
< / urn: Zmmjf503 >
< / soapenv:Body >
< / soapenv:Envelope >
the response message is:
< SOAP - env:Envelope xmlns:soap - env = "http://schemas.xmlsoap.org/soap/envelope/" >
< SOAP - env:Header >
< n0:MessageID = "http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:n0 >
UUID:4cbe5b84 - 474 c-9abe-e100-00000ad00164
< / n0:MessageID >
< n1:Action SOAP - env:mustUnderstand = "1" xmlns:n1 = "http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:soap - env = "http://schemas.xmlsoap.org/soap/envelope" / >
< / soap - env:Header >
< SOAP - env:Body / >
< / soap - env:Envelope >
Above the response indicates that the BS called SAP Web server successfully, but seems that the service did not get the request message.
3. the Web service can be called successfully through SoapUI. and I checked the soapUI request message; and it can work if I just change the request:
< soapenv:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv >
* < soap: Header = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap > < / soap: Header > *.
< soapenv:Body >
< xmlns:urn urn: Zmmjf503 = "urn: sap - com:document:sap:soap:functions:mc - style" >
string of < ContractInfo > < / ContractInfo >
< / urn: Zmmjf503 >
< / soapenv:Body >
< / soapenv:Envelope >
and I got the right answer:
< SOAP - env:Envelope xmlns:soap - env = "http://schemas.xmlsoap.org/soap/envelope/" >
< SOAP - env:Header / >
< SOAP - env:Body >
< n0:Zmmjf503Response xmlns:n0 = "urn: sap - com:document:sap:soap:functions:mc - style" >
< Recmsg > <! [CDATA [<? xml version = "1.0" encoding = "utf-8"? > < DocumentResponse > < CONDITION > 0 < / STATE > < HTBH > < / HTBH > < MESSAGE > < / MESSAGE > < / DocumentResponse >]] > < / Recmsg >
< / n0:Zmmjf503Response >
< / soap - env:Body >
< / soap - env:Envelope >
4 it bother me, because the only difference between the above two request messages is the header (one contains a "newline"):
------------------------------------------------------------------------------------------------------------------------------
* < soap: Header xmlns:soap = 'http://schemas.xmlsoap.org/soap/envelope/' > *.
* < / soap: Header > *.
-------------------------------------------------------------------------------------------------------------------------------
VS
--------------------------------------------------------------------------------------------------------------------------------------
* < soap: Header = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap > < / soap: Header > *.
----------------------------------------------------------------------------------------------------------------------------------------
5 I thought that the SOAP engine should ignore "carriage returns", seems this is a problem of SAP ECC710.
Do you have someone having this problem? Thank you
Concerning
WenHello Wen,
I tried to use exactly the same request (carriage return) to call the service through soapUI, and it does not work... just like BS OSB
should I assume that it is a matter of SAP ECC?That same demand also doesn't SOAPUI so certainly it's an issue with SAP ECC. I doubt that SAP ECC is the treatment the carriage return as an end of file marker. Check with support.
Kind regards
Anuj -
Call a web service in java (JDeveloper)
Hello everyone,
I'm working on a project for my studies of computer science (@University of Freiburg, Germany).
I want to call another student web service. I need the other web service as input for my own calculation. (Customer Lifetime Value j4i :)) Unfortunately, I couldn't find tutorials or other help in the web. So I hope you guys could help me.
Basically, I'm looking for a small piece of code in java or a tutorial, that calls a web service to exsiting. Code Java would be particularly useful, since my work is written in java (and later deployed by JDevelloper as a web service). I found a few tuts on service control over the sites of the Oracle, but I do not know how to work with the ctrl files either.
Greetings,
Sebastianhttp://www.Oracle.com/technology/OBE/obe11jdev/11/WS/WS.html#T5
-
How to call the web service?
Hello
I want to know how to call the web service from my application HTML5 & javascript.
Please help me find this detail as what I can access easily. and I want to access web services online (a method of it) I'm not concered with how background Web service takes place.
I just want that when you call a web service method, I will return the result.
Please try this out for a WebService call
var xmlhttp; xmlhttp = new XMLHttpRequest(); xmlhttp.open("get","your url",true); xmlhttp.setRequestHeader("Accept","application/json"); xmlhttp.setRequestHeader("Content-type", "application/json"); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { if (xmlhttp.status == 200) { console.log(xmlhttp.responseText); } } } xmlhttp.send();
This will display the result of the invocation of webservice. The url is the application that you deploy and the type can be get/post. If xmlhttp.send (post) takes argument for the display of the data. You can call it by clicking a button in HTML.
-
Call the web service with Digest authentication
Hello
I JDevelper 12.2.4, I need build the java class to call the web service with Digest authentication.
Any suggestion?
Refer to:
-
problems with the XML that is returned when you call a web service with CF11
Hi, I ran into an unusual behavior when calling web services.
I call a web service that returns an XML like this:
< children >
< child >
John < firstname > < / name >
DOE < name > < / lastname >
< / child >
< / children >
during the call to the web service of CF10, it works fine. However, when the CF11, I don't get this:
< child >
John < firstname > < / name >
DOE < name > < / lastname >
< / child >
no < child >? for some reason, CF11 ignores / hides the highest level XML. This does not happen on previous versions. Why? the server that hosts the web service's CF11 too.
Report it as a bug in Coldfusion. In any case, I recommend making sure your web service returns a string, not an XML object.
This is because a web service must be universal. Appellants to .NET, Java, PHP, ASP and so on, will interpret a chain exactly the same way. Whereas an object XML Coldfusion is a construction that is heard only in CFML.
Your return string should also start with the XML declaration, like this
John DOE So it is clear to the appellant in which brought the cat.
-
Call to Web Service of Oracle PL/SQL not to call the Web service in SOA Server
Hello
Try to call the Web service to oralce pl/sql function
created a function
Unable to invoke the web service from the server of the SOA.
CREATE or REPLACE FUNCTION HelloWorld_WebServices(S_STRING Varchar2) RETURN VARCHAR2 as
Server sys.utl_dbws. SERVICE;
APPEL_ sys.utl_dbws. CALL;
service_qname sys.utl_dbws. QNAME;
port_qname sys.utl_dbws. QNAME;
response sys. XMLTYPE;
application sys. XMLTYPE;
BEGIN
sys.utl_dbws.set_http_proxy ("hostname: Port'");
service_qname: = sys.utl_dbws.to_qname ("ns1", "process");
Server: = sys.utl_dbws.create_service (service_qname);
APPEL_: = sys.utl_dbws.create_call (server);
sys.utl_dbws.set_target_endpoint_address (APPEL_, ' http:/host name: port/soa-infra/services/OFS/HelloWorld/helloworld_client_ep ');
sys.utl_dbws.set_property (APPEL_, 'OPERATION_STYLE', 'process');
asks: = sys. XMLTYPE ("< ns1:process xmlns:ns1 ="http://xmlns.oracle.com/OFSOrderServices/HelloWorld/HelloWorld"> < ns1:input > < / ns1:input > < / ns1:process > '");
answer: = sys.utl_dbws.invoke (APPEL_, request);
return response.extract('//HelloWorld/child::text() ','http://xmlns.oracle.com/OFSOrderServices/HelloWorld/HelloWorld'). getstringval();
DBMS_OUTPUT. Put_line ("values of the OutputsVariables8");
-Of return ';
END;
Run - the code below:
Select HelloWorld_WebServices ('Hi') to double;
Error:
ORA-29532: Java call terminated by eception Java exception: java.lang.NoClassDefFoundError
ORA-06512: at "SYS." UTL_DBWS', line 403
ORA-06512: at "SYS." UTL_DBWS', line 400
ORA-06512: at the 'APPS '. HELLOWORLD_WEBSERVICES', line 74
29532 00000 - "Java call terminated by eception Java exception: %s."
* Cause: A mistake or a Java exception has been reported and could not be
solved by Java code.
* Action: Modify Java code, if this behavior is not expected.
Hello
Fixed the error
After loading once again of DBA and network provided access files JAR/JVM firewall
and the correction on the threshold
Return response.extract (' / result/child::text () ','xmlns = "http://xmlns.oracle.com/OFSOrderServices/HelloWorld/HelloWorld" '). getstringval();
-
the initialization of a variable in a bpel workflow to call another web service
Hello
I'm fairly new development bpel. I don't have a early created myself but unfortunately, I only got to work on existing projects from now on. I am wanting to add an invocation of another web service to an existing bpel service. I added the wsdl for .bpel and composite.xml files info, and I can see the operations, so my plan is to see the service properly, and I created the necessary links.
I just need to initialize the variables that I'm passing on this web service. Basically need to invoke the web service passing in xml format that would go into these elements:
< ns1:dataRequest >
< ns1:appName > < / ns1:appName >
< ns1:progName > < / ns1:progName >
< ns1:valueUsed > < / ns1:valueUsed >
< ns1:setting > < / ns1:setting >
< / ns1:dataRequest >
Can someone just point me in the right direction on this. I think I need to create a new .wsdl file that I've read so far, but I have a lot of time looking for this problem - it is low on my priorities. So I thought that it might accelerate things to go ahead and ask here before I dive into it later.
Thank youHello
As far as I get your situation is you want to call a web service from BPEL process existing. Here are the steps that you can follow.
(1) create a partner link in the BPEL process that calls the external Web service.
(2) create an activiyt to invoke in BPEL process that invokes the foregoing created partner link
(3) create an Assign activity that initializes the variable which is an entry to invoke activity.Let me know if you have confusion with this approach.
Thank you
AJ -
SOA Gateway - timeout when calling a web service custom Pl/SQL using SOAP
Hello
I developed and deployed my PL/SQL web service custom repository integration SOA Gateway.
The web service works well, but sometimes its execution time exceeds 60 seconds, and I get the following time-out error: java.net.SocketTimeOutException: Read timed out
Here's my env:
Oracle E-Business Suite integrated SOA Gateway 12.1.3 IBM AIX on POWER Systems (64-bit) 6.1 I would like to know if there is a way to increase this time-out?
EDIT:
I took a quick glance at this doc errors of timeout in Web Services deployment (Doc ID 1073270.1( )
and modified the $ORA_CONFIG_HOME/10.1.3/opmn/conf/opmn.xml file
then bounced oacore, oafm, but it did not work.
EDIT 2:
I tried to change the timeout setting in the file httpd.conf ( $IAS_ORACLE_HOME/Apache/Apache/conf/httpd.conf )
restart apache and the server, but it didn't work.
Thank you
Kind regards
Simon
In fact, I tried to play with the values that you mentioned, I put the maximum Heap space in JAVA to 2048M and in Apache timeout to 3600 seconds and after a wait of cca. 20 minutes I got the answer I needed the SOAP service.
Kind regards
Ognjen
-
CASE to call external web services
Hello
I wonder what I should put in place to make calls to external web services providing data, which must be kept by the CAs in a record store.
Could someone give me some advice?
I think it must be different, then from the analyses of the documents or sites Web.
Any help is appreciated.
Thank you and best regards,
Heiko
Heiko,
What is the format of data that you get from the web service?
I'm not aware of frank manner (out of the box) to obtain Web service data in the ERMS. You have two options:
~ Add an intermediate step, like get Web service data in a database or store the answer in the form of XML file, then pointing to your to that source intermediate certification authorities.
~ Write java code using the API short to get the web service data and write this in a record store.
HTH
Pankaj. -
How to add exactly - once to call a web service
Hi all
I'm working on a project of OSB and it's proxy transport service use jca to listen to a folder. In the proxy service, we ask a business service that allows to call a service web http. Now, I want to add the exactly - once the proxy service after ws call option. However, this triggers an error, he said: setting quality of service exactly once in legend of service action is not supported for the BusinessService service SH-GetDealVOL/Services/Business Services/Call_StockService
I searched on the Internet found this:
BEA-382550
Error: Implementation quality of service exactly one time in legend of service action is not supported for the name of the service
Description
Implementation quality of service exactly one time in legend of service action is not supported for the selected service. Quality of service is adjustable to exactly one time only if the endpoint of transport service is transactional and the model of one-way or synchronous message. Action
Check the configuration of the pipeline to ensure that the quality of service is not defined at once via the Options for routing or any other action that alters the content of the variable message $outbound context. Action log allows you to see the value of any variable message context when executing.
Now, as the web service's third party service, I don't know it is synchronous or asynchronous. If she is not synchronous, can I add the exactly - once?
Any help will be great
Thank you
Daniel
If the service you are calling supports transactions, meaning that he can start a new or registered in the existing transaction, you can assign to QoS to "Exactly Once" or not. You can go through the following link for design considerations.
Design considerations - 11g Release 1 (11.1.1.6.3)
Thank you
Jahangir
Maybe you are looking for
-
Tecra A6 does not connect to internet with lan cable
I got a new Tecra A6, (windows xp) which is barely a week. fine, except that when I connect my router to the laptop computer with lan cable broadband, I am not able to connect to the internet. When I connect the cable to the internet, I'm getting the
-
Pavilion m4-1001tx: using ram ddr3 on ddr3l slot
There will be no danger or risk to do?
-
Satellite A300 does not start after the installation of the anti-virus
Hello I brought a Satellite A300 today and loaded it up and it was fine.I uninstalled the google toolbar, office and land it came preinstalled with also the mcafree anti virus.So I could install my own anti virus. After that the system asked me to re
-
Stream 11-d008tu: System disabled steam 11
Hi, seems to be a common problem, I have a Steam client 11 wish me re-install windows as it was a school laptop ex. It does not start in recovery mode or ext DVD the admin password is not known. Deactivation of the system 53070556 Any help would be w
-
Windows stops and displays the error message with the file wpfb_ati2dvag
Windows stops and I get the message that I have a problem with the wpfb_ati2dag file. Is there any solution for this?