You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Naeem Malik (Ext. 797)" <Na...@FINEOS.com> on 2006/03/01 14:17:07 UTC

JAXM POST failed null---Please HELP

Hi

 I am getting the following error message from a long time, it now over my
nerve, could any one please help me in this matter, i have try almost many
things but didnt get any help

client side>>> attaching the xml file

          AttachmentPart attpart = message.createAttachmentPart();

          attpart.setContentId("xyz123");
                    
          attpart.setContent(getXMLAttachment(),"text/xml");

         message.addAttachmentPart(attpart);

message.saveChanges();


server side retrieveing message

public claimServiceServlet extends JAXMServlet implements ReqRespListener{

.....
....
public SOAPMessage onMessage(SOAPMessage msg) {
    SOAPMessage message = null;

    try {
    	
    	System.out.println("Incoming message: ");
        msg.writeTo(System.out);
    	
    	System.out.println("nomi BEfore doing any thing with attachement:
");
    	msg.saveChanges();
    	java.util.Iterator iterator = msg.getAttachments();

    	String attContent = "";
    	
    	System.out.println("claimService claimXML attachement
size>>>0.2<<<<< "+iterator.equals(null));
    	while (iterator.hasNext()) {
    	  AttachmentPart attachment = 
    	    (AttachmentPart)iterator.next();
    	  String id = attachment.getContentId();
    	  String type = attachment.getContentType();
    	  System.out.print("Attachment " + id + 
    	    " has content type " + type);
    	  System.out.println(" content>>
"+attachment.getContent().toString());
    	  if (type == "text/xml") {
    	    Object content = attachment.getContent();
    	    System.out.println("Attachment " +
    	      "contains:\n" + content);
    	  }
    	}


i am getting following error message when ever i try to retrieve attachement

2006-03-01 12:52:48 StandardWrapperValve[claimreceiver]: Servlet.service()
for servlet claimreceiver threw exception
javax.servlet.ServletException: JAXM POST failed null
	at javax.xml.messaging.JAXMServlet.doPost(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:716)

although it seem by TCP Moniter that attachement is going fine over the
wire. but for some reason i am not able to access it. although i am able to
see the attachement part by using the msg.writeTo(System.out) but only if i
dont use message.saveChanges method on client side but if i use this
message.saveChanges  method it even didnt go in the onMessage of
claimServiceServlet.

Could please any one help me in this matter ?

Thanks and regards

Naeem Malik
          


Naeem Malik
Technical Consultancy Team 
___________________________

FINEOS Corporation

Pembroke House
8 - 10 Lower Pembroke St
Dublin 2

Email:	Naeem.Malik@FINEOS.com
Ph:	+353 1 6399797(Direct)
Fax: 	+353 1 6399701
Why don't you visit our website at http://www.FINEOS.com

ENTERPRISE SOLUTIONS FOR BANKING AND INSURANCE



**********************************************************************
The information contained in this e-mail is confidential, may be 
privileged and is intended only for the user of the recipient named above.  
If you are not the intended recipient or a representative of the intended 
recipient, you have received this e-mail in error and must not copy, use 
or disclose the contents of this e-mail to anybody else.  If you have 
received this e-mail in error, please notify the sender immediately 
by return e-mail and permanently delete the copy you received.  
This e-mail has been swept for computer viruses.  However, you should 
carry out your own virus checks. 
Registered in Ireland, No. 205721.  http://www.FINEOS.com
**********************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org