Hi, I have a very curious problem.  My SOAP client sends a simple request with 1 small attachment to it.  When I run this client as a stand-alone application, it works fine.  However, when the <<same code>> is called from within a message-driven-bean (an EJB which is listening to a JMS message queue) inside an application-server, the attachment is added twice!!
 
Can there be something different in the envrionment between running stand-alone versus running inside an EJB container that would cause this, or is there some problem with my client?  I'm using DIME, but the same also happens when I use MIME.
 
Has anyone else encountered this before, and figured out what was causing it?
 
Thanks in advance for any light you can shed on this bizzare behaviour.  Working sample code attached, plus the two HTTP dumps of the different tests.
 
Stu
 
 

Attachment: TestSOAP.java
Description: Binary data

POST / HTTP/1.0
Content-Type: application/dime
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1
Host: localhost:9009
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://www.domain.com/SOAP";
Content-Length: 672

?    ) )  ?+uuid:714C6C40-4531-442E-A498-3AC614200295   
http://schemas.xmlsoap.org/soap/envelope/   <?xml version="1.0"encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <soapenv:Body>
  <Request xmlns="http://www.domain.com/SOAP/";>
   <email xsi:type="xsd:string" xmlns="">[EMAIL PROTECTED]</email>
   <attachment href="C0C99DA0FBE209B8033896CD3D241DB1" xmlns=""/>
  </Request>
 </soapenv:Body>
</soapenv:Envelope>
?
   ;C0C99DA0FBE209B8033896CD3D241DB1text/plain  This is a very simple ASCII text file.
It is 2 lines long.
POST / HTTP/1.0
Content-Type: application/dime
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1
Host: localhost:9009
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://www.domain.com/SOAP";
Content-Length: 788

?    ) )  ?+uuid:714C6C40-4531-442E-A498-3AC614200295   
http://schemas.xmlsoap.org/soap/envelope/   <?xml version="1.0"encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <soapenv:Body>
  <Request xmlns="http://www.domain.com/SOAP/";>
   <email xsi:type="xsd:string" xmlns="">[EMAIL PROTECTED]</email>
   <attachment href="323EF9B9D4ABA99982ECD7EE5A4EA4ED" xmlns=""/>
  </Request>
 </soapenv:Body>
</soapenv:Envelope?
   ;099705763A3405AEBD2A06458AD13CC2text/plain  This is a very simple ASCII text file.
It is 2 lines long.
?
   ;323EF9B9D4ABA99982ECD7EE5A4EA4EDtext/plain  This is a very simple ASCII text file.
It is 2 lines long.

Reply via email to