AXF_SOAPCALL response error 302 Moved Temporarily
DECLARE
STRREQUEST VARCHAR2(32767);
strResponse VARCHAR2(32767);
BEGIN
STRREQUEST :='<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<UsernameToken>
<Username>weblogic</Username> <Password>user_passwrod</Password>
</UsernameToken>
</Security>
</soap:Header>
<soap:Body xmlns:ns1="http://imaging.oracle/">
<ns1:updateDocument>
<documentId>2.IPM_002620</documentId>
<uploadToken></uploadToken>
<fieldValues name="Status" id="4">
<value type="TEXT">Posted</value>
</fieldValues>
<reserved>0</reserved>
</ns1:updateDocument>
</soap:Body>
</soap:Envelope>
STRRESPONSE := AXF_SOAPCALL ('http://myserver:16000/imaging/ws' , STRREQUEST, 'true' ,Null,Null );
DBMS_OUTPUT.PUT_LINE (STRRESPONSE);
end;
getting the folowing response :
<html><head><title>302 Moved Temporarily</title></head>
<body bgcolor="#FFFFFF">
<p>This document you requested has moved temporarily.</p>
<p>It's now at http://amcon-orclipm1:16000/imaging/ws/.</p>
</body></html>
Any idea what's the error :
302 Moved Temporarily
his document you requested has moved temporarily
Thanks
Bilal
Hi,
I am working on a similar scenario where I my consuming an external web service using https protocol from PI.
I have configured a soap receiver channel to call the target url of this web service as https://portal.xyz.org.uk/webservice_alt.
I am getting an error HTTP 302 suggesting that PI is not able to follow the re-direction to the target URL as the service resides not on that URL but on https://portal1.xyz.org.uk/webservice_alt or https://portal2.xyz.org.uk/webservice_alt.
This is their server fail over handling mechanism which is very common. But PI 7.0 is not able to handle this.
So if I change the target URL on the SOAP receiver channel to https://portal1.xyz.org.uk/web service or https://portal2.xyz.org.uk/webservice_alt , PI works fine without errors . But this is not the right approach because, every time the web service provider takes one of these systems down for upgrade/patching etc, they inform us and then I manually go and change the target URL to the available server on my production PI system config.
My problem is I want to resolve this redirection error in PI. I have tried raising a call with SAP itself and they pointed out to use Axis adapter which is still not working.
So I am here asking for help. any suggestions please from the experts?
Thanks
Jhansi.
Similar Messages
-
Distributed Document Capture and UCM commit issue: 302 Moved Temporarily
I am installing and configuring Oracle Document Capture and Oracle Distributed Document Capture to commit documents to Oracle UCM.
I am unable to commit documents to UCM because of the following error: "302 Moved Temporarily". What can be wrong with my configuration?
Error log from the ODDC:
Wed Dec 15 10:20:14 CET 2010 INFO Document file name is D:\oracle\Document Capture\Batches\001\00000001\00000001_1.
Wed Dec 15 10:20:14 CET 2010 INFO Begin Check In Process.
Wed Dec 15 10:20:14 CET 2010 INFO Idc service = CHECKIN_UNIVERSAL.
Wed Dec 15 10:20:14 CET 2010 INFO Parsing xml to obtain fields data.
Wed Dec 15 10:20:14 CET 2010 INFO dDocTitle: oddc.
Wed Dec 15 10:20:14 CET 2010 INFO dDocType: Application.
Wed Dec 15 10:20:14 CET 2010 INFO Field DocAuthor: weblogic.
Wed Dec 15 10:20:14 CET 2010 INFO dSecurityGroup: Public.
Wed Dec 15 10:20:14 CET 2010 INFO dDocAuthor: weblogic.
Wed Dec 15 10:20:14 CET 2010 INFO dDocAccount: .
Wed Dec 15 10:20:14 CET 2010 INFO primaryFile: D:\oracle\Document Capture\Batches\001\00000001\00000001.1.
Wed Dec 15 10:20:15 CET 2010 SEVERE Failed to check in document. Exception: {0}. Error is: oracle.stellent.ridc.protocol.http.HttpProtocolException: HTTP/1.1 302 Moved Temporarily
at oracle.stellent.ridc.protocol.http.IdcHttpProtocol.writeRequest(IdcHttpProtocol.java:171)
at oracle.stellent.ridc.IdcClient.sendRequest(IdcClient.java:140)
at com.oracle.capture.UCM11g.Driver.checkIn(Driver.java:192)
at com.oracle.capture.UCM11g.ComDriver.checkIn(ComDriver.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.jniwrapper.win32.com.server.IDispatchServer.invoke(SourceFile:209)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.jniwrapper.win32.com.server.CoInterfaceVTBL$VirtualMethodCallback.b(SourceFile:232)
at com.jniwrapper.win32.com.server.CoInterfaceVTBL$VirtualMethodCallback.callback(SourceFile:135)
at com.jniwrapper.Callback.enterPoint(SourceFile:222)
at com.jniwrapper.Function.invokeCFunc(Native Method)
at com.jniwrapper.FunctionCall.a(SourceFile:126)
at com.jniwrapper.FunctionCall.call(SourceFile:34)
at com.jniwrapper.Function.invoke(SourceFile:188)
at com.jniwrapper.Function.invoke(SourceFile:212)
at com.jniwrapper.win32.MessageLoopThread$LoopThread.run(MessageLoopThread.java:489)
Error log from the WLS - UCM_server1:
####<2010-12-15 10:23:52 CET> <Info> <ServletContext-> <???> <UCM_server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <8857620d73b0a621:-7e6d4fca:12ce951b643:-7ffd-0000000000000045> <1292405032703> <BEA-000000> <Failed access to redirected secure URL>
I am using Oracle Distributed Document Capture Release 10gR3 and Content Server 11g Release 1.
I configured the Oracle UCM 11g Commit Driver:
user: my_user, password: my_password, Server URL: http://localhost:16200/cs
When I am trying to commit a batch I am getting the following response:
HTTP/1.1 200 OK
Cache-Control: no-cache
Date: Wed, 15 Dec 2010 09:33:06 GMT
Content-Length: 664
Content-Type: text/plain; charset=utf-8
Set-Cookie: IDCCS_SESSIONID=yycVNLLSL1hJ3P2mQkQrjss7XLZY23r8vFbt2n4wTj7VJ2c9xQ01!-1355344816; path=/; HttpOnly
X-ORACLE-DMS-ECID: 0000IndO3b39_aW5Pzw0yd1D28UE00000t
X-Powered-By: Servlet/2.5 JSP/2.1
<?hda version="11gR1-11.1.1.3.0-idcprod1-100505T121221" jcharset=UTF8 encoding=utf-8?>
@Properties LocalData
IdcService=PING_SERVER
ClientEncoding=UTF8
UserTimeZone=UTC
UserDateFormat=iso8601
addAlert=1
ActAsAnonymous=1
dUser=anonymous
blDateFormat=yyyy-MM-dd HH:mm:ssZ!tUTC!mAM,PM
refreshSubjects=
refreshMonikers=
changedSubjects=
refreshSubMonikers=
blFieldTypes=StatusMessage message
RedirectUrl=/cs/
changedMonikers=
idcToken=
IsJava=1
@end
@ResultSet USER_ALERTS
3
alertId
alertMsg
alertUrl
csWeblayout8dot3Error
<$lcMessage('!csWeblayout8dot3Error')$>
@end
@ResultSet UserAttribInfo
2
dUserName
AttributeInfo
anonymous
account,#none,15,role,guest,15
@end
HTTP/1.1 302 Moved Temporarily
Date: Wed, 15 Dec 2010 09:33:06 GMT
Transfer-Encoding: chunked
Location: http://localhost:16200/cs/login/login.htm
X-ORACLE-DMS-ECID: 0000IndO3c19_aW5Pzw0yd1D28UE00000u
X-Powered-By: Servlet/2.5 JSP/2.1
0113
<html><head><title>302 Moved Temporarily</title></head>
<body bgcolor="#FFFFFF">
<p>This document you requested has moved temporarily.</p>
<p>It's now at http://localhost:16200/cs/login/login.htm.</p>
</body></html>
0000
The Request:
POST /cs HTTP/1.1
User-Agent: Java; Stellent CIS 11g
IdcVersion: 11.1.1
Host: 127.0.0.1:16200
Content-Length: 124
Content-Type: text/hda; charset=UTF-8
IsJava=1
<?hda jcharset=UTF-8?>
@Properties LocalData
IdcService=PING_SERVER
UserTimeZone=UTC
UserDateFormat=iso8601
@end
POST /cs HTTP/1.1
User-Agent: Java; Stellent CIS 11g
IdcVersion: 11.1.1
Authorization: Basic d2VibG9naWM6d2VibG9naWMx
Host: localhost:16200
Cookie: $Version=0; IDCCS_SESSIONID=Z2ZpNLQbKchmg2tVB5fpQLL2pPphT4BFX18GJPbkqkxMxLVMhbLZ!-1355344816; $Path=/
Content-Length: 28963
Content-Type: multipart/form-data; boundary=67xMPN-krvICaGSzKNTkd02u8MLyarA
--67xMPN-krvICaGSzKNTkd02u8MLyarA
Content-Disposition: form-data; name="IsJava"
Content-Type: text/plain; charset=US-ASCII
1
--67xMPN-krvICaGSzKNTkd02u8MLyarA
Content-Disposition: form-data; name="ClientEncoding"
Content-Type: text/plain; charset=US-ASCII
UTF-8
--67xMPN-krvICaGSzKNTkd02u8MLyarA
Content-Disposition: form-data; name="IdcService"
Content-Type: text/plain; charset=UTF-8
CHECKIN_UNIVERSAL
--67xMPN-krvICaGSzKNTkd02u8MLyarA
Content-Disposition: form-data; name="UserTimeZone"
Content-Type: text/plain; charset=UTF-8
UTC
--67xMPN-krvICaGSzKNTkd02u8MLyarA
Content-Disposition: form-data; name="UserDateFormat"
Content-Type: text/plain; charset=UTF-8
iso8601
--67xMPN-krvICaGSzKNTkd02u8MLyarA
Content-Disposition: form-data; name="dSecurityGroup"
Content-Type: text/plain; charset=UTF-8
Public
--67xMPN-krvICaGSzKNTkd02u8MLyarA
Content-Disposition: form-data; name="dDocAccount"
Content-Type: text/plain; charset=UTF-8
--67xMPN-krvICaGSzKNTkd02u8MLyarA
Content-Disposition: form-data; name="dDocAuthor"
Content-Type: text/plain; charset=UTF-8
weblogic
--67xMPN-krvICaGSzKNTkd02u8MLyarA
Content-Disposition: form-data; name="dDocType"
Content-Type: text/plain; charset=UTF-8
Application
--67xMPN-krvICaGSzKNTkd02u8MLyarA
Content-Disposition: form-data; name="dDocTitle"
Content-Type: text/plain; charset=UTF-8
oddc
--67xMPN-krvICaGSzKNTkd02u8MLyarA
Content-Disposition: form-data; name="DocAuthor"
Content-Type: text/plain; charset=UTF-8
weblogic
--67xMPN-krvICaGSzKNTkd02u8MLyarA
Content-Disposition: form-data; name="primaryFile"; filename="00000002.1"
Content-Type: application/octet-stream; charset=ISO-8859-1
˙Ř˙ŕ<file content....>"302 Moved Temporarily" is a web server error (I googled it - see e.g. http://www.checkupdown.com/status/E302.html)
Two recommendations that you can try:
- do not use 'localhost' - use computer assigned name, or at worst IP address
- in my system, Server URL is set to http://ecm-base:16200/cs/idcplg (from ODC). Try to modify yours accordingly. -
SOAP receiver: error HTTP 302 (Moved Temporarily)
Dear all,
I configured scenario where SOAP web service is consumed from SAP ABAP system via PI. The problem is in communication with the web service: the error observed in communication channels monitor for the configured SOAP receiver channel is:
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: invalid content type for SOAP: TEXT/HTML; HTTP 302 Moved Temporarily: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 302 Moved Temporarily
The consumed web service is based on the function module developed in SAP NetWeaver 7.00 system. Endpoint for the service was then created via SOAMANAGER, generated binding's address was used as a target URL in the SOAP receiver channel.
If the service is consumed not via PI, but tested directly from external SOAP client (I used soapUI) with the same WSDL and endpoint, the response is fine and error-free.
Please advise possible root cause of the issue.
My regards,
VadimHi,
I am working on a similar scenario where I my consuming an external web service using https protocol from PI.
I have configured a soap receiver channel to call the target url of this web service as https://portal.xyz.org.uk/webservice_alt.
I am getting an error HTTP 302 suggesting that PI is not able to follow the re-direction to the target URL as the service resides not on that URL but on https://portal1.xyz.org.uk/webservice_alt or https://portal2.xyz.org.uk/webservice_alt.
This is their server fail over handling mechanism which is very common. But PI 7.0 is not able to handle this.
So if I change the target URL on the SOAP receiver channel to https://portal1.xyz.org.uk/web service or https://portal2.xyz.org.uk/webservice_alt , PI works fine without errors . But this is not the right approach because, every time the web service provider takes one of these systems down for upgrade/patching etc, they inform us and then I manually go and change the target URL to the available server on my production PI system config.
My problem is I want to resolve this redirection error in PI. I have tried raising a call with SAP itself and they pointed out to use Axis adapter which is still not working.
So I am here asking for help. any suggestions please from the experts?
Thanks
Jhansi. -
Why get 302 Moved temporarily error
details:
<div style="padHTTP/1.0 302 Moved Temporarily Date: Thu, 30 Sep 2004 21:16:06 GMT Server: atg.server.http.HttpServer Connection: close Pragma: no-cache Cache-Control: no-cache Expires: Tue, 04 Dec 1993 21:29:02 GMT Content-Type: text/html Location: http://localhost:8840/business/error.jsp?_requestid=163
302 Moved TemporarilyWhy localhost, that presumably you control, is giving that, I couldn't say. Maybe you accidentally messed up your server's config somehow, or maybe your servlet is accidentally sending content bytes when it's supposed to be sending the response header.
-
HTTP/1.1 302 Moved Temporarily Error getting while Crawling.
Hi,
I am running the application as crawling for any Url(e.x.http://tmo.eonline.mobi/).In this case I m getting the Error (HTTP/1.1 302 Moved Temporarily),so i am not able to fetch its sublinks and not able to go ahead.and my results are coming Empty.
I have put code snippet below from where i am getting error.
HTTPRedirect(final HttpMethod httpMethod) throws IOException {
final StatusLine statusLine = httpMethod.getStatusLine();
statusCode = statusLine.getStatusCode();Please give Solution for this problem or any useful link.
Thanking with you an anticipation in advance.Hi,
You should be able to get the "location" value out of the HTTP header which points to the new url which you can then process as normal.
Ben. -
Tomcat servlet respond with "302 Moved Temporarily" to HTTP GET requests
I started Tomcat (4.1.31) on a Unix machine (SunOS 5.8)
I tested the tomcat servlet using the following commands:
telnet 0 80
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
GET /index.html HTTP/1.0
HTTP/1.1 302 Moved Temporarily
Location: http://localhost/
Content-Length: 0
Date: Mon, 17 Oct 2005 18:09:15 GMT
Server: Apache-Coyote/1.1
Connection: close
Any other servlet that I test responses with the same result
Tomcat version 4.1.31
SDK build 1.3.1_02-b02
Solaris SunOS 5.8"302 Moved Temporarily" is a web server error (I googled it - see e.g. http://www.checkupdown.com/status/E302.html)
Two recommendations that you can try:
- do not use 'localhost' - use computer assigned name, or at worst IP address
- in my system, Server URL is set to http://ecm-base:16200/cs/idcplg (from ODC). Try to modify yours accordingly. -
HTTP_EXCEPTION:HTTP 302 Moved Temporarily (RFC to SOAP)
Hi gurus
Iam facing a problem with a message which is failed at Call SOAP Receiver Adapter. The error is as follows:
com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: XIAdapter:ADAPTER.HTTP_EXCEPTION:HTTP 302 Moved Temporarily
HTTP 302 means that it has been redirected.It can be caused by an authentication need. In some cases, when the user/password authentication is requested, the WS call is redirected to another page.
But the proxy authentication and user authentication was done.
Could anyboyd please tell what is the solution for this?
Thanks.Hi.
Check this thread.
XIAdapter/HTTP/ADAPTER.HTTP_EXCEPT -
Pacman -S failure---http 1.0 302 moved temporarily
hi everybody
when i use the pacman tool ,i edit thc /etc/pacman.conf , i change the site with
Server = http://mirror.vmmatrix.net/ArchLinux/current/os/i686
or other site http://mirror.lupaworld.com/archlinux/current/os/i686 .etc
these site are mirror. but when i pacman -S packages , output the error with " HTTP 1.0 302 moved temporarily'
can you help now?Hi,
You should be able to get the "location" value out of the HTTP header which points to the new url which you can then process as normal.
Ben. -
ADAPTER.HTTP_EXCEPTION / HTTP 302 Moved Temporarily
Hello all,
I have an RFC->XI->Web Service (SOAP) synchronous scenario.
I'm trying to send a message from the the RFC, and in the message monitoring (SXMB_MONI) I'm getting this error message:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Inbound Message
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIAdapter</SAP:Category>
<SAP:Code area="HTTP">ADAPTER.HTTP_EXCEPTION</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>HTTP 302 Moved Temporarily</SAP:AdditionalText>
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack />
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Does anyone knows what migth be happening?
Thanks in advance.
FelipeHello everyone,
Over a year ago I posted this issue. And I was never able to solve it. Now that I'm actually needing to do an interface of this kind, I cant find the solution.
The Web Service that I'm trying to invoke it is outside the LOCAL AREA NETWORK.
Please any ideas on how to solve this?
Thanks,
Felipe -
Redirection with out sending client a 302 Moved Temporarily
I am familiar with the NameTrans fn="redirect" and fn="mozilla-redirect", however they send a 302 Moved Temporarily response to the client.
Is there a way to have the web server redirect internally so that there is not a round trip to the browser?
I am wanting to change a old and well established path in our application to a different path but I am trying to do it with out the latency of a redirect to the browser.
BTW the old path accessed images from docroot and now I need to route them through a servlet. The path is NOT relative to our web application. The only option I can think of is to create a new web app with the path that is in use and have it forward the request within the Servlet Container. I would rather do it without having to define a new web app and servlet though
Thanks,
BretHow are you performing the ajax request?
-
HTTP/1.1 302 Moved Temporarily
I have a situation where weblogic is returning a HTTP/1.1 302 Moved Temporarily
and was curious what the reason might be.
WLS 6.1
win 2000
I.E. browser
There are two cases illustrated here. The first has no proxy settings in the browser
while the second has browsers pointing to a web proxy server.
In both cases the client resolves the IP address and establishes a TCP connection.
In both cases the weblogic server returns a 302 message indicating the url has
moved temporarily.
In both cases, the client then attempts to connect to a new url. One works and
one does not, that is another question, but for now.
Why does the server respond to the initial connection 'in both cases' with a 302
message?Hi,
You should be able to get the "location" value out of the HTTP header which points to the new url which you can then process as normal.
Ben. -
Using JDeveloper 11.1.1.6.0
We're noticing that when performing an ajax request for a static HTML file that the server responds with a 302 "Moved Temporarily" prior to pulling back the file. I'm guessing it's trying to tack on session information. I'd like the server to just respond with the content since it's static and doesn't require a session or security. Is there a way to achieve this? I searched the forums and couldn't find an answer. Essentially this is the behavior for returning content such as javascript/images - I'd like to do the same thing for this specific file.
Help appreciated!How are you performing the ajax request?
-
Evolution 2.22 and Google calendar: "Moved Temporarily"
Hi
I'm trying to get Evolution 2.22 working with my Google Calendar, but I can't see the calendar in Evolution, and if I create new entries in Evolution they do not show up on my Google Calendar (yes I have selected my Google Calendar in the dropdown box)
So I tried to look at the traffic using Wireshark, and here is what I get:
POST /calendar/feeds/[email protected]/private/full HTTP/1.0
Authorization: GoogleLogin auth=XXXXXX
Content-Type: application/atom+xml
Content-Length: 379
<?xml version="1.0"?>
<entry xmlns:gd="http://schemas.google.com/g/2005" xmlns="http://www.w3.org/2005/Atom"><category label="label" scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/g/2005#event"/><gd:when startTime="2008-04-07T22:00:00.000" endTime="2008-04-07T22:30:00.000"/><content type="text"></content><title type="text">Test</title></entry>
HTTP/1.0 302 Moved Temporarily
Set-Cookie: S=calendar=XXXXXX;Expires=Tue, 07-Apr-2009 14:31:39 GMT
Location: http://www.google.com/calendar/feeds/[email protected]/private/full?gsessionid=XXXXXX
Content-Type: text/html; charset=UTF-8
Date: Mon, 07 Apr 2008 14:31:39 GMT
Expires: Mon, 07 Apr 2008 14:31:39 GMT
Cache-Control: private, max-age=0
Content-Length: 288
Server: GFE/1.3
Connection: Close
<HTML>
<HEAD>
<TITLE>Moved Temporarily</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Moved Temporarily</H1>
The document has moved <A HREF="http://www.google.com/calendar/feeds/[email protected]/private/full?gsessionid=XXXXXX">here</A>.
</BODY>
</HTML>
I have replaced all private information with XXXXXX
I looked at the source for the Evolution Google Calendar plugin but as I'm not a C programmer it did not make much sense
Anyone got it working?enrique wrote:Yeah, and in the changelog for Gnome 2.22.1 there is no mention of a fix.
the problem should be in evolution-data-server (in the backend to google calendar) which is in another package, but I couldn't find a changelog for that.
Let's just our fingers -
HTTP error 302: response.sendRedirect()
Hi everybody,
I have a first servlet (AGSenderServlet) sending a file to a second one (AGReceiverServlet). This second servlet I'm receiving a file and then redirect to a JSP page. But I'm getting the following exception:
13-Sep-2010 13:20:42 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet AGSenderServlet threw exception
java.io.IOException: Received HTTP status code 302
at AGSenderServlet.doGet(AGSenderServlet.java:43)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
....I've looked on internet and apparently the error 302 is linked to response.sendRedirect().
Here is my code:
public class AGReceiverServlet extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
// Create a factory for disk-based file items
DiskFileItemFactory factory = new DiskFileItemFactory();
// Create a new file upload handler
ServletFileUpload upload = new ServletFileUpload(factory);
String realPath = this.getServletContext().getRealPath("sync/in");
List items = null;
try {
items = upload.parseRequest(request);
} catch (FileUploadException e) {
e.printStackTrace();
// Process the uploaded items
Iterator iter = items.iterator();
try {
String fileName = "blabla";
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();
// Process a file upload
if (!item.isFormField()) {
fileName = item.getName();
long sizeInBytes = item.getSize();
//Write to File
if (fileName != null) {
fileName = FilenameUtils.getName(fileName);
File uploadedFile = new File(realPath);
if (!uploadedFile.exists())
uploadedFile.mkdirs();
uploadedFile = new File(realPath+"/"+fileName);
item.write(uploadedFile);
System.out.println("http://"+request.getServerName()+':'+request.getServerPort()+"/upTool/filereceived.jsp?filename="+fileName);
String redirectURL = "http://"+request.getServerName()+':'+request.getServerPort()+"/upTool/filereceived.jsp?filename="+fileName;
response.sendRedirect(redirectURL);
} catch (Exception e) {
e.printStackTrace();
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
doGet(request, response);
}The file received is saved properly and is ok.
Using print out I have discovered that it was the running the whole code but not the code in filereceived.jsp (the JSP of the sendRedirect() ).
I have tried the url used in the sendRedirect() and it works ok.
Any idea?
Cheers.The AGSenderServlet is sending a file to the AGReceiverServlet using multipart and Postmethod object. Here is the code.
public class AGSenderServlet extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
String filename = request.getParameter("filename");
String ext = request.getParameter("ext");
String serverName = request.getParameter("serverName");
String port = request.getParameter("port");
String path = null;
String uri = "http://"+serverName+":"+port+"/AGReceiverServlet";
File file = new File((this.getServletContext().getRealPath("/sync/out"))+"\\"+filename+'.'+ext);
System.out.println("Test = "+file.getAbsolutePath());
PostMethod post = new PostMethod(uri);
Part[] parts = new Part[] {
new FilePart(file.getName(), file) // File you want to upload
post.setRequestEntity(new MultipartRequestEntity(parts, post.getParams()));
// Now perform the POST and check for errors
HttpClient http = new HttpClient();
int status = http.executeMethod(post);
if (status != HttpStatus.SC_OK) {
throw new IOException("Received HTTP status code " + status);
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
doGet(request, response);
}Line 43 is just throw new IOException("Received HTTP status code " + status);What do you mean by " then you should handle it." ? I think I handle it. It redirects to the JSP filereceived.jsp which is hosted and available on the server (tried to access it directly by entering the url and it works).
Edited by: Foobrother on Sep 13, 2010 7:38 AM -
Mendelson AS2 - Not able to receive messages- error 302 response code.
Team ,
Our scenario is IDOC ( Delivery ) to AS2 ( Mendelson ) . Not able to Receive AS2 message on mendelson tool. The tool is installed on the server .
Receiving the error :
Message processing failed. Cause: javax.resource.ResourceException: Message cannot be delivered: Remote server returned response code 302 and error message Found
No certificates are been used.
This is my As2 Receiver Channel. Can anyone help me on this.Team ,
On connecting to the server , mendelson AS2 Server, the channel gets connect to this ip 10.30.10.38.
Is there a proxy placed to connect to mendelson. Can anyone provide inputs on this.
Processing Details for Cluster Node Server 00 70_7097763
Type
Time Stamp
Message ID
Explanation
8/21/14 5:34:34 PM
3456cba5-2929-11e4-caad-00002a4e53de
Message processing failed. Cause: javax.resource.ResourceException: Message cannot be delivered: java.net.ConnectException: Connection timed out: connect
8/21/14 5:34:34 PM
3456cba5-2929-11e4-caad-00002a4e53de
disconnected
8/21/14 5:33:52 PM
372154d8-292b-11e4-82f8-00002a4e53de
prepared request to http://10.30.10.38:8080/as2/HttpReceiver
8/21/14 5:33:52 PM
372154d8-292b-11e4-82f8-00002a4e53de
prepared message (1 KiB)
8/21/14 5:33:52 PM
372154d8-292b-11e4-82f8-00002a4e53de
Message processing started
Maybe you are looking for
-
Payment terms at item level in Po Or IR
Hi All, İs it possible to enter terms of payment at item level. There is an invoice with different terms of payment at item level how can ı post it? Thanks
-
A standard table is missing in ABAP dictionary
We wane to use a standard program which uses a standard table(CCEE/FISISTGRD) . but when trying to execute this pgm , itrs going into dump.. The error is CCEE/FISISTGRD doesnot exist in ABAP dictionary Edited by: deepti Gandham on Apr 24, 2009 9:58 A
-
'could not connect to administration server" in essbase console
Hello friends, while i was trying to login to eas console iam getting this error message as "could not connect to administration server" even after restarting the services. Thanks in Advance..
-
How do I get my project with video onto my website?
I just want to be able to upload my project, which is a mixture of slides with video. There seems to be multiple ways to upload, but I don't know which method to use over another and while I've tried doing so the videos don't work. So I tried again
-
Officejet6500n scanning issues - can't get it to do PDF
My menu on the settings does not have PDF, only JPG and some other stuff. Does this model have the capability of doing PDF"S?