Re: deploy both client and server in tomcat

2009-04-16 Thread jason zhang

Hi
By looking into the axis2 source code, I have a solution like this
ConfigurationContext ctx= ListenerManager.defaultConfigurationContext;
   sc = new ServiceClient(ctx, null);
   sc.engageModule("rampart");
However, I have an exception:"Unable to engage module : rampart"

Any help on configuring axis2 client in server is really appreciated.

thanks
-jason





jason zhang wrote:

Hi, All
I am using axis2-1.4. I had the service deployed to tomcat and it is 
tested. I also developed client using the AXIOM.

The client is initialized like this
ConfigurationContext ctx = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(TestConfig.repo_dir, 
null);

sc = new ServiceClient(ctx, null);
sc.engageModule("rampart");


Right now, I need to move the client code to tomcat and use  it as a 
library. How can I obtain a ConfigurationContext in server? I know the 
axis2 definitely creates configurationContext for its services. I just 
do not know how to obtain the configuration for my client.


Help is appreciated.

thanks

-jason






deploy both client and server in tomcat

2009-04-09 Thread jason zhang

Hi, All
I am using axis2-1.4. I had the service deployed to tomcat and it is 
tested. I also developed client using the AXIOM.

The client is initialized like this
ConfigurationContext ctx = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(TestConfig.repo_dir, 
null);

sc = new ServiceClient(ctx, null);
sc.engageModule("rampart");


Right now, I need to move the client code to tomcat and use  it as a 
library. How can I obtain a ConfigurationContext in server? I know the 
axis2 definitely creates configurationContext for its services. I just 
do not know how to obtain the configuration for my client.


Help is appreciated.

thanks

-jason



Re: difference in AxisFault handling in server between SOAP 11 and SOAP 12

2008-10-23 Thread jason zhang




Hi, Nandana
yes, AXIOM trunk fixed this issue.

thanks
-jason
Nandana Mihindukulasooriya wrote:
Hi Json,
   Did you try using AXIOM trunk ? There was an issue in AXIOM which
created wrong structure for SOAP 1.1 fault, but it is now fixed in the
trunk. Please have a look at these two issues. [1], [2]
  
thanks,
nandana
  
[1] - https://issues.apache.org/jira/browse/WSCOMMONS-343
[2] - http://issues.apache.org/jira/browse/RAMPART-164
  
  On Thu, Oct 23, 2008 at 12:36 PM, jason
zhang <[EMAIL PROTECTED]>
wrote:
  Hi

I use AXIOM style client code to invoke service. My service is
implemented using generated stub. It uses policy for security.  To test
the fault handling, my server code always throws AxisFault.
If the client code has this line:
"options.setSoapVersionURI(org.apache.axiom.soap.SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);",
 the AxisFault is reported back correctly to client. The response is
like this

HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: application/soap+xml; action=""true"
 href="http://www.w3.org/2005/08/addressing/soap/fault" target="_blank">http://www.w3.org/2005/08/addressing/soap/fault";charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 23 Oct 2008 04:29:32 GMT
Connection: close

http://www.w3.org/2003/05/soap-envelope">http://schemas.xmlsoap.org/soap/envelope/">axis2ns5:Server
de
error
...
--
If the client code does not have that line, the message is sent to
server using SOAP 11 style,
The response is a HTTP error from tomcat.
-
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Length: 1000
Date: Thu, 23 Oct 2008 04:30:06 GMT
Connection: close

Apache Tomcat/6.0.16 - Error
report...
HTTP Status 500 - type Status
reportmessage
description
The server encountered an internal error () that prevented it
from fulfilling this request.Apache
Tomcat/6.0.16


I traced the error to
org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper line 151
private void processText(XMLStreamReader parser, OMElement value) {
      try {
146            int token = parser.next();
147           while (token != XMLStreamReader.END_ELEMENT) {
148                if (token == XMLStreamReader.CHARACTERS) {
149                    factory.createOMText(value, parser.getText());
150                } else {
151                    throw new SOAPProcessingException(
                          "Only Characters are allowed here");
              }
              token = parser.next();
          }


      } catch (XMLStreamException e) {
          throw new SOAPProcessingException(e);
      }
  }

When the error occurs, the value is an
org.apache.axiom.soap.impl.dom.soap11.SOAP11FaultCodeImpl element.
token is 1(StartElement).

Is this a bug or something wrong in my code?

thanks

-jason


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

  
  
  
  
  
-- 
Nandana Mihindukulasooriya  
WSO2 inc.
  
  http://nandana83.blogspot.com/
  http://www.wso2.org





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



difference in AxisFault handling in server between SOAP 11 and SOAP 12

2008-10-22 Thread jason zhang

Hi

I use AXIOM style client code to invoke service. My service is 
implemented using generated stub. It uses policy for security.  To test 
the fault handling, my server code always throws AxisFault.
If the client code has this line: 
"options.setSoapVersionURI(org.apache.axiom.soap.SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);",  
the AxisFault is reported back correctly to client. The response is like 
this


HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: application/soap+xml; 
action="http://www.w3.org/2005/08/addressing/soap/fault";charset=UTF-8

Transfer-Encoding: chunked
Date: Thu, 23 Oct 2008 04:29:32 GMT
Connection: close

xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>xmlns:axis2ns5="http://schemas.xmlsoap.org/soap/envelope/";>axis2ns5:Server

de
error 
...

--
If the client code does not have that line, the message is sent to 
server using SOAP 11 style,

The response is a HTTP error from tomcat.
-
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Length: 1000
Date: Thu, 23 Oct 2008 04:30:06 GMT
Connection: close

Apache Tomcat/6.0.16 - Error 
report... HTTP Status 500 - 
type Status 
reportmessage description The 
server encountered an internal error () that prevented it from 
fulfilling this request.noshade="noshade">Apache Tomcat/6.0.16



I traced the error to 
org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper line 151

private void processText(XMLStreamReader parser, OMElement value) {
   try {
146int token = parser.next();
147   while (token != XMLStreamReader.END_ELEMENT) {
148if (token == XMLStreamReader.CHARACTERS) {
149factory.createOMText(value, parser.getText());
150} else {
151throw new SOAPProcessingException(
   "Only Characters are allowed here");
   }
   token = parser.next();
   }


   } catch (XMLStreamException e) {
   throw new SOAPProcessingException(e);
   }
   }

When the error occurs, the value is an 
org.apache.axiom.soap.impl.dom.soap11.SOAP11FaultCodeImpl element. token 
is 1(StartElement).


Is this a bug or something wrong in my code?

thanks

-jason


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



SOAPProcessingException: Only Characters are allowed here for axiom invocation

2008-10-22 Thread jason zhang

Hi, All
I have a very strange situation.

I have a web service. The web service uses policy for username/password 
authentication.
If I use client stub to invoke the service (adb style), the fault 
message is reported back correctly to client as SOAP payload.  
If I use AXIOM to invoke the service, the fault message is not sent back 
as SOAP message. Instead an error html page is

sent to client from Tomcat.

I checked the message sent from client to server. The only difference is 
the action parameter.


---stub invocation (action is a parameter to 
Content-Type)--

POST /cmdportal/services/programws HTTP/1.1
Content-Type: multipart/related; 
boundary=MIMEBoundaryurn_uuid_6D90727ED5A413F06B1224668252054; 
type="application/xop+xml"; 
start="<0.urn:uuid:[EMAIL PROTECTED]>"; 
start-info="application/soap+xml"; action="urn:executeProgram"

User-Agent: Axis2
Host: 127.0.0.1:9090
Transfer-Encoding: chunked


--AXIOM invocation(action is SOAPAction header)--
POST /cmdportal/services/programws HTTP/1.1
Content-Type: multipart/related; 
boundary=MIMEBoundaryurn_uuid_61DF8EDCB8331CE4B71224668218401; 
type="application/xop+xml"; 
start="<0.urn:uuid:[EMAIL PROTECTED]>"; 
start-info="text/xml"

SOAPAction: "urn:executeProgram"
User-Agent: Axis2
Host: 127.0.0.1:9090
Transfer-Encoding: chunked


When using AXIOM invocation, the error message from tomcat console is " 
org.apache.axis2.AxisFault: Error in extracting message properties". I 
traced it to "
org.apache.ws.security.WSSecurityException: Error in converting SOAP 
Envelope to Document; nested exception is:
   org.apache.axiom.soap.SOAPProcessingException: Only Characters are 
allowed here"
   
I use this code to set the SOAP 
action:sc.getOptions().setAction("urn:executeProgram") for AXIOM invocation.


Does anyone know what the error in AXIOM invocation stems from? Is there 
a workround (to mimic the adb invocation)?


Thanks

  


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



axis2 1.4 maven repository

2008-05-15 Thread jason zhang

Hi, david
If I click the URL, I can see the axis 1.4 jar file is there.
But if I use Eclipse+Maven plugin in, I could not find the axis2 1.4 
related library.

I can see axis2 1.3 related library

Any suggestion?

thanks

-jason

David Illsley wrote:

You've got the wrong groupid. Try [1]
David

[1] http://repo1.maven.org/maven2/org/apache/axis2/axis2-kernel/1.4/

  



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



Re: axis2 1.4 incorrect wsdl with policy

2008-05-10 Thread jason zhang




Hi, Sanka
you are right.  After I use the , The policy is the first element of
. For each binding, the policy element is
referenced.


"http://schemas.xmlsoap.org/soap/http"
style="document"/>
...

Thanks for the help

-jason



Sanka Samaranayake wrote:
Hi Jason, 
  
I think you should specify   instead of .
  
Note that  will attached the specified policies
to all soap12 bindings of your service. If you need to attach the
specified policies to both soap11 and soap12 bindings you should
include  both  and
 elements. 
  
You can't attach a policy to a particular binding by setting the 
identifier attribute of   element to that
binding name. It is a limitation we have at the moment. 
  
Sanka
  
  On Thu, May 8, 2008 at 9:17 PM, jason zhang
<[EMAIL PROTECTED]>
wrote:
  
Hi, Sanka
This does not work.
My original wsdl is like this

    ...
    
    ...


My service.xml is like this

    
        
       ...
false
true


            xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
            

                
                

            
            

   
...
          
The generated wsdl does not have policy element at all.

thanks

-jason



Sanka Samaranayake wrote:
 If you want to attach a policy to a
particular binding you should do
that in the services.xml as follows.
  
 
  
http://schemas.xmlsoap.org/ws/2004/09/policy">
  
    
    
  
  
   ...  

  
 
  

  
HTH
  
Sanka
 
  
  
      
  
  On Sun, May 4, 2008 at 2:48 PM, jason zhang <[EMAIL PROTECTED]>
wrote:
  Hi, all
I am using axis2 1.4 with rampart 1.4 RC1. My services.xml is like this
--


  
       ...
      
         xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
          xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
          xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          
      
  


Then I retrieve the generated wsdl from web interface (http://localhost:8080/cmdportal1/services/programws?wsdl)
My wsdl is like this
-


  http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit
y-1.0.xsd" wsu:Id="UToverHTTP">
      ...
  
  programws
  
   ...
 
 


Should the policy element  be the first element of ?

thanks

-jason







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

  
  
  
  
  
-- 
Sanka Samaranayake
WSO2 Inc.
  
  http://sankas.blogspot.com/
  http://www.wso2.org/





  
  
  
  
  
-- 
Sanka Samaranayake
WSO2 Inc.
  
  http://sankas.blogspot.com/
  http://www.wso2.org/





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



Re: axis2 1.4 incorrect wsdl with policy

2008-05-08 Thread jason zhang




Hi, Sanka
This does not work.
My original wsdl is like this

    ...
    
    ...


My service.xml is like this

    
        
       ...
false
true

            xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
            
                
                
            
            
   
...
          
The generated wsdl does not have policy element at all.

thanks

-jason

Sanka Samaranayake wrote:

  
If you want to attach a policy to a particular binding you should do
that in the services.xml as follows.
  
 
  
http://schemas.xmlsoap.org/ws/2004/09/policy">
  
    
    
  
  
   ...  

  
 
  

  
HTH
  
Sanka
 
  
  
  
  
  On Sun, May 4, 2008 at 2:48 PM, jason zhang <[EMAIL PROTECTED]>
wrote:
  Hi, all
I am using axis2 1.4 with rampart 1.4 RC1. My services.xml is like this
--


  
       ...
      
         xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
          xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
          xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          
      
  


Then I retrieve the generated wsdl from web interface (http://localhost:8080/cmdportal1/services/programws?wsdl)
My wsdl is like this
-


  http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit
y-1.0.xsd" wsu:Id="UToverHTTP">
      ...
  
  programws
  
   ...
 
 


Should the policy element  be the first element of ?

thanks

-jason







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

  
  
  
  
  
-- 
Sanka Samaranayake
WSO2 Inc.
  
  http://sankas.blogspot.com/
  http://www.wso2.org/





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



axis2 1.4 incorrect wsdl with policy

2008-05-04 Thread jason zhang

Hi, all
I am using axis2 1.4 with rampart 1.4 RC1. My services.xml is like this
--


   
...
 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";

   xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";
   xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
   
   
   


Then I retrieve the generated wsdl from web interface 
(http://localhost:8080/cmdportal1/services/programws?wsdl)

My wsdl is like this
-


   http://schemas.xmlsoap.org/ws/2004/09/policy"; 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit

y-1.0.xsd" wsu:Id="UToverHTTP">
   ...
   
   programws
   
...
  
  


Should the policy element  be the first element of ?

thanks

-jason







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



rampart and WSPasswordCallback

2008-05-04 Thread jason zhang

Hi, all

According to CallbackHandler 
javadoc(http://java.sun.com/javase/6/docs/technotes/guides/security/jaas/JAASRefGuide.html#CallbackHandler), 
the CallBackHandler should collect password information from external 
source(LDAP, database) and set it to Callback. However, in this example( 
http://wso2.org/library/3190), the PWCBHandler decides whether the 
password is correct or not directly, which should be performed by 
LoginModule.


Is this a mistaken or a designed hack?

thanks

-jason




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



Re: Axis2 with rampart sample, username hardcoded

2008-03-31 Thread jason zhang

Hi, Nandana
I am using rampart 1.3 and axis 1.3. Is this a bug or is there any error 
with my code?


thanks

-jason

jason zhang wrote:

Hi, Nandana
I used this poicy in my service.xml, deployed the service. I then 
generated stub using wsdl which contains the policy element.


My client code is like this
ConfigurationContext ctx = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(repo_dir, 
null);

   stub = new net.sf.webcommand.ws.client.ProgramwsStub(ctx,
   "http://localhost:9090/cmdportal1/services/programws";);
   ServiceClient sc=stub._getServiceClient(); 
sc.engageModule("rampart");

   Options options = sc.getOptions();
   options.setUserName("apache");
   options.setPassword("password");
 But the client does not send the username and password. It just 
sends an empty security header.  This header is like this


xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; 
soapenv:mustUnderstand="true" />


any suggestion?

thanks

-jason


Nandana Mihindukulasooriya wrote:

Hi Jason,
   You need to have that Username Token assertion inside a
supporting token assertion.


xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; 


xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>


  

 


  
  xmlns:ramp="http://ws.apache.org/rampart/policy";>
Alice   

org.apache.testing.clients.WSS11Client 







But here the password is in clear text. If you are using Rampart
SNAPSHOT , you can use WS Security Policy 1.2 to send the hashed
password. The policy for that is given below.


xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; 


xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";

xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702";>



  

 
  

  
  
  

  
  xmlns:ramp="http://ws.apache.org/rampart/policy";>
Alice   

org.apache.testing.clients.WSS11Client 







thanks,
/nandana

  






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



Re: Axis2 with rampart sample, username hardcoded

2008-03-31 Thread jason zhang

Hi, Nandana

I am using axis2-1.3 and rampart 1.3

thanks

-jason

Nandana Mihindukulasooriya wrote:

Hi Jason,
 What are the Axis2 and Rampart versions that you are using ?

thanks,
/nandana

  



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



Re: Axis2 with rampart sample, username hardcoded

2008-03-30 Thread jason zhang

Hi, Nandana
I used this poicy in my service.xml, deployed the service. I then 
generated stub using wsdl which contains the policy element.


My client code is like this
ConfigurationContext ctx = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(repo_dir, 
null);

   stub = new net.sf.webcommand.ws.client.ProgramwsStub(ctx,
   "http://localhost:9090/cmdportal1/services/programws";);
   ServiceClient sc=stub._getServiceClient();  
   sc.engageModule("rampart");

   Options options = sc.getOptions();
   options.setUserName("apache");
   options.setPassword("password");
 
But the client does not send the username and password. It just sends an 
empty security header.  This header is like this


xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; 
soapenv:mustUnderstand="true" />


any suggestion?

thanks

-jason


Nandana Mihindukulasooriya wrote:

Hi Jason,
   You need to have that Username Token assertion inside a
supporting token assertion.

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>


  

   

  
  http://ws.apache.org/rampart/policy";>
Alice

org.apache.testing.clients.WSS11Client





But here the password is in clear text. If you are using Rampart
SNAPSHOT , you can use WS Security Policy 1.2 to send the hashed
password. The policy for that is given below.

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";

xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702";>


  


  
  
  
  

  
  http://ws.apache.org/rampart/policy";>
Alice

org.apache.testing.clients.WSS11Client





thanks,
/nandana

  



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



Re: Using rampart policy for basic authentication

2008-03-29 Thread jason zhang




Hi, Martin
The BasicPolicy is not what I am looking for. In your example, the
AlgorithmSuite is Basic128Rsa15. It is inside a SymmetricBinding.
Symmetric binding implies that the message is encrypted using a
symmetric algorithm. 

I just want username and password passed to server in Soap header as is
defined in Web Services Security UsernameToken Profile 1.0.  The
message is clear http message. 

thanks

-jason




Martin Gainty wrote: 

  you can define a BasicPolicy in your services.xml an example is:

"http://schemas.xmlsoap.org/ws/2004/09/policy">
"http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">

   

   
  
   


Is this what you're looking for?
Martin-
- Original Message -
From: "jason zhang" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, March 29, 2008 6:07 AM
Subject: Using rampart policy for basic authentication


  
  
Hi, All
Is it possible to implement the rampart sample/basic/sample02 with
policy?  What I want to do just basic username/password authentication
with policy. All the examples in  policy directory involve encryption or
signature.

If it is possible, how can I find out in my business method who the
authenticated user is?  For example, the Servlet API has a method
HttpServletRequest.getRemoteUser(). Is such a similar API in rampart?

Thanks

-jason


-
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]



Using rampart policy for basic authentication

2008-03-29 Thread jason zhang

Hi, All
Is it possible to implement the rampart sample/basic/sample02 with 
policy?  What I want to do just basic username/password authentication 
with policy. All the examples in  policy directory involve encryption or 
signature.


If it is possible, how can I find out in my business method who the 
authenticated user is?  For example, the Servlet API has a method 
HttpServletRequest.getRemoteUser(). Is such a similar API in rampart?


Thanks

-jason


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



Re: Axis2 with rampart sample, username hardcoded

2008-03-28 Thread jason zhang




Hi, nandana

Can I use a policy to specify that the server only needs username and
password tokens? The server does not need encryption, signature, etc.
I used this policy in my server.

           
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
            xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
            
                
                    "http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization"/>
                    
                       
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"
                       
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
                         />
                    
                       
xmlns:ramp="http://ws.apache.org/rampart/policy">
                        
                            net.sf.webcommand.ws.WsPWCallbackHandler
                        
                    
                
            
        

I got a null pointer exception following the tutorial.  If I removed
the mtom:OptimizedMimeSerialization, the client does send the message,
but with a empty security header

           
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
            soapenv:mustUnderstand="true">

Did I write the policy correctly?

thanks

-jason



Nandana Mihindukulasooriya wrote:

  Hi Daniel,

  
  
How can I get rid of the  element in the config file and set the
username/password in the handler PWCBClientHandler?

  
  
If you use the policy based configuration you can get rid of both
 and password callback and set the username/password using
options in the client. Please take a look at the tutorial [1].

thanks,
/nandana

[1] - http://wso2.org/library/3190

-
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]



log4j configuration under tomcat 6

2008-03-23 Thread jason zhang
Hi all
I have some trouble in tuning the log4j configuration for axis2 under
tomcat. My web application has both web service and other component such as
web interface.

First, Can I use JDK log instead of log4j log? If I use log4j log, can I
specify log information for my own class in the log4j.properties.

If tomcat uses log4j for log and If there is a log4j.properties under
WEB-INF/classes, tomcat is supposed to read the log file and handle the log
properly.  How does this work under axis2? Which handles the
log4j.properties, axis2 or tomcat?

Thanks

-- 
-jason