Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

web service with attachment under java 1.6

 
ivan stefko
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i'm trying to develop web service with attachment but i have a problem and i don't know where..

so server side:


if i deploy this web service to server (tomcat 5.5.25) and use soapUI application as client for test ... everything is OK... web service gets me 3 attachments.

so.. i need to have a look to client side:


if i run this client ... code ends with this error (- call this method: SOAPMessage response = connection.call(message, endpoint)):

EVERE: Generating fault class
AxisFault
faultCode: {http://xml.apache.org/axis/}Client.NoSOAPAction
faultSubcode:
faultString: no SOAPAction header!
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:no SOAPAction header!
at org.apache.axis.transport.http.AxisServlet.getSoapAction(AxisServlet.java:1013)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:678)
....................

no SOAPAction header!
at org.apache.axis.transport.http.AxisServlet.getSoapAction(AxisServlet.java:1013)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:678)
...................


-----------------------------------------------------------
develop IDE: eclipse
jar file in classpath: activation.jar, axis.jar, commons-discovery-0.2.jar, commons-logging.jar, jaxrpc.jar, mailapi_1_3_1.jar, saaj.jar, webserviceutils.jar, wsdl4j-1.5.1.jar


thanks for any help!

i.
 
ivan stefko
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i already find the solution. is necessary to add this code to client:

MimeHeaders hd = message.getMimeHeaders();
hd.addHeader("SOAPAction", "urn:yoursoapaction");

more
See http://users.skynet.be/pascalbotte/rcx-ws-doc/saajpost.htm for a
sample SAAJ client.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic