MapViewer: send admin request using pl/sql
Hello,
i have a reqirement to send mapviewer admin requests to the mapviewer server using pl/sql.
I found a java class in Re: How can I refresh the map cache for Oracle Maps ? , but i'm struggeling to replicate this functionality in pl/sql, without using java.
Are there any examples out htere how to send admin requests to mapviewer using pl/sql?
Thanks in advance,
Dirk
You may use the UTL_SMTP package to send e-mail via the SMTP protocol. This package has been available in the Oracle database since Oracle 8i Release 2 (8.1.6). For more information, please check its documentation in "Oracle8i Supplied PL/SQL Packages Reference".
Similar Messages
-
How to send e-mail using PL/SQL
I need to send e-mail using PL/SQL. Is it possible?
Thanks in advance,
AgnaldoYes. Use the UTL_SMTP package
-
HTTP error while sending SOAP request using wsdl file
We created SOAP request using the wsdl file ; while sending SOAP request from Altova XMLSpy, we are getting the below error.
HTTP error: could not post file
Can you please explain how to resolve this issue
Regards,
Sanghamitrathere is very little information to help you here.
Can you confirm if this is a SOAP sender scenario or SOAP receiver scenario?
Also do go to thru these links to help you out;
Troubleshooting
Troubleshooting - RFC and SOAP scenarios *** Updated on 20/04/2009 ***
RFC -> SOAP
RFC -> XI -> WebService - A Complete Walkthrough (Part 1)
RFC -> XI -> WebService - A Complete Walkthrough (Part 2)
SOAP <-> XI <-> RFC/BAPI
Walkthrough - SOAP XI RFC/BAPI -
Problem while sending/Receiving request using the HttpURLConnection obj
Hi,
We are facing the problem while passing the request in Weblogic.
Looks like there is some problem with Weblogic while sending/Receiving the request using the HttpURLConnection object.
Currently we are migrating 2 applications to WebLogic. Application1 to application2 request should pass.
Below is some example we tried:
"When we send a request to our code using the SSOAdaptor code (which handles the request/session in our application) which is on the SunOne server the request parameters are received by our code successfully. And also in Create User Functionality of application1 we are sending a request to webpass(which is on Sunone Server) using the HttpURLConnection object and the SOAP request is received successfully by the Webpass."
Looks like when we send request (using HttpURLConnection) from a server other than Weblogic to a servlet in a Weblogic the request parameters are received with out issues.
Where as when the request is sent from WebLogic to WebLogic the request parameters are missing some how.
Is there any issue in Weblogic? Please helpus on this.
Thanks,
Nagesh
Edited by: user9307541 on Mar 15, 2010 5:08 AMHi,
Please find below scenario for testing.
We have tested the SSOAdaptor code (it is the fucntion name which will send the data from source) locally by hittiing the WPS adaptor URL in a Java client program(TestRequest.java) and the request parameters were reaching the WPS Adapter successfully.
Then we have written two test servlets to test the communication between SSOAdaptor(TestServlet.java) and WPS adaptor(WPSServlet.java).
Functionality of TestSevlet: It is sending a request to WPSServelt similar to the way we are doing it in SSOAdaptor.
Functionality of WPSServlet: It will receive the request parameters and write the parameter Map to console.
We have deployed and these two servlets(in a single webapplication) on Tomcat server and the request parameters are reaching the WPSServlet successfully.
Output on Tomcat server:
before sending request
**********************Inside WPS Servlet -- the request Map is:{TypeAcc=[Ljava.lang.String;@14e3f41, ServiceName=[Ljava.lang.String;@1acd47, GMEPortalUserID=[Ljava.lang.String;@19b04e2, UserID=[Ljava.lang.String;@5dcec6, Country=[Ljava.lang.String;@b25b9d}
after sending request
After this we have deployed these two servlets (with in a single webapplication) on the Weblogic server in Dev machine(path: /apps/usmport/domains/usmport/servers/usmport_admin/upload/ssoAdaptor/WEB-INF/classes/com/gm/gmeportal/security/adaptor) and
now the request parameters are not reaching the WPSServlet.
Output on Weblogic Server:
before sending request
**********************Inside WPS Servlet -- the request Map is:{}
after sending request
Looks like there is some problem with Weblogic while sending/Receiving the request using the HttpURLConnection object.
When we send a request to WPSAdaptor using the Old SSOAdaptor code which is on the SunOne server the request parameters are received by WPS successfully. And also in Create User Functionality of Portal we are sending a request to webpass(which is on Sunone Server) using the HttpURLConnection object and the SOAP request is received successfully by the Webpass.
Looks like when we send request (using HttpURLConnection) from a server other than Weblogic to a servlet in a Weblogic the request parameters are received with out issues. Where as when the request is sent from weblogic to weblogic the request parameters are missing some how.
Please find below javs source code used to test this:
TestRequest.java
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
public class TestRequest {
* @param args
public static void main(String[] args) throws Exception{
// TODO Auto-generated method stub
excutePost("http://localhost:8080/Testing/TestServlet", "GMEPortalUserID=captest.wss@it0555&UserID=bl1133&Country=it&TypeAcc=256&ServiceName=Logon");
//System.out.println("********** Now the request is from SSO *****************");
//excuteGet("http://10.156.0.173:7013/channel21/wpsadapter", "GMEPortalUserID=captest.wss@it0554&UserID=bl1133&Country=it&TypeAcc=256&ServiceName=Logon");
public static String excutePost(String targetURL, String urlParameters)
URL url;
HttpURLConnection connection = null;
try {
//Create connection
url = new URL(targetURL);
connection = (HttpURLConnection)url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Content-Type",
"application/x-www-form-urlencoded");
connection.setRequestProperty("Content-Length", "" +
Integer.toString(urlParameters.getBytes().length));
connection.setRequestProperty("Content-Language", "en-US");
connection.setUseCaches (false);
connection.setDoInput(true);
connection.setDoOutput(true);
//Send request
DataOutputStream wr = new DataOutputStream (
connection.getOutputStream ());
wr.writeBytes (urlParameters);
wr.flush ();
wr.close ();
//Get Response
InputStream is = connection.getInputStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is));
String line;
StringBuffer response = new StringBuffer();
while((line = rd.readLine()) != null) {
response.append(line);
response.append('\r');
rd.close();
System.out.println("Response is:" + response);
return response.toString();
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
if(connection != null) {
connection.disconnect();
public static String excuteGet(String targetURL, String urlParameters) throws Exception
URL url = new URL(targetURL);
HttpURLConnection httpurlconnection =
(HttpURLConnection) url.openConnection();
/*httpurlconnection.setRequestProperty(
"cookie",
constructRequestParams(httpservletrequest.getCookies()));*/
httpurlconnection.setDoOutput(true);
httpurlconnection.setDoInput(true);
httpurlconnection.setRequestProperty(
"Content-length",
String.valueOf(urlParameters.length()));
OutputStream outputstream = httpurlconnection.getOutputStream();
outputstream.write(urlParameters.getBytes());
outputstream.flush();
//Get Response
try{
InputStream is = httpurlconnection.getInputStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is));
String line;
StringBuffer response = new StringBuffer();
while((line = rd.readLine()) != null) {
response.append(line);
response.append('\r');
rd.close();
System.out.println("Response from SSO is:" + response);
return response.toString();
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
if(httpurlconnection != null) {
httpurlconnection.disconnect();
TestServlet.java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
* Servlet implementation class TestServlet
public class TestServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
* Default constructor.
public TestServlet() {
// TODO Auto-generated constructor stub
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doPost(request,response);
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
//System.out.println("********************** the request Map is:" + request.getParameterMap());
try {
System.out.println("before sending request");
excuteGet("http://localhost:7003/ssoAdaptor/WPSServlet", "GMEPortalUserID=captest.wss@it0554&UserID=bl1133&Country=it&TypeAcc=256&ServiceName=Logon");
System.out.println("after sending request");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
public String excuteGet(String targetURL, String urlParameters) throws Exception
URL url = new URL(targetURL);
HttpURLConnection httpurlconnection =
(HttpURLConnection) url.openConnection();
/*httpurlconnection.setRequestProperty(
"cookie",
constructRequestParams(httpservletrequest.getCookies()));*/
httpurlconnection.setDoOutput(true);
httpurlconnection.setDoInput(true);
httpurlconnection.setRequestProperty(
"Content-length",
String.valueOf(urlParameters.length()));
OutputStream outputstream = httpurlconnection.getOutputStream();
outputstream.write(urlParameters.getBytes());
outputstream.flush();
//Get Response
try{
InputStream is = httpurlconnection.getInputStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is));
String line;
StringBuffer response = new StringBuffer();
while((line = rd.readLine()) != null) {
response.append(line);
response.append('\r');
rd.close();
//System.out.println("Response from SSO is:" + response);
return response.toString();
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
if(httpurlconnection != null) {
httpurlconnection.disconnect();
WPSServlet.java
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
* Servlet implementation class WPSServlet
public class WPSServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
* @see HttpServlet#HttpServlet()
public WPSServlet() {
super();
// TODO Auto-generated constructor stub
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
System.out.println("**********************Inside WPS Servlet -- the request Map is:" + request.getParameterMap());
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request,response);
Thanks,
Nagesh -
Help: Sending HTTPService request using POST to a php script
Hello all,
I need help in learning the proper method of communicating to php scripts from flex 3. I am very new to flex 3, php and web development. Thanks!
What I am trying to do is as follows:
1. User drags and drops a few items in a list control
2. user clicks a button to send these keywords to server php script
3. server will form a query based on the words sent and retrieve records and send them back
Here is what I have done so far:
1. When I send a request to server without any parameters, I amable to receive the request and query the database and send results in xml format
current issues I am facing:
1. I am gathering the list of entries in list control as follows:
<*** this function is callled when user decides to send request to server ***>private function startsearch():void {
var i:int;
var myAC:ArrayCollection = ArrayCollection(SelCtypes_id.dataProvider);
var nct:XML = new XML("<contenttypes></contenttypes>");
// add contenttype child now
for (i = 0; i<myAC.length; i++) {
nct.appendChild(XML(<contenttype>{myAC[i].toString()}</contenttype>));
var params:Object = new Object();
params.contenttypes = nct.toXMLString();
getsearchresults.send(params);
<*** my http service entry****>
<mx:HTTPService id="getsearchresults"
method="post"
url="http://localhost/search_xml.php"
result="handlesearchresultsXml(event)"
contentType="application/xml" />
This is what I see in flex debugger just when the request is sent out:
-> just before gersearchresults.send(params) call:
params.contenttypes = "<contenttypes>
<contenttype>AVI</contenttype>
<contenttype>SWF</contenttype>
</contenttypes>"
<*** within the HTTPrequest send function, I see th following in debugger ***>
message.contentType="application/xml"
message.body = paramsToSend shows "<contenttypes><contenttypes>
<contenttype>AVI</contenttype>
<contenttype>SWF</contenttype>
</contenttypes></contenttypes>"
This looks like my XML object is again formatted by an out <contenttypes> tag and the string is converted to be HTML safe (i.e. <, > notation).
It looks like I am not doing something right with my params formation to XML and HTTPservice is reformatting it to be some form of XML (I do not know XML well either :-)
My questions:
1. What am I doing wrong?
2. If there is a good example where I can send multiple parameters from flex client to php server and get data back where the request parameters will beof the form...
<query>
<type1>
<type1val>value1</type1val>
<type1val>value2</type1val>
</type1>
<type2>
<type2val>value3</type2val>
<type2val>value4</type2val>
</type2>
</query>
Thanks for your help!Hi, I'm having a problem with a similiar issue :/
I'm getting the error #1010 (A term is undefined and has no properties):
at flexGraph/httpResultHandlerUserInfo()
at flexGraph/__userInfoXML_result()
etc.
I removed some parts of the code so it's easier to read, if you can help me. I'm trying to populate a datagrid with info from a database, according to the alias I choose in the ComboBox. I get the error when I pick an alias from the ComboBox.
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.events.DropdownEvent;
[Bindable] private var usersInfo:ArrayCollection;
private function httpResultHandlerUserInfo(event:ResultEvent):void{
usersInfo = event.result.users.user;
private function chooseUserCB(event:DropdownEvent):void{
userInfoXML.send();
]]>
<mx:HTTPService id="userInfoXML" url="http://www.mysecondplace.org/flex/userInfo.php"
result="httpResultHandlerUserInfo(event)"
useProxy="false" method="POST">
<mx:request xmlns=""><alias>{usersAliasCB.selectedItem.alias}</alias></mx:request>
</mx:HTTPService>
<mx:ComboBox id="usersAliasCB"
x="10" y="10"
labelField="alias"
close="chooseUserCB(event)"/>
<mx:DataGrid id="testing"
x="10" y="100"
dataProvider="{usersInfo}"/>
Here's an example from the PHP file:
$query_user = "SELECT * FROM users WHERE alias='.$_POST["alias"].'";
Help me please -
I've the following header and http request.
POST http://deab/DexNETWebServices_4_0_0_4/LoginService.svc HTTP/1.1
MIME-Version: 1.0
Content-Type: multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1";start-info="application/soap+xml"
VsDebuggerCausalityData: uIDPo5F/qXRc4YJImqB6Ard30cQAAAAAAjIXinpIVUulXLJOsSG7yyv7Lf2yHgpHlIxvc6oeqaAACQAA
Host: deab
Content-Length: 1017
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
--uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1
Content-ID: <http://tempuri.org/0>
Content-Transfer-Encoding: 8bit
Content-Type: application/xop+xml;charset=utf-8;type="application/soap+xml"
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://tempuri.org/ILoginService/LoginByUserName</a:Action><a:MessageID>urn:uuid:cf410a05-23d4-4b92-a22c-329cbc19fbe7</a:MessageID><a:ReplyTo><a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address></a:ReplyTo><a:To s:mustUnderstand="1">http://deab/DexNETWebServices_4_0_0_4/LoginService.svc</a:To></s:Header><s:Body><LoginByUserName xmlns="http://tempuri.org/"><systemId>19e0ddb4-5fa5-41ee-b624-aea762865a6c</systemId><strName>FirmwareUpdateLogQueryWorker</strName><productId>0af39a3e-6549-485b-872f-b73413203998</productId><password>abc</password></LoginByUserName></s:Body></s:Envelope>
--uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1--
I'm using the following code to set the header from PL/SQL and call the request. But UTL_HTTP.get_response returns the error 400 Bad Request.
DECLARE
l_request CLOB;
l_http_req UTL_HTTP.req;
l_http_resp UTL_HTTP.resp;
v_buffer VARCHAR2 (32767);
p_status_code NUMBER (9);
p_error_message VARCHAR2 (32767);
p_response CLOB;
BEGIN
l_request :=
'--uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1'
|| CHR (13)
|| 'Content-ID: <http://tempuri.org/0>'
|| CHR (13)
|| 'Content-Transfer-Encoding: 8bit'
|| CHR (13)
|| 'Content-Type: application/xop+xml;charset=utf-8;type="application/soap+xml"'
|| CHR (13)
|| CHR (13)
|| '<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://tempuri.org/ILoginService/LoginByUserName</a:Action><a:MessageID>urn:uuid:cf410a05-23d4-4b92-a22c-329cbc19fbe7</a:MessageID><a:ReplyTo><a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address></a:ReplyTo><a:To s:mustUnderstand="1">http://deab/DexNETWebServices_4_0_0_4/LoginService.svc</a:To></s:Header><s:Body><LoginByUserName xmlns="http://tempuri.org/"><systemId>'
|| '19e0ddb4-5fa5-41ee-b624-aea762865a6c'
|| '</systemId><strName>'
|| 'FirmwareUpdateLogQueryWorker'
|| '</strName><productId>'
|| '0af39a3e-6549-485b-872f-b73413203998'
|| '</productId><password>'
|| 'abc'
|| '</password></LoginByUserName></s:Body></s:Envelope>'
|| CHR (13)
|| '--uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1--';
DBMS_OUTPUT.put_line ('request ' || l_request);
l_http_req := UTL_HTTP.begin_request ('http://deab/DexNETWebServices_4_0_0_4/LoginService.svc', 'POST', 'HTTP/1.1');
UTL_HTTP.set_header (l_http_req, 'MIME-Version', '1.0');
UTL_HTTP.set_header (
l_http_req,
'Content-Type',
'multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1";start-info="application/soap+xml"');
-- UTL_HTTP.set_header (l_http_req, 'Content-ID', '<http://tempuri.org/0>');
-- UTL_HTTP.set_header (l_http_req, 'Content-Transfer-Encoding', '8bit');
UTL_HTTP.set_header (
l_http_req,
'VsDebuggerCausalityData',
'uIDPo5F/qXRc4YJImqB6Ard30cQAAAAAAjIXinpIVUulXLJOsSG7yyv7Lf2yHgpHlIxvc6oeqaAACQAA');
UTL_HTTP.set_header (l_http_req, 'Content-Length', LENGTH (l_request));
-- UTL_HTTP.set_header (l_http_req,
-- 'SOAPAction',
-- 'http://tempuri.org/ILoginService/LoginByUserName');
UTL_HTTP.write_text (l_http_req, l_request);
DBMS_LOB.createtemporary (p_response, FALSE);
l_http_resp := UTL_HTTP.get_response (l_http_req);
BEGIN
LOOP
UTL_HTTP.read_text (l_http_resp, v_buffer, 32767);
DBMS_OUTPUT.put_line (v_buffer);
DBMS_LOB.writeappend (p_response, LENGTH (v_buffer), v_buffer);
END LOOP;
EXCEPTION
WHEN UTL_HTTP.end_of_body
THEN
NULL;
END;
UTL_HTTP.end_response (l_http_resp);
p_status_code := l_http_resp.status_code;
p_error_message := l_http_resp.reason_phrase;
p_response := REPLACE (p_response, '<', '<');
p_response := REPLACE (p_response, '>', '>');
DBMS_OUTPUT.put_line (
'Status: ' || p_status_code || '-' || p_error_message || ': ' || p_response);
END;
Thank you for your help on this.HI Michiel
I am also trying to achieve something similar to that. I am trying to call a web service that sends an xml attachment over MTOM? Kindly, let me know if this was achievable from your end? I mean how did the issue got resolved.
thanks
vijay -
Send a request using Http(s)URLConnection through proxy issue
Hi all,
Here are system environment,
OS: Ubuntu 12.04
Java version: 1.6.0_27
OpenJDK Runtime Environment (IcedTea6 1.12.4) (6b27-1.12.4-1ubuntu1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
There are 3 roles introduction as below:
1. A https client: It can not direct connect to https server. Because it is restricted in a enclosed network environment just like intranet(ip is 10.100.11.8).The only way out is proxy server.
2. A proxy server: Locate between https client and https server. It have two network interfaces(ip are 10.100.11.10 and 192.168.11.10)
3. A https server: It is on extranet(ip is 192.168.11.123) and it also cannot connect to https client directly.
The other network environment setup is: There is no DNS server on https client network environment.
The following is part of https client code section:
public static void main(String args[]){
String proxyIp ="10.100.11.10";// proxy server IP
testConn(proxyIp);
private static void testConn(String proxyIp){
String httpsURL="https://192.168.11.123:8443/httpsServices";
setSSLContext();// I thought this is not root cause so I do not post on
try{
InetAddress intIPAdd= InetAddress.getByAddress(convStrToByte(proxyIp));
InetSocketAddress proxyInetAddr = new InetSocketAddress(intIPAdd,80);
Proxy proxy = new Proxy(Proxy.Type.HTTP, proxyInetAddr);
URL httpsUrl = new URL(httpsURL);
HttpsURLConnection httpsCon = (HttpsURLConnection) httpsUrl.openConnection(proxy);
httpsCon.setDoOutput(true);
httpsCon.setDoInput(true);
httpsCon.setRequestMethod("POST");
httpsCon.setDefaultUseCaches(true);
httpsCon.setUseCaches(true);
System.out.println("Get OutPutStream start!");
OutputStream out = httpsCon.getOutputStream(); // or httpsCon.connect();
System.out.println("Get OutPutStream done!");
OutputStreamWriter owriter = new OutputStreamWriter(out);
owriter.write("<request>test</request>");
owriter.flush();
owriter.close();
private static byte[] convStrToByte(String ip){
String str[] = ip.split("\\.");
byte[] ipAry = new byte[str.length];
for(int i=0;i<str.length;i++){
ipAry[i] = (byte) Integer.parseInt(str, 10);
return ipAry;
All right, my problem is, while print out "Get OutPutStream start" untill "Get OutPutStream done", it always takes about 5 secs.
No Error or exception. It was just hanging there approx 5 secs.
I observed the packets flow with wireshark.
Found out that hang time is to send a multicast to ask MDNS the proxy IP. No one reply this message. It would ask 3 times and then send request to proxy.
About https trust and authentication issue. I use *All Trust* solution. because https server use self-signed CA by myself.
If need, I would update this post with code section of setSSLContext() part.
I wondering to know that I create proxy object using *InetSocketAddress(InetAddress addr, int port)*, or I create proxy ip instance using *public static InetAddress getByAddress(byte[] addr)* why it would ask to MDNS for proxy ip?
On normal concept, I give an ip address and it do not need to resolve this ip for domain name.
Check InetAddress getByAddress(byte[] addr) of JAVA SE6 API:
It says: 'This method doesn't block, i.e. no reverse name service lookup is performed.'
What can I do to let https client don't need to ask MDNS?
Thank you guys so much.
Edited by: 1002346 on 2013/4/29 上午 12:05Java does reverse DNS lookups for security reasons. Not sure you can disable it but if you can it will be described on the Networking Properties page.
-
I've the following header and http request.
POST http://deab/DexNETWebServices_4_0_0_4/LoginService.svc HTTP/1.1
MIME-Version: 1.0
Content-Type: multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1";start-info="application/soap+xml"
VsDebuggerCausalityData: uIDPo5F/qXRc4YJImqB6Ard30cQAAAAAAjIXinpIVUulXLJOsSG7yyv7Lf2yHgpHlIxvc6oeqaAACQAA
Host: deab
Content-Length: 1017
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
--uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1
Content-ID: <http://tempuri.org/0>
Content-Transfer-Encoding: 8bit
Content-Type: application/xop+xml;charset=utf-8;type="application/soap+xml"
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://tempuri.org/ILoginService/LoginByUserName</a:Action><a:MessageID>urn:uuid:cf410a05-23d4-4b92-a22c-329cbc19fbe7</a:MessageID><a:ReplyTo><a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address></a:ReplyTo><a:To s:mustUnderstand="1">http://deab/DexNETWebServices_4_0_0_4/LoginService.svc</a:To></s:Header><s:Body><LoginByUserName xmlns="http://tempuri.org/"><systemId>19e0ddb4-5fa5-41ee-b624-aea762865a6c</systemId><strName>FirmwareUpdateLogQueryWorker</strName><productId>0af39a3e-6549-485b-872f-b73413203998</productId><password>abc</password></LoginByUserName></s:Body></s:Envelope>
--uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1--
I'm using the following code to set the header from PL/SQL.
l_http_req := UTL_HTTP.begin_request ('http://deab/DexNETWebServices_4_0_0_4/LoginService.svc', 'POST', 'HTTP/1.1');
UTL_HTTP.set_header (
l_http_req,
'Content-Type',
'multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1";start-info="application/soap+xml"');
UTL_HTTP.set_header (l_http_req, 'Content-Length', LENGTH (l_request));
But UTL_HTTP.get_response returns the error 400 Bad Request. How do I set MIME-Version and VsDebuggerCausalityData from the header?
Thank you for your help on this.Here is the complete code that returns the 400 Bad Request error. Thanks for your help.
DECLARE
l_request CLOB;
l_http_req UTL_HTTP.req;
l_http_resp UTL_HTTP.resp;
v_buffer VARCHAR2 (32767);
p_status_code NUMBER (9);
p_error_message VARCHAR2 (32767);
p_response CLOB;
BEGIN
l_request :=
'--uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1
Content-ID: <http://tempuri.org/0>
Content-Transfer-Encoding: 8bit
Content-Type: application/xop+xml;charset=utf-8;type="application/soap+xml"
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://tempuri.org/ILoginService/LoginByUserName</a:Action><a:MessageID>urn:uuid:cf410a05-23d4-4b92-a22c-329cbc19fbe7</a:MessageID><a:ReplyTo><a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address></a:ReplyTo><a:To s:mustUnderstand="1">http://deab/DexNETWebServices_4_0_0_4/LoginService.svc</a:To></s:Header><s:Body><LoginByUserName xmlns="http://tempuri.org/"><systemId>'
|| '19e0ddb4-5fa5-41ee-b624-aea762865a6c'
|| '</systemId><strName>'
|| 'FirmwareUpdateLogQueryWorker'
|| '</strName><productId>'
|| '0af39a3e-6549-485b-872f-b73413203998'
|| '</productId><password>'
|| 'abc'
|| '</password></LoginByUserName></s:Body></s:Envelope>
--uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1--';
DBMS_OUTPUT.put_line ('request ' || l_request);
l_http_req :=
UTL_HTTP.begin_request (
'http://deab/DexNETWebServices_4_0_0_4/LoginService.svc',
'POST',
'HTTP/1.1');
UTL_HTTP.set_header (
l_http_req,
'Content-Type',
'multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1";start-info="application/soap+xml"');
UTL_HTTP.set_header (l_http_req, 'Content-Length', LENGTH (l_request));
UTL_HTTP.set_header (l_http_req, 'MIME-Version', '1.0');
UTL_HTTP.set_header (
l_http_req,
'VsDebuggerCausalityData',
'uIDPo5F/qXRc4YJImqB6Ard30cQAAAAAAjIXinpIVUulXLJOsSG7yyv7Lf2yHgpHlIxvc6oeqaAACQAA');
UTL_HTTP.write_text (l_http_req, l_request);
DBMS_LOB.createtemporary (p_response, FALSE);
l_http_resp := UTL_HTTP.get_response (l_http_req);
BEGIN
LOOP
UTL_HTTP.read_text (l_http_resp, v_buffer, 32767);
DBMS_OUTPUT.put_line (v_buffer);
DBMS_LOB.writeappend (p_response, LENGTH (v_buffer), v_buffer);
END LOOP;
EXCEPTION
WHEN UTL_HTTP.end_of_body
THEN
NULL;
END;
UTL_HTTP.end_response (l_http_resp);
p_status_code := l_http_resp.status_code;
p_error_message := l_http_resp.reason_phrase;
p_response := REPLACE (p_response, '<', '<');
p_response := REPLACE (p_response, '>', '>');
DBMS_OUTPUT.put_line (
'Status: ' || p_status_code || '-' || p_error_message || ': ' || p_response);
END; -
Why can't I send game request using this browser as the main browser on my phone?
Every time I try to send a life on candy crush it doesn't send .
Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
The Firefox cache temporarily stores images, scripts, and other parts of websites while you are browsing. <br>
Note: ''This will temporarily log you out of all sites you're logged in to.''
To clear cache and cookies, do the following:
#Tap the menu icon located at the top right corner. This is the icon with 3 bars. On older Android devices you'll have to press the hardware menu key and then tap More.
#Tap '''Settings'''.
#After that, you will be taken to the settings screen. In the settings screen, look under the section '''''Privacy & Security''''' and select '''Clear private data'''.
#You will then be taken to a list of what can be cleared. Select the following 2 for deletion:
#*Cookies & active logins
#*Cache
#After those have been selected, tap the '''Clear data''' button to actually clear the cache and cookies.
Did this help you with your problems? Please let us know! -
Can I creatre HTML DB region contain d ynamic mapviewer request using JBC?
Hi all
I've tried sample code about create mapviewer request using PL/SQL that passed via HTML DB region...and success because it request a predifined map and theme of mapviewer...
But when I tried to insert some row to create dynamic theme using </jdbc> tag in this code ...I couldn't get the result..and the region just show a base_map same like before I inserted the jdbc request...
My question is...Could I collaborate jdbc queries in PL/SQL the create HTML DB region? If it's impossible...how is the sollution to ..for example put some point feature (i.e. store location) on our base map that PL/SQL created...I assume to not using predefine theme for this store location....or can I used cursor to populate these 'stores' coordinates and treat them as variable in PL/SQL maprequest????
Please tell me the extremely complete solution because it's very important for my life (I will die if I can't solve the problem....arrgghhhh)
Regard!
AdhiHi all
I've tried sample code about create mapviewer request using PL/SQL that passed via HTML DB region...and success because it request a predifined map and theme of mapviewer...
But when I tried to insert some row to create dynamic theme using </jdbc> tag in this code ...I couldn't get the result..and the region just show a base_map same like before I inserted the jdbc request...
My question is...Could I collaborate jdbc queries in PL/SQL the create HTML DB region? If it's impossible...how is the sollution to ..for example put some point feature (i.e. store location) on our base map that PL/SQL created...I assume to not using predefine theme for this store location....or can I used cursor to populate these 'stores' coordinates and treat them as variable in PL/SQL maprequest????
Please tell me the extremely complete solution because it's very important for my life (I will die if I can't solve the problem....arrgghhhh)
Regard!
Adhi -
Email Configuration using PL/SQL
Dear All,
I am trying to send a mail using pl/sql package, but mail is not going, its throwing the below error.
The configured ip is 192.168.5.44 . The same i am calling in the procedure
ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at "SYS.UTL_SMTP", line 20
ORA-06512: at "SYS.UTL_SMTP", line 96
ORA-06512: at "SYS.UTL_SMTP", line 138
ORA-06512: at "APPS.XX_SEND_MAIL", line 21
ORA-06512: at line 2
If anyone provide a solution it will be much helpful.
Coding used:
CREATE OR REPLACE PROCEDURE APPS.xx_send_mail (
p_to IN VARCHAR2,
p_from IN VARCHAR2,
p_subject IN VARCHAR2,
p_text_msg IN VARCHAR2 DEFAULT NULL,
p_html_msg IN VARCHAR2 DEFAULT NULL,
p_smtp_host IN VARCHAR2,
p_smtp_port IN NUMBER DEFAULT 25
AS
l_mail_conn UTL_SMTP.connection;
l_boundary VARCHAR2 (50) := '----=*#abc1234321cba#*=';
BEGIN
utl_tcp.close_all_connections;
dbms_output.put_line('first begin ');
l_mail_conn := UTL_SMTP.open_connection (p_smtp_host, p_smtp_port);
dbms_output.put_line('before smtp host ');
UTL_SMTP.helo (l_mail_conn, p_smtp_host);
dbms_output.put_line('before from ');
UTL_SMTP.mail (l_mail_conn, p_from);
dbms_output.put_line('before second begin ');
begin
dbms_output.put_line('before to mail address ');
UTL_SMTP.rcpt (l_mail_conn, p_to);
dbms_output.put_line('after to mail address ');
exception
when others then
dbms_output.put_line('sqlcode '||sqlcode||' '||' sqlerrm '||sqlerrm);
end;
dbms_output.put_line('after exception');
UTL_SMTP.open_data (l_mail_conn);
UTL_SMTP.write_data (l_mail_conn,
'Date: '
|| TO_CHAR (SYSDATE, 'DD-MON-YYYY HH24:MI:SS')
|| UTL_TCP.crlf
UTL_SMTP.write_data (l_mail_conn, 'To: ' || p_to || UTL_TCP.crlf);
--UTL_SMTP.write_data (l_mail_conn, 'Cc: ' || p_cc || UTL_TCP.crlf);
UTL_SMTP.write_data (l_mail_conn, 'From: ' || p_from || UTL_TCP.crlf);
UTL_SMTP.write_data (l_mail_conn, 'Subject: ' || p_subject || UTL_TCP.crlf);
UTL_SMTP.write_data (l_mail_conn, 'Reply-To: ' || p_from || UTL_TCP.crlf);
UTL_SMTP.write_data (l_mail_conn, 'MIME-Version: 1.0' || UTL_TCP.crlf);
UTL_SMTP.write_data (l_mail_conn,
'Content-Type: multipart/alternative; boundary="'
|| l_boundary
|| '"'
|| UTL_TCP.crlf
|| UTL_TCP.crlf
IF p_text_msg IS NOT NULL
THEN
UTL_SMTP.write_data (l_mail_conn, '--' || l_boundary || UTL_TCP.crlf);
UTL_SMTP.write_data
(l_mail_conn,
'Content-Type: text/plain; charset="iso-8859-1"'
|| UTL_TCP.crlf
|| UTL_TCP.crlf
UTL_SMTP.write_data (l_mail_conn, p_text_msg);
UTL_SMTP.write_data (l_mail_conn, UTL_TCP.crlf || UTL_TCP.crlf);
END IF;
IF p_html_msg IS NOT NULL
THEN
UTL_SMTP.write_data (l_mail_conn, '--' || l_boundary || UTL_TCP.crlf);
UTL_SMTP.write_data (l_mail_conn,
'Content-Type: text/html; charset="iso-8859-1"'
|| UTL_TCP.crlf
|| UTL_TCP.crlf
UTL_SMTP.write_data (l_mail_conn, p_html_msg);
UTL_SMTP.write_data (l_mail_conn, UTL_TCP.crlf || UTL_TCP.crlf);
END IF;
UTL_SMTP.write_data (l_mail_conn,
'--' || l_boundary || '--' || UTL_TCP.crlf
UTL_SMTP.close_data (l_mail_conn);
UTL_SMTP.quit (l_mail_conn);
END;hi
am also facing the same problem.
procedure is
CREATE OR REPLACE PROCEDURE send_mail (p_to IN VARCHAR2,
p_from IN VARCHAR2,
p_message IN VARCHAR2)
AS
l_mail_conn UTL_SMTP.connection;
l_reply utl_smtp.reply;
l_smtp_host VARCHAR2(50) := 'smtp.gmail.com:25';
l_smtp_port NUMBER := 25;
BEGIN
l_mail_conn := UTL_SMTP.open_connection(l_smtp_host, l_smtp_port);
utl_smtp.EHLO(l_mail_conn, l_smtp_host);
utl_smtp.command(l_mail_conn, 'AUTH LOGIN');
utl_smtp.command(l_mail_conn, utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw('[email protected]'))));
utl_smtp.command(l_mail_conn, utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw('mypwd'))));
l_reply :=UTL_SMTP.mail(l_mail_conn, p_from);
dbms_output.put_line( l_reply.code || ' ' || l_reply.text );
UTL_SMTP.rcpt(l_mail_conn, p_to);
UTL_SMTP.write_data(l_mail_conn, p_message || UTL_TCP.crlf || UTL_TCP.crlf);
UTL_SMTP.quit(l_mail_conn);
END;
/am calling as follows
declare
conn utl_smtp.connection;
smtp_domain VARCHAR2(256) := null;
BEGIN
utl_smtp.command(conn,'STARTTLS');
utl_smtp.helo(conn, smtp_domain);
send_mail(p_to => '[email protected]',
p_from => '[email protected]',
p_message => 'can i get message.');
END;
/and getting the error
ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at "SYS.UTL_SMTP", line 21
ORA-06512: at "SYS.UTL_SMTP", line 97
ORA-06512: at "SYS.UTL_SMTP", line 159
ORA-06512: at line 5i have checked in control panel that IIS is installed and SMTP is also setup.
i am able to ping SMTP HOST thro' TELNET
and i have changed the SMTP_OUT_SERVER parameter like
ALTER SYSTEM SET SMTP_OUT_SERVER= 'smtp.gmail.com:25' scope = botham not getting any clue. is it because of using GMAIL server?
oracle version 10g and Windows is XP - SP3
thank you for any help
Regards
Karthik -
Azure Sql DB Export to Storage Container fails with "An error occurred while sending the request"
I've built a new VM from which I'm running PowerShell scripts to backup my databases. It had worked before on an old server for several months, and worked once on the new server, then I upgraded my Azure PowerShell cmdlets, and haven't been able to
get it to work again. The new version is 0.8.10.1.
Below is my source code, with sensitive stuff replaced with ?'s. When I display the $stctx and $dbctx, they seem to have reasonable values. I added the IP address of the server as an exception to the db firewall, and I've installed SQL Server
Mangement Studio and verified that I can connect to the database. I have a feeling there's something simple I've overlooked.
Here's are both error messages:
Start-AzureSqlDatabaseExport : An error occurred while sending the request.
At C:\Users\Public\PublicCmds\test.ps1:29 char:1
+ Start-AzureSqlDatabaseExport -SqlConnectionContext $dbctx -StorageContext $stctx ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-AzureSqlDatabaseExport], HttpRequestException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet.StartAzureSqlDatabaseExport
Start-AzureSqlDatabaseExport : Error while copying content to a stream.
At C:\Users\Public\PublicCmds\test.ps1:29 char:1
+ Start-AzureSqlDatabaseExport -SqlConnectionContext $dbctx -StorageContext $stctx ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-AzureSqlDatabaseExport], HttpRequestException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet.StartAzureSqlDatabaseExport
Here is the source code:
param($dbname)
if ($dbname -eq $null) {
write-host "Database code must be specified"
return
$password = "????"| ConvertTo-SecureString -asPlainText -Force
$servercredential = new-object System.Management.Automation.PSCredential("????", $password)
$dbsize = 1
$dbrestorewait = 10
$dbserver = "????"
$stacct = $dbname
$stkey = "????"
$stctx = New-AzureStorageContext -StorageAccountName $stacct -StorageAccountKey $stkey
$dbctx = New-AzureSqlDatabaseServerContext -ServerName $dbserver -Credential $servercredential
$dt = Get-Date
$timestamp = "_" + $dt.Year + "-" + ("{0:D2}" -f $dt.Month) + "-" + ("{0:D2}" -f $dt.Day) + "-" + ("{0:D2}" -f $dt.Hour) + ("{0:D2}" -f $dt.Minute)
$bkupname = $dbname + $timestamp + ".bacpac"
write-host "db context"
$dbctx
write-host "storage context"
$stctx
write-host "Backup $dbname to $bkupname"
Start-AzureSqlDatabaseExport -SqlConnectionContext $dbctx -StorageContext $stctx -StorageContainerName databasebackup -DatabaseName $dbname -BlobName $bkupnameHi Brad,
Mentioned script, with appropriate values, works on my system.
I'm able to export an Azure SQL database to blob storage. Am using version 0.8.10.1 of cmdlets, so this the same version mentioned in this problem description.
Can you please try using Add-AzureAccount and check if that helps. This is indicated in a different third-party blog.
http://answers.flyppdevportal.com/categories/azure/azuretroubleshooting.aspx?ID=8aee89fe-430e-45fe-af54-7c8ed3ac60e1%29."http://answers.flyppdevportal.com/categories/azure/azuretroubleshooting.aspx?ID=8aee89fe-430e-45fe-af54-7c8ed3ac60e1
Does it work from a different machine with newly downloaded credentials.
Does it work for a newly created database (so minimal database size).
If above do not work, we may require additional details like RequestID, StorageAccountName, ServerName so an MS ticket may be more appropriate.
Girish Prajwal -
Hi All,
I have a small C# console app.
I have been facing some timeout issue with Sql Azure for a while now.
I now decided to use the retry logic and Reliable connections - using the
TransientFaultHandling Enterprise lib
RetryPolicy myretrypolicy = new RetryPolicy<SqlAzureTransientErrorDetectionStrategy>(3, TimeSpan.FromSeconds(3));
What should be the correct max tries and interval that actually works for SQL AZURE?
The issue i have is when i use this lib i keep getting error :
Failed to establish a MARS session in preparation to send the request to the server.
As anyone used this library successfully in a console app before.If yes can you share some resources or some sample snippet code.
CheersHey there and apologies for the slow response. Is this still an issue for you? And do you still need help?
Thanks Guy -
MapViewer add datasource by admin request - problem
Hello. Sorry for my english. I am from Russia.
Please suggest me.
I try to create datasource by admin request, but receive that error:
<oms_error>Access denied for this operation!</oms_error>
What does it mean?
that is request
<?xml version="1.0" standalone="yes"?>
<non_map_request>
<add_data_source
name="myds"
jdbc_host="mycomp1"
jdbc_port="1521"
jdbc_sid="orcl"
jdbc_user="user1"
jdbc_password="!123qwe"
jdbc_mode="thin"
number_of_mappers="3" />
</non_map_request>If you are using MApViewer 10g (e.g. 10.1.3) this has to be done from the Admin pages once you've logged in as an oc4jadmin.
To do this programmaticaly see LJ's post elsewhere in this forum on how to do this in Java. That was for clearing the map cache but the same logic applies here.
Re: How can I refresh the map cache for Oracle Maps ?
Jayant -
How can I create an csv/excel file using pl/sql and then sending that file
How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.968776 wrote:
How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.You are trying to do it at a wrong place..
Whay do you want database (pl/sql) code to do these things?
Anyhow, you may be interested in :
{message:id=9360007}
{message:id=9984244}
Maybe you are looking for
-
EPay 8.9 vs 9.0 Payroll for NA - PDFs for Payslips & W2s
We are on HCM 8.9 & want to implement the ePay but with the PDF files for payslips and W2s which is not included in ver 8.9 but is in 9.0. Is there a way to either just upgrade ePay to 9.0 without an entire HCM upgrade or a way to implement the PDFs
-
Maximum size of PDF file?
I'm assembling a book comprised mostly of photos - it will contain approximately one hundred 10MB photos (1 GB). I want to then convert the (Open Office / .odt) document to PDF. Is there any problem with generating a file this large? If curious about
-
Has anyone used their ip4 or higher with the text messaging sync system in the new ford cars it is call map
-
RARs' criteria for analyzing roles in ECC backend system?
Hi All, I'm working on setting up a prototype of Access Control 5.3. In RAR I notice the analyzis of roles is not done for all roles. I have taken note 1179717 into consideration, and also performed mass user compare. But not all roles are analyzed y
-
I tried to update my 6234. I don´t know the actual Product Code but it was Software Version 3.72, as far as i could remember, because i had to send to Nokia Service Center after update... Connection between PC and Phone worked fine. I´m using a DKU 2