Passing a large string in URL
Hi
The scenario is as follows
There are two servers A and B on different locations. From Server A i want to send a request to a url on server B. The request contains a string parameter of very large value (more than 255 characters). The problem is that I cant use a get because of the restriction.
How can I do the above in a jsp page. The string is generated dynamically when the user clicks on a link and also contains special characters like (+%)
I know i need to encode the url. But how do i post to a url on a different server
It would be nice if i can get the complete code. Short of time and cant read much thrugh the docs :)
Thanks
Sairam
That depends, what type of field are you inserting the string into? What you need to do is check the size of the field and the length of the string. If the length exceeds the field size, then you either need to increase the field size or, if you know you will be generally inserting very large strings, change the field to a clob. Hope this helps.
Similar Messages
-
Pass multiple query strings to url using HTTPWebRequest
I'm trying to read data from API (in Json format) and load it into SQL server using script task in SSIS.
Dim Request1 As System.Net.HttpWebRequest = DirectCast(System.Net.HttpWebRequest.Create(URL), System.Net.HttpWebRequest)
Dim Object1 As [Object]
Dim Response1 As System.Net.HttpWebResponse = Nothing
Dim reader1 As System.IO.StreamReader
Dim myResponseString As String
Request1.Headers.Add("Authorization: Token *****")
Try
Response1 = DirectCast(Request1.GetResponse(), System.Net.HttpWebResponse)
reader 1= New System.IO.StreamReader(Response1.GetResponseStream())
myResponseString = reader.ReadToEnd()
I'm able to do this with the URL. However, the requirement now is to pass different query strings to the URL and load the data into SQL.
Could someone please provide the code sample to achieve this.
ThanksIf we sent you a code you must try and tell that it doesn't work or that's not what I want, this is better than repeating the same question again and again. Here you go another snippet for httpwebrequest with querstrings and tested:
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Try
Dim request As HttpWebRequest = DirectCast(HttpWebRequest.Create(New Uri("http://www.google.com?querstring1=1&querystring2=2")), HttpWebRequest)
request.BeginGetResponse(New AsyncCallback(AddressOf ReadCallback), request)
Catch ex As WebException
End Try
End Sub
Private Sub ReadCallback(asynchronousResult As IAsyncResult)
Dim request As HttpWebRequest = DirectCast(asynchronousResult.AsyncState, HttpWebRequest)
Dim response As HttpWebResponse = DirectCast(request.EndGetResponse(asynchronousResult), HttpWebResponse)
Using streamReader1 As New StreamReader(response.GetResponseStream())
Dim resultString As String = streamReader1.ReadToEnd()
Dim result As String = Convert.ToString("Using HttpWebRequest: ") & resultString
End Using
End Sub
Fouad Roumieh -
Hi,
I want to pass multiple query string values using the same parameter in Query String (URL) Filter Web Part like mentioned below:
http://server/pages/Default.aspx?Title=Arup&Title=Ratan
But it always return those items whose "Title" value is "Arup". It is not returned any items whose "Title" is "Ratan".
I have followed the
http://office.microsoft.com/en-us/sharepointserver/HA102509991033.aspx#1
Please suggest me.
Thanks | Arup
THanks! Arup R(MCTS)
SucCeSS DoEs NOT MatTer.Hi DH, sorry for not being clear.
It works when I create the connection from that web part that you want to be connected with the Query String Filter Web part. So let's say you created a web part page. Then you could connect a parameterized Excel Workbook to an Excel Web Access Web Part
(or a Performance Point Dashboard etc.) and you insert it into your page and add
a Query String Filter Web Part . Then you can connect them by editing the Query String Filter Web Part but also by editing the Excel Web Access Web Part. And only when I created from the latter it worked
with multiple values for one parameter. If you have any more questions let me know. See you, Ingo -
Is it possible to pass parameters as query string to url iview of of sap tr
I have created sap transaction iview . and created url iview for this sap transaction iview. Now i want to pass the parameters to this url iview as query string? and this parameter values should populate in the sap transaction screen . Have any body worked on this?
pl. help.
thanksURL iview I think is not the right way to do this.
For this we have several templates calles application integrator.
BR, Oliver -
SAPGUI Iview and passing logon language as query string in URL
Dear Portal experts, is it possible to send the sapgui logon language as query string in URL so sso login to EP is language JP and the login to SAPGUI Iview (for windows) can be different langauge eg English. There is a document that talks abt configuration setting for SAPGUI for HTML , but no documentation for SAPGUI for windows using shortcut..
eg : http://serverhost:port/...../xxxx.iview?sap-config-mode=true&sap-language=ja
Please let know ...thanks.
Regards
GabrielHi Gabriel,
There are some context variables available for Generic component of app integrator. You can refer to the below link.
http://help.sap.com/saphelp_nw70/helpdata/en/36/5e3842134bad04e10000000a1550b0/content.htm
I know transaction iView is a different component but worth giving it a try.
Regards,
Mahesh
Edited by: Mahesh Krishnapillai on Jan 6, 2012 1:09 PM -
Passing a Path string results in mangled name
So I have a script that I made that takes a bunch of PDFs from a folder, and puts the resulting PDF into DropBox's Public folder. So, the DropBox path is ~/ericdannewitz/Dropbox/Public/JulieanneMartin/ and the file name would be JuileAnne Martin - 08-30-2011.pdf
When I pass the string that has the whole name and path to Adobe Acrobat (current version), it contains this:
"HD:Users:ericdannewitz:Dropbox:Public:JulieAnneMartin:JulieAnne Martin - 08-30-2011.pdf"
Though when Acrobat saves it, it comes out in Dropbox as "JulieAnne Martin - 08-30-2011#0" sometimes.
Ideas? I just tested it again on another Mac, and it came out right, but the production machine kept leaving out the end part of the filename. Both versions of Acrobat, and OS X are the same (Acrobat X and 10.6.8).That depends, what type of field are you inserting the string into? What you need to do is check the size of the field and the length of the string. If the length exceeds the field size, then you either need to increase the field size or, if you know you will be generally inserting very large strings, change the field to a clob. Hope this helps.
-
How to disable web service authentication by sap-user string in url
Hi Experts,
I am publish some RFC function as webservice for my SAP AS ABAP, i set the authentication as basic. I can using http basic authentication to call the service and get the result. But it also accept passing user/password through the url string: http://localhost:8001/sap/bc/soap/wsdl11?services=BAPI_PO_CHANGE&sap-client=100&sap-user=myId&sap-password=myPassword
I want to disable this, make it no user/password through url string. Can anyone tell me how to do it, thanks.
Best regards,
PeterWell, it's not a backdoor - but (extremely) bad style: an URL should never contain any authentication data (like UID & PWD) nor should it ever contain any (security) session ID (which, if valid, would allow to skip authentication).
So, I agree with you / your customer: it should be (made) possible to configure the system to discard / ignore any authentication data which is contained in the URL.
I recommend to submit a customer message to SAP (using message component BC-MID-ICF). You might refer to this SDN posting (by providing the URL) in the support ticket.
PS: Basic Authentication is not much better but at least the information (UID & PWD) is not sent in the clear (although simply Base64-encoded) and not in the URL (but in the http header). Sending cleartext data in the URL is really the worst. The best is: use stronger authentication mechanisms (e.g. X.509 client certificates, Kerberos, Biometric authentication mechanisms, etc.). -
Passing / parsing XML String IN / OUT from PL / SQL package
Hello, People !
I am wondering where can I find exact info (with code sample) about following :
We use Oracle 8.1.6 and 8.1.7. I need to pass an XML String (could be from VARCHAR2 to CLOB) from VB 6.0 to PL/SQL package. Then I need to use built in PL/SQL XML parser to parse given string (could be large hierarchy of nodes)
and the return some kind of cursor thru I can loop and insert data into
different db Tables. (The return value may have complex parent/child data relationship - so I am not sure If this should be a cursor)
I looked online many site for related info - can't find what I am looking
for - seems like should be a common question.
Thanx a lot !Hello, People !
I am wondering where can I find exact info (with code sample) about following :
We use Oracle 8.1.6 and 8.1.7. I need to pass an XML String (could be from VARCHAR2 to CLOB) from VB 6.0 to PL/SQL package. Then I need to use built in PL/SQL XML parser to parse given string (could be large hierarchy of nodes)
and the return some kind of cursor thru I can loop and insert data into
different db Tables. (The return value may have complex parent/child data relationship - so I am not sure If this should be a cursor)
I looked online many site for related info - can't find what I am looking
for - seems like should be a common question.
Thanx a lot ! -
How to pass two parameters in one url?
the tutorial teaches me to use
/faces/Details.jsp?personId=#{currentRow.value['PERSON.PERSONID']}
to pass one parameter.
How can i pass two parameters in one url?
/faces/Details.jsp?personId=#{currentRow.value['PERSON.PERSONID']}&personName=#{currentRow.value['PERSON.PERSONNAME']}
is not right.The '&' character needs to be escaped, lest it be interpreted by the application server as a separator character in the HTTP query string. Instead of '&', try '%26'.
// Gregory -
Newbie question: Binding very large strings ( 4k) to OLAP query
Hi there guys
I am using Oracle 10.2 and I am trying to bind string variables to olap literals in my query string:
SELECT TRUNC(IND-TO_DATE('01011900','ddmmyyyy')+2),VAL1
FROM (
SELECT *
FROM TABLE(
OLAP_TABLE(
'OLAPFAME.MAG_CRD DURATION SESSION',
:1 ))
MODEL
DIMENSION BY(IND)
MEASURES(VAL1,R2C1)
RULES UPDATE SEQUENTIAL ORDER())
WHERE OLAP_CONDITION( R2C1, :2, 1 )=1
I try and setString() to params 1 and 2, but it doesnt seem to work. The reason I am trying this is because when I pass large (>4K) DML string literals inline, I get ORA-01704. Hence me trying to bind to the variables via prepared statements (not even sure if this will get me past this 4k problem)!
I have also read that I can store these large strings in variables and use those as a OLAP DML string via the ampersand syntax (not sure how to do this, ensuring that they would just have statement scope).
Sorry if this is obtuse, but I'm at my wits end after a long days "trying stuff" :(
Thanks in advance
AdamOnce again, I answer my own question. -_-;;
The second process (fetch_comments) seems to be unnecessary. The Automated Row Fetch seems to be able to handle the 32K by itself. I'm still curious why the second process didn't work though.... -
Passing a long string from Vb to stored proc
Hi,
I am passing a long string from Vb to this stored proc ..
defn:
Create Or Replace Procedure saveTaxFormInDB(intFormUID IN number,
intCLUID IN number,
PDFdata IN varchar2,
Status IN OUT Varchar2) AS
Problem lies with the string pdfdata. I am sending it from VB as:
Set cmdParamStr = cmdAdoCmd.CreateParameter("Data", adVarChar,
adParamInput, 32767, strData)
I have checked the parameters in VB while sending and I have the
correct string argument to be passed to "PDFData", But i am not
sure if it is getting the value correctly.
Because I know that the code is raising exception while
accessing PDFData. (eg. in places like insert ..(pdfdata) and
length(pdfdata)...)
Please advise how i can solve this problem.
Please Note that the string is not VERY large. I do not need to
use LOBS in any way. the string is definitely within the limits
of varchar2(which i think is 4000 chars.. correct me if i am
wrong).
Many thankswhat is the backend MS SQl server or Oracle.??
If it is MS SQLSERVER, then
1.Create a SqlCommand object with the parameters as the name of the stored procedure that is to be executed and the connection object con to which the command is to be sent for execution.
SqlCommand command = new SqlCommand("Name of StoredProcedure",con);
2.Change the command objects CommandType property to stored procedure.
command.CommandType = CommandType.StoredProcedure;
3.Add the parameters to the command object using the Parameters collection and the SqlParameter class.
command.Parameters.Add(new SqlParameter("@parametername",SqlDbType.Int,0,"Filedname"));
4.Specify the values of the parameters using the Value property of the parameters
command.Parameters[0].Value=4;
command.Parameters[1].Value="ABC";
If it is oracle,
OracleConnection con = new OracleConnection("uid=;pwd=");
try
con.Open();
OracleCommand spcmd = new OracleCommand("Name of StoredProcedure");
spcmd.CommandType = CommandType.StoredProcedure;
spcmd.Connection = con;
spcmd.Parameters.Add("empid", OracleType.Number, 5).Value = txtEmpid.Text;
spcmd.Parameters.Add("sal", OracleType.Number, 5).Value = txtSal.Text;
spcmd.ExecuteNonQuery();
} -
Passing a large 3D-array to a sub vi and back causes huge loss of performance
I am passing a large 3D-Array of type I16 to a sub-vi node of same type, and back to the main VI. For test purposes I have removed all processing in between. Still, the sub-vi call requires many ms to s, depending on array size. I was under the impression that variables are passed to sub-VIs by reference. Is this incorrect? can it be fixed?
JohannesHi Johannes,
(There may be exceptions but) No, variables are not passed and returned by reference.
"A fix" may be possible by restructuring your app such that the large 3d array never gets moved around. This can be done by using what I call an action engine. It uses a variation of the LV2 global to store the large array ONE TIME in a shift register. After that, all other operations are performed "in-place".
This technique has allowed me to process very large data sets "on-the-fly".
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction -
Need help on breaking a large string into substringsto fit in a line
hii,suppose i have i have large string (the content of which is not apparently visible to me)which i want to show in a text area ,,,now how can i break it into multiple lines to be able view the total string...
i dont want to use horizantal scrollbar...
here i submit a sample code..and pls show me the neccesary modifications...
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class textarea extends JFrame
textarea()
super("Text area length test");
setSize(640,480);
Container contentpane=getContentPane();
JTextArea area=new JTextArea("Split panes allow the user to dynamically change the size of two or more components displayed side-by-side (within a window or another panel). Special dividers can be dragged with the mouse to increase space for one component and decrease the display space for another. Note that the total display area does not change. This gives applications a more modern and sophisticated view. A familiar example is the combination of a tree and a table separated by a horizontal divider (e.g. file explorer-like applications). The Swing framework for split panes consists only of JSplitPane.");
area.setLayout(new BorderLayout());
contentpane.add(area);
setVisible(true);
class texttest
public static void main(String args[])
new textarea();
In the original code the Stron to be printed is not visible to me...Configure the text area so that it uses word wrap (see the javadoc)
Kaj -
Error while passing ODI variable in JNDI Url for JMS Queue XML
Hi,
Facing a weird problem while passing ODI variable in JNDI Url for JMS Queue XML.
Below is the JNDI Url configured under ODI Topology:
JNDI Url: t3://<host_location>?d=#TEST.SCHEMA_FILE&s=<schema_name>&JMS_DESTINATION=jms/<queue_name>
where,
#TEST.SCHEMA_FILE --> ODI variable storing xsd name and location
Issue Description:
If we restart ODI server then for the first run of any ODI interface using JMS Queue XML, it is unable to get the value for ODI variable present in JNDI Url (d=#TEST.SCHEMA_FILE).
It throws error message saying: No XSD found
Temporary Resolution:
As a temporary fix if we hard-code and pass the value in that ODI variable as shown below, it will successfully go through.
eg: JNDI Url: t3://<host_location>?d=C:\XSD\test.xsd&s=<schema_name>&JMS_DESTINATION=jms/<queue_name>
Reverting it back to variable later will have no issues and subsequent run will succeed.
But again anytime later if server is restarted then first run will have this issue.
Want to have permanent fix for it.
Any one having idea on it please share. Appreciate your help!What ODI version are you using? It could be related to the bug in the older version as described in support note Doc ID 1290326.1
-
Sun Studio 12u1 cc passes empty filename strings to the linker
Hi,
Sun Studio 12u1 cc passes empty filename strings to the linker, as demonstrated with the following
trivial test case.
This problem occurs while trying to compile the Boost 1.42 beta 1 libraries with Sun Studio 12u1.
goanna% cat e.c
int main()
return 0;
goanna% cc -V
cc: Sun C 5.9 SunOS_i386 Patch 124868-11 2009/11/21
usage: cc [ options] files. Use 'cc -flags' for details
goanna% cc "e.c" ""
goanna% kde12u1
goanna% cc -V
cc: Sun C 5.10 SunOS_i386 Patch 142363-03 2009/12/03
usage: cc [ options] files. Use 'cc -flags' for details
goanna% cc "e.c" ""
ld: fatal: file : open failed: No such file or directory
ld: fatal: File processing errors. No output written to a.out
goanna%
Thanks, MarkThanks for filing the bug report. It will be visible at [http://bugs.sun.com] in a day or two as bug 6921481.
Maybe you are looking for
-
Problem in Painting in JDesktopPane
Hi Here is the code for my class: public class DiagramPane extends JDesktopPane{ public DiagramPane() { setDragMode(JDesktopPane.OUTLINE_DRAG_MODE); public void paint(Graphics g){ super.paint(g); int cmpCount=getComponentCount(); if(cmpCount>1){ for(
-
Can I use the SDK on a PC to develop applications for the iPad, iPhone, etc
I was thinking about paying the $99 a year to join the developer program because I want to download the SDK and try creating applications for the iPhone and iPad; however, can you download the SDK and use it on a PC or does it require that you have a
-
i have an iphone 4 and i just updated to ios5 and i can't get my music to stay on my iphone and i also keep getting and error message when trying to restore iphone. anyone else having this problem?
-
Concatenating a string in a URL syntax does not work (syntax error)
I am trying to print a Report in PDF format. The code is: select '<a href="http://oasdev.oh.gov./reports/rwservlet?GDMS_ACR&Y='||:P106_YEAR||'&B='||:P100_BUSINESS_UNIT_ID||'&C='||:P106_COMMISSION_ID||'&d=('||TO_CHAR(SYSDATE,'MMDDYYYYhhMISS')||')", ta
-
Dynamic Tool TIP in Table Control
Dear Friends, Thanks in Advance. How to implement Dynamic Tool TIP in the Table Control for Particularly One Columnn. i.e rows in that Column. Note : Column contains Currency Type Data For that column, i am calculating the Quantity Multiplied with th