int values are a minimum of 32 bits in Java, not 16 bits. They have a range from roughly -2 billion to +2 billion.

There may well be a problem in the code, but it's not because ints are limited to +/- 64k.

- Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Martin Gainty wrote:
Jorge

Appears you may have discovered a bug as the BoundaryPushbackInputStream.java as there appears to not be ability to deal with any buffer over 64k (the native datatypes appear to be all integer instead of long)
Looking at the source
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/BoundaryPushbackInputStream.java?revision=528680&pathrev=528680 <http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/BoundaryPushbackInputStream.java?revision=528680&pathrev=528680> I find length assignments of variables to int (max +- 64k) but no mention of lengths to long or unsigned long datatypes
Do you know if there a JIRA ???

Saludos Cordiales!
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.

    ----- Original Message -----
    *From:* Jorge Fernandez <mailto:[EMAIL PROTECTED]>
    *To:* [email protected] <mailto:[email protected]> ;
    [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
    *Sent:* Sunday, April 29, 2007 11:23 AM
    *Subject:* Re: Help with SwA

    Hi Thilina,

    With the new release that seems to work fine. But sadly :( , now
    I'm getting the following exception when trying to access the
    attachments with both MTOM or SwA at the client:

    org.apache.axiom.om.OMException: javax.mail.MessagingException:
    Error reading input stream;
    nested exception is:
    java.io.IOException: End of Stream, but boundary not found
    at
    org.apache.axiom.attachments.Attachments.getPart(Attachments.java:517)
    at
    
org.apache.axiom.attachments.Attachments.getNextPartDataHandler(Attachments.java:414)
    at
    
org.apache.axiom.attachments.Attachments.getContentIDSet(Attachments.java:386)
    at
    
org.apache.axiom.attachments.Attachments.getAllContentIDs(Attachments.java:379)
    at
    
client.Medici_LinkSOAP12PortStub.getAttachment(Medici_LinkSOAP12PortStub.java:4102)
    at client.ClientUtilities.mtomTest(ClientUtilities.java:531)
    at client.Client.main(Client.java:69)
    Caused by: javax.mail.MessagingException: Error reading input stream;
    nested exception is:
    java.io.IOException: End of Stream, but boundary not found
    at javax.mail.internet.MimeBodyPart.<init>(MimeBodyPart.java:177)
    at
    org.apache.axiom.attachments.PartOnMemory.<init>(PartOnMemory.java:31)
    at
    org.apache.axiom.attachments.Attachments.getPart(Attachments.java:513)
    ... 6 more
    Caused by: java.io.IOException: End of Stream, but boundary not found
    at
    
org.apache.axiom.attachments.BoundaryPushbackInputStream.read(BoundaryPushbackInputStream.java:230)
    at
    
org.apache.axiom.attachments.MIMEBodyPartInputStream.read(MIMEBodyPartInputStream.java:84)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at com.sun.mail.util.ASCIIUtility.getBytes(ASCIIUtility.java:246)
    at javax.mail.internet.MimeBodyPart.<init>(MimeBodyPart.java:175)
    ... 8 more

    I can see with TCPMon this:

    HTTP/1.1 200 OK
    Server: Apache-Coyote/1.1
    Content-Type: multipart/related;
    boundary=MIMEBoundaryurn_uuid_2B201ECB17F697F7391177859246638;
    type="application/soap+xml";
    start="<0.urn:uuid:[EMAIL PROTECTED]>";
    action="urn:validateUser";charset=UTF-8Transfer-Encoding:
    chunkedDate: Sun, 29 Apr 2007 15:07:26
    GMT423--MIMEBoundaryurn_uuid_2B201ECB17F697F7391177859246638Content-Type:
    application/soap+xml; charset=UTF-8Content-Transfer-Encoding:
    8bitContent-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:2B201ECB17F697F7391177859246088</axis2:ServiceGroupId>
    </wsa:ReferenceParameters>
    </wsa:ReplyTo>
    <wsa:MessageID>urn:uuid:2B201ECB17F697F7391177859246104</wsa:MessageID>
    <wsa:Action>urn:validateUser</wsa:Action>
    <wsa:RelatesTo>urn:uuid:7C37DED94C81AED4F81177859244163</wsa:RelatesTo>
    </soapenv:Header>
    <soapenv:Body>
    <ns3:validateUserResponse
    xmlns:ns3="http://op_messages.medici_link/xsd";>
    <ns3:return>sim588929623218</ns3:return>
    </ns3:validateUserResponse>
    </soapenv:Body>
    </soapenv:Envelope>
    38

    --MIMEBoundaryurn_uuid_2B201ECB17F697F7391177859246638
    2000

    Content-Type: application/octet-stream
    Content-Transfer-Encoding: binary
    Content-ID:
    <urn:uuid:2B201ECB17F697F7391177859246543>BM:/
    data............................

    And this is the last line I can see with TCPMon
    <¥b;¤a:£_:¡]8ž]7›Z4šY3˜W1–U/“T

    I'm sending a 11'8KB picture.
    With axis2 1.1.1 I had no problem with sending a picture that was
    about 24 KB. If I sent a larger one, I received it with errors and
    I couldn't see it correctly in the client but the response message
    seemed to be well formed.

    Could you tell me, please if I have to do something else to send
    attachments in the service??



    */Thilina Gunarathne <[EMAIL PROTECTED]>/* escribió:

        > org.apache.axis2.AxisFault: Invalid Application type.
        Support available for
        > MTOM & SwA/SOAP 1.l only.; nested exception is:
        > org.apache.axiom.om.OMException: Invalid Application type.
        Support
        > available for MTOM & SwA/SOAP 1.l only.
        You seem to be usign a old version of the axis2.. Please try the
        latest 1.2 release..

        > But I don't know if this is right. Do I have to specify
        something in the
        > wsdl like I do when I use MTOM so the client could expect
        any attachment
        > when parsing the response message.
        MTOM is much better than SwA.. You can specify the type of the
        element
        containing the binary data as base64Binary...

        Seems like you already have it in your WSDL, since you seem to
        be able
        to succesfully generate skeletons with MTOM suppport...

        See http://ws.apache.org/axis2/1_2/mtom-guide.html#25 for more
        data...

        Thanks,
        Thilina
-- 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://us.rd.yahoo.com/mail/es/tagline/messenger/*http://es.voiceyahoo.com/>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to