Re: HELP - The attachments stream can only be accessed once; either by using the IncomingAttachmentStreams class or by getting a collection of AttachmentPart objects. They cannot both be called within

2007-05-03 Thread Prasad Viswatmula

Here is my stack trace.  It's not from AXIOM.

java.lang.IllegalStateException: The attachments stream can only be
accessed once; either by using the IncomingAttachmentStreams class or
by getting a collection of AttachmentPart objects.  They cannot both
be called within the life time of the same service request.
at 
org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:546)
at org.apache.axis.Message.getContentLength(Message.java:511)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
org.apache.axis.utils.BeanPropertyDescriptor.get(BeanPropertyDescriptor.java:127)
at 
org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:192)
at 
org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
at 
org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
at 
org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:801)
at org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
at 
org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
at 
org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
at 
org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.client.Call.invoke(Call.java:2757)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at 
com.walsworth.od2.FileWebServiceSoapBindingStub.put(FileWebServiceSoapBindingStub.java:334)
at com.walsworth.od2.FileWSClient.main(FileWSClient.java:51)

On 5/2/07, Glen Mazza [EMAIL PROTECTED] wrote:

This may be related to AXIOM internally (I don't know if AXIOM is used
in Axis 1, however).  I googled the error message and it seems like the
only thing that could cause that error message to occur (search on The
attachments stream within [1]) is that you called *both* getPart() and
getIncomingAttachmentStreams() -- but you can only call one of the
methods.

Glen

[1]
http://mail-archives.apache.org/mod_mbox/ws-commons-dev/200703.mbox/%
[EMAIL PROTECTED]

Am Mittwoch, den 02.05.2007, 16:20 -0500 schrieb Prasad Viswatmula:
 I am using Axis 1.4 and getting the above error.

 Thanks,
 Prasad

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



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




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



Re: HELP - The attachments stream can only be accessed once; either by using the IncomingAttachmentStreams class or by getting a collection of AttachmentPart objects. They cannot both be called within

2007-05-03 Thread Glen Mazza
When debugging, work backwards.  The first error line of your stack
trace says go to line 546 of AttachmentsImpl[1], which appears to
indicate a mistake similar to what I mentioned earlier.  You are not
showing us your code, so I cannot help you further, but I think you are
making an invalid series of function calls to cause that error to occur.
Follow the Axis1 source code[1] and your own code to figure out what
sequence of calls you are making to cause that error to occur, and then
reimplement your code so you don't do that anymore.

If I may generalize your problem, this is your error message:
You have called function foo() after calling function bar(), which is
disallowed.

And this is your source code:
a.bar();
a.foo();

Can you simplify your problem to this level, and then come back to this
ML for help in reimplementation?  I.e. Hello everybody, this is what
I'm coding to accomplish X, but Axis 1.4 says this ordering of function
calls is disallowed.  How can I code it differently?

Glen

[1] http://preview.tinyurl.com/32t97a


Am Donnerstag, den 03.05.2007, 12:46 -0500 schrieb Prasad Viswatmula:
 Here is my stack trace.  It's not from AXIOM.
 
 java.lang.IllegalStateException: The attachments stream can only be
 accessed once; either by using the IncomingAttachmentStreams class or
 by getting a collection of AttachmentPart objects.  They cannot both
 be called within the life time of the same service request.
   at 
 org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:546)
   at org.apache.axis.Message.getContentLength(Message.java:511)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at 
 org.apache.axis.utils.BeanPropertyDescriptor.get(BeanPropertyDescriptor.java:127)
   at 
 org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:192)
   at 
 org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
   at 
 org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
   at 
 org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:801)
   at org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
   at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
   at 
 org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
   at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
   at 
 org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
   at 
 org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
   at org.apache.axis.client.Call.invoke(Call.java:2757)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at 
 com.walsworth.od2.FileWebServiceSoapBindingStub.put(FileWebServiceSoapBindingStub.java:334)
   at com.walsworth.od2.FileWSClient.main(FileWSClient.java:51)
 
 On 5/2/07, Glen Mazza [EMAIL PROTECTED] wrote:
  This may be related to AXIOM internally (I don't know if AXIOM is used
  in Axis 1, however).  I googled the error message and it seems like the
  only thing that could cause that error message to occur (search on The
  attachments stream within [1]) is that you called *both* getPart() and
  getIncomingAttachmentStreams() -- but you can only call one of the
  methods.
 
  Glen
 
  [1]
  http://mail-archives.apache.org/mod_mbox/ws-commons-dev/200703.mbox/%
  [EMAIL PROTECTED]
 
  Am Mittwoch, den 02.05.2007, 16:20 -0500 schrieb Prasad Viswatmula:
   I am using Axis 1.4 and getting the above error.
  
   Thanks,
   Prasad
  



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



HELP - The attachments stream can only be accessed once; either by using the IncomingAttachmentStreams class or by getting a collection of AttachmentPart objects. They cannot both be called within the

2007-05-02 Thread Prasad Viswatmula

I am using Axis 1.4 and getting the above error.

Thanks,
Prasad

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



Re: HELP - The attachments stream can only be accessed once; either by using the IncomingAttachmentStreams class or by getting a collection of AttachmentPart objects. They cannot both be called within

2007-05-02 Thread Glen Mazza
This may be related to AXIOM internally (I don't know if AXIOM is used
in Axis 1, however).  I googled the error message and it seems like the
only thing that could cause that error message to occur (search on The
attachments stream within [1]) is that you called *both* getPart() and
getIncomingAttachmentStreams() -- but you can only call one of the
methods.

Glen

[1]
http://mail-archives.apache.org/mod_mbox/ws-commons-dev/200703.mbox/%
[EMAIL PROTECTED]

Am Mittwoch, den 02.05.2007, 16:20 -0500 schrieb Prasad Viswatmula:
 I am using Axis 1.4 and getting the above error.
 
 Thanks,
 Prasad
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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