axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Senthil_KM" <Senthil...@infosys.com>
Subject SAAJ Attchemt Part Error Server side
Date Wed, 03 Mar 2004 13:19:08 GMT
 
Hi ,
 
I am trying to send a SOAP with attachement to  a servcie which is
suuposed to echo back the SOAP message
 
The code of the service is :
 
-------------------------
 
package samples.test.eg9;
import javax.activation.DataHandler;
 
public class Simple {
 
public DataHandler echoAttach(DataHandler dh) throws Exception {
 
 ** if(dh == null)
  System.out.println("Some error some where");
 
  System.out.println("recieved " + dh.getName() + "content  " +
dh.getContent().toString());
 
  return dh;
  }
}
-----------------------------------------
 
 
Form the client side i am sedning tjhe SOAP msg with an attachment
 
But when the servcie gets invoked i get the error message(**) "Some
error some where" . Basically my DataHandler Object is null
Can some one help me out???
 
My client side  i call the Service using SAAJ api
 
SOAPMEssage response = conn.call(requestSOAPmsg,endpointURL)
 
I have also traced the SOAP msg that is being sent to the servcie using
the TCP MON utility of the Axis
 
and the request SOAP msg is 
 
-------------------------------------------------------
POST /axis/services/SimpleEcho HTTP/1.0
Content-Type: multipart/related; type="text/xml";
start="<97F9976B59E8134AA5B2170A0F758F93>";
boundary="----=_Part_0_4839036.1078315466584"
Accept: application/soap+xml, application/dime, multipart/related,
text/*
User-Agent: Axis/1.1
Host: localhost
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 699
------=_Part_0_4839036.1078315466584
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <97F9976B59E8134AA5B2170A0F758F93>
   <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
<http://schemas.xmlsoap.org/soap/envelope/> "
xmlns:xsd="http://www.w3.org/2001/XMLSchema
<http://www.w3.org/2001/XMLSchema> "
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance> "> 
         <soapenv:Body>  
            <echoAttach xmlns=""/> 
         </soapenv:Body>
 
</soapenv:Envelope>------=_Part_0_4839036.1078315466584Content-Type:
text/plainContent-Transfer-Encoding: binaryContent-Id: 
      <More_Info>This service is called SimpleEcho and is used for
Echoing the datahandler------=_Part_0_4839036.1078315466584--
------------------------------------------------------------------------
-----------------
 
So from the clieent side that SOAP msg is constructed properly but on
the server side where i am trying to capture this SOAP message using the
DataHandler object it  is giving me a null as the value..
 
Can some one help me out with this

Rgds

Senthil


Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message