[jira] Commented: (AXIS2-1085) StAX Filter [ Data conversion, extraction, or do something between XMLStreamReader and StAXBuilder]

2006-10-21 Thread Rich Scheuerle (JIRA)
[ 
http://issues.apache.org/jira/browse/AXIS2-1085?page=comments#action_12444047 ] 

Rich Scheuerle commented on AXIS2-1085:
---

I loaded the patch onto my machine.  Here are my questions:

1) It appears that the Axis2 has not been changed to use the Filter ?  Is this 
correct ?  Please let me know when you have the final patch.

2) The FilterDemo and FilterConfigDemo worked.  Can you convert these into 
testcases and add some additional asserts?

3) The contributed code is high quality, but lacks javadoc.  Can you please 
provide class and method javadoc for the contributed code (especially Filter 
and FilterRegistry) ?

4) Filter has a single method the references the context:
public XMLStreamReader init(XMLStreamReader reader, Object context);

FilterRegistry has  two  references to the context:
 public XMLStreamReader enableFilter(XMLStreamReader reader, Object 
context) 
  public XMLStreamReader insertFilter(XMLStreamReader reader, Object 
context) 

Should the context be an Object or should the context be 
org.apache.axis2.context.MessageContext ?






> StAX Filter [ Data conversion, extraction, or do something between 
> XMLStreamReader and StAXBuilder]
> ---
>
> Key: AXIS2-1085
> URL: http://issues.apache.org/jira/browse/AXIS2-1085
> Project: Apache Axis 2.0 (Axis2)
>  Issue Type: New Feature
>  Components: core
> Environment: windows
>Reporter: Takahide Nogayama
> Assigned To: Rich Scheuerle
> Attachments: patchAXIOM_to_moduleaxiom-apisrcmainjava.txt, 
> patchAXIS2_to_moduleskernelsrc.txt, src_demo.zip, 
> StAX_filter_architecture.ppt, 
> ver2_patch_to_axiom_modules_axiom-api_src_main_java_org_apache_axiom_om_impl_builder.txt,
>  ver2_patch_to_axis2_modules_kernel_src_org_apache_axis2_transport.txt, 
> ver5_patch_to_axis2_modules.txt
>
>
> To use this Filter in AXIS2, we have to change AXIS2 alittle. 
> See
> http://issues.apache.org/jira/browse/WSCOMMONS-76

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Resolved: (AXIS2-1471) Updating resource.properties files for kernel and jaxws modules

2006-10-21 Thread Rich Scheuerle (JIRA)
 [ http://issues.apache.org/jira/browse/AXIS2-1471?page=all ]

Rich Scheuerle resolved AXIS2-1471.
---

Resolution: Fixed

> Updating resource.properties files for kernel and jaxws modules
> ---
>
> Key: AXIS2-1471
> URL: http://issues.apache.org/jira/browse/AXIS2-1471
> Project: Apache Axis 2.0 (Axis2)
>  Issue Type: Improvement
>  Components: core, jaxws
> Environment: Systems running with English locale.
>Reporter: Ming Cheung
> Assigned To: Rich Scheuerle
>Priority: Trivial
> Attachments: patch.txt, patch2.txt
>
>
> The purpose of revising these resources.properties files is for the 
> possibility of translating these files into multiple National languages files 
> such as Germany, Spanish, Japanese, and etc in the future. The new uploaded 
> patch contains files which are  formatted with proper English syntax, 
> spelling and usage. These changes have also been reviewed by a Technical 
> Writer.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Updated: (AXIS2-1471) Updating resource.properties files for kernel and jaxws modules

2006-10-21 Thread Rich Scheuerle (JIRA)
 [ http://issues.apache.org/jira/browse/AXIS2-1471?page=all ]

Rich Scheuerle updated AXIS2-1471:
--

Attachment: patch2.txt

Thanks for the submission Ming.

I reviewed the changes, and I agree that this is a substantial improvement of 
the message text.  I made several additional changes (patch2.txt) and will 
commit the changes shortly.

> Updating resource.properties files for kernel and jaxws modules
> ---
>
> Key: AXIS2-1471
> URL: http://issues.apache.org/jira/browse/AXIS2-1471
> Project: Apache Axis 2.0 (Axis2)
>  Issue Type: Improvement
>  Components: core, jaxws
> Environment: Systems running with English locale.
>Reporter: Ming Cheung
> Assigned To: Rich Scheuerle
>Priority: Trivial
> Attachments: patch.txt, patch2.txt
>
>
> The purpose of revising these resources.properties files is for the 
> possibility of translating these files into multiple National languages files 
> such as Germany, Spanish, Japanese, and etc in the future. The new uploaded 
> patch contains files which are  formatted with proper English syntax, 
> spelling and usage. These changes have also been reviewed by a Technical 
> Writer.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Resolved: (AXIS2-1469) MIME messages should not be sent when using transports other than HTTP

2006-10-21 Thread Thilina Gunarathne (JIRA)
 [ http://issues.apache.org/jira/browse/AXIS2-1469?page=all ]

Thilina Gunarathne resolved AXIS2-1469.
---

Resolution: Fixed
  Assignee: Thilina Gunarathne

Transports other than HTTP uses the AbstractTransportSender... So disabling 
MTOM & SwA in AbstractTransportSender.
http://svn.apache.org/viewvc?view=rev&rev=466368

> MIME messages should not be sent when using transports other than HTTP
> --
>
> Key: AXIS2-1469
> URL: http://issues.apache.org/jira/browse/AXIS2-1469
> Project: Apache Axis 2.0 (Axis2)
>  Issue Type: Bug
>  Components: client-api
>Affects Versions: 1.1
> Environment: WinXP, Sun JVM 1.5, Axis2 RC1
>Reporter: yogen
> Assigned To: Thilina Gunarathne
>
> The client code generated using WSDL2Java sends MIME message to the soap 
> service even though TCP transport is used. The message content looks like 
> this:
> ##
> --MIMEBoundaryurn_uuid_5E3F43F482C80E679911612724538971
> content-type: application/xop+xml; charset=utf-8; type="text/xml";
> content-transfer-encoding: binary
> content-id: <0.urn:uuid:[EMAIL PROTECTED]>
>  
> 
>http://www.w3.org/2005/08/addressing " 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ ">
>   
>  
> tcp://localhost:7070/axis2/services/Axis2SampleDocLitService
>  
> 
> http://www.w3.org/2005/08/addressing/anonymous
>  
>  
> urn:uuid:4284CC3353C978EC2911612724537881
>  echoString
>   
>   
>   xmlns="http://userguide.axis2.apache.org/xsd";>echo
>   
>
>  
> --MIMEBoundaryurn_uuid_5E3F43F482C80E679911612724538971--
> ##
> This is the client code:
> ##
> public class TCP1Client{
>  
> public static void main(java.lang.String args[]){
> Axis2SampleDocLitServiceStub stub = null;
> try{
> stub = new Axis2SampleDocLitServiceStub(null, 
> "tcp://localhost:6060/axis2/services/Axis2SampleDocLitService");
> stub._getServiceClient().getOptions().setTo(new 
> EndpointReference("tcp://localhost:6060/axis2/services/Axis2SampleDocLitService"));
> 
> stub._getServiceClient().getOptions().setTransportInProtocol(Constants.TRANSPORT_TCP);
> stub._getServiceClient().engageModule(new 
> QName(Constants.MODULE_ADDRESSING));
> System.out.println(echoString(stub));
> } catch(Exception e){
> e.printStackTrace();
> }
> }
>  
> public static String echoString(Axis2SampleDocLitServiceStub stub){
> try{
> EchoStringParamDocument reqDoc00 = 
> EchoStringParamDocument.Factory.newInstance();
> reqDoc00.setEchoStringParam("echo");
>  
> EchoStringReturnDocument resDoc00 = stub.echoString(reqDoc00);
>  
> return resDoc00.getEchoStringReturn();
> } catch(Exception e){
> e.printStackTrace();
> }
> return null;
> }
>  
> }
> ##
>  
> The error generated by Axis runtime:
> ##
> Oct 19, 2006 11:55:29 AM org.apache.axis2.deployment.DeploymentEngine doDeploy
> INFO: Deploying module : addressing-1.09
> org.apache.axis2.AxisFault: javax.xml.stream.XMLStreamException: ParseError 
> at [row,col]:[1,1]
> Message: only whitespace content allowed before start tag and not -; nested 
> exception is: 
>  org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: 
> ParseError at [row,col]:[1,1]
> Message: only whitespace content allowed before start tag and not -
>  at 
> org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:126)
>  at 
> org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)
>  at 
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:367)
>  at 
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:281)
>  at 
> com.sample.Axis2SampleDocLitServiceStub.echoString(Axis2SampleDocLitServiceStub.java:505)
>  at TCP1Client.echoString(TCP1Client.java:28)
>  at TCP1Client.main(TCP1Client.java:17)
> Caused by: org.apache.axiom.om.OMException: 
> javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
> Message: only whitespace content allowed before start tag and not -
>  at 
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:199)
>  at 
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:155)
>  at 
> org.apache.axi

[Axis2]Fwd: MTOM

2006-10-21 Thread Thilina Gunarathne

Forwarding with the correct prefix...

-- Forwarded message --
From: Thilina Gunarathne <[EMAIL PROTECTED]>
Date: Oct 21, 2006 12:56 PM
Subject: Re: MTOM
To: axis-dev@ws.apache.org
Cc: axis-user@ws.apache.org

Try this,
   OMElement theElement = null;
   OMNode theNode = theElement.getFirstOMChild();
   if (theNode.getType() == OMNode.TEXT_NODE) {
   OMText theText = (OMText) theNode;
theText.setBinary(true);
   DataHandler dh = (DataHandler) theText.getDataHandler();
   InputStream stream = dh.getDataSource().getInputStream();
   } else if (theNode.getType() == OMNode.ELEMENT_NODE ) {
   // do what ever you need with the plain XML
   }

Axis2 cannot automatically identify whether a given string is
base64Binary or plain string. It's up to the user to provide that
information either as a schema or by manually setting the "setBinary"
property.  Axis2 can idetify this automatically in the case of MTOM
optimised MIME.

~Thilina


On 10/21/06, Tony Dean <[EMAIL PROTECTED]> wrote:



Thilina,

So the following code should work?

boolean binary = false;
OMElement theElement...
OMNode theNode =  theElement.getFirstOMChild();
if (theNode.getType() == OMNode.TEXT_NODE)  {
   OMText theText =  (OMText)  theNode;
   if (theText.isBinary() {
  // base64Binary:  could  be base64 encoded in soap body or mime 
attachment, how do  I know the  difference or should it even matter?
  binary =  true;
  DataHandler dh =  theText.getDataHandler();
  InputStream stream =  dh.getDataSource().getInputStream();
  ...
   }
}

if (!binary) {
   // then process the child nodes of theElement  as plain xml
   ...
}

Thank  you for your insight.
  

From: Thilina Gunarathne  [mailto:[EMAIL PROTECTED]

Sent: Saturday, October 21, 2006 2:25  AM
To: axis-dev@ws.apache.org
Cc:  axis-user@ws.apache.org
Subject: Re: MTOM



Hi,
You would be able to handle the case2 & 3 without much  hassle.. In the case2 you have to 
explicitly set that the content is  base64Binary. If not Axis2 will treat it as a normal string. You 
can do that  either by using a schema which defines that the content of the "output" element  
is base64Binary  or you can explicitly set that by setting the  "setBinary(true);" in that 
text node.

Following modified code will  handle both case 2 & 3..



>
> OMElementoutputElement ...
> OMNode node = outputElement.getFirstOMChild();
> if(node.getType() == OMNode.TEXT_NODE) {
>OMText text = (OMText)node;


 test.setBinary(true);

>   DataHandler dh = text.getDataHandler();
>InputStream stream =dh.getDataSource().getInputStream();
> }

>
> Isdh valid for case (2) as well? or is dh=null in this case?  I can
test text.isOptimized() to see if base64 encoded?  How can I know ifits plain 
xml?


If the node is an  instance of OMElement then it's  a piece  of xml..  You can 
also test for node.getType() ==  OMNode.ELEMENT_NODE...

Thanks,
~Thilina


> Maybetext.isBinary ()...
>
> Thanks for any suggestions.
>
>
>
> TonyDean
> SAS Institute Inc.
> 919.531.6704
> [EMAIL PROTECTED]
>
> SAS... The Powerto Know
> http://www.sas.com
>
>
> -
>  Tounsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



--
http://webservices.apache.org/~thilina/
 http://thilinag.blogspot.com/




--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

--
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

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



Re: MTOM

2006-10-21 Thread Thilina Gunarathne
One more thing... Please do not cross post to the mailing lists.. Send it either to the dev or either to the user... Some who are interested in the conversation will miss the conversation if somebody responded to only to one list...
Thanx,ThilinaOn 10/21/06, Thilina Gunarathne <[EMAIL PROTECTED]> wrote:
Try this,        OMElement theElement = null;        OMNode theNode = theElement.getFirstOMChild();        if (theNode.getType() == OMNode.TEXT_NODE) {            OMText theText = (OMText) theNode;
            
theText.setBinary(true);            DataHandler dh = (DataHandler) theText.getDataHandler();            InputStream stream = dh.getDataSource().getInputStream();        } else if (theNode.getType
() == OMNode.ELEMENT_NODE
) {            // do what ever you need with the plain XML        }Axis2 cannot automatically identify whether a given string is base64Binary or plain string. It's up to the user to provide that information either as a schema or by manually setting the "setBinary" property.  Axis2 can idetify this automatically in the case of MTOM optimised MIME.
~ThilinaOn 10/21/06, Tony Dean <
[EMAIL PROTECTED]> wrote:





Thilina,
 
So the following code should work?
 
boolean binary = false;
OMElement theElement...
OMNode theNode = 
theElement.getFirstOMChild();
if (theNode.getType() == OMNode.TEXT_NODE) 
{
   OMText theText = 
(OMText)  theNode;
   if (theText.isBinary() {
  // base64Binary:  could 
be base64 encoded in soap body or mime attachment, how do  I know the 
difference or should it even matter?
  binary = 
true;
  DataHandler dh = 
theText.getDataHandler();
  InputStream stream = 
dh.getDataSource().getInputStream();
  ...
   }
}
 
if (!binary) {
   // then process the child nodes of theElement 
as plain xml
   ...
}
 
Thank 
you for your insight. 

From: Thilina Gunarathne 
[mailto:[EMAIL PROTECTED]] Sent: Saturday, October 21, 2006 2:25 
AMTo: axis-dev@ws.apache.orgCc: 
axis-user@ws.apache.orgSubject: Re: MTOM

Hi,You would be able to handle the case2 & 3 without much 
hassle.. In the case2 you have to explicitly set that the content is 
base64Binary. If not Axis2 will treat it as a normal string. You can do that 
either by using a schema which defines that the content of the "output" element 
is base64Binary  or you can explicitly set that by setting the 
"setBinary(true);" in that text node. Following modified code will 
handle both case 2 & 3..

OMElement 
  outputElement ... OMNode node = outputElement.getFirstOMChild();if 
  (node.getType() == OMNode.TEXT_NODE) {   OMText text = (OMText) 
  node;
 test.setBinary(true);
   
  DataHandler dh = text.getDataHandler();   InputStream stream = 
  dh.getDataSource().getInputStream();}
Is 
  dh valid for case (2) as well? or is dh=null in this case?  I can 
  test text.isOptimized() to see if base64 encoded?  How can I know if 
  its plain xml?
If the node is an  instance of OMElement then it's  a piece 
of xml..  You can also test for node.getType() == 
OMNode.ELEMENT_NODE...Thanks,~Thilina
Maybe 
  text.isBinary ()...Thanks for any suggestions.Tony 
  DeanSAS Institute Inc.919.531.6704[EMAIL PROTECTED]SAS... The Power 
  to Knowhttp://www.sas.com-

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

-- http://webservices.apache.org/~thilina/

http://thilinag.blogspot.com/ 


-- http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/


-- http://webservices.apache.org/~thilina/http://thilinag.blogspot.com/



Re: UsernameToken dynamic

2006-10-21 Thread Ruchith Fernando

Hi,

You can create the wsse:Security header and insert the Token you
obtain from the STS into the header and add this header to the SOAP
Header of your request SOAP Envelope. Rampart/WSS4J will not remove
this header and will add other security information to the *same*
header.

Thanks,
Ruchith

On 10/19/06, Jesús Daniel Blázquez Carazo <[EMAIL PROTECTED]> wrote:



Hello.

I am trying to secure the web service using axis1.4 in the server side and
in the client side axis 2.

My problem is the following:

I use rampart module to insert the username token in the SOAP header. But
this username token is unknown in development time because it is returned by
a Security Token Service in runtime. I like to know how to insert this
dynamic username token into the AxisConfiguration object.
To test I include the username in the axis2.xml in development time but for
my proposal it must be inserted in runtime.

Thanks



--
www.ruchith.org

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



Re: MTOM

2006-10-21 Thread Thilina Gunarathne
Try this,        OMElement theElement = null;        OMNode theNode = theElement.getFirstOMChild();        if (theNode.getType() == OMNode.TEXT_NODE) {            OMText theText = (OMText) theNode;            
theText.setBinary(true);            DataHandler dh = (DataHandler) theText.getDataHandler();            InputStream stream = dh.getDataSource().getInputStream();        } else if (theNode.getType() == OMNode.ELEMENT_NODE
) {            // do what ever you need with the plain XML        }Axis2 cannot automatically identify whether a given string is base64Binary or plain string. It's up to the user to provide that information either as a schema or by manually setting the "setBinary" property.  Axis2 can idetify this automatically in the case of MTOM optimised MIME.
~ThilinaOn 10/21/06, Tony Dean <[EMAIL PROTECTED]> wrote:





Thilina,
 
So the following code should work?
 
boolean binary = false;
OMElement theElement...
OMNode theNode = 
theElement.getFirstOMChild();
if (theNode.getType() == OMNode.TEXT_NODE) 
{
   OMText theText = 
(OMText)  theNode;
   if (theText.isBinary() {
  // base64Binary:  could 
be base64 encoded in soap body or mime attachment, how do  I know the 
difference or should it even matter?
  binary = 
true;
  DataHandler dh = 
theText.getDataHandler();
  InputStream stream = 
dh.getDataSource().getInputStream();
  ...
   }
}
 
if (!binary) {
   // then process the child nodes of theElement 
as plain xml
   ...
}
 
Thank 
you for your insight. 

From: Thilina Gunarathne 
[mailto:[EMAIL PROTECTED]] Sent: Saturday, October 21, 2006 2:25 
AMTo: axis-dev@ws.apache.orgCc: 
axis-user@ws.apache.orgSubject: Re: MTOM

Hi,You would be able to handle the case2 & 3 without much 
hassle.. In the case2 you have to explicitly set that the content is 
base64Binary. If not Axis2 will treat it as a normal string. You can do that 
either by using a schema which defines that the content of the "output" element 
is base64Binary  or you can explicitly set that by setting the 
"setBinary(true);" in that text node. Following modified code will 
handle both case 2 & 3..

OMElement 
  outputElement ... OMNode node = outputElement.getFirstOMChild();if 
  (node.getType() == OMNode.TEXT_NODE) {   OMText text = (OMText) 
  node;
 test.setBinary(true);
   
  DataHandler dh = text.getDataHandler();   InputStream stream = 
  dh.getDataSource().getInputStream();}
Is 
  dh valid for case (2) as well? or is dh=null in this case?  I can 
  test text.isOptimized() to see if base64 encoded?  How can I know if 
  its plain xml?
If the node is an  instance of OMElement then it's  a piece 
of xml..  You can also test for node.getType() == 
OMNode.ELEMENT_NODE...Thanks,~Thilina
Maybe 
  text.isBinary ()...Thanks for any suggestions.Tony 
  DeanSAS Institute Inc.919.531.6704[EMAIL PROTECTED]SAS... The Power 
  to Knowhttp://www.sas.com-
To 
  unsubscribe, e-mail: [EMAIL PROTECTED] 
  For additional commands, e-mail: [EMAIL PROTECTED]
-- http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ 


-- http://webservices.apache.org/~thilina/http://thilinag.blogspot.com/