I attach the response message
Thilina Gunarathne <[EMAIL PROTECTED]> escribió: Messsage traces please..:)
On 5/1/07, Jorge Fernandez wrote:
> Hi Thilina,
>
> You were right. The problem was in TCPMon. Without using TCPMon, I don't
> even have the problem sending big files. Thanks a lot.
>
> I have one more question now that this problem was fixed: Is there any
> sample of MOTM or SwA where the attachment is not a file?? I have to send
> large arrays, for example of short and sending them in xml increases the
> size of the message as it has to generate the tags for each element. So I
> would like to send them as attachments.
>
> Could anyone tell me how can I do it?
>
> I was given some advise and I'm trying to convert the array of short in a
> byte array doing this. I would appreciate some help on this:
>
> short[] data=new short[100];
> for (short i=0;i
> data[i]=i;
> byte[] byte_data = new byte[data.length * 2];
> for(int i=0; i < data.length; i++){
> byte_data[2*i] = (byte) ((data[i] >>> 8) & 0xFF);
> byte_data[2*i + 1] = (byte) ((data[i] >>> 0) & 0xFF);
> }
>
> // Populating the code generated beans
> GetAttachmentResponse response=new GetAttachmentResponse();
> DataHandler dataHandler = new
> DataHandler(byte_data,"application/octet-stream");
> BinaryData binaryData =new BinaryData();
> binaryData.setBase64Binary(dataHandler);
> binaryData.setContentType(dataHandler.getContentType());
> response.setBinaryData(binaryData);
>
> The problem is in the method toEnvelope setting the child for the body.
>
> I'm getting the following exception:
>
> java.lang.RuntimeException: org.apache.axiom.om.OMException: Referenced
> Attachment not found in the MIME Message.
> ContentID:1.urn:uuid:[EMAIL PROTECTED]
> at
> client.Medici_LinkSOAP12PortStub.fromOM(Medici_LinkSOAP12PortStub.java:5296)
> at
> client.Medici_LinkSOAP12PortStub.getAttachment(Medici_LinkSOAP12PortStub.java:4103)
> at client.ClientUtilities.mtomTest(ClientUtilities.java:476)
> at client.Client.main(Client.java:69)
> Caused by: org.apache.axiom.om.OMException: Referenced Attachment not found
> in the MIME Message.
> ContentID:1.urn:uuid:[EMAIL PROTECTED]
> at
> org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder.getDataHandler(MTOMStAXSOAPModelBuilder.java:103)
> at
> medici_link.xmime.xsd.BinaryData$Factory.parse(BinaryData.java:429)
> at
> medici_link.op_messages.xsd.GetAttachmentResponse$Factory.parse(GetAttachmentResponse.java:342)
> at
> client.Medici_LinkSOAP12PortStub.fromOM(Medici_LinkSOAP12PortStub.java:5024)
> ... 3 more
>
> And with TCPMon I can see the fault as an attachment.
>
> Thanks and regards,
>
> Jorge Fernández
>
>
--
Thilina Gunarathne - http://www.wso2.com - http://thilinag.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_3B82B5DA59C7F75D1E1178016055344;
type="application/xop+xml"; start="<0.urn:uuid:[EMAIL PROTECTED]>";
start-info="application/soap+xml";
action="urn:getAttachment";charset=UTF-8Transfer-Encoding: chunkedDate: Tue, 01
May 2007 10:40:54
GMT516--MIMEBoundaryurn_uuid_3B82B5DA59C7F75D1E1178016055344Content-Type:
application/xop+xml; charset=UTF-8;
type="application/soap+xml"Content-Transfer-Encoding: binaryContent-ID:
<0.urn:uuid:[EMAIL PROTECTED]>
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Header>
<wsa:ReplyTo>
<wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
<wsa:ReferenceParameters>
<axis2:ServiceGroupId
xmlns:axis2="http://ws.apache.org/namespaces/axis2">urn:uuid:3B82B5DA59C7F75D1E1178016053150</axis2:ServiceGroupId>
</wsa:ReferenceParameters>
</wsa:ReplyTo>
<wsa:MessageID>urn:uuid:3B82B5DA59C7F75D1E1178016055296</wsa:MessageID>
<wsa:Action>urn:getAttachment</wsa:Action>
<wsa:RelatesTo>urn:uuid:B5AEE5ABDE83138F781178016055102</wsa:RelatesTo>
</soapenv:Header>
<soapenv:Body>
<ns3:getAttachmentResponse
xmlns:ns3="http://op_messages.medici_link/xsd">
<ns3:binaryData xmlns:s1="http://www.w3.org/2005/05/xmlmime"
s1:contentType="application/octet-stream">
<xop:Include href="cid:1.urn:uuid:[EMAIL PROTECTED]"
xmlns:xop="http://www.w3.org/2004/08/xop/include" />
</ns3:binaryData>
</ns3:getAttachmentResponse>
</soapenv:Body>
</soapenv:Envelope>38--MIMEBoundaryurn_uuid_3B82B5DA59C7F75D1E1178016055344
10c1
--MIMEBoundaryurn_uuid_3B82B5DA59C7F75D1E1178016055487
Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
Content-Transfer-Encoding: binary
Content-ID:
<0.urn:uuid:[EMAIL PROTECTED]>
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Header>
<wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action>
<wsa:RelatesTo>urn:uuid:B5AEE5ABDE83138F781178016055102</wsa:RelatesTo>
</soapenv:Header>
<soapenv:Body>
<soapenv:Fault>
<soapenv:Code>
<soapenv:Value>soapenv:Sender</soapenv:Value>
</soapenv:Code>
<soapenv:Reason>
<soapenv:Text xml:lang="en-US">Error while writing
to the OutputStream.</soapenv:Text>
</soapenv:Reason>
<soapenv:Detail>
<Exception>org.apache.axis2.AxisFault: Error while
writing to the OutputStream.
 at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:290)
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:105)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by:
org.apache.axiom.om.OMException: Error while writing to the OutputStream.
at
org.apache.axiom.om.impl.MIMEOutputUtils.complete(MIMEOutputUtils.java:72)
at
org.apache.axiom.om.impl.MTOMXMLStreamWriter.flush(MTOMXMLStreamWriter.java:123)
at or
g.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:419)
at
org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:55)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(CommonsHTTPTransportSender.java:275)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:203)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:452)
 at
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:48)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
 at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:279)
... 17 more
Caused by: javax.activation.UnsupportedDataTypeException: no
object DCH for MIME type application/octet-stream
 at
javax.activation.ObjectDataContentHandler.writeTo(DataHandler.j
ava:885)
 at
javax.activation.DataHandler.writeTo(DataHandler.java:316)
 at
javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1350)
 at
javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:845)
 at
org.apache.axiom.om.impl.MIMEOutputUtils.writeBodyPart(MIMEOutputUtils.java:128)
at
org.apache.axiom.om.impl.MIMEOutputUtils.complete(MIMEOutputUtils.java:65)
... 26 more
</Exception>
</soapenv:Detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
38
--MIMEBoundaryurn_uuid_3B82B5DA59C7F75D1E1178016055487
2
--
0
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]