You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jorge Fernandez <in...@yahoo.es> on 2007/08/27 17:49:42 UTC

Simple question about MTOM, Rampart and optimize parts

Hi all,

I would like to know how does Rampart work with MTOM. I see that when using Rampart, MTOM elements are included as strings in the SOAP message instead of sending them outside the message as MIME parts, even if I don't do any operation with them (not signature, nor encryption), but these MIME parts appear empty in the HTTP message. Why is that?

Does optimize parts something about that? I don't understand much about this parameter.

If anybody could give me a hint about this, that would be great.

Thanks,

Jorge Fernández



       
---------------------------------

Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.

Re: Simple question about MTOM, Rampart and optimize parts

Posted by Dimuthu <mu...@apache.org>.
Hi,

On Wed, 2007-08-29 at 14:03 +0200, Jorge Fernandez wrote:
> Hi Dimuthu,
> 
> WSCOMMONS-238 opened. 
> 
> Please could you clarify a pair of things?
> 
> Expected behaviour of Rampart is to add  or MTOM elements as MIME parts isn't it?
Yes
> what exactly does Optimize parts? How does it optimize elements? does it reduze its size? Is it applicable for any element, not only MTOM?
It tries to "optimize the transmission of base64 encoded data" according
to the MTOM spec. Therefore the size will be reduced.
When it comes to "optimizeParts" element in RampartConfig, Rampart will
try to MTOMize all the elements specified by XPath expressions.

Hope this helps.

Regards,
Dimuthu

> Thanks,
> 
> Jorge Fernández
> 
> Dimuthu <mu...@apache.org> escribió: Hi,
> 
> Please look at my comments in line.
> 
> On Mon, 2007-08-27 at 17:49 +0200, Jorge Fernandez wrote:
> > Hi all,
> > 
> > I would like to know how does Rampart work with MTOM. I see that when
> >  using Rampart, MTOM elements are included as strings in the SOAP
> >  message instead of sending them outside the message as MIME parts,
> >  even if I don't do any operation with them (not signature, nor
> >  encryption), but these MIME parts appear empty in the HTTP message.
> >  Why is that?
> 
> mmm ...... looks like this is a bug in Axiom. We are looking at it.
> Please report a bug.
> 
> > Does optimize parts something about that? I don't understand much about this parameter.
> 
> Using this parameter, people can manually specify which element needs to
> be optimized. For example if you want to optimize CipherValue in
> EncryptedData then you can specify using this parameter. It is effective
> if you have specified  assertion in
> your policy. Syntax for the element is as follows[1]. So actually this
> is a workaround for the above problem.
> 
> Hope this will help.
> 
> Cheers,
> Dimuthu
> 
> [1]
> 
> 
> //ns1:data1
> //ns2:data2
> 
> 
> 
> 
> 
> 
> 
> 
> > If anybody could give me a hint about this, that would be great.
> > 
> > Thanks,
> > 
> > Jorge Fernández
> > 
> > 
> > 
> >        
> > ---------------------------------
> > 
> > Sé un Mejor Amante del Cine
> > ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.
-- 
http://wso2.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Simple question about MTOM, Rampart and optimize parts

Posted by Dimuthu <mu...@apache.org>.
Hi,

On Wed, 2007-08-29 at 14:03 +0200, Jorge Fernandez wrote:
> Hi Dimuthu,
> 
> WSCOMMONS-238 opened. 
> 
> Please could you clarify a pair of things?
> 
> Expected behaviour of Rampart is to add  or MTOM elements as MIME parts isn't it?
Yes
> what exactly does Optimize parts? How does it optimize elements? does it reduze its size? Is it applicable for any element, not only MTOM?
It tries to "optimize the transmission of base64 encoded data" according
to the MTOM spec. Therefore the size will be reduced.
When it comes to "optimizeParts" element in RampartConfig, Rampart will
try to MTOMize all the elements specified by XPath expressions.

Hope this helps.

Regards,
Dimuthu

> Thanks,
> 
> Jorge Fernández
> 
> Dimuthu <mu...@apache.org> escribió: Hi,
> 
> Please look at my comments in line.
> 
> On Mon, 2007-08-27 at 17:49 +0200, Jorge Fernandez wrote:
> > Hi all,
> > 
> > I would like to know how does Rampart work with MTOM. I see that when
> >  using Rampart, MTOM elements are included as strings in the SOAP
> >  message instead of sending them outside the message as MIME parts,
> >  even if I don't do any operation with them (not signature, nor
> >  encryption), but these MIME parts appear empty in the HTTP message.
> >  Why is that?
> 
> mmm ...... looks like this is a bug in Axiom. We are looking at it.
> Please report a bug.
> 
> > Does optimize parts something about that? I don't understand much about this parameter.
> 
> Using this parameter, people can manually specify which element needs to
> be optimized. For example if you want to optimize CipherValue in
> EncryptedData then you can specify using this parameter. It is effective
> if you have specified  assertion in
> your policy. Syntax for the element is as follows[1]. So actually this
> is a workaround for the above problem.
> 
> Hope this will help.
> 
> Cheers,
> Dimuthu
> 
> [1]
> 
> 
> //ns1:data1
> //ns2:data2
> 
> 
> 
> 
> 
> 
> 
> 
> > If anybody could give me a hint about this, that would be great.
> > 
> > Thanks,
> > 
> > Jorge Fernández
> > 
> > 
> > 
> >        
> > ---------------------------------
> > 
> > Sé un Mejor Amante del Cine
> > ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.
-- 
http://wso2.org


Re: Simple question about MTOM, Rampart and optimize parts

Posted by Jorge Fernandez <in...@yahoo.es>.
Hi Dimuthu,

WSCOMMONS-238 opened. 

Please could you clarify a pair of things?

Expected behaviour of Rampart is to add  or MTOM elements as MIME parts isn't it?

what exactly does Optimize parts? How does it optimize elements? does it reduze its size? Is it applicable for any element, not only MTOM?

Thanks,

Jorge Fernández

Dimuthu <mu...@apache.org> escribió: Hi,

Please look at my comments in line.

On Mon, 2007-08-27 at 17:49 +0200, Jorge Fernandez wrote:
> Hi all,
> 
> I would like to know how does Rampart work with MTOM. I see that when
>  using Rampart, MTOM elements are included as strings in the SOAP
>  message instead of sending them outside the message as MIME parts,
>  even if I don't do any operation with them (not signature, nor
>  encryption), but these MIME parts appear empty in the HTTP message.
>  Why is that?

mmm ...... looks like this is a bug in Axiom. We are looking at it.
Please report a bug.

> Does optimize parts something about that? I don't understand much about this parameter.

Using this parameter, people can manually specify which element needs to
be optimized. For example if you want to optimize CipherValue in
EncryptedData then you can specify using this parameter. It is effective
if you have specified  assertion in
your policy. Syntax for the element is as follows[1]. So actually this
is a workaround for the above problem.

Hope this will help.

Cheers,
Dimuthu

[1]


//ns1:data1
//ns2:data2








> If anybody could give me a hint about this, that would be great.
> 
> Thanks,
> 
> Jorge Fernández
> 
> 
> 
>        
> ---------------------------------
> 
> Sé un Mejor Amante del Cine
> ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.
-- 
http://wso2.org



       
---------------------------------

Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.

Re: Simple question about MTOM, Rampart and optimize parts

Posted by Jorge Fernandez <in...@yahoo.es>.
Hi Dimuthu,

WSCOMMONS-238 opened. 

Please could you clarify a pair of things?

Expected behaviour of Rampart is to add  or MTOM elements as MIME parts isn't it?

what exactly does Optimize parts? How does it optimize elements? does it reduze its size? Is it applicable for any element, not only MTOM?

Thanks,

Jorge Fernández

Dimuthu <mu...@apache.org> escribió: Hi,

Please look at my comments in line.

On Mon, 2007-08-27 at 17:49 +0200, Jorge Fernandez wrote:
> Hi all,
> 
> I would like to know how does Rampart work with MTOM. I see that when
>  using Rampart, MTOM elements are included as strings in the SOAP
>  message instead of sending them outside the message as MIME parts,
>  even if I don't do any operation with them (not signature, nor
>  encryption), but these MIME parts appear empty in the HTTP message.
>  Why is that?

mmm ...... looks like this is a bug in Axiom. We are looking at it.
Please report a bug.

> Does optimize parts something about that? I don't understand much about this parameter.

Using this parameter, people can manually specify which element needs to
be optimized. For example if you want to optimize CipherValue in
EncryptedData then you can specify using this parameter. It is effective
if you have specified  assertion in
your policy. Syntax for the element is as follows[1]. So actually this
is a workaround for the above problem.

Hope this will help.

Cheers,
Dimuthu

[1]


//ns1:data1
//ns2:data2








> If anybody could give me a hint about this, that would be great.
> 
> Thanks,
> 
> Jorge Fernández
> 
> 
> 
>        
> ---------------------------------
> 
> Sé un Mejor Amante del Cine
> ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.
-- 
http://wso2.org



       
---------------------------------

Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.

Re: Simple question about MTOM, Rampart and optimize parts

Posted by Dimuthu <mu...@apache.org>.
Hi,

Please look at my comments in line.

On Mon, 2007-08-27 at 17:49 +0200, Jorge Fernandez wrote:
> Hi all,
> 
> I would like to know how does Rampart work with MTOM. I see that when
>  using Rampart, MTOM elements are included as strings in the SOAP
>  message instead of sending them outside the message as MIME parts,
>  even if I don't do any operation with them (not signature, nor
>  encryption), but these MIME parts appear empty in the HTTP message.
>  Why is that?

mmm ...... looks like this is a bug in Axiom. We are looking at it.
Please report a bug.

> Does optimize parts something about that? I don't understand much about this parameter.

Using this parameter, people can manually specify which element needs to
be optimized. For example if you want to optimize CipherValue in
EncryptedData then you can specify using this parameter. It is effective
if you have specified <wsoma:OptimizedMimeSerialization/> assertion in
your policy. Syntax for the element is as follows[1]. So actually this
is a workaround for the above problem.

Hope this will help.

Cheers,
Dimuthu

[1]
<ramp:optimizeParts>
<ramp:expressions>
<ramp:expression>//ns1:data1</ramp:expression>
<ramp:expression>//ns2:data2</ramp:expression>
</ramp:expressions>
<ramp:namespaces>
<nampespace uri="http://test1.com" prefix="ns1"/>
<nampespace uri="http://test2.com" prefix="ns2"/>
</ramp:namespaces>
</ramp:optimizeParts>


> If anybody could give me a hint about this, that would be great.
> 
> Thanks,
> 
> Jorge Fernández
> 
> 
> 
>        
> ---------------------------------
> 
> Sé un Mejor Amante del Cine
> ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.
-- 
http://wso2.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Simple question about MTOM, Rampart and optimize parts

Posted by Dimuthu <mu...@apache.org>.
Hi,

Please look at my comments in line.

On Mon, 2007-08-27 at 17:49 +0200, Jorge Fernandez wrote:
> Hi all,
> 
> I would like to know how does Rampart work with MTOM. I see that when
>  using Rampart, MTOM elements are included as strings in the SOAP
>  message instead of sending them outside the message as MIME parts,
>  even if I don't do any operation with them (not signature, nor
>  encryption), but these MIME parts appear empty in the HTTP message.
>  Why is that?

mmm ...... looks like this is a bug in Axiom. We are looking at it.
Please report a bug.

> Does optimize parts something about that? I don't understand much about this parameter.

Using this parameter, people can manually specify which element needs to
be optimized. For example if you want to optimize CipherValue in
EncryptedData then you can specify using this parameter. It is effective
if you have specified <wsoma:OptimizedMimeSerialization/> assertion in
your policy. Syntax for the element is as follows[1]. So actually this
is a workaround for the above problem.

Hope this will help.

Cheers,
Dimuthu

[1]
<ramp:optimizeParts>
<ramp:expressions>
<ramp:expression>//ns1:data1</ramp:expression>
<ramp:expression>//ns2:data2</ramp:expression>
</ramp:expressions>
<ramp:namespaces>
<nampespace uri="http://test1.com" prefix="ns1"/>
<nampespace uri="http://test2.com" prefix="ns2"/>
</ramp:namespaces>
</ramp:optimizeParts>


> If anybody could give me a hint about this, that would be great.
> 
> Thanks,
> 
> Jorge Fernández
> 
> 
> 
>        
> ---------------------------------
> 
> Sé un Mejor Amante del Cine
> ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.
-- 
http://wso2.org


Re: Simple question about MTOM, Rampart and optimize parts

Posted by Dimuthu Leelarathne <di...@wso2.com>.
Hi Jorge,

Please look at my comments in line.

On Mon, 2007-08-27 at 17:49 +0200, Jorge Fernandez wrote:
> Hi all,
> 
> I would like to know how does Rampart work with MTOM. I see that when
>  using Rampart, MTOM elements are included as strings in the SOAP
>  message instead of sending them outside the message as MIME parts,
>  even if I don't do any operation with them (not signature, nor
>  encryption), but these MIME parts appear empty in the HTTP message.
>  Why is that?
mmm ...... looks like this is a bug in Axiom. We are looking at it.
Please report a bug.


> Does optimize parts something about that? I don't understand much about this parameter.

Using this parameter, people can manually specify which element needs to
be optimized. For example if you want to optimize CipherValue in
EncryptedData then you can specify using this parameter. It is effective
if you have specified <wsoma:OptimizedMimeSerialization/> assertion in
your policy. Syntax for the element is as follows[1]. So actually this
is a workaround for the above problem.

Hope this helps :)

Cheers,
Dimuthu

[1]
<ramp:optimizeParts>
<ramp:expressions>
<ramp:expression>//ns1:data1</ramp:expression>
<ramp:expression>//ns2:data2</ramp:expression>
</ramp:expressions>
<ramp:namespaces>
<nampespace uri="http://test1.com" prefix="ns1"/>
<nampespace uri="http://test2.com" prefix="ns2"/>
</ramp:namespaces>
</ramp:optimizeParts>


> If anybody could give me a hint about this, that would be great.
> 
> Thanks,
> 
> Jorge Fernández
> 
> 
> 
>        
> ---------------------------------
> 
> Sé un Mejor Amante del Cine
> ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.


Axis2 1.1 and Rampart 1.1.1

Posted by "Skinner, Gregory W." <gs...@mitre.org>.
I am using Axis2 1.1 and Rampart 1.1.1 and whenever I send a message to my
service, I still end up getting a NullPointerException with the following in
the logs:

Unknown top level PED found:
org.apache.neethi.builders.xml.XmlPrimtiveAssertion
Aug 27, 2007 6:27:26 PM org.apache.axis2.transport.http.AxisServlet doPost
SEVERE: java.lang.NullPointerException

Does anyone have any idea how I can fix this?

thanks

Re: Simple question about MTOM, Rampart and optimize parts

Posted by Giao <gq...@yahoo.com>.
Please let me know if you come up with an answer.  I
am also using MTOM from an Axis2 client. (Axis2 1.1.1
and Rampart 1.1.  I am sticking with these version
because everything else works. I know Axis2 1.2 did
not work with Rampart 1.1 so I stopped testing other
combinations.)

As soon as I call
'ServiceClient.engageModule("rampart")' Axis2 seems to
ignore the statement
'Options.setProperty(Constants.Configuration.ENABLE_MTOM,
Constants.VALUE_TRUE)' and puts the attachment as 
base64 encoded within the SOAP message.

I have been avoiding stepping through the Axis2 and
Rampart source code to debug.  This would either help
me identify a property I'm not setting, or I'd find
that I have to recompile the Axis2/Rampart code,
something that I would not like to do.

Thanks in advance.
Giao Nguyen

--- Jorge Fernandez <in...@yahoo.es>
wrote:

> Hi all,
> 
> I would like to know how does Rampart work with
> MTOM. I see that when using Rampart, MTOM elements
> are included as strings in the SOAP message instead
> of sending them outside the message as MIME parts,
> even if I don't do any operation with them (not
> signature, nor encryption), but these MIME parts
> appear empty in the HTTP message. Why is that?
> 
> Does optimize parts something about that? I don't
> understand much about this parameter.
> 
> If anybody could give me a hint about this, that
> would be great.
> 
> Thanks,
> 
> Jorge Fernández
> 
> 
> 
>        
> ---------------------------------
> 
> Sé un Mejor Amante del Cine
> ¿Quieres saber cómo? ¡Deja que otras personas te
> ayuden!.
> 



       
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org