Apex_web_service.make_rest_request: Passing parameters and the content type
Not sure if I am missing something, but should this API be setting the content type (to application/x-www-url-formencoded) when there are values present for the parameters p_parm_name and p_parm_value.
The example in the docs is to a yahoo API. I'm not sure about that particular one (see: http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_web_service.htm#BABEDJHJ), and I think it requires an appid (yahoo account), so i just went with the example here:
http://developer.yahoo.com/yql/guide/yql-code-examples.html#yql_php
If I run the following from a html file on my desktop it works:
<form method="POST" action="http://query.yahooapis.com/v1/public/yql">
<input type="hidden" name="q" value="select * from upcoming.events where location='San Francisco' and search_text='dance'"></input>
<input type="hidden" name="format" value="json"></input>
<input type="submit"></input>
</form>That is, it returns a JSON result.
The raw HTTP data is as follows:
POST http://query.yahooapis.com/v1/public/yql HTTP/1.1
Host: query.yahooapis.com
Connection: keep-alive
Content-Length: 110
Cache-Control: max-age=0
Origin: null
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Ubuntu/12.04 Chromium/20.0.1132.47 Chrome/20.0.1132.47 Safari/536.11
Content-Type: application/x-www-form-urlencoded
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-AU,en;q=0.8,en-US;q=0.6
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
q=select+fromupcoming.events+where+location%3D%27San+Francisco%27+and+search_text%3D%27dance%27&format=json>
However, running the following returns nothing: (nothing, as in nothing that depends on the parameters passed in)
set serveroutput on
declare
l_c CLOB;
begin
l_c := apex_web_service.make_rest_request(
p_url => 'http://query.yahooapis.com/v1/public/yql',
p_http_method => 'POST',
p_parm_name => apex_util.string_to_table('q:format'),
p_parm_value => apex_util.string_to_table('select * from upcoming.events where location=''San Francisco'' and search_text=''dance'':json'),
p_proxy_override => 'http://192.168.1.3:8888');
dbms_output.put_line(substr(l_c, 1, 4000));
end;Raw HTTP data:
POST http://query.yahooapis.com/v1/public/yql HTTP/1.1
Host: query.yahooapis.com
Connection: Keep-Alive
Content-Length: 106
Connection: close
q=select+%2A+from+upcoming%2Eevents+where+location%3D'San+Francisco'+and+search_text%3D'dance'&format=json>
I do note a key difference is that content type isn't being set in the web service API.
This was just to test a public service. I do note that the above has slighty different request data (percentage encoding on some chars). However, I experienced the same behaviour on a procedure I had written (I can also provide this example test case if you like), which is where I first noticed the issue.
Using utl_http and setting the content type to application/x-www-url-formencoded, does resolve the issue. However, just thought i'd see the possibility of using the Web service API that is made available.
Is the example in the docs valid, or am I missing something obvious?
This is on ApEx 4.1 on the OTN Dev Days VM.
Thoughts?
Hi trent,
I too have had issues with this API , so moved forward with UTL_HTTP API.
There is something amiss.
If you change your code to the one below it works.
SET SERVEROUT ON
declare
l_c CLOB;
l_param varchar2(1000) ;
begin
l_param := 'select * from upcoming.events where location=''San Francisco'' '||
' and search_text=''dance'''||'&'||'format=json';
l_c := apex_web_service.make_rest_request(
p_url => 'http://query.yahooapis.com/v1/public/yql?q='||
utl_url.escape(l_param)
,p_http_method => 'POST'
dbms_output.put_line(substr(l_c, 1, 4000));
end;
/Note the use of UTL_URL.ESCAPE. The call does not work without it.
I do not use a proxy, so that parameter does not feature in my snippet above.
Cheers,
PS: However, the below does not work. So, it appears that the p_parm_name and p_parm_value do not quite work.
SET SERVEROUT ON;
declare
l_c CLOB;
l_param varchar2(1000) ;
begin
l_param := 'select * from upcoming.events where location=''San Francisco'' and search_text=''dance''';
l_c := apex_web_service.make_rest_request(
p_url => 'http://query.yahooapis.com/v1/public/yql'
,p_http_method => 'POST'
,p_parm_name => apex_util.string_to_table('q:format')
,p_parm_value => apex_util.string_to_table(utl_url.escape(l_param)||':json')
dbms_output.put_line(substr(l_c, 1, 4000));
end;
/ Edited by: Prabodh on Oct 13, 2012 2:04 PM
Similar Messages
-
Re: content types: what is the protocol of "file" and the content type of m
The protocol is the string that goes before the "://", so for files it would be "file".
Your guess for mpegs is correct, and you can check MIME types here.
shmoovePretty much any number or a space character. Punctuation does too, in theory, but I'd advise to limit it to hyphens and underscores. Periods are OK in the middle of file names but you won't be able to start a file name with one at the Finder level since that would actually hide the file.
Matt -
Cfhttp and setting the content-type for a request
Hi,
I am trying to set the content-type for a cfhttp request like this (on coldfusion 9):
<cfhttp redirect="no" method="get" timeout="120" url="http://10.0.0.1/test2.cfm">
<cfhttpparam type="HEADER" name="Content-Type" value="application/json; charset=utf-8">
</cfhttp>
// coding on test2.cfm:
<cfset x = GetHttpRequestData()>
<cfdump var=#x#>
// Output on test2.cfm
content
[empty string]
headers
struct
Accept-Encoding
deflate, gzip, x-gzip, compress, x-compress
Connection
TE
Host
10.0.0.1:80
Proxy-Connection
close
TE
trailers, deflate, gzip, compress
User-Agent
ColdFusion
X-REWRITE-URL
http://10.0.0.1:80/test2.cfm
method
GET
protocol
HTTP/1.1
As you can see no content-type is send through. I also tried the sniffer.exe:
GET http://10.0.0.1:80/test2.cfm HTTP/1.1
Host: 127.0.0.1
Proxy-Connection: close
Connection: TE
TE: trailers, deflate, gzip, compress
User-Agent: ColdFusion
Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress
Here you can also see that no content-type was passed through. The sniffer should report back
GET http://10.0.0.1:80/test2.cfm HTTP/1.1
Host: 127.0.0.1
Proxy-Connection: close
Connection: TE
TE: trailers, deflate, gzip, compress
User-Agent: ColdFusion
Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress
Content-Type: application/json; charset=utf-8
But is does not, what do i need todo to set the content-type in a cfhttp request.
Kind regards,
Nebu12Robots - are you sure about your statement that GET method requests cannot have Content-Type headers? I don't think that that is correct. I've always thought that it was valid (maybe unusual, but ...) and this W3C link weems to agree, especially in the context of its comment about what Content-Type means in a HEAD method request: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
The big problem with trying to get around the CFHTTP limitation by using the CGI scope is that the dash is illegal in a CF varname.
There is a custom tag called CFHTTP5 that getsaround a lot of the CFHTTP limitations, including cookie preservation across multiple requests. I haven't used it for a long time (CF5), but it is still actively developed. Costs $50 - http://www.cftagstore.com/tags/cfxhttp5.cfm
-reed -
Hi there,
Help appreciated in programmatically 'Supporting content types in the gallery and for content types associated with a document library'.
Any resources/references or source is greatly appreciated.
Regards,Hi,
Would you mind providing more details about your requirement? Cause I'm not quite clear about what you really need.
What’s more, there are seems two questions in your post. If you have several questions to ask, I suggest you post them into every single thread to make them easier to be discussed
in the forum.
Best regards
Patrick Liang
TechNet Community Support -
When I change the settings to allow for the content type and page extraction and save it, it shows allowed. When I close the pdf, reopen it, review the security properties, it shows the content type as allowed and the page extraction as disallowed. I need both to stay at allowed, how do make this happen?
The moment that you select not to allow any kind of change done to the file then pages extraction is automatically not allowed as well. There's no way around that.
-
The content type for office excel 2007 in jsp page and the mime-type in we
Hi,
In my system MS Office 2007 is installed. I am trying to generating excel sheets from JSP page by setting the content type "application/vnd.ms-excel" in jsp page and as well as in web.xml file. I am getting the below message
The file you are trying to open, 'xxxxxxxx.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
Then finally the excel file is opening and displaying properly. If in my system MS Office 2003 is installed , then the above message is not coming.
I have changed the content type according to Excel 2007 <%@ page contentType= "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" %> and in web.xml file the mime type to
<mime-mapping>
<extension>xlsx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>
</mime-mapping>
even the content type is changed according to office excel 2007 , i am getting the same above message.
My client is asking not to display the above message. So how to prevent that message ?
It's very great if any body reply me as soon as possible.Hi Akash,
I am not using the POI. I am generating the excel sheet using the below code.
<jsp:directive.page import="java.util.Map" />
<jsp:directive.page import="lehman.ra.Report.ReportDefinition" />
<jsp:directive.page import="lehman.ra.RAUtilBean" />
<jsp:directive.page import="java.util.ArrayList" />
<jsp:directive.page import="lehman.util.GeneralUtil" />
<jsp:directive.page import="lehman.admin.report.AdminHtmlReportFormatter"/>
<jsp:directive.page import="lehman.helper.irprod.IRProdHelper"/>
<%@ page contentType= "application/vnd.ms-excel" %>
<jsp:directive.page import="java.util.Iterator"/>
<jsp:directive.page import="java.util.HashMap"/>
<%
String strTradeDate = (String) session.getAttribute("TradingDate");
String sContextPath = request.getContextPath();
IRProdHelper irHelper = new IRProdHelper();
String sReportFormat = "E2E";
String subtab1 = request.getParameter("subtab1");
if (subtab1 == null)
subtab1 ="";
Map report_Ids = (Map) session.getAttribute("ADMIN_E2E_REPORTS");
AdminHtmlReportFormatter formatter = new AdminHtmlReportFormatter();
ArrayList contentData = new ArrayList();
ArrayList headerData = new ArrayList();
ArrayList metaData = new ArrayList();
Map resultMap = null;
String headerString = "";
String contentString = "";
String reportId = "";
int titleSpan = 5;
if( report_Ids!=null && report_Ids.size() > 0){
Object oReportObj = null;
Iterator rowIter = report_Ids.keySet().iterator();
RAUtilBean raUtilBean = new RAUtilBean();
ReportDefinition rdef = new ReportDefinition();
while ( rowIter.hasNext() ){
oReportObj = rowIter.next();
reportId = oReportObj.toString();
System.out.println("**************reportId="+reportId);
resultMap = (HashMap) report_Ids.get(oReportObj);
if(resultMap == null )
continue;
if(resultMap.size() > 0 ) {
contentData = (ArrayList)resultMap.get(GeneralUtil.CONTENT_DATA);
headerData = (ArrayList)resultMap.get(GeneralUtil.COL_METADATA);
metaData = (ArrayList)resultMap.get(GeneralUtil.METADATA);
rdef = new ReportDefinition();
raUtilBean.setReportAttributes(rdef, headerData, metaData,reportId, sReportFormat);
titleSpan = raUtilBean.findMaxCol(contentData, rdef.getDisplayCols());
if("51031".equals(reportId)){
if(resultMap.get("HIDE_ETA")!=null){
boolean hideETA = ((Boolean)resultMap.get("HIDE_ETA")).booleanValue();
formatter.setHideETA(hideETA);
if(hideETA){
titleSpan = titleSpan-1;
rdef.setMaxCol(titleSpan);
headerString = formatter.constructHeadingForE2E(rdef, headerData);
contentString = formatter.constructContentForE2E(rdef, contentData, strTradeDate, sReportFormat);
%>
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
<meta name="ProgId" content="Excel.Sheet"/>
<meta name="Generator" content="Microsoft Excel 9"/>
<link rel="File-List" href="./Test33_files/filelist.xml"/>
<link rel="Edit-Time-Data" href="./Test33_files/editdata.mso"/>
<link rel="OLE-Object-Data" href="./Test33_files/oledata.mso"/>
<link href="<%=sContextPath %>/llehman.css" rel="stylesheet" type="text/css">
<link href="<%=sContextPath %>/llcontent.css" rel="stylesheet" type="text/css">
<style>
<xsl:comment>
table
{mso-displayed-decimal-separator:"\.";
mso-displayed-thousand-separator:"\,";}
.style0
{mso-number-format:General;
text-align:general;
vertical-align:bottom;
white-space:nowrap;
mso-rotate:0;
mso-background-source:auto;
mso-pattern:auto;
color:windowtext;
font-size:10.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Arial;
mso-generic-font-family:auto;
mso-font-charset:0;
border:none;
mso-protection:locked visible;
mso-style-name:Normal;
mso-style-id:0;}
.xl21
{mso-style-parent:style0;
color:black;
font-size:8.0pt;
font-family:Arial, sans-serif;
mso-font-charset:0;
border-top:.5pt solid silver;
border-right:.5pt solid silver;
border-bottom:.5pt solid silver;
border-left:none;}
.xl24
{mso-style-parent:style0;
mso-number-format:"\#\,\#\#0\.00_\)\;\\\(\#\,\#\#0\.00\\\)";}
.xl25
{mso-style-parent:style0;
mso-number-format:0%;}
.xl26
{mso-style-parent:style0;
mso-number-format:"\#\,\#\#0_\)\;\\\(\#\,\#\#0\\\)";}
.xl27
{mso-style-parent:style0;
background-color:#666666;
color:#FFFFFF;
font-size:9.0pt;
font-family:Arial, sans-serif;
mso-font-charset:0;
text-align:left;
vertical-align:middle;
border-top:none;
border-right:.5 pt solid silver;
border-bottom:.5pt silver;
border-left:none;
mso-pattern:auto none;
white-space:normal;
.xl55
color:black;
font-size:8.0pt;
font-weight:700;
mso-style-parent:style0;
mso-number-format:"\#\,\#\#0_\)\;\[Red\]\\\(\#\,\#\#0\\\)";
mso-pattern:auto none;
font-size:9.0pt;
font-family:Arial, sans-serif;
mso-font-charset:0;
text-align:right;
border-top:none;
border-right:.5pt solid silver;
border-bottom:.5pt solid silver;
border-left:none;
.xlDate{
mso-style-parent:style0;
mso-number-format:"yyyy\\-mm\\-dd";
.xlDateTime{
mso-style-parent:style0;
mso-number-format:"yyyy\\-mm\\-dd\\ h\\:mm\\ AM\/PM";
</xsl:comment>
</style>
<xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name><%=subtab1%></x:Name>
<x:WorksheetOptions>
<x:ProtectContents>False</x:ProtectContents>
<x:ProtectObjects>False</x:ProtectObjects>
<x:ProtectScenarios>False</x:ProtectScenarios>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml>
</head>
<body text="#000000" style="margin-left:5px;margin-top:5px">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<table border='0' cellpadding="0" cellspacing='0' width="100%">
<tr class="xl21">
<td align="left" nowrap style='font-size:11px;' colspan="<%=titleSpan%>"><b><%=subtab1%></b> - COB <%=irHelper.formatDate(strTradeDate)%> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
<!-- Report Processing -->
<tr>
<td>
<%=headerString%>
<%=contentString%>
</td>
</tr>
<%
}//end of if
}//end of while
}//end of if report_Ids
%>
</table>
</body>
</html> -
Passing parameters to the url which navigates to oracle applications
Hi All,
My requirement is i need to display a link in the email message, so that user can click it and can navigate to a form in oracle applications.
The link will be like http://shine.apps.com/function_id=670&language=US etc
I am able to display the form which the user wants, but they want the form to be queried with a value. so can anyone help me to how to pass parameters to the above url.
Thanks in advance
Srinivas DodlaI achived the same thorugh workflow. In the workflow define a attribute of type form and then pass the formname, applicaiton name, resp name and any other form parameters to it.
You can mix forms personalization to achive best results.
Thanks
Prudhvi
www.erpschools.com -
Passing parameters into the Oracle form
I want to pass some paramaters into the .fmx file which i invoke through the applet. like say, in the following line
serverArgs="module=abc001.fmx userid=user/pwd@dbuser useSDI=no"
i want to pass parameters in the following manner:
serverArgs="module=abc001.fmx(param1,param2) userid=user/pwd@dbuser useSDI=no"
since one cannot pass parameters to a .fmx file before invoking it, it does not seem possible.
But is there a sort of a workaround? A java wrapper for oracle forms?? so that i pass parametrs to the java class and it passes this info to the form.
i need to pass these parameters because these param1,param2 are the username/password for my oracle forms-based application which implements its own in-house user validation logic and i need to display the menu in the applet based on the user without prompting him for this application username/password
thanks
Any help will be highly appreciated.In the form FNDRSRUN which is the Standard Request Submission form there are parameters CHAR1-CHAR5, NUMBER1-NUMBER5, and DATE1-DATE5. I was wondering if i populate the parameter NUMBER1 with my value how can I access this parameter when the form is brought up. This is more of an applications setup issue I will be creating a function that calls the FNDRSRUN form this function will force this form to use a single request not a request group. In the request setups there is a parameter. When I set up the request parameter I have to select a value set and then for Default Type I can select Constant, Profile, SQL Statement, or Segment and then I have to give a default value. Can I default this parameter to use NUMBER1 or another parameter in the FNDRSRUN form.
-
Using Forms that don't set the content type charset
The Servlet API 2.3 has a new method, request.setCharacterEncoding(), to
deal with the fact that almost no browsers set the content type. When I call
this method passing "Shift_JIS" using weblogic 6.1, it works fine when the
content type is not set by the browser. That is, after calling
setCharacterEncoding when I call request.getParameter("testparam") I get the
correct translated value. However, if the content type is
"application/x-www-form-urlencoded; charset=Shift_JIS" and I call
request.setCharacterEncoding("Shift_JIS"), getParameter("testparam") returns
null.
Can anyone shed some light on this?
It looks like I'll have to not set the character encoding if it is already
set. That, of course, opens the possibility that the character set used for
translation is different than was used in the form.
Russ Cole
[email protected]
It might not be the new 3G network. Though I've heard the major metropolitan cities can have slower responses due to congestion.
Have you upgraded to the new operating system? Have you tried resetting your phone? You can do that by holding the "Home" and "Power" buttons down together, through the shut down screen and until the apple appears on the screen.
You might also try this:
http://www.roughlydrafted.com/2010/07/07/how-to-speed-up-your-iphone-3g-running- ios4/
It's called a cold reboot.
Sharon -
Visual Studio 2013 deploying incorrectly the content types of a document library
Hello everyone.
I created a SharePoint farm solution in VS 2013. I add four content types (say, C1, C2, C3, C4, based on the Document content type) and I create a couple of document libraries (say, L1, L2). Now I add C1 and C2 to L1, and add C3 and C4 to L2.
When I deploy the solution from VS, I go to the site and found out that L1 has C1 and C2, as expected. However, L2 has C1 and C2 instead of C3 and C4.
I have reviewed for hours the xml files (Elements, Schema, etc.) and all IDs seem to be correct and all properties are in order.
Has anyone come across a problem like this? Any thoughts will be really appreciated, as I'm clueless and frustrated at this point, after hours of dealing with this problem.
Thanks in advance!
Best regards
Fernando A. Gómez F.
fermasmas.wordpress.com
Galería de ejemplosHi Sohel, thanks for your reply.
No, I don't add them programmatically, I added the "Content Type" and "List" items to the VS solution. It generated some files, including Elements.xml and Schema.xml. Then I used the integrated VS designers to add the content types to
the list. A very run-of-the-mill solution, I think, nothing too fancy.
One thing I noticed is that I created a feature, and everytime I add a new list, instead of using the existing feature, it creates a new one, which I delete, and then add the list to the existing feature using the designer.
Finally, something weird happened today. I opened my VS, opened the solution and there was several feature files created out of the blue by the VS. I thought something was messed up with the Visual Studio Online connection, but it happens anyway when working
in disconnected mode.
Fernando A. Gómez F.
fermasmas.wordpress.com
Galería de ejemplos -
The following error occurs.
Welcome to the Exchange Management Shell!
Full list of cmdlets: Get-Command
Only Exchange cmdlets: Get-ExCommand
Cmdlets that match a specific string: Help *<string>*
Get general help: Help
Get help for a cmdlet: Help <cmdlet name> or <cmdlet name> -?
Show quick reference guide: QuickRef
Exchange team blog: Get-ExBlog
Show full output for a command: <command> | Format-List
Tip of the day #0:
Did you know that the Identity parameter is a "positional parameter"? That means you can use:
Get-Mailbox "user" instead of: Get-Mailbox -Identity "user"
It's a neat usability shortcut!
VERBOSE: Connecting to mail1.dorothy.local.
New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
the destination computer. The content type is absent or invalid. For more information, see the
about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
gTransportException
+ FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
Exception calling "GetComputerSite" with "0" argument(s): "The Specified directory object cannot be found."
At C:\Program Files\Microsoft\Exchange Server\V15\bin\ConnectFunctions.ps1:164 char:2
+ $localSite=[System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetC ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ActiveDirectoryObjectNotFoundException
Failed to connect to an Exchange server in the current site.
Enter the server FQDN where you want to connect.: mail1.dorothy.local
VERBOSE: Connecting to mail1.dorothy.local.
New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
the destination computer. The content type is absent or invalid. For more information, see the
about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
gTransportException
+ FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
Randy CheekGood Morning,
Log into the server with an account that has appropriate Exchange rights, not a local account.
Note: By default - Domain Admins don't have Exchange rights.
Dame Luthas, ITILv3, MCSE Messaging 2013, MCSA, MCITP
My Technical Blog: http://thelifestrategist.wordpress.com
Discipline is the Difference between Goals and Accomplishments
If this post is useful, please hit the green arrow on the left & if this is the answer hit "mark as answer" -
How to display name of the table and the description and the table type
Hi,
Can you people tell me how to display the name of the table and the description and the table type (View, structure, etc...) used in the program.
I want to display in a list.
Kind Regardsuse this program
TABLES : TSTC, tstct.
TABLES : DD03l, DD02l.
DATA : Program like sy-repid.
DATA : BEGIN OF I_FINAL OCCURS 0,
tabname LIKE dd02l-tabname,
TABCLASS LIKE dd02l-tabCLASS,
TEXT LIKE DD02T-DDTEXT,
END OF I_FINAL.
DATA : BEGIN of ITAB Occurs 0,
name like dd02l-tabname,
END OF ITAB.
DATA : TCD(100) TYPE C.
DATA : var1 LIKE dd02l-tabname.
DATA : DESC LIKE TSTCT-TTEXT.
selection-screen skip.
SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS : r1 RADIOBUTTON GROUP r DEFAULT 'X'.
Parameters : Tcode like sy-tcode.
selection-screen skip.
PARAMETERS : r2 RADIOBUTTON GROUP r.
Parameters : Prog like sy-repid.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
select-options : Type for dd02l-tabclass .
SELECTION-SCREEN END OF BLOCK B1 .
at selection-screen.
if r1 = 'X' and Tcode is initial.
message e001(00) with 'Enter Transaction Code' .
elseif r2 = 'X' and Prog is initial.
message e001(00) with 'Enter Program Name' .
endif.
START-OF-SELECTION.
if r1 = 'X'.
Prog = ' '.
select single * from TSTC where tcode = tcode.
if sy-subrc = 0.
program = TSTC-PGMNA.
select single TTEXT from tstct into desc where tcode = tcode and SPRSL = 'E'.
else.
Write :/ 'Invalid Transaction Code'.
exit.
endif.
elseif r2 = 'X'.
Tcode = ' '.
program = Prog.
endif.
CALL FUNCTION 'GET_TABLES'
EXPORTING
PROGNAME = Program
TABLES
TABLES_TAB = itab.
if itab is initial.
skip.
skip.
skip.
skip.
skip.
WRITE :/40 'No Data Found' color 6 INTENSIFIED OFF.
ELSE.
PERFORM : categorize.
endif.
END-OF-SELECTION.
LOOP AT I_FINAL.
WRITE :/4 I_FINAL-tabname COLOR 2 INTENSIFIED OFF NO-GAP HOTSPOT ON, 35 I_FINAL-TABCLASS COLOR 2 INTENSIFIED OFF NO-GAP,
50 I_FINAL-TEXT COLOR 2 INTENSIFIED OFF NO-GAP.
ENDLOOP.
AT LINE-SELECTION.
TCD = SY-LISEL.
var1 = TCD+3(30).
set parameter id 'DTB' FIELD VAR1.
call transaction 'SE11' and skip first screen.
TOP-OF-PAGE.
WRITE :/45 'TABLE DETAILS RELATED TO THE TRANSACTION CODE' COLOR 7 .
WRITE :/2 'DATE : ' COLOR 1, SY-DATUM COLOR 1 INTENSIFIED OFF NO-GAP.
WRITE :/2 'TRANSACTION CODE : ' COLOR 1, Tcode COLOR 1 INTENSIFIED OFF NO-GAP.
WRITE :/2 'TCODE DESCRIPTION : ' COLOR 1, desc COLOR 1 INTENSIFIED OFF NO-GAP.
WRITE :/2 'PROGRAM NAME : ' COLOR 1, PROGRAM COLOR 1 INTENSIFIED OFF NO-GAP.
SKIP 1.
WRITE :/1(140) SY-ULINE.
WRITE :/4 'TABLE NAME' COLOR 5 INTENSIFIED OFF NO-GAP,35 'TABLE TYPE' COLOR 5 INTENSIFIED OFF NO-GAP,
55 'DESCRIPTION' COLOR 5 INTENSIFIED OFF NO-GAP.
WRITE :/1(140) SY-ULINE.
*& Form categorize
text
--> p1 text
<-- p2 text
FORM categorize .
SELECT dd02ltabname dd02ltabCLASS DD02T~DDTEXT
FROM dd02l INNER JOIN DD02T ON dd02ltabname = dd02Ttabname
INTO TABLE I_FINAL
FOR ALL ENTRIES IN itab
WHERE DD02L~TABNAME = ITAB-NAME AND TABCLASS IN TYPE AND DDLANGUAGE = 'E'.
if sy-subrc <> 0.
skip.
skip.
skip.
skip.
skip.
WRITE :/40 'No Data Found' color 6 INTENSIFIED OFF.
endif. -
Hi all,
We are trying to interact with Documentum server through DFS exposed WCF which communicates through port 9443 and we are provided with documentum issued Public Key certificates. We have successfully imported the certificates in client machine and configured
the bindings as below in our .Net web application config file.
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding
name="ObjectServicePortBinding1">
<security
mode="Transport">
<transport
clientCredentialType="None"
proxyCredentialType="None"
realm=""
/>
<message
clientCredentialType="Certificate"
algorithmSuite="Default"
/>
</security>
</binding>
<binding
name="QueryServicePortBinding">
<security
mode="Transport">
<transport
clientCredentialType="None"
proxyCredentialType="None"
realm=""
/>
<message
clientCredentialType="Certificate"
algorithmSuite="Default"
/>
</security>
</binding>
</wsHttpBinding>
</bindings>
Also, we set the message encoding as MTOM and the wcf client object initialization code snippet is as below,
ObjectServicePortClient
serviceClient = new
ObjectServicePortClient(new
WSHttpBinding("ObjectServicePortBinding1"),
new
EndpointAddress(UriUtil.ObjectServiceUri));
if (serviceClient.Endpoint.Binding
is
WSHttpBinding)
WSHttpBinding
wsBinding = serviceClient.Endpoint.Binding as
WSHttpBinding;
wsBinding.MessageEncoding =
"MTOM".Equals(transferMode) ?
WSMessageEncoding.Mtom :
WSMessageEncoding.Text;
serviceClient.Endpoint.Behaviors.Add(new
ServiceContextBehavior(Config.RepositoryName,
Config.DocumentumUserName,
Config.DocumentumPassword));
When we execute the above code, we are getting error message as below,
Exception: The content type text/xml;charset=utf-8 of the response message does not match the content type of the binding (multipart/related; type="application/xop+xml"). If using a custom encoder, be sure that the IsContentTypeSupported
method is implemented properly. The first 407 bytes of the response were: '<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:VersionMismatch</faultcode><faultstring>Couldn't
create SOAP message. Expecting Envelope in namespace http://schemas.xmlsoap.org/soap/envelope/, but got http://www.w3.org/2003/05/soap-envelope </faultstring></S:Fault></S:Body></S:Envelope>'
Then, we changed the bindings as below
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding
name="ObjectServicePortBinding1">
<security
mode="Transport">
<transport
clientCredentialType="Certificate"
proxyCredentialType="None"
realm=""
/>
<message
clientCredentialType="Certificate"
algorithmSuite="Default"
/>
</security>
</binding>
<binding
name="QueryServicePortBinding">
<security
mode="Transport">
<transport
clientCredentialType="
Certificate"
proxyCredentialType="None"
realm=""
/>
<message
clientCredentialType="Certificate"
algorithmSuite="Default"
/>
</security>
</binding>
</wsHttpBinding>
</bindings>
We are getting another error message,
Exception: The client certificate is not provided. Specify a client certificate in ClientCredentials.
Any pointers on resolving this issue would be highly helpful.
ThanksHi Dhanasegaran,
As per your case, the corresponding details which may guide you to resolve this issue:
1. First of all, you can try to call the wcf service directly from the browser & check where it will point out the correct location.
2. In config file ,Set IncludeExceptionDetailInFaults to true to enable exception information to flow to clients for debugging purposes .
Set this to true only during development to troubleshoot a service like below :
<serviceBehaviors>
<behavior name="metadataAndDebugEnabled">
<serviceDebug
includeExceptionDetailInFaults="true"
/>
<serviceMetadata
httpGetEnabled="true"
httpGetUrl=""
/>
</behavior>
</serviceBehaviors>
3. I suggest you to change that <security mode ="TransportWithMessageCredential"> instead of <security mode ="Transport">
for more information, refer the following link :
https://msdn.microsoft.com/en-us/library/aa354508(v=vs.110).aspx -
I have a WCF service I am trying to run on a new installation of 64-bit Windows Server 2008 IIS. Although it runs fine on Windows 2003 IIS, it is throwing the error in the thread title, which appears to be a server config issue, but I am not sure. Googling and searching the MSDN forums did not turn up a solution. I tried running WCF Logging, but that didn't help either.
Does anyone have any suggestions on how to solve this probelm?
Here is the error:
The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>500 - Internal server error.</title>
<style type="text/css">I have the same issue on Windows 7 machine. The service works fine using a SoapUI client but a .Net client faisl to get a response.
Hi,
I have a WCF service which works perfectly when using SoapUI but throws error in my .Net client.
{"The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first
1024 bytes of the response were: '<HTML><HEAD><link rel=\"alternate\" type=\"text/xml\" href=\"http://xyz.mysite.com/ysa/Broker.svc?disco\"/><STYLE type=\"text/css\">#content{ FONT-SIZE: 0.7em;
PADDING-BOTTOM: 2em; MARGIN-LEFT: 30px}BODY{MARGIN-TOP: 0px; MARGIN-LEFT: 0px; COLOR: #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: white}P{MARGIN-TOP: 0px; MARGIN-BOTTOM: 12px; COLOR: #000000; FONT-FAMILY: Verdana}PRE{BORDER-RIGHT: #f0f0e0 1px solid; PADDING-RIGHT:
5px; BORDER-TOP: #f0f0e0 1px solid; MARGIN-TOP: -5px; PADDING-LEFT: 5px; FONT-SIZE: 1.2em; PADDING-BOTTOM: 5px; BORDER-LEFT: #f0f0e0 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0e0 1px solid; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e5e5cc}.heading1{MARGIN-TOP:
0px; PADDING-LEFT: 15px; FONT-WEIGHT: normal; FONT-SIZE: 26px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 3px; MARGIN-LEFT: -30px; WIDTH: 100%; COLOR: #ffffff; PADDING-TOP: 10px; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #003366}.intro{MARGIN-LEFT: -15px}</STYLE><TITLE>Broker
Service</TITLE></HEAD><BODY><DIV id=\"content\"><P class=\"head'."}
I have the same service hosted on my local machine and when I point to the local service I can execute the operation with no issues. The message encoding is Soap11. I tried changing to Soap12 but I get exact same error. Any ideas greatly appreciated.
I do have windows Activation Features installed and I am using .Net Framework 4.
Thanks
Sofia Khatoon -
The content type of the response message does not match the content type of the binding
I have written an ASP.Net web service which returns english,chinese and portuguese data. Everything seemed working fine until the method retunred only english data. The moment it returns english, chinese and portuguese data I get the error:
The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using
a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were:
'<!DOCTYPE html> <html> <head> <title>Runtime Error</title>
<meta name="viewport" content="width=device-width" /> <style> body {font-family:"Verdana";font-weight:normal;font-size:
.7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin- -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon
} pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt} .marker {font-weight:
bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable
{ text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } @media screen and (max-width: 639px) { pre { width: 440px; o'.
It is not written using WCF ... any workarounds?!
Thank you.Hi Raj Krish,
For ASP.NET related issue, please post to the following forum:
http://forums.asp.net/
Regards,
Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Maybe you are looking for
-
I have just had my Toshiba laptop hard drive replaced. This has resulted in all previous content held on the laptop to be lost. I wanted to try and transfer my music library from my ipad to the laptop, but it will not allow me to do so. The messag
-
Error in GENSTATUS during upgrade from CRM 4.0 to CRM 2007
Dear experts We have 12 errors in GENSTATUS after upgrading our CRM system from 4.0 to 2007. I don't know how to solve them - I had a look at SDN forum, OSS notes without success. Our system was previously connected to MSA but we want to turn it off
-
Syncing from iTunes to iPad deletes content from iTunes
I recently bought three TV series to watch while going away for a few days. They downloaded fine to my iTunes Library and I synced them to my iPad. I watched them on my iPad through ATV2 and today I went back to the iTunes library only to find that n
-
HT1349 My iPhone 4S is frozen and will not turn on or off. Help??
My iPhone 4S is frozen and will not turn on or off. Help??
-
Alert based on response time of user possible?
Hello, I'm just wondering if the following is possible in SAP (R/3, CRM, BW, etc...) Lets say I have a user that is getting poor response times on occasion. Normally, I would run a trace in ST12 when they are having a problem. But what I'd really l