Making HTTP requests with content-disposition
I need to write a Java app that can access a web server that returns most content as files (ie. using content-disposition).
Previously I have used something like this to make HTTP GET requests to return files on a web server.
��String strUrl = "http://www.yahoo.com/index.html";
��URL url = new URL( strUrl );
��URLConnection conn = url.openConnection();
��InputStream in = url.openConnection.getInputStream();
��byte[] buf = new byte[conn.getContentLength()];
��in.read( buf, 0, getContentLength() );
This doesn't seem to work when the HTTP header has "content-disposition". Here is the header returned by the web server.
��Server=Microsoft-IIS/4.0
��Date=Thu, 04 Jul 2002 13:18:53 GMT
��Content-Disposition=filename=file.xyz
��Content-Type=text/html
��Cache-control=private
��Transfer-Encoding=chunked
��content-length=30306
The number of bytes actually read (as returned by in.read()) is less than the number of bytes as indicated in the content-length.
How can I handle this?
Mike
I have managed to discover that an incorrect content-type header is causing the problems that I have been encountering with file downloads from a web server.
As I mentioned in a previous post the content-length header was not a good indicator of file download success.
My program downloads pictures from the internet, almost always in .jpeg format. I have found that files are successfully downloaded only when the content-type header contains the words: image/jpeg. In some instances although I am trying to download a picture file the http content-type header is stated as being: text/html.
In those instances where text/html is given as the content-type file download fails in so far as the files are not acutally viewable on the native system (Windows varieties in my case).
To determine the error I used the following code:
URLConnection urlConnect = myURL.openConnection();
System.out.println("Http Header, Content-Type: "+urlConnect.getContentType());
System.out.println("Http Header, Content-Length: "+urlConnect.getContentLength());Even though content-length mostly corresponded with the downloaded files length, if the Conten-Type header was wrong then the file was all but useless.
Regards
Davo
Similar Messages
-
After Mavericks OS upgrade, can no longer make any HTTP requests with the OPTIONS verb
My machine can no longer make any HTTP requests with the OPTIONS verb. This happens whether I try it curl, postman, or ajax.
curl -i -X OPTIONS http://www.google.com returns curl: (52) Empty reply from server
It should return a long string containing a 405 error code.
I suspect that this is related to the Mavericks upgrade I did earlier this week. I only have one mac (my dev machine) with Mavericks. Other macs are Mountain Lion and they don't have this problem.
Can anyone else with Mavericks confirm whether or not they have this problem too?
If this is Mavericks related, anyone know of a fix or workaround?Turns out that it wasn't Mavericks related at all. Cisco AnyConnect has a security module running behind the scenes even when you're not VPNed into anything. It was blocking my OPTIONS verb requests. I was able to make these calls after uninstalling.
Re-installing with Web Security turned off should prevent it from happening. While I was uninstalling I did notice that there was a web security uninstall script in /opt/cisco/vpn/bin but I already committed to taking the whole app off my machine. Simply running that script could have done it too.
I must give credit to Ben Nadel. It was his blog post that helped me fix this issue.
http://www.bennadel.com/blog/2559-Cisco-AnyConnect-VPN-Client-May-Block-CORS-AJA X-OPTIONS-Requests.htm?&_=0.10495476494543254#comments_44093 -
Re: Servlet making HTTP requests
Hi,
We are using an application that uses a servlet to perform some JDBC calls
(which take about 30 minutes) and then make some HTTP requests (which takes
about 5 to 10 minutes) to another application.
Once the client has made the request to initiate this process it waits for
the complete process (40 minutes) to complete. I know this is not ideal but
its what we've got to live with.
After a minute or so after the servlet has started making the HTTP requests
the browser stops responding and has a blank frame displayed instead of the
response data. We have assumed that after the servlet makes the HTTP
requests the other application it is not interacting with the HTTP session
on the server the client is connected to and a timeout occurrs. This
termintes the request and is why we see a blank frame. Is this correct ? The
HTTP requests complete successfully in the background.
Any advice would be greatly appreciated.
Kev
Your application is really tough and interesting. Web browser usually has timeout
limit. Proxy server also has timeout limit (usually 30 seconds). If no communication
after such kind of timeout limit, your browser will stop.
When your code calls getWriter() or getOutputStream(), your servlet will flush
all HTTP response header data to your browser and your browser then will get the
response from your servlet. Beyond that, if you don't send any data from your
servlet to your browser before proxy or browser timeout, you can only get a blank
screen.
If you want to monitor how your servlet works, try to BUILD INTERCATION. At least,
send data from your servlet to your browser for each time interval which will
not be longer than browser/proxy timeout. You can send out any information you
like, if your browser understand it. NOTE YOU SHOULD EXPLICITLY CALL FLUSH() of
your OutputStream() or Writer() to flush() your data following each write(). This
way, you can keep the connection alive.
On the other hand, you can also try set content-length field of response to some
predefined number, and set Connection field as Keep-Alive, before you call getWriter()
or getOutputStream(). Then send some data to your browser, for example, one byte
at a time, until you have sent the number of bytes as specified.
"Kev" <[email protected]> wrote:
>Hi,
>
>We are using an application that uses a servlet to perform some JDBC
>calls
>(which take about 30 minutes) and then make some HTTP requests (which
>takes
>about 5 to 10 minutes) to another application.
>
>Once the client has made the request to initiate this process it waits
>for
>the complete process (40 minutes) to complete. I know this is not ideal
>but
>its what we've got to live with.
>
>After a minute or so after the servlet has started making the HTTP requests
>the browser stops responding and has a blank frame displayed instead
>of the
>response data. We have assumed that after the servlet makes the HTTP
>requests the other application it is not interacting with the HTTP session
>on the server the client is connected to and a timeout occurrs. This
>termintes the request and is why we see a blank frame. Is this correct
>? The
>HTTP requests complete successfully in the background.
>
>Any advice would be greatly appreciated.
>
>Kev
>
>
-
CFHTTP request with content-type "application/atom+xml"
Is it possible to send a HTTP request (method="post") with a body that has a set content-type (such as "application/atom+xml")?
using CFHTTP and CFHTTPPRAM, it seems the tag does not accept a content-type.
<cfhttpparam type="body" value="#myAtomXML#">
is there anyway to have CFHTTP , post the body with a given content-type?
IF NOT, could anyone point me to the right direction to accompolish this using Java?Hi,
Have you tried the "mimetype" attribute of the <cfhttpparam> tag?.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_g-h_10.html -
Hi Team,
I need to access Java web service which is simple service and accepts and returns XML over HTTP. No credentials are needed to access the service. We need to pass following two HTTP headers (Content-Type and Authorization) along with XML request message:
<GetStatus> message is being constructed in the orchestration and URI is constant to access.
Which adapter shall I use to get the response back? I tried using WCF-WSHttp with Security Mode = Transport, and different options of client credential types but every time, error returned stating:
System.Net.WebException:
The HTTP request is unauthorized with client authentication scheme 'Basic'. The
authentication header received from the server was 'Basic realm='.
Authentication failed for principal Basic. Message payload is of type:
String
In Fiddler, request looks line following
POST <https://URL/GetServiceReopnse HTTP/1.1
Content-Type: application/xml
Authorization: Basic cmVmU3RhdHN2Y19kgeRfsdfs=
Host: <Server name>
<GetStatus XMLNS="http://server.com/.....">
<OrgId>232323</OrgId>
<HubId>3232342323</HubId>
</GetStatus>
MMK-007First, you should not use the HTTP Adapter because it's been deprecated and replaced by WCF.
Start with the WCF-Custom Adapter and select the customBinding.
You should start with the textMessageEncoder and httpTransport and go from there. -
Make HTTP request with Idoc Script
Is there a way to make an HTTP request to a remote host with Idoc?
For example, in PHP you could do:
file_get_contents('http://website.com/');
Does Idoc have a similar method?"garry.b" <[email protected]> wrote in
message
news:gnndbf$i2q$[email protected]..
> Hi,
>
> When using AS3 to generate an HTTP POST request:
>
> var service:HTTPService = new HTTPService ();
> service.url = "
http://localhost:9090/service";
> service.method = "post";
> // service.request = {itemId: "12345"};
> service.send ({itemId: "12345"});
>
> my CherryPy web server complains about unexpected body
parameters:
>
> HTTPError: (400, 'Unexpected body parameters: itemId')
>
> Using Firebug's Network display, its Post tab shows the
following content:
>
> Referer:
http://localhost:8080/log/log-1.0-SNAPSHOT.swf
> Content-type: application/x-www-form-urlencoded
> Content-length: 12
>
> itemId=12345
>
> which looks very strange to me as I would expect the
Referer, etc.,
> request
> headers to show up in the Request Headers section and
not as POST body
> content.
> While this could be some Firebug issue, I think the
request message is
> really
> formatted incorrectly. When the web server gets the
request, it does
> recognize
> 'itemId' as a body parameter but then complains that
it's unexpected.
>
> I've googled the error message, studied HTTPService
examples, spent
> several
> hours playing with it and am stumped. Tracy Spratt
suggested setting the
> service 'request' to force a POST and I tried it but am
getting the same
> error.
> How do I make a POST request? Can I get POST data into
the message body?
> Stick with URL parameters only?
What happens if you post to the same service using an html
form? -
IllegalArgumentException making HTTP request
My MIDlet works beautifully inside the Palm emulator. It makes an HTTP request to my servlet, and correclty handles the binary data it gets back, using HttpConnection.openInputStream().
However, when I run the same MIDlet from my Visor Neo (after first establishing an internet connection), the first "getXxx()" call I make results in an IllegalArgumentException. (I have confirmed that HTTP communications are working between the Visor and my servlet by browsing to my servlet from an HTML browser on the Visor and viewing the HTML sent by my servlet.)
I am still waiting on the Visor ROMs for the emulator from Handspring to see if the problem is with Handspring's version of PalmOS 3.5, but I'm hoping it isn't the Visor.
-kHello
Can someone tell me how to make the Palm Emulator network capable? I want to access a servlet through the palm emulator to test whether the network capability works fine.
Thanks
prasso -
NEED TO INTEGRATE WITH THIRD PARTY (ALPHATRUST) BY MAKING HTTPS REQUEST FRO
We have a custom OA-framework based project going live almost immediately. I am responsible for the piece that needs to
integrate with a service provider, Alphatrust, that we use for signatures. My
code worked fine in my local JDeveloper environment using a java.net.URL object
to get a URLConnection. It turns out that my local configuration is defaulting
to use Sun's http client that is included in the JDK/JRE, while the appserver
has the configuration java.proto .handler.pkgs=HTTPClient which makes it use
(I think) some version of the open source client at
http://www.innovation.ch/java/HTTPClient/. With this configuration my outbound
request sending xml post data fails with a ClassCast exception thrown from
HTTPClient.HTTPConnection.getSSLSocket(HTTPConnection.java:1933). I have two
candidate workarounds in mind.
(1) remove the configuration java.protocol.handler.pkgs=HTTPClient.
I have tested this option and it does fix the problem. However I am concerned that it may have unintended
consequences, such as possibly breaking our Verisign integration.
(2) place an alternate http client library on the classpath, such as Jakarta Commons
HttpClient, and use it. But (a) I don't know exactly how to place extra jar's
onto the classpath on the application server and (b) I don't know what the
support implications vis-a-vis Oracle would be.
Please advise. Would you recommond option (1), (2), or is there yet another option that I have not
thought of? Please treat this request as urgent.
Here is the java code, from my application module, that fails on the application server.
OutputStreamWriter wr = null;
BufferedReader rd = null;
URLConnection conn = null;
// System.getProperties().remove("java.proto .handler.pkgs");
// if I uncomment the above line, it works, but I am concerned about
// the impact on, for example, Verisign integration
URL url = new URL("https://pronto1.alphatrust.com/prontosvr2/prontoxml.asp");
conn =
url.openConnection();
conn.setDoOutput(true);
conn.setRequestProperty("Content-Type", "text/xml");
Object outs = conn.getOutputStream();
// the last line above throws a ClassCastExceptionNot sure if you have seen oracle.apps.fnd.framework.webui.OAUrl and whether it fits your scenario.
OAUrl class is used for generating, modifying URL objects in OAF.
--Shiv -
HTTP request with dot in keynames
Hi,
I am integrating flex framework with server side as Spring
MVC.
In my application I have a Employee object which looks like
Employee
|----address
|-----street
|-----city
For Spring databinding to work the request parameter for city
should look like employee.address.city=appleton.
How do I send a request using Flex where the request key is
"employee.address.city" ?
Please help me...Hi,
Are you using LCDS? There is some article on how to use LCDS
with Spring on:
http://www.adobe.com/devnet/flex/articles/spring_flex_print.html -
Problem in sending a HTTPS request with weblogic 8.1
Hi ,
I am tring to do a HTTPS connection on weblogic8.1 and when i ever i try to do i get the following error.
Note that the same code works fine for me in the Jboss , but not for weblogic
The error is
java.lang.StackOverflowError
at java.nio.charset.Charset.isSupported(Unknown Source)
at java.lang.StringCoding.lookupCharset(Unknown Source)
at java.lang.StringCoding.decode(Unknown Source)
at java.lang.String.<init>(Unknown Source)
at java.lang.String.<init>(Unknown Source)
at sun.security.util.DerValue.getPrintableString(Unknown Source)
at sun.security.util.DerValue.getAsString(Unknown Source)
at sun.security.x509.AVA.toKeywordValueString(Unknown Source)
at sun.security.x509.AVA.toString(Unknown Source)
at sun.security.x509.RDN.toString(Unknown Source)
at sun.security.x509.X500Name.generateDN(Unknown Source)
at sun.security.x509.X500Name.toString(Unknown Source)
at sun.security.x509.CertificateIssuerName.toString(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.X509CertInfo.<init>(Unknown Source)
at sun.security.x509.X509CertImpl.parse(Unknown Source)
at sun.security.x509.X509CertImpl.<init>(Unknown Source)
at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at sun.security.pkcs.PKCS7.parseSignedData(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.<init>(Unknown Source)
at sun.security.util.SignatureFileVerifier.<init>(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at weblogic.utils.classloaders.ZipSource.getInputStream(ZipSource.java:33)
at weblogic.utils.classloaders.ZipSource.getBytes(ZipSource.java:67)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:404)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.doGetImpl(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.KeyFactory.getInstance(Unknown Source)
at sun.security.x509.X509Key.buildX509Key(Unknown Source)
at sun.security.x509.X509Key.parse(Unknown Source)
at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
at sun.security.x509.X509CertInfo.parse(Unknown Source)
at sun.security.x509.dkarr, Thanks for your reply.<BR>
here is the constructor I got for the class 'com.corizon.ps.oneview.servlet.OneViewWritebackResultServlet'
<BR><BR>
<b> public OneViewWritebackResultServlet()<BR>
{<BR>
senderThread = null;<BR>
jmsConnectionHandler = null;<BR>
closureManager = null;<BR>
mRequestSenderThread = null;<BR>
connected = false;<BR>
}</b><BR>
<BR>
Is this ok ?
<BR>
Thanks,<BR>
-Ninad<BR> -
Facing problem while making http request?
Hi Friends,
I have made blackberry application. I am able to download the same using OTA successfully. With the help of this application I am trying to communicate to server using Httpconnection and want to get some response from server. It is working properly when am i trying Blackberry simulator...but whenever I try to Blackberry device(BB Curve 8900) it is not working and device got stuck. After that I have to restart the device. After restarting again application shows "Uncaught Exception" . So I am not able to find out what is exact problem. So if anybody faced this type of problem please suggest me.thanks in advance...
Regards,
hkhan_2005Just a thought. Create Calculated Key Figure. In the formula editor use a Formula Variable, say ZFV_TEST. Use Processing by > Replacement Path; Use Reference Characteristic > Charg..Date Date. In Replacement Path > Replace Variable With > InfoObject, Replace With > Key. Save your variable ZFV_TEST. Goto Dimensions > Date. Formula: Target Date = DATE(Charg..Date + DATE(270)). This works iff your values are just for a few records with same date data sans aggregation. Would suggest you to use constant selection on the selection; as the values may be aggregated. If it doesn't work, you may try using a Virtual KF for each line items. Last option, you may try customer exits. You may refer this [thread |Re: Date range for a variable from number of days enterd;for your reference.
Edited by: Arun Bala G on Oct 29, 2010 6:15 AM -
HTTP POST Request with XML file in
Hi @ all,
I would like to send an HTTP Request with an XML File in the body to an SAP System
I have the target URL and the a XML File.
Now the question is. Is it possible to use something like the HTTP_POST FuBa to send an url post request with an xml file?
If yes can anybody give me a hint?
I have a php script which exactly do this coding. But to integrate it all in one system it is necessary to transform it into ABAP and call it there.
// compose url and request and call send function
function test($productID, $categoryID) {
// create url
$PIhost = "XXX.wdf.sap.corp";
$PIport = "50080";
$PIurl = "/sap/xi/adapter_plain";
$PIurl .= "?sap-client=800";
$PIurl .= "&service=XXX";
$PIurl .= "&namespace=XXX";
$PIurl .= "&interface=Frontend_Interface";
$PIurl .= "&qos=EO";
$PIurl .= "&sap-user=XXX";
$PIurl .= "&sap-password=XXX";
// create xml
$request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
$request .="<n1:FrontendInbound_MessageType xmlns:n1=\"http://crmpiebay.com\">\n";
$request .= "\t<FrontendInbound>\n";
$request .= "\t\t<ProductName/>\n";
$request .= "\t\t<ProductCategory>".$categoryID."</ProductCategory>\n";
$request .= "\t\t<ProductID>".$productID."</ProductID>\n";
$request .= "\t\t<MessageID/>\n";
$request .= "\t</FrontendInbound>\n";
$request .= "</n1:FrontendInbound_MessageType>";
// send http request
postToHost($PIhost, $PIport, $PIurl, $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"]."/".$_SERVER["PHP_SELF"], $request);
// send post request to PI server
function postToHost($host, $port, $path, $referer, $data_to_send) {
$fp = fsockopen($host, $port);
if($fp) {
$res="";
fputs($fp, "POST $path HTTP/1.1\r\n");
fputs($fp, "Host: $host\r\n");
fputs($fp, "Referer: $referer\r\n");
fputs($fp, "Content-type: text/plain\r\n");
fputs($fp, "Content-length: ". strlen($data_to_send) ."\r\n");
fputs($fp, "Connection: close\r\n\r\n");
fputs($fp, $data_to_send);
while(!feof($fp)) {
$res .= fgets($fp, 128);
fclose($fp);
return $res;
Would be great if anybody could give me a hint how to solve such a HTTP Post request with XML body data.
Thanks in advance.
Chris
Edited by: Christian Kuehne on Feb 26, 2009 4:32 PMhi friend could you please share your solution regarding this query if u got it already?
-
Change content-disposition in email attachment
I am using apex_mail (in Apex 4.1) to send emails with an attachment.
v_mail_id := apex_mail.send(
p_to => '[email protected]'
...etc...
apex_mail.add_attachment( p_mail_id => v_mail_id
,p_attachment => v_image
,p_filename => 'signature.jpg'
,p_mime_type => 'image/jpeg');
Apex creates this as an attachment:
Content-Disposition: attachment;
I would like to change it to inline:
Content-Disposition: inline;
so I can reference it in my email body with <img src="cid:signature.jpg"/>. Well... I hope it is going to be shown inline anyway if I change Content-Disposition.
Currently (with Content-Disposition: attachment;) it works for Outlook, but, for instance, not in Gmail in the browser. Gmail shows the image separately as an attachment.
Is there a way to change the content-disposition with Apex?
I know it is possible to do it with utl_mail, but this is currently not installed in our databases. I need to involve our DBA to set this up, and I don't know if he is willing to do that.Hi Joel,
I thought so. I will put this in the Apex feature request database.
Ino
BTW, for other people it might be interesting to know that there is another option I tried that doesn't work in many situations either. You can put this in the email body:
<img src="data:image/jpeg;base64,'||v_image_base64||'"/>
where v_image_base64 is the base64 encoded jpg image.
From my experiments the inline attachment with a cid reference seems to work best. -
How to send a HTTP request to servlet in java application
I'm new in Java. I need to send a HTTP request with parameters to servlet in a java aplication. Here is my code. It can be compiled but always threw an exceptions when I ran it. Can anyone help?
package coreservlets;
import java.io.*;
import java.net.*;
public class PostHTTP
public static void main(String args[])
throws IOException, UnknownHostException {
try
// URL and servlet
URL myURL = new URL("http://pc076/servlet/coreservlets.OffHold");
URLConnection c = myURL.openConnection();
c.setUseCaches(false);
c.setDoOutput(true);
ByteArrayOutputStream byteStream = new ByteArrayOutputStream(512);
PrintWriter out = new PrintWriter(byteStream, true);
//parameters
String postData = "REASON_CODE=3B&RSPCODE=JSmith&CASENUM=NA795401&REPLY=123&SOURCE=XYZ&REPLYLINK=http://pc076/servlet/coreservlets.ShowParameters";
out.print(postData);
out.flush();
String lengthString = String.valueOf(byteStream.size());
c.setRequestProperty("Content-Length", lengthString);
c.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
byteStream.writeTo(c.getOutputStream());
BufferedReader in = new BufferedReader(new InputStreamReader
(c.getInputStream()));
String line;
//String linefeed = "\n";
//resultsArea.setText("");
while((line = in.readLine()) != null) {
System.out.println(line);
//resultsArea.append(linefeed);
catch(IOException ioe) {
// Print debug info in Java Console
System.out.println("IOException: " + ioe);here are some updates to your code I haven't tested it running
post again if you still have trouble
URL myURL = new URL("http://pc076/servlet/coreservlets.OffHold");
HttpURLConnection c = (HttpURLConnection)myURL.openConnection();
c.setDoInput(true);
c.setDoOutput(true);
ByteArrayOutputStream byteStream = new ByteArrayOutputStream(512);
String lengthString = String.valueOf(byteStream.size());
c.setRequestProperty("Content-Length", lengthString);
c.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
PrintWriter out = new PrintWriter(byteStream, true);
//parameters
String postData = "REASON_CODE=3B&RSPCODE=JSmith&CASENUM=NA795401&REPLY=123&SOURCE=XYZ&REPLYLINK=http://pc076/servlet/coreservlets.ShowParameters";
out.print(postData);
out.flush();
byteStream.writeTo(c.getOutputStream());
// connect
c.connect();
BufferedReader in = new BufferedReader(new InputStreamReader
(c.getInputStream()));
String line;
while((line = in.readLine()) != null)
System.out.println(line); -
Plugin login appears after initial weblogic everytime applet makes http request
When I visit a page I get the initial login to the page via the realm followed
by a java plugin loging (shown in attached pictures) every time the applet makes
an http request. This stops the applet working, any idea how I can solve this?
[pictures.doc]Any idea how to do thisn not really sure what you mean. I already inclued the session
Id in the URL. Code we use to open connection is
URL url = new URL(serverProtocol + "://" + serverName + ":" + serverPort + "/"
+ servlet + ((sessionId==null)?"":"?sessionid=" + sessionId));
URLConnection uc = url.openConnection();
uc.setDoOutput(true);
uc.setDoInput(true);
uc.setUseCaches(false);
uc.setRequestProperty("Content-type", "java-internal/" + object.getClass().getName());
Robert Patrick <[email protected]> wrote:
If you are making HTTP requests from within an applet, you will need
to provide the
right HTTP headers to correctly identify that each subsequent request
is from the
previously logged-in user (e.g., the cookie that contains the WLS session
ID
attached to the response from logging in).
andrea bates wrote:
When I visit a page I get the initial login to the page via the realmfollowed
by a java plugin loging (shown in attached pictures) every time theapplet makes
an http request. This stops the applet working, any idea how I cansolve this?
Name: pictures.doc
pictures.doc Type: WINWORD File (application/msword)
Encoding: base64
Maybe you are looking for
-
HT1918 How can i change my credit card details on my itunes?
How can i change my credit card detail on Itunes??????????????????????????/
-
Hello, This is really frustrating after subscribing to upload all my photos to revel. After ticking 'access all catalog media' I have the following two problems: 1. Pictures are shown individually in Revel, and not in their respective albums as per '
-
How do I make a utube video full-screen in iweb?
Hello, Is there a way to make a utube video that is on my iweb-built website, full screen? Everything about the videos I have imported from utube works fine, except when I click on the full-screen icon...nothing happens. View the videos (2) here: ht
-
How can I get radio Scotland on bbc iplayer?
Can I bbc radio Scotland on iplayer on iPad?
-
hi all i need your help to give me the solve of my issue i need to increase the refresh rate of portal 10g on unix 5.10 MANY THANKS