Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SOAP with Attachment Problem

 
ranjith menon
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI All,

I am getting the following Error when trying to run a Standalone SOAP Request using Pure JAVA API. The Exception trace is as follows

Is this related to any jars that i need to put in my classpath. I am not having problem when i am trying to send just a SOAP message, but get the following error when trying to send an Attachment along with it. Do i need to do any thing special when i put an attachment when run as stand alone.
I ma using Java 1.4.2_04 on Windows XP Professional... Looks like PrivilegedActionException but not sure if i am missing any thing.

----Error begins here...

java.io.IOException
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
urce)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:293)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:151)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:121)
at javaClient.orderprocessing.CreateOrder_Clnt.main(CreateOrder_Clnt.jav
a:99)
Caused by: java.net.SocketException: Software caused connection abort: recv fail
ed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
urce)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:273)
... 4 more
Jul 8, 2004 7:48:10 PM com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection
post
SEVERE: SAAJ0009: Message send failed
java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptio
nImpl: Message send failed
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:121)
at javaClient.orderprocessing.CreateOrder_Clnt.main(CreateOrder_Clnt.jav
a:99)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:308)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:151)
... 3 more
Caused by: java.io.IOException
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
urce)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:293)
... 4 more
Caused by: java.net.SocketException: Software caused connection abort: recv fail
ed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
urce)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:273)
... 4 more
Error ... java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SO
APExceptionImpl: Message send failed

------ Error Ends .....

My Class path looks as follows...

.;C:\Program Files\Altova\xmlspy\XMLSpyInterface.jar;D:\j2sdk1.4.2_04\lib\ejb.jar;D:\j2sdk1.4.2_04\lib\tools.jar;D:\j2sdk1.4.2_04\lib\servlet23.jar;D:\jwsdp13\saaj\lib\saaj-api.jar;D:\jwsdp13\saaj\lib\saaj-impl.jar;D:\jwsdp13\jwsdp-shared\lib\activation.jar;D:\jwsdp13\jwsdp-shared\lib\mail.jar;D:\jwsdp13\jaxp\lib\jaxp-api.jar;D:\jwsdp13\jaxp\lib\endorsed\xercesImpl.jar;D:\jwsdp13\jaxp\lib\endorsed\dom.jar;D:\Ranjith\webSClient

I am really tiedup in my project because of this error. Appriciate all the help i can get..

Thanks
Ranjith
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the attachment stuff work using a "policy.all" policy file?
 
ranjith menon
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lasse,

Thanks for responding, but i do not know whether it uses policy file or not, sine i made a policy file with just this piece of code and named it java.policy

grant{
permission java.security.AllPermissions;
};

and the java call as

>java -Djava.security.policy=D:\j2sdk1.4.2_04\jre\lib\secur
ity\java.policy javaClient.orderprocessing.CreateOrder_Clnt

but this gave the same error...

Am i missing something in your question ???

Thanks
Ranjith
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic