• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

web service with attachment under java 1.6

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic