Axis 1 and ws-policy

2009-11-23 Thread Wishing Carebear
Hello:
I have a snippet of wsdl as shown below. Does Axis 1(1.4.1) supports that.
Please look into the attached wsdl for more details...

Thanks,
cabear

wsdl:definitions name=BusinessCardService
 targetNamespace=http://tempuri.org/; xmlns:wsdl=
http://schemas.xmlsoap.org/wsdl/;
 xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:wsu=
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd

 xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:wsam=
http://www.w3.org/2007/05/addressing/metadata;
 xmlns:tns=http://tempuri.org/; xmlns:wsa=
http://schemas.xmlsoap.org/ws/2004/08/addressing;
 xmlns:wsp=http://schemas.xmlsoap.org/ws/2004/09/policy; xmlns:wsap=
http://schemas.xmlsoap.org/ws/2004/08/addressing/policy;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:msc=
http://schemas.microsoft.com/ws/2005/12/wsdl/contract;
 xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:soap12=
http://schemas.xmlsoap.org/wsdl/soap12/;
 xmlns:wsa10=http://www.w3.org/2005/08/addressing; xmlns:wsx=
http://schemas.xmlsoap.org/ws/2004/09/mex;
 wsp:Policy wsu:Id=WSHttpBinding_IBusinessCard_policy
  wsp:ExactlyOne
   wsp:All
sp:SymmetricBinding
 xmlns:sp=http://schemas.xmlsoap.org/ws/2005/07/securitypolicy;
 wsp:Policy
  sp:ProtectionToken
   wsp:Policy
sp:SecureConversationToken
 sp:IncludeToken=
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient

 wsp:Policy
  sp:RequireDerivedKeys /
  sp:BootstrapPolicy
   wsp:Policy
sp:SignedParts
 sp:Body /
 sp:Header Name=To
  Namespace=http://www.w3.org/2005/08/addressing; /
 sp:Header Name=From
  Namespace=http://www.w3.org/2005/08/addressing; /
 sp:Header Name=FaultTo
  Namespace=http://www.w3.org/2005/08/addressing; /
 sp:Header Name=ReplyTo
  Namespace=http://www.w3.org/2005/08/addressing; /
 sp:Header Name=MessageID
  Namespace=http://www.w3.org/2005/08/addressing; /
 sp:Header Name=RelatesTo
  Namespace=http://www.w3.org/2005/08/addressing; /
 sp:Header Name=Action
  Namespace=http://www.w3.org/2005/08/addressing; /
/sp:SignedParts
?xml version=1.0 encoding=utf-8?
wsdl:definitions name=BusinessCardService
	targetNamespace=http://tempuri.org/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
	xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
	xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd;
	xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:wsam=http://www.w3.org/2007/05/addressing/metadata;
	xmlns:tns=http://tempuri.org/; xmlns:wsa=http://schemas.xmlsoap.org/ws/2004/08/addressing;
	xmlns:wsp=http://schemas.xmlsoap.org/ws/2004/09/policy; xmlns:wsap=http://schemas.xmlsoap.org/ws/2004/08/addressing/policy;
	xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:msc=http://schemas.microsoft.com/ws/2005/12/wsdl/contract;
	xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/;
	xmlns:wsa10=http://www.w3.org/2005/08/addressing; xmlns:wsx=http://schemas.xmlsoap.org/ws/2004/09/mex;
	wsp:Policy wsu:Id=WSHttpBinding_IBusinessCard_policy
		wsp:ExactlyOne
			wsp:All
sp:SymmetricBinding
	xmlns:sp=http://schemas.xmlsoap.org/ws/2005/07/securitypolicy;
	wsp:Policy
		sp:ProtectionToken
			wsp:Policy
sp:SecureConversationToken
	sp:IncludeToken=http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient;
	wsp:Policy
		sp:RequireDerivedKeys /
		sp:BootstrapPolicy
			wsp:Policy
sp:SignedParts
	sp:Body /
	sp:Header Name=To
		Namespace=http://www.w3.org/2005/08/addressing; /
	sp:Header Name=From
		Namespace=http://www.w3.org/2005/08/addressing; /
	sp:Header Name=FaultTo
		Namespace=http://www.w3.org/2005/08/addressing; /
	sp:Header Name=ReplyTo
		Namespace=http://www.w3.org/2005/08/addressing; /
	sp:Header Name=MessageID
		Namespace=http://www.w3.org/2005/08/addressing; /
	sp:Header Name=RelatesTo
		Namespace=http://www.w3.org/2005/08/addressing; /
	sp:Header Name=Action
		Namespace=http://www.w3.org/2005/08/addressing; /
/sp:SignedParts
sp:EncryptedParts
	sp:Body /
/sp:EncryptedParts
sp:SymmetricBinding
	wsp:Policy
		sp:ProtectionToken
			wsp:Policy
sp:SpnegoContextToken
	sp:IncludeToken=http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient;
	wsp:Policy
		sp:RequireDerivedKeys /

Re: Axis 1 and ws-policy

2009-11-23 Thread Wishing Carebear
Could someone give some pointers.

Thanks,
cabear

On Mon, Nov 23, 2009 at 2:09 PM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Hello:
 I have a snippet of wsdl as shown below. Does Axis 1(1.4.1) supports that.
 Please look into the attached wsdl for more details...

 Thanks,
 cabear

 wsdl:definitions name=BusinessCardService
  targetNamespace=http://tempuri.org/; xmlns:wsdl=
 http://schemas.xmlsoap.org/wsdl/;
  xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
  xmlns:wsu=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
 
  xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:wsam=
 http://www.w3.org/2007/05/addressing/metadata;
  xmlns:tns=http://tempuri.org/; xmlns:wsa=
 http://schemas.xmlsoap.org/ws/2004/08/addressing;
  xmlns:wsp=http://schemas.xmlsoap.org/ws/2004/09/policy; xmlns:wsap=
 http://schemas.xmlsoap.org/ws/2004/08/addressing/policy;
  xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:msc=
 http://schemas.microsoft.com/ws/2005/12/wsdl/contract;
  xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:soap12=
 http://schemas.xmlsoap.org/wsdl/soap12/;
  xmlns:wsa10=http://www.w3.org/2005/08/addressing; xmlns:wsx=
 http://schemas.xmlsoap.org/ws/2004/09/mex;
  wsp:Policy wsu:Id=WSHttpBinding_IBusinessCard_policy
   wsp:ExactlyOne
wsp:All
 sp:SymmetricBinding
  xmlns:sp=http://schemas.xmlsoap.org/ws/2005/07/securitypolicy;
  wsp:Policy
   sp:ProtectionToken
wsp:Policy
 sp:SecureConversationToken
  sp:IncludeToken=
 http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient
 
  wsp:Policy
   sp:RequireDerivedKeys /
   sp:BootstrapPolicy
wsp:Policy
 sp:SignedParts
  sp:Body /
  sp:Header Name=To
   Namespace=http://www.w3.org/2005/08/addressing; /
  sp:Header Name=From
   Namespace=http://www.w3.org/2005/08/addressing; /
  sp:Header Name=FaultTo
   Namespace=http://www.w3.org/2005/08/addressing; /
  sp:Header Name=ReplyTo
   Namespace=http://www.w3.org/2005/08/addressing; /
  sp:Header Name=MessageID
   Namespace=http://www.w3.org/2005/08/addressing; /
  sp:Header Name=RelatesTo
   Namespace=http://www.w3.org/2005/08/addressing; /
  sp:Header Name=Action
   Namespace=http://www.w3.org/2005/08/addressing; /
 /sp:SignedParts



Re: DIME, MTOM and Axis1

2009-10-27 Thread Wishing Carebear
Any pointers please.

Thanks,
cabear

On Mon, Oct 26, 2009 at 7:45 PM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Hello:
 I have some legacy webservice application using axis1. Need to support
 attachment webservice using axis1 both sending and receiving.

 The consumer will be .NET WSE3 client. Is this possible with axis1.

 If so could someone point me to some examples.

 Thanks for your time and help,
 cabear



DIME, MTOM and Axis1

2009-10-26 Thread Wishing Carebear
Hello:
I have some legacy webservice application using axis1. Need to support
attachment webservice using axis1 both sending and receiving.

The consumer will be .NET WSE3 client. Is this possible with axis1.

If so could someone point me to some examples.

Thanks for your time and help,
cabear


Axis1 and proxy

2009-09-23 Thread Wishing Carebear
Hello:
Have added the proxy information to the jvm arguements but when the call is
made get the following exception. Could someone give me some pointers.

Thanks,
cabear

proxy host is 10.1.32.163
proxy port is 6588
proxy set is null
proxy user is null
proxy password is null
AxisFault
 faultCode: 
{http://xml.apache.org/axis/https://owa.savvion.com/owa/redir.aspx?C=32f3b8ae83014704b3d6dcbf5c9e79d0URL=http%3a%2f%2fxml.apache.org%2faxis%2f
}HTTP
 faultSubcode:
 faultString: (0)null
 faultActor:
 faultNode:
 faultDetail:
{}:return code:  0


{http://xml.apache.org/axis/https://owa.savvion.com/owa/redir.aspx?C=32f3b8ae83014704b3d6dcbf5c9e79d0URL=http%3a%2f%2fxml.apache.org%2faxis%2f
}HttpErrorCode:0

(0)null
at
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.j
ava:744)
at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)

at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)


Re: Axis1 (1.4.1) and WS-Addressing

2009-09-21 Thread Wishing Carebear
Thanks Doug.

But where can I find the wsa example.

Regards,
cabear

On Mon, Sep 21, 2009 at 4:23 AM, Doug Davis d...@us.ibm.com wrote:


 Yes - look at the wsa sample.

 thanks
 -Doug
 __
 STSM |  Standards Architect  |  IBM Software Group
 (919) 254-6905  |  IBM 444-6905  |  d...@us.ibm.com
 The more I'm around some people, the more I like my dog.


   *Wishing Carebear wishing.careb...@gmail.com*

 09/20/2009 08:56 AM   Please respond to
 axis-user@ws.apache.org

To
 axis-user@ws.apache.org  cc
   Subject
 Axis1 (1.4.1) and WS-Addressing




 Hello:
 Does WS-Addressing works with Axis1. If so could someone point me to some
 examples.

 Thanks for your time,
 cabear



Re: Axis1 (1.4.1) and WS-Addressing

2009-09-21 Thread Wishing Carebear
Thanks Doug for your quick response.

On Mon, Sep 21, 2009 at 8:21 AM, Doug Davis d...@us.ibm.com wrote:


 http://svn.apache.org/viewvc/webservices/axis/trunk/java/samples/wsa/

 thanks
 -Doug
 __
 STSM |  Standards Architect  |  IBM Software Group
 (919) 254-6905  |  IBM 444-6905  |  d...@us.ibm.com
 The more I'm around some people, the more I like my dog.


   *Wishing Carebear wishing.careb...@gmail.com*

 09/21/2009 11:19 AM   Please respond to
 axis-user@ws.apache.org

To
  axis-user@ws.apache.org
  cc
   Subject
 Re: Axis1 (1.4.1) and WS-Addressing




 Thanks Doug.

 But where can I find the wsa example.

 Regards,
 cabear

 On Mon, Sep 21, 2009 at 4:23 AM, Doug Davis 
 *...@us.ibm.com*d...@us.ibm.com
 wrote:

 Yes - look at the wsa sample.

 thanks
 -Doug
 __
 STSM |  Standards Architect  |  IBM Software Group
 (919) 254-6905  |  IBM 444-6905  |  *...@us.ibm.com* d...@us.ibm.com
 The more I'm around some people, the more I like my dog.

   *Wishing Carebear **wishing.careb...@gmail.com*wishing.careb...@gmail.com
 **

 09/20/2009 08:56 AM
   Please respond to*
 **axis-u...@ws.apache.org* axis-user@ws.apache.org


   To
 *axis-u...@ws.apache.org* axis-user@ws.apache.org  cc
   Subject
 Axis1 (1.4.1) and WS-Addressing





 Hello:
 Does WS-Addressing works with Axis1. If so could someone point me to some
 examples.

 Thanks for your time,
 cabear




Re: Axis1 (1.4.1) and WS-Addressing

2009-09-21 Thread Wishing Carebear
Doug;
When is the support for wsa available for Axis1. I'm using Axis 1.4.1
binaries but the Call object does not have ReplyTo method.

Thanks,
cabear

On Mon, Sep 21, 2009 at 8:39 AM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Thanks Doug for your quick response.


 On Mon, Sep 21, 2009 at 8:21 AM, Doug Davis d...@us.ibm.com wrote:


 http://svn.apache.org/viewvc/webservices/axis/trunk/java/samples/wsa/

 thanks
 -Doug
 __
 STSM |  Standards Architect  |  IBM Software Group
 (919) 254-6905  |  IBM 444-6905  |  d...@us.ibm.com
 The more I'm around some people, the more I like my dog.


   *Wishing Carebear wishing.careb...@gmail.com*

 09/21/2009 11:19 AM   Please respond to
 axis-user@ws.apache.org

To
  axis-user@ws.apache.org
  cc
   Subject
 Re: Axis1 (1.4.1) and WS-Addressing




 Thanks Doug.

 But where can I find the wsa example.

 Regards,
 cabear

 On Mon, Sep 21, 2009 at 4:23 AM, Doug Davis 
 *...@us.ibm.com*d...@us.ibm.com
 wrote:

 Yes - look at the wsa sample.

 thanks
 -Doug
 __
 STSM |  Standards Architect  |  IBM Software Group
 (919) 254-6905  |  IBM 444-6905  |  *...@us.ibm.com* d...@us.ibm.com
 The more I'm around some people, the more I like my dog.

   *Wishing Carebear 
 **wishing.careb...@gmail.com*wishing.careb...@gmail.com
 **

 09/20/2009 08:56 AM
   Please respond to*
 **axis-u...@ws.apache.org* axis-user@ws.apache.org


   To
 *axis-u...@ws.apache.org* axis-user@ws.apache.org  cc
   Subject
 Axis1 (1.4.1) and WS-Addressing





 Hello:
 Does WS-Addressing works with Axis1. If so could someone point me to some
 examples.

 Thanks for your time,
 cabear





Re: Axis1 (1.4.1) and WS-Addressing

2009-09-21 Thread Wishing Carebear
Thanks Doug for all your help. I need to verify whether I'm using 1.4 or
1.4.1 at my end.

Regards,
cabear

On Mon, Sep 21, 2009 at 10:27 AM, Doug Davis d...@us.ibm.com wrote:


 I don't recall which version is the latest or when the WSA stuff went in -
 you may need to grab the src and build it manually if the 1.4.1 doesn't
 include it.

 thanks
 -Doug
 __
 STSM |  Standards Architect  |  IBM Software Group
 (919) 254-6905  |  IBM 444-6905  |  d...@us.ibm.com
 The more I'm around some people, the more I like my dog.


   *Wishing Carebear wishing.careb...@gmail.com*

 09/21/2009 12:31 PM
Please respond to
 axis-user@ws.apache.org

To
 axis-user@ws.apache.org  cc
   Subject
 Re: Axis1 (1.4.1) and WS-Addressing




 Doug;
 When is the support for wsa available for Axis1. I'm using Axis 1.4.1
 binaries but the Call object does not have ReplyTo method.

 Thanks,
 cabear

 On Mon, Sep 21, 2009 at 8:39 AM, Wishing Carebear *
 wishing.careb...@gmail.com* wishing.careb...@gmail.com wrote:
 Thanks Doug for your quick response.


 On Mon, Sep 21, 2009 at 8:21 AM, Doug Davis 
 *...@us.ibm.com*d...@us.ibm.com
 wrote:
 *
 **http://svn.apache.org/viewvc/webservices/axis/trunk/java/samples/wsa/*http://svn.apache.org/viewvc/webservices/axis/trunk/java/samples/wsa/

 thanks
 -Doug
 __
 STSM |  Standards Architect  |  IBM Software Group
 (919) 254-6905  |  IBM 444-6905  |  *...@us.ibm.com* d...@us.ibm.com
 The more I'm around some people, the more I like my dog.

   *Wishing Carebear **wishing.careb...@gmail.com*wishing.careb...@gmail.com
 **

 09/21/2009 11:19 AM
   Please respond to*
 **axis-u...@ws.apache.org* axis-user@ws.apache.org

To
 *axis-u...@ws.apache.org* axis-user@ws.apache.org  cc
   Subject
 Re: Axis1 (1.4.1) and WS-Addressing





 Thanks Doug.

 But where can I find the wsa example.

 Regards,
 cabear

 On Mon, Sep 21, 2009 at 4:23 AM, Doug Davis 
 *...@us.ibm.com*d...@us.ibm.com
 wrote:

 Yes - look at the wsa sample.

 thanks
 -Doug
 __
 STSM |  Standards Architect  |  IBM Software Group
 (919) 254-6905  |  IBM 444-6905  |  *...@us.ibm.com* d...@us.ibm.com
 The more I'm around some people, the more I like my dog.
   *Wishing Carebear **wishing.careb...@gmail.com*wishing.careb...@gmail.com
 **

 09/20/2009 08:56 AM
   Please respond to*
 **axis-u...@ws.apache.org* axis-user@ws.apache.org


   To
 *axis-u...@ws.apache.org* axis-user@ws.apache.org  cc
   Subject
 Axis1 (1.4.1) and WS-Addressing






 Hello:
 Does WS-Addressing works with Axis1. If so could someone point me to some
 examples.

 Thanks for your time,
 cabear






Axis1 (1.4.1) and WS-Addressing

2009-09-20 Thread Wishing Carebear
Hello:
Does WS-Addressing works with Axis1. If so could someone point me to some
examples.

Thanks for your time,
cabear


ws-addressing references not working

2009-09-20 Thread Wishing Carebear
Hello:
Foudn the following reference for WS-Addressing with Axis1 in the mailing
list but it does not work.

http://ws.apache.org/ws-fx/addressing/

Can someone point me to the right place.

Thanks for your help and time,
regards,
Ravi


Re: Axis1 (1.4.1) and WS-Addressing

2009-09-20 Thread Wishing Carebear
Can someone please reply.

Thanks,
cabear

On Sun, Sep 20, 2009 at 5:56 AM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Hello:
 Does WS-Addressing works with Axis1. If so could someone point me to some
 examples.

 Thanks for your time,
 cabear



Re: Help with axis1.4.1 (not axis2) and wss4j

2009-08-31 Thread Wishing Carebear
 back class specified in the passwordCallback
 parameter. The user value is passed to an instance of the callback class as
 the identifier.

 The parameter signaturePropFile specifies the properties file used during
 the signing process. This file specifies what keystore file to used and the
 password to the keystore.


 #
 # Webservice Security
 #

 org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
 org.apache.ws.security.crypto.merlin.keystore.type=pkcs12
 org.apache.ws.security.crypto.merlin.file=pki/keystore.pfx
 org.apache.ws.security.crypto.merlin.keystore.password=keypassword
 #

 The following example is a template for a password callback class.


 package com.acme.security ;

 import  java.io.* ;

 import javax.security.auth.callback.Callback ;
 import javax.security.auth.callback.CallbackHandler ;
 import javax.security.auth.callback.UnsupportedCallbackException ;

 import org.apache.ws.security.WSPasswordCallback ;

 public class PasswordCallback implements CallbackHandler
 {
 public PasswordCallback ()
 {
 }

 public void handle ( Callback[] callbackArray ) throws IOException,
 UnsupportedCallbackException
 {
 System.out.println ( PasswordCallback handle ) ;

 for ( int i = 0; i  callbackArray.length; i++ )
 {
 if ( callbackArray[i] instanceof WSPasswordCallback )
 {
 WSPasswordCallback callback =
 (WSPasswordCallback)callbackArray[i] ;

 int usage = callback.getUsage () ;

 String identifier = callback.getIdentifer () ;

 if ( usage == WSPasswordCallback.UNKNOWN )
 {
 System.out.println ( UNKNOWN  + identifier ) ;

 continue ;
 }

 if ( usage == WSPasswordCallback.DECRYPT )
 {
 System.out.println ( DECRYPT  + identifier ) ;

 continue ;
 }

 if ( usage == WSPasswordCallback.SIGNATURE )
 {
 System.out.println ( SIGNATURE  + identifier ) ;

 if ( identifier.equals ( XYZLabel ) )
 {
  /*
  keystore private key password
  */

  callback.setPassword ( keypassword ) ;

  return ;
 }

 return ;
 }

 if ( usage == WSPasswordCallback.KEY_NAME )
 {
 System.out.println ( KEY_NAME  + identifier ) ;

 continue ;
 }

 if ( usage == WSPasswordCallback.USERNAME_TOKEN )
 {
 System.out.println ( USERNAME_TOKEN   + identifier )
 ;

 if ( identifier.equals ( myuser ) )
 {
  callback.setPassword ( mypassword ) ;

  return ;
 }

 return ;
 }

 if ( usage == WSPasswordCallback.USERNAME_TOKEN_UNKNOWN )
 {
 System.out.println ( USERNAME_TOKEN_UNKNOWN  +
 identifier ) ;

 continue ;
 }

 if ( usage == WSPasswordCallback.SECURITY_CONTEXT_TOKEN )
 {
 System.out.println ( SECURITY_CONTEXT_TOKEN  +
 identifier ) ;

 continue ;
 }
 }
 }

 throw new java.io.IOException ( PasswordCallback: unrecognized
 password callback instance or callback usage ) ;
 }
 }


 =


 -Original Message-
 *From:* Wishing Carebear [mailto:wishing.careb...@gmail.com]
 *Sent:* Saturday, 29 August 2009 7:35 AM
 *To:* axis-user@ws.apache.org
 *Subject:* Re: Help with axis1.4.1 (not axis2) and wss4j

 Hello:
 Can someone provide some pointers.

 Thanks,
 cabear

 On Fri, Aug 28, 2009 at 10:13 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:
 I'm trying to write a client to a WSE 3.0 published webservice. The policy
 file looks like below:

 Does wss4j and axis supports addressing.

 Thanks,
 cabear

 

 policies xmlns=http://schemas.microsoft.com/wse/2005/06/policy; 
 http://schemas.microsoft.com/wse/2005/06/policy
  extensions
  extension name=usernameForCertificateSecurity 
 type=Microsoft.Web.Services3.Design.UsernameForCertificateAssertion, 
 Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, 
 PublicKeyToken=31bf3856ad364e35 /
  extension name=x509 
 type=Microsoft.Web.Services3.Design.X509TokenProvider, 
 Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, 
 PublicKeyToken=31bf3856ad364e35

Re: Help with axis1.4.1 (not axis2) and wss4j

2009-08-31 Thread Wishing Carebear
Alick:
Is there any good tutorial with Addressing and wss4j security and Axis1.

Thanks,
cabear

On Mon, Aug 31, 2009 at 10:45 PM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Thanks Alick.

 I will try it out.

 Regards,
 cabear


 On Mon, Aug 31, 2009 at 2:54 PM, Alick Buckley alick.buck...@lansa.com.au
  wrote:

  Hi,

 Axis 1.4 offers WS-Security capability by using the Apache WSS4J,
 XML-Security and WS-Addressing projects.

 WS-Security and WS-Addressing capability is available by configuring the
 Axis client configuration file for the particular service that needs to have
 these features enabled.

 The global configuration parameter 'enableNamespacePrefixOptimization'
 needs to be false, so the XML is not altered after the signing process.

 Client Configuration Example

 ?xml version=1.0 encoding=utf-8?

 deployment name=defaultClientConfig xmlns=
 http://xml.apache.org/axis/wsdd/; xmlns:java=
 http://xml.apache.org/axis/wsdd/providers/java;

 globalConfiguration
   parameter name=disablePrettyXML value=true/
   parameter name=addressing.sendReplyTo value=true/
   parameter name=enableNamespacePrefixOptimization value=false/
 /globalConfiguration

 service name=MyServicePort
   requestFlow
 handler type=java:com.acme.MyHandler
   parameter name=acme.keyword value=value/
 /handler
   /requestFlow
 /service

 service name=XYZPort
   requestFlow

 handler
 type=java:org.apache.axis.message.addressing.handler.AddressingHandler
   !-- Reference elements are added in the same order --
   parameter name=referencePropertyNames
  value={Element}{
 http://schemas.xmlsoap.org/ws/2004/03/addressing}Actionhttp://schemas.xmlsoap.org/ws/2004/03/addressing%7DAction
 ;
 {Element}{
 http://schemas.xmlsoap.org/ws/2004/03/addressing}MessageIDhttp://schemas.xmlsoap.org/ws/2004/03/addressing%7DMessageID
 ;
 {Element}{
 http://schemas.xmlsoap.org/ws/2004/03/addressing}ReplyTohttp://schemas.xmlsoap.org/ws/2004/03/addressing%7DReplyTo
 ;
 {Element}{
 http://schemas.xmlsoap.org/ws/2004/03/addressing}Tohttp://schemas.xmlsoap.org/ws/2004/03/addressing%7DTo
 ;
 {Element}{
 http://schemas.xmlsoap.org/ws/2004/03/addressing}Fromhttp://schemas.xmlsoap.org/ws/2004/03/addressing%7DFrom
 /
 /handler

 handler type=java:org.apache.ws.axis.security.WSDoAllSender
   !-- action order is important, do Timestamp then Signature if
 signing Timestamp --
   parameter name=action value=Timestamp Signature/
   parameter name=user value=XYZLabel/
   parameter name=passwordCallbackClass
 value=com.acme.security.PasswordCallback/
   parameter name=signatureKeyIdentifier value=DirectReference/
   parameter name=signaturePropFile
 value=pki/security.properties/
   parameter name=timeToLive value=300/
   parameter name=precisionInMilliseconds value=false /
   !-- Reference elements are added in the same order --
   parameter name=signatureParts
  value={Element}{
 http://schemas.xmlsoap.org/ws/2004/03/addressing}Actionhttp://schemas.xmlsoap.org/ws/2004/03/addressing%7DAction
 ;
 {Element}{
 http://schemas.xmlsoap.org/ws/2004/03/addressing}MessageIDhttp://schemas.xmlsoap.org/ws/2004/03/addressing%7DMessageID
 ;
 {Element}{
 http://schemas.xmlsoap.org/ws/2004/03/addressing}ReplyTohttp://schemas.xmlsoap.org/ws/2004/03/addressing%7DReplyTo
 ;
 {Element}{
 http://schemas.xmlsoap.org/ws/2004/03/addressing}Tohttp://schemas.xmlsoap.org/ws/2004/03/addressing%7DTo
 ;
 {Element}{
 http://schemas.xmlsoap.org/ws/2004/03/addressing}Fromhttp://schemas.xmlsoap.org/ws/2004/03/addressing%7DFrom
 ;
 {Element}{
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamphttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd%7DTimestamp
 ;
 {Element}{
 http://schemas.xmlsoap.org/soap/envelope/}Bodyhttp://schemas.xmlsoap.org/soap/envelope/%7DBody
 /
 /handler
   /requestFlow
 /service

 transport name=http
 pivot=java:org.apache.axis.transport.http.HTTPSender/
 transport name=java
 pivot=java:org.apache.axis.transport.java.JavaSender/
 transport name=local
 pivot=java:org.apache.axis.transport.local.LocalSender/

 /deployment

 The latest WS-Addressing namespace is currently '
 http://schemas.xmlsoap.org/ws/2004/08/addressing' but some web service
 servers such as .Net expect the namespace to be '
 http://schemas.xmlsoap.org/ws/2004/03/addressing'.

 To change the 2004/08 to the 2004/03 namespace requires the following
 code:

 stub._setProperty (
 org.apache.axis.message.addressing.Constants.ENV_ADDRESSING_NAMESPACE_URI,

 org.apache.axis.message.addressing.Constants.NS_URI_ADDRESSING_2004_03 ) ;


 The parameter user can have several roles depending

Help with axis1.4.1 (not axis2) and wss4j

2009-08-28 Thread Wishing Carebear
Hello:
I'm trying to write a client to a WSE 3.0 published webservice. The policy
file looks like below:

Does wss4j and axis supports addressing.

Thanks,
cabear



policies xmlns=http://schemas.microsoft.com/wse/2005/06/policy;
http://schemas.microsoft.com/wse/2005/06/policy
extensions
extension name=usernameForCertificateSecurity
type=Microsoft.Web.Services3.Design.UsernameForCertificateAssertion,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35 /
extension name=x509
type=Microsoft.Web.Services3.Design.X509TokenProvider,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35 /
extension name=requireActionHeader
type=Microsoft.Web.Services3.Design.RequireActionHeaderAssertion,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35 /
/extensions
policy name=ServerPolicy
usernameForCertificateSecurity establishSecurityContext=true
renewExpiredSecurityContext=true
requireSignatureConfirmation=false
messageProtectionOrder=SignBeforeEncrypt requireDerivedKeys=true
ttlInSeconds=300
serviceToken
x509 storeLocation=LocalMachine 
storeName=My
findValue=CN=TMPDMDevelopment
findType=FindBySubjectDistinguishedName /
/serviceToken
protection
request signatureOptions=IncludeAddressing, 
IncludeTimestamp,
IncludeSoapBody encryptBody=true /
response signatureOptions=IncludeAddressing, 
IncludeTimestamp,
IncludeSoapBody encryptBody=true /
fault signatureOptions=IncludeAddressing, 
IncludeTimestamp,
IncludeSoapBody encryptBody=false /
/protection
/usernameForCertificateSecurity
requireActionHeader /
/policy
policy name=AuthenticationServicePolicy
usernameForCertificateSecurity establishSecurityContext=true
renewExpiredSecurityContext=true
requireSignatureConfirmation=false
messageProtectionOrder=SignBeforeEncrypt requireDerivedKeys=true
ttlInSeconds=300
serviceToken
x509 storeLocation=LocalMachine 
storeName=AddressBook
findValue=CN=TMPDMDevelopment
findType=FindBySubjectDistinguishedName /
/serviceToken
protection
request signatureOptions=IncludeAddressing, 
IncludeTimestamp,
IncludeSoapBody encryptBody=true /
response signatureOptions=IncludeAddressing, 
IncludeTimestamp,
IncludeSoapBody encryptBody=true /
fault signatureOptions=IncludeAddressing, 
IncludeTimestamp,
IncludeSoapBody encryptBody=false /
/protection
/usernameForCertificateSecurity
requireActionHeader /
/policy
!--policy name=ClientPolicy
usernameForCertificateSecurity establishSecurityContext=true
renewExpiredSecurityContext=true
requireSignatureConfirmation=false
messageProtectionOrder=SignBeforeEncrypt requireDerivedKeys=true
ttlInSeconds=300
serviceToken
x509 storeLocation=LocalMachine 
storeName=AddressBook
findValue=CN=TMPDMDevelopment
findType=FindBySubjectDistinguishedName /
/serviceToken
protection
request signatureOptions=IncludeAddressing, 
IncludeTimestamp,
IncludeSoapBody encryptBody=true /
response signatureOptions=IncludeAddressing, 
IncludeTimestamp,
IncludeSoapBody encryptBody=true /
fault signatureOptions=IncludeAddressing, 
IncludeTimestamp,
IncludeSoapBody encryptBody=false /
/protection
/usernameForCertificateSecurity
requireActionHeader /
/policy--
/policies





Re: Help with axis1.4.1 (not axis2) and wss4j

2009-08-28 Thread Wishing Carebear
Hello:
Can someone provide some pointers.

Thanks,
cabear

On Fri, Aug 28, 2009 at 10:13 AM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Hello:
 I'm trying to write a client to a WSE 3.0 published webservice. The policy
 file looks like below:

 Does wss4j and axis supports addressing.

 Thanks,
 cabear

 

 policies xmlns=http://schemas.microsoft.com/wse/2005/06/policy; 
 http://schemas.microsoft.com/wse/2005/06/policy
   extensions
   extension name=usernameForCertificateSecurity 
 type=Microsoft.Web.Services3.Design.UsernameForCertificateAssertion, 
 Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, 
 PublicKeyToken=31bf3856ad364e35 /
   extension name=x509 
 type=Microsoft.Web.Services3.Design.X509TokenProvider, 
 Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, 
 PublicKeyToken=31bf3856ad364e35 /
   extension name=requireActionHeader 
 type=Microsoft.Web.Services3.Design.RequireActionHeaderAssertion, 
 Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, 
 PublicKeyToken=31bf3856ad364e35 /
   /extensions
   policy name=ServerPolicy
   usernameForCertificateSecurity establishSecurityContext=true 
 renewExpiredSecurityContext=true requireSignatureConfirmation=false 
 messageProtectionOrder=SignBeforeEncrypt requireDerivedKeys=true 
 ttlInSeconds=300
   serviceToken
   x509 storeLocation=LocalMachine 
 storeName=My findValue=CN=TMPDMDevelopment 
 findType=FindBySubjectDistinguishedName /
   /serviceToken
   protection
   request signatureOptions=IncludeAddressing, 
 IncludeTimestamp, IncludeSoapBody encryptBody=true /
   response signatureOptions=IncludeAddressing, 
 IncludeTimestamp, IncludeSoapBody encryptBody=true /
   fault signatureOptions=IncludeAddressing, 
 IncludeTimestamp, IncludeSoapBody encryptBody=false /
   /protection
   /usernameForCertificateSecurity
   requireActionHeader /
   /policy
   policy name=AuthenticationServicePolicy
   usernameForCertificateSecurity establishSecurityContext=true 
 renewExpiredSecurityContext=true requireSignatureConfirmation=false 
 messageProtectionOrder=SignBeforeEncrypt requireDerivedKeys=true 
 ttlInSeconds=300
   serviceToken
   x509 storeLocation=LocalMachine 
 storeName=AddressBook findValue=CN=TMPDMDevelopment 
 findType=FindBySubjectDistinguishedName /
   /serviceToken
   protection
   request signatureOptions=IncludeAddressing, 
 IncludeTimestamp, IncludeSoapBody encryptBody=true /
   response signatureOptions=IncludeAddressing, 
 IncludeTimestamp, IncludeSoapBody encryptBody=true /
   fault signatureOptions=IncludeAddressing, 
 IncludeTimestamp, IncludeSoapBody encryptBody=false /
   /protection
   /usernameForCertificateSecurity
   requireActionHeader /
   /policy
   !--policy name=ClientPolicy
   usernameForCertificateSecurity establishSecurityContext=true 
 renewExpiredSecurityContext=true requireSignatureConfirmation=false 
 messageProtectionOrder=SignBeforeEncrypt requireDerivedKeys=true 
 ttlInSeconds=300
   serviceToken
   x509 storeLocation=LocalMachine 
 storeName=AddressBook findValue=CN=TMPDMDevelopment 
 findType=FindBySubjectDistinguishedName /
   /serviceToken
   protection
   request signatureOptions=IncludeAddressing, 
 IncludeTimestamp, IncludeSoapBody encryptBody=true /
   response signatureOptions=IncludeAddressing, 
 IncludeTimestamp, IncludeSoapBody encryptBody=true /
   fault signatureOptions=IncludeAddressing, 
 IncludeTimestamp, IncludeSoapBody encryptBody=false /
   /protection
   /usernameForCertificateSecurity
   requireActionHeader /
   /policy--
 /policies


 




wss4j with Axis 1( no Axis2) comunicating with WSE3 configured webservice

2009-05-29 Thread Wishing Carebear
Hello:
I'm using wss4j with Apache Axis 1.4 (no Axis2). Wondering if someone could
provide what should be the equivalent client.wsdd file for the following
policy file. I have tried posting this in wss4j newsgroup but could not get
any response. Hoping some one could give me some pointers. Thanks.

policies xmlns=http://schemas.microsoft.com/wse/2005/06/policy;
  extensions
extension name=usernameForCertificateSecurity
type=Microsoft.Web.Services3.Design.UsernameForCertificateAssertion,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35 /
extension name=x509
type=Microsoft.Web.Services3.Design.X509TokenProvider,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35 /
extension name=requireActionHeader
type=Microsoft.Web.Services3.Design.RequireActionHeaderAssertion,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35 /
  /extensions
  policy name=usernameTokenSecurity
usernameForCertificateSecurity establishSecurityContext=true
renewExpiredSecurityContext=true requireSignatureConfirmation=false
messageProtectionOrder=SignBeforeEncrypt requireDerivedKeys=true
ttlInSeconds=300
  serviceToken
x509 storeLocation=LocalMachine storeName=AddressBook
findValue=CN=TMPDMDevelopment findType=FindBySubjectDistinguishedName /
  /serviceToken
  protection
request signatureOptions=IncludeAddressing, IncludeTimestamp,
IncludeSoapBody encryptBody=true /
response signatureOptions=IncludeAddressing, IncludeTimestamp,
IncludeSoapBody encryptBody=true /
fault signatureOptions=IncludeAddressing, IncludeTimestamp,
IncludeSoapBody encryptBody=false /
  /protection
/usernameForCertificateSecurity
requireActionHeader /
  /policy
/policies


Re: wss4j with Axis 1( no Axis2) comunicating with WSE3 configured webservice

2009-05-29 Thread Wishing Carebear
Thanks Jose. Will look into it.

2009/5/29 José Ferreiro jose.ferre...@gmail.com

 Hello!

 I successfully made a secure dotnet client using the dotnet. 2.0 and Web
 services enhancement 3.0 (WSE 3.0) talking to axis 1.4 and wss4j 1.5.3 [1]
 with *x509 v3 certificates*.

 See this page which helps me as a start [2]! There is the equivalent file
 of client.wsdd in the dotnet framework nammed as web.config. In my project I
 called it [3] wse3PolicyCache.config. The name does not matter...

 Happy Axis and Happy coding!

 José Ferreiro



 [1]-
 http://magnot.blogspot.com/2008/04/secure-web-services-interoperability.html
 [2]- http://erlend.oftedal.no/blog/?blogid=12
 [3]-
 http://bp1.blogger.com/_SFCs1WYrqtY/SBXPETktd3I/AXE/nNI7mNpQS6c/s1600-h/visualStudio.png
 [4]-
 http://bp0.blogger.com/_SFCs1WYrqtY/SBXILDktdzI/AWk/9wqequ_9vNk/s1600-h/pfx-pkcs12-1.PNG


 On Fri, May 29, 2009 at 6:39 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:
 I'm using wss4j with Apache Axis 1.4 (no Axis2). Wondering if someone
 could provide what should be the equivalent client.wsdd file for the
 following policy file. I have tried posting this in wss4j newsgroup but
 could not get any response. Hoping some one could give me some pointers.
 Thanks.

 policies xmlns=http://schemas.microsoft.com/wse/2005/06/policy;
   extensions
 extension name=usernameForCertificateSecurity
 type=Microsoft.Web.Services3.Design.UsernameForCertificateAssertion,
 Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
 PublicKeyToken=31bf3856ad364e35 /
 extension name=x509
 type=Microsoft.Web.Services3.Design.X509TokenProvider,
 Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
 PublicKeyToken=31bf3856ad364e35 /
 extension name=requireActionHeader
 type=Microsoft.Web.Services3.Design.RequireActionHeaderAssertion,
 Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
 PublicKeyToken=31bf3856ad364e35 /
   /extensions
   policy name=usernameTokenSecurity
 usernameForCertificateSecurity establishSecurityContext=true
 renewExpiredSecurityContext=true requireSignatureConfirmation=false
 messageProtectionOrder=SignBeforeEncrypt requireDerivedKeys=true
 ttlInSeconds=300
   serviceToken
 x509 storeLocation=LocalMachine storeName=AddressBook
 findValue=CN=TMPDMDevelopment findType=FindBySubjectDistinguishedName /
   /serviceToken
   protection
 request signatureOptions=IncludeAddressing, IncludeTimestamp,
 IncludeSoapBody encryptBody=true /
 response signatureOptions=IncludeAddressing, IncludeTimestamp,
 IncludeSoapBody encryptBody=true /
 fault signatureOptions=IncludeAddressing, IncludeTimestamp,
 IncludeSoapBody encryptBody=false /
   /protection
 /usernameForCertificateSecurity
 requireActionHeader /
   /policy
 /policies







Re: wss4j with Axis 1( no Axis2) comunicating with WSE3 configured webservice

2009-05-29 Thread Wishing Carebear
Hi Jose:
Have couple of questions for you
1) I have shown the .config file from the WSE3 in my first email. Is it
possible to get the equivalent .wsdd file
2) What i have is a .NET service and axis client.
3) I have the certificate from  webservice. How should I use this in the
client.wsdd. In otherwords, not sure what information I need to provide for
the encryptionuser and crypto.properties. Any tutorial on how to use the
certificate from .NET with wss4j and Axis.

Thanks,
Ravi

2009/5/29 José Ferreiro jose.ferre...@gmail.com

 Hello!

 I successfully made a secure dotnet client using the dotnet. 2.0 and Web
 services enhancement 3.0 (WSE 3.0) talking to axis 1.4 and wss4j 1.5.3 [1]
 with *x509 v3 certificates*.

 See this page which helps me as a start [2]! There is the equivalent file
 of client.wsdd in the dotnet framework nammed as web.config. In my project I
 called it [3] wse3PolicyCache.config. The name does not matter...

 Happy Axis and Happy coding!

 José Ferreiro



 [1]-
 http://magnot.blogspot.com/2008/04/secure-web-services-interoperability.html
 [2]- http://erlend.oftedal.no/blog/?blogid=12
 [3]-
 http://bp1.blogger.com/_SFCs1WYrqtY/SBXPETktd3I/AXE/nNI7mNpQS6c/s1600-h/visualStudio.png
 [4]-
 http://bp0.blogger.com/_SFCs1WYrqtY/SBXILDktdzI/AWk/9wqequ_9vNk/s1600-h/pfx-pkcs12-1.PNG


 On Fri, May 29, 2009 at 6:39 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:
 I'm using wss4j with Apache Axis 1.4 (no Axis2). Wondering if someone
 could provide what should be the equivalent client.wsdd file for the
 following policy file. I have tried posting this in wss4j newsgroup but
 could not get any response. Hoping some one could give me some pointers.
 Thanks.

 policies xmlns=http://schemas.microsoft.com/wse/2005/06/policy;
   extensions
 extension name=usernameForCertificateSecurity
 type=Microsoft.Web.Services3.Design.UsernameForCertificateAssertion,
 Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
 PublicKeyToken=31bf3856ad364e35 /
 extension name=x509
 type=Microsoft.Web.Services3.Design.X509TokenProvider,
 Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
 PublicKeyToken=31bf3856ad364e35 /
 extension name=requireActionHeader
 type=Microsoft.Web.Services3.Design.RequireActionHeaderAssertion,
 Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
 PublicKeyToken=31bf3856ad364e35 /
   /extensions
   policy name=usernameTokenSecurity
 usernameForCertificateSecurity establishSecurityContext=true
 renewExpiredSecurityContext=true requireSignatureConfirmation=false
 messageProtectionOrder=SignBeforeEncrypt requireDerivedKeys=true
 ttlInSeconds=300
   serviceToken
 x509 storeLocation=LocalMachine storeName=AddressBook
 findValue=CN=TMPDMDevelopment findType=FindBySubjectDistinguishedName /
   /serviceToken
   protection
 request signatureOptions=IncludeAddressing, IncludeTimestamp,
 IncludeSoapBody encryptBody=true /
 response signatureOptions=IncludeAddressing, IncludeTimestamp,
 IncludeSoapBody encryptBody=true /
 fault signatureOptions=IncludeAddressing, IncludeTimestamp,
 IncludeSoapBody encryptBody=false /
   /protection
 /usernameForCertificateSecurity
 requireActionHeader /
   /policy
 /policies







Re: Ramapart Config based dynamic client sample code

2009-02-18 Thread Wishing Carebear
Nandana:
Any luck with the sample document.

Thanks,
cabear

On Sun, Feb 15, 2009 at 3:45 PM, Nandana Mihindukulasooriya 
nandana@gmail.com wrote:

 Please get the AxisOperation/AxisMessage and from that you can get the
 PolicySubject. Attach the policy to the PolicySubject. I will check whether
 there is a sample documented somewhere.

 thanks,
 nandana


 On Wed, Feb 11, 2009 at 12:25 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

  Can someone give some pointers please.
 Thanks,
 cbear


 On Mon, Feb 9, 2009 at 3:42 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello: Hoping someone could reply.

 Thanks for your time,
 Regards,
 cbear


 On Mon, Feb 9, 2009 at 11:42 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Could someone give some pointers.
 Thanks,
 cbear


 On Fri, Feb 6, 2009 at 4:27 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello: The OutflowConfiguration that works right now looks like below:
  private static Parameter getOutflowConfiguration() {
  OutflowConfiguration ofc = new OutflowConfiguration();
 ofc.setActionItems(Encrypt);
 ofc.setEncryptionUser(service);
 ofc.setEncryptionPropFile(client.properties);
 return ofc.getProperty();
 }

 Since the OutflowConfiguration is deprecated, would like to use
 RampartConfiguration is possible. Don't have any policy defined for the
 service. Found some examples of RampartConfig() as below:

  private static Policy getRampartConfig(){
  RampartConfig rampartConfig = new RampartConfig();
 rampartConfig.setUser(client);
 rampartConfig.setPwCbClass(samples.quickstart.clients.PWCBHandler);
  CryptoConfig sigCrypto = new CryptoConfig();

 sigCrypto.setProvider(org.apache.ws.security.components.crypto.Merlin);
  Properties props = new Properties();
 props.setProperty(org.apache.ws.security.crypto.merlin.keystore.type,
 JKS);

 props.setProperty(org.apache.ws.security.crypto.merlin.file,client.jks);
 props.setProperty(org.apache.ws.security.crypto.merlin.keystore.password,
 clientPW);
  sigCrypto.setProp(props);
  rampartConfig.setSigCryptoConfig(sigCrypto);
  Policy policy = new Policy();
 policy.addAssertion(rampartConfig);
  return policy;
  }
 But don't know how to bind this to the OperationClient. I also have to
 encrypt the request and decrycpt the response messages.

 Thanks,
 cbear

 On Fri, Feb 6, 2009 at 10:46 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello: Noticed that the OutflowConfiguration and InFlowConfiguration
 classes are deprectaed.

 Trying to see if RampartConfig could be used to get the same behavior.
 Saw the policy based examples but could not find any code that could add 
 the
 Rampart code programmitically.

 1) Please point me to some examples where the RampartConfig is done
 programmitically
 2) I use the OperationClient to invoke webservices. Would like to add
 the RampartConfig() to that. Is it possible
 3) Also would like to know the equivalent of OutFlow and InFlow
 configuration handlers using the RampartConfig.

 Thanks for your help and time,
 Regards
 cabear








 --
 Nandana Mihindukulasooriya
 WSO2 inc.

 http://nandana83.blogspot.com/
 http://www.wso2.org



Re: Ramapart Config based dynamic client sample code

2009-02-16 Thread Wishing Carebear
Thanks Nandana.

Regards,
Ravi

On Sun, Feb 15, 2009 at 3:45 PM, Nandana Mihindukulasooriya 
nandana@gmail.com wrote:

 Please get the AxisOperation/AxisMessage and from that you can get the
 PolicySubject. Attach the policy to the PolicySubject. I will check whether
 there is a sample documented somewhere.

 thanks,
 nandana


 On Wed, Feb 11, 2009 at 12:25 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

  Can someone give some pointers please.
 Thanks,
 cbear


 On Mon, Feb 9, 2009 at 3:42 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello: Hoping someone could reply.

 Thanks for your time,
 Regards,
 cbear


 On Mon, Feb 9, 2009 at 11:42 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Could someone give some pointers.
 Thanks,
 cbear


 On Fri, Feb 6, 2009 at 4:27 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello: The OutflowConfiguration that works right now looks like below:
  private static Parameter getOutflowConfiguration() {
  OutflowConfiguration ofc = new OutflowConfiguration();
 ofc.setActionItems(Encrypt);
 ofc.setEncryptionUser(service);
 ofc.setEncryptionPropFile(client.properties);
 return ofc.getProperty();
 }

 Since the OutflowConfiguration is deprecated, would like to use
 RampartConfiguration is possible. Don't have any policy defined for the
 service. Found some examples of RampartConfig() as below:

  private static Policy getRampartConfig(){
  RampartConfig rampartConfig = new RampartConfig();
 rampartConfig.setUser(client);
 rampartConfig.setPwCbClass(samples.quickstart.clients.PWCBHandler);
  CryptoConfig sigCrypto = new CryptoConfig();

 sigCrypto.setProvider(org.apache.ws.security.components.crypto.Merlin);
  Properties props = new Properties();
 props.setProperty(org.apache.ws.security.crypto.merlin.keystore.type,
 JKS);

 props.setProperty(org.apache.ws.security.crypto.merlin.file,client.jks);
 props.setProperty(org.apache.ws.security.crypto.merlin.keystore.password,
 clientPW);
  sigCrypto.setProp(props);
  rampartConfig.setSigCryptoConfig(sigCrypto);
  Policy policy = new Policy();
 policy.addAssertion(rampartConfig);
  return policy;
  }
 But don't know how to bind this to the OperationClient. I also have to
 encrypt the request and decrycpt the response messages.

 Thanks,
 cbear

 On Fri, Feb 6, 2009 at 10:46 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello: Noticed that the OutflowConfiguration and InFlowConfiguration
 classes are deprectaed.

 Trying to see if RampartConfig could be used to get the same behavior.
 Saw the policy based examples but could not find any code that could add 
 the
 Rampart code programmitically.

 1) Please point me to some examples where the RampartConfig is done
 programmitically
 2) I use the OperationClient to invoke webservices. Would like to add
 the RampartConfig() to that. Is it possible
 3) Also would like to know the equivalent of OutFlow and InFlow
 configuration handlers using the RampartConfig.

 Thanks for your help and time,
 Regards
 cabear








 --
 Nandana Mihindukulasooriya
 WSO2 inc.

 http://nandana83.blogspot.com/
 http://www.wso2.org



Re: Ramapart Config based dynamic client sample code

2009-02-10 Thread Wishing Carebear
 Can someone give some pointers please.
Thanks,
cbear

On Mon, Feb 9, 2009 at 3:42 PM, Wishing Carebear wishing.careb...@gmail.com
 wrote:

 Hello:Hoping someone could reply.

 Thanks for your time,
 Regards,
 cbear


 On Mon, Feb 9, 2009 at 11:42 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Could someone give some pointers.
 Thanks,
 cbear


 On Fri, Feb 6, 2009 at 4:27 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:The OutflowConfiguration that works right now looks like below:
 private static Parameter getOutflowConfiguration() {
  OutflowConfiguration ofc = new OutflowConfiguration();
 ofc.setActionItems(Encrypt);
 ofc.setEncryptionUser(service);
 ofc.setEncryptionPropFile(client.properties);
 return ofc.getProperty();
 }

 Since the OutflowConfiguration is deprecated, would like to use
 RampartConfiguration is possible. Don't have any policy defined for the
 service. Found some examples of RampartConfig() as below:

 private static Policy getRampartConfig(){
  RampartConfig rampartConfig = new RampartConfig();
  rampartConfig.setUser(client);
  rampartConfig.setPwCbClass(samples.quickstart.clients.PWCBHandler);
  CryptoConfig sigCrypto = new CryptoConfig();

 sigCrypto.setProvider(org.apache.ws.security.components.crypto.Merlin);
  Properties props = new Properties();
  props.setProperty(org.apache.ws.security.crypto.merlin.keystore.type,
 JKS);

 props.setProperty(org.apache.ws.security.crypto.merlin.file,client.jks);
  props.setProperty(org.apache.ws.security.crypto.merlin.keystore.password,
 clientPW);
  sigCrypto.setProp(props);
  rampartConfig.setSigCryptoConfig(sigCrypto);
  Policy policy = new Policy();
  policy.addAssertion(rampartConfig);
  return policy;
  }
 But don't know how to bind this to the OperationClient. I also have to
 encrypt the request and decrycpt the response messages.

 Thanks,
 cbear

 On Fri, Feb 6, 2009 at 10:46 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:Noticed that the OutflowConfiguration and InFlowConfiguration
 classes are deprectaed.

 Trying to see if RampartConfig could be used to get the same behavior.
 Saw the policy based examples but could not find any code that could add 
 the
 Rampart code programmitically.

 1) Please point me to some examples where the RampartConfig is done
 programmitically
 2) I use the OperationClient to invoke webservices. Would like to add
 the RampartConfig() to that. Is it possible
 3) Also would like to know the equivalent of OutFlow and InFlow
 configuration handlers using the RampartConfig.

 Thanks for your help and time,
 Regards
 cabear







Re: Ramapart Config based dynamic client sample code

2009-02-09 Thread Wishing Carebear
Could someone give some pointers.
Thanks,
cbear

On Fri, Feb 6, 2009 at 4:27 PM, Wishing Carebear wishing.careb...@gmail.com
 wrote:

 Hello:The OutflowConfiguration that works right now looks like below:
 private static Parameter getOutflowConfiguration() {
  OutflowConfiguration ofc = new OutflowConfiguration();
 ofc.setActionItems(Encrypt);
 ofc.setEncryptionUser(service);
 ofc.setEncryptionPropFile(client.properties);
 return ofc.getProperty();
 }

 Since the OutflowConfiguration is deprecated, would like to use
 RampartConfiguration is possible. Don't have any policy defined for the
 service. Found some examples of RampartConfig() as below:

 private static Policy getRampartConfig(){
  RampartConfig rampartConfig = new RampartConfig();
  rampartConfig.setUser(client);
  rampartConfig.setPwCbClass(samples.quickstart.clients.PWCBHandler);
  CryptoConfig sigCrypto = new CryptoConfig();
  sigCrypto.setProvider(org.apache.ws.security.components.crypto.Merlin);
  Properties props = new Properties();
  props.setProperty(org.apache.ws.security.crypto.merlin.keystore.type,
 JKS);

 props.setProperty(org.apache.ws.security.crypto.merlin.file,client.jks);
  props.setProperty(org.apache.ws.security.crypto.merlin.keystore.password,
 clientPW);
  sigCrypto.setProp(props);
  rampartConfig.setSigCryptoConfig(sigCrypto);
  Policy policy = new Policy();
  policy.addAssertion(rampartConfig);
  return policy;
  }
 But don't know how to bind this to the OperationClient. I also have to
 encrypt the request and decrycpt the response messages.

 Thanks,
 cbear

 On Fri, Feb 6, 2009 at 10:46 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:Noticed that the OutflowConfiguration and InFlowConfiguration
 classes are deprectaed.

 Trying to see if RampartConfig could be used to get the same behavior. Saw
 the policy based examples but could not find any code that could add the
 Rampart code programmitically.

 1) Please point me to some examples where the RampartConfig is done
 programmitically
 2) I use the OperationClient to invoke webservices. Would like to add the
 RampartConfig() to that. Is it possible
 3) Also would like to know the equivalent of OutFlow and InFlow
 configuration handlers using the RampartConfig.

 Thanks for your help and time,
 Regards
 cabear





Re: Ramapart Config based dynamic client sample code

2009-02-09 Thread Wishing Carebear
Hello:Hoping someone could reply.

Thanks for your time,
Regards,
cbear

On Mon, Feb 9, 2009 at 11:42 AM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Could someone give some pointers.
 Thanks,
 cbear


 On Fri, Feb 6, 2009 at 4:27 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:The OutflowConfiguration that works right now looks like below:
 private static Parameter getOutflowConfiguration() {
  OutflowConfiguration ofc = new OutflowConfiguration();
 ofc.setActionItems(Encrypt);
 ofc.setEncryptionUser(service);
 ofc.setEncryptionPropFile(client.properties);
 return ofc.getProperty();
 }

 Since the OutflowConfiguration is deprecated, would like to use
 RampartConfiguration is possible. Don't have any policy defined for the
 service. Found some examples of RampartConfig() as below:

 private static Policy getRampartConfig(){
  RampartConfig rampartConfig = new RampartConfig();
  rampartConfig.setUser(client);
  rampartConfig.setPwCbClass(samples.quickstart.clients.PWCBHandler);
  CryptoConfig sigCrypto = new CryptoConfig();

 sigCrypto.setProvider(org.apache.ws.security.components.crypto.Merlin);
  Properties props = new Properties();
  props.setProperty(org.apache.ws.security.crypto.merlin.keystore.type,
 JKS);

 props.setProperty(org.apache.ws.security.crypto.merlin.file,client.jks);
  props.setProperty(org.apache.ws.security.crypto.merlin.keystore.password,
 clientPW);
  sigCrypto.setProp(props);
  rampartConfig.setSigCryptoConfig(sigCrypto);
  Policy policy = new Policy();
  policy.addAssertion(rampartConfig);
  return policy;
  }
 But don't know how to bind this to the OperationClient. I also have to
 encrypt the request and decrycpt the response messages.

 Thanks,
 cbear

 On Fri, Feb 6, 2009 at 10:46 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:Noticed that the OutflowConfiguration and InFlowConfiguration
 classes are deprectaed.

 Trying to see if RampartConfig could be used to get the same behavior.
 Saw the policy based examples but could not find any code that could add the
 Rampart code programmitically.

 1) Please point me to some examples where the RampartConfig is done
 programmitically
 2) I use the OperationClient to invoke webservices. Would like to add the
 RampartConfig() to that. Is it possible
 3) Also would like to know the equivalent of OutFlow and InFlow
 configuration handlers using the RampartConfig.

 Thanks for your help and time,
 Regards
 cabear






Ramapart Config based dynamic client sample code

2009-02-06 Thread Wishing Carebear
Hello:Noticed that the OutflowConfiguration and InFlowConfiguration classes
are deprectaed.

Trying to see if RampartConfig could be used to get the same behavior. Saw
the policy based examples but could not find any code that could add the
Rampart code programmitically.

1) Please point me to some examples where the RampartConfig is done
programmitically
2) I use the OperationClient to invoke webservices. Would like to add the
RampartConfig() to that. Is it possible
3) Also would like to know the equivalent of OutFlow and InFlow
configuration handlers using the RampartConfig.

Thanks for your help and time,
Regards
cabear


Re: Ramapart Config based dynamic client sample code

2009-02-06 Thread Wishing Carebear
Hello:The OutflowConfiguration that works right now looks like below:
private static Parameter getOutflowConfiguration() {
OutflowConfiguration ofc = new OutflowConfiguration();
ofc.setActionItems(Encrypt);
ofc.setEncryptionUser(service);
ofc.setEncryptionPropFile(client.properties);
return ofc.getProperty();
}

Since the OutflowConfiguration is deprecated, would like to use
RampartConfiguration is possible. Don't have any policy defined for the
service. Found some examples of RampartConfig() as below:

private static Policy getRampartConfig(){
 RampartConfig rampartConfig = new RampartConfig();
rampartConfig.setUser(client);
rampartConfig.setPwCbClass(samples.quickstart.clients.PWCBHandler);
 CryptoConfig sigCrypto = new CryptoConfig();
 sigCrypto.setProvider(org.apache.ws.security.components.crypto.Merlin);
 Properties props = new Properties();
props.setProperty(org.apache.ws.security.crypto.merlin.keystore.type,
JKS);
props.setProperty(org.apache.ws.security.crypto.merlin.file,client.jks);
props.setProperty(org.apache.ws.security.crypto.merlin.keystore.password,
clientPW);
 sigCrypto.setProp(props);
 rampartConfig.setSigCryptoConfig(sigCrypto);
 Policy policy = new Policy();
policy.addAssertion(rampartConfig);
 return policy;
 }
But don't know how to bind this to the OperationClient. I also have to
encrypt the request and decrycpt the response messages.

Thanks,
cbear

On Fri, Feb 6, 2009 at 10:46 AM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Hello:Noticed that the OutflowConfiguration and InFlowConfiguration
 classes are deprectaed.

 Trying to see if RampartConfig could be used to get the same behavior. Saw
 the policy based examples but could not find any code that could add the
 Rampart code programmitically.

 1) Please point me to some examples where the RampartConfig is done
 programmitically
 2) I use the OperationClient to invoke webservices. Would like to add the
 RampartConfig() to that. Is it possible
 3) Also would like to know the equivalent of OutFlow and InFlow
 configuration handlers using the RampartConfig.

 Thanks for your help and time,
 Regards
 cabear



Re: Rampart dynamic configuration with axis2

2009-02-05 Thread Wishing Carebear
Hello:1) I tried to use the Policy based examples. When I try to get the
wsdl, get the following exception o the axis2 server:

[INFO] getData request failed for dialect, http://schemas.xmlsoap.org/wsdl/
org.apache.axis2.dataretrieval.DataRetrievalException:
java.lang.NullPointerExce
ption
at
org.apache.axis2.dataretrieval.WSDLDataLocator.outputInlineForm(WSDLD
ataLocator.java:134)
at
org.apache.axis2.dataretrieval.WSDLDataLocator.getData(WSDLDataLocato
r.java:73)
at
org.apache.axis2.dataretrieval.AxisDataLocatorImpl.getData(AxisDataLo
catorImpl.java:81)
at
org.apache.axis2.description.AxisService.getData(AxisService.java:272
5)
at
org.apache.axis2.description.AxisService.getWSDL(AxisService.java:146
5)
at
org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1
337)
at
org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:14
6)
at
org.apache.axis2.transport.http.server.AxisHttpService.doService(Axis
HttpService.java:281)
at
org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(
AxisHttpService.java:187)
at
org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpS
erviceProcessor.java:82)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.run
Worker(ThreadPoolExecutor.java:1061)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
ker.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at
org.apache.axis2.util.ExternalPolicySerializer.serialize(ExternalPoli
cySerializer.java:175)
at
org.apache.axis2.util.PolicyUtil.getPolicyComponentAsOMElement(Policy
Util.java:110)
at
org.apache.axis2.description.AxisService2WSDL11.addPoliciesToDefiniti
onElement(AxisService2WSDL11.java:621)
at
org.apache.axis2.description.AxisService2WSDL11.generateOM(AxisServic
e2WSDL11.java:238)
at
org.apache.axis2.dataretrieval.WSDLDataLocator.outputInlineForm(WSDLD
ataLocator.java:130)
... 12 more
Caused by: java.lang.NullPointerException
at
org.apache.ws.secpolicy.model.TransportToken.serialize(TransportToken
.java:90)
at
org.apache.ws.secpolicy.model.TransportBinding.serialize(TransportBin
ding.java:157)
at
org.apache.axis2.util.ExternalPolicySerializer.serialize(ExternalPoli
cySerializer.java:159)
... 16 more

2) Wondering how I could do the policy based client using dynamically
(coding)

3) Is it not recommended to use the OutflowConfiguration with axis2 since
the class is deprecated

4) Is WS-Policy needs to be used along with WS-Security.. if only
WS-Security needs to be used, how to do that programmitically without the
deprecated OutflowConfiguration

Thanks,
cabear

On Fri, Jan 30, 2009 at 7:18 PM, Nandana Mihindukulasooriya 
nandana@gmail.com wrote:

 Yes, In Rampart , there are two configurations. One used custom
 configuration language and the other option uses standard WS - Security
 Policy. You are looking in to the custom configuration one which is
 deprecated. Please look at the Rampart policy based samples (samples/policy)
 for policy based configuration. It also can be configured either using files
 or dynamically using code.

 thanks,
 nandana



 On Fri, Jan 30, 2009 at 6:43 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 OutflowConfiguration is deprecated.
 Right now I'm able to do dynamic invocation using OperationClient and
 OutflowConfiguration for WSSecurity. Is there any other equivalent for
 OutflowConfiguration that is recommended.


 On Thu, Jan 29, 2009 at 4:47 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Got the source code from Googling :)



 On Thu, Jan 29, 2009 at 2:08 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:Read the following of sample 11 for dynamic configuration with
 axis2 for WSSeurity. But could not find the file in Rampart distribution.
 Could someone point me to the location where I can get it:


 http://blog.sweetxml.org/2007/12/rampart-basic-examples-how-you-add-ws.html
 11. Dynamic configuration : Get rid of the config files ... let's use
 code!

 Both client and servce are configured to first sign and then encrypt the
 outgoing message and to decrypt and verify the incoming message using their
 key pairs.

 Note that we don't use any parameters in the client.axis2.xml, see 
 org.apache.rampart.samples.sample11.Client's
 getOutflowConfiguration() and getInflowConfiguration() methods and
 their usage.
 Thanks,cabear






 --
 Nandana Mihindukulasooriya
 WSO2 inc.

 http://nandana83.blogspot.com/
 http://www.wso2.org



Re: Rampart dynamic configuration with axis2

2009-02-03 Thread Wishing Carebear
Nandana:Could you give me some pointers.

Thanks,
cbear

On Fri, Jan 30, 2009 at 11:04 PM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Nandana:
 Thanks for your reply.

 1) is WS-Security Policy the preferred approach. If so where can I see some
 exampels on how to do dynamically using code. May be the policy examples has
 one for dynamic configuration.
 2) I guess you meant it is recommended not to use the OutflowConfiguration.

 3) Also could you point me to some good resource on WS Security policy. My
 requirement is to invoke Webservice using dynamic code ( no wsdl2java) with
 WS-Security.

 Regards,
 cabear
 On Fri, Jan 30, 2009 at 7:18 PM, Nandana Mihindukulasooriya 
 nandana@gmail.com wrote:

 Yes, In Rampart , there are two configurations. One used custom
 configuration language and the other option uses standard WS - Security
 Policy. You are looking in to the custom configuration one which is
 deprecated. Please look at the Rampart policy based samples (samples/policy)
 for policy based configuration. It also can be configured either using files
 or dynamically using code.

 thanks,
 nandana



 On Fri, Jan 30, 2009 at 6:43 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 OutflowConfiguration is deprecated.
 Right now I'm able to do dynamic invocation using OperationClient and
 OutflowConfiguration for WSSecurity. Is there any other equivalent for
 OutflowConfiguration that is recommended.


 On Thu, Jan 29, 2009 at 4:47 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Got the source code from Googling :)



 On Thu, Jan 29, 2009 at 2:08 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello: Read the following of sample 11 for dynamic configuration with
 axis2 for WSSeurity. But could not find the file in Rampart distribution.
 Could someone point me to the location where I can get it:


 http://blog.sweetxml.org/2007/12/rampart-basic-examples-how-you-add-ws.html
  11. Dynamic configuration : Get rid of the config files ... let's use
 code!

 Both client and servce are configured to first sign and then encrypt
 the outgoing message and to decrypt and verify the incoming message using
 their key pairs.

 Note that we don't use any parameters in the client.axis2.xml, see 
 org.apache.rampart.samples.sample11.Client's
 getOutflowConfiguration() and getInflowConfiguration() methods and
 their usage.
  Thanks, cabear






 --
 Nandana Mihindukulasooriya
 WSO2 inc.

 http://nandana83.blogspot.com/
 http://www.wso2.org





Re: Rampart dynamic configuration with axis2

2009-01-30 Thread Wishing Carebear
Nandana:
Thanks for your reply.

1) is WS-Security Policy the preferred approach. If so where can I see some
exampels on how to do dynamically using code. May be the policy examples has
one for dynamic configuration.
2) I guess you meant it is recommended not to use the OutflowConfiguration.
3) Also could you point me to some good resource on WS Security policy. My
requirement is to invoke Webservice using dynamic code ( no wsdl2java) with
WS-Security.

Regards,
cabear
On Fri, Jan 30, 2009 at 7:18 PM, Nandana Mihindukulasooriya 
nandana@gmail.com wrote:

 Yes, In Rampart , there are two configurations. One used custom
 configuration language and the other option uses standard WS - Security
 Policy. You are looking in to the custom configuration one which is
 deprecated. Please look at the Rampart policy based samples (samples/policy)
 for policy based configuration. It also can be configured either using files
 or dynamically using code.

 thanks,
 nandana



 On Fri, Jan 30, 2009 at 6:43 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 OutflowConfiguration is deprecated.
 Right now I'm able to do dynamic invocation using OperationClient and
 OutflowConfiguration for WSSecurity. Is there any other equivalent for
 OutflowConfiguration that is recommended.


 On Thu, Jan 29, 2009 at 4:47 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Got the source code from Googling :)



 On Thu, Jan 29, 2009 at 2:08 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello: Read the following of sample 11 for dynamic configuration with
 axis2 for WSSeurity. But could not find the file in Rampart distribution.
 Could someone point me to the location where I can get it:


 http://blog.sweetxml.org/2007/12/rampart-basic-examples-how-you-add-ws.html
  11. Dynamic configuration : Get rid of the config files ... let's use
 code!

 Both client and servce are configured to first sign and then encrypt the
 outgoing message and to decrypt and verify the incoming message using their
 key pairs.

 Note that we don't use any parameters in the client.axis2.xml, see 
 org.apache.rampart.samples.sample11.Client's
 getOutflowConfiguration() and getInflowConfiguration() methods and
 their usage.
 Thanks, cabear






 --
 Nandana Mihindukulasooriya
 WSO2 inc.

 http://nandana83.blogspot.com/
 http://www.wso2.org



Re: WS_Security with Axis2 using ServiceClient and OperationClient

2009-01-29 Thread Wishing Carebear
Hello:I have the sample code:
--
// creating the SOAPEnvelope from a XML file
FileReader soapFileReader = new
FileReader(C:\\RaviWS\\axis2ws\\XML\\WSS_SAMPLE_03.xml);
XMLStreamReader parser =

 XMLInputFactory.newInstance().createXMLStreamReader(soapFileReader);
StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(parser,
null);
SOAPEnvelope envelope = (SOAPEnvelope)
builder.getDocumentElement();



 System.out.println( input SOAPMessage is \n  + envelope );

//Blocking invocation
ServiceClient client = new ServiceClient();
OperationClient opClient =
client.createClient(ServiceClient.ANON_OUT_IN_OP);

// creating outMsgContext
MessageContext outMsgCxt = new MessageContext();

// creating Options and setting it to the MessageContext
Options options = outMsgCxt.getOptions();
options.setTo(targetEPR);
options.setAction(urn:echo);

// creating the username token
options.setProperty(WSHandlerConstants.USER, bob);
options.setProperty(WSHandlerConstants.PASSWORD_TYPE,
WSConstants.PASSWORD_TEXT);

 
options.setProperty(WSHandlerConstants.USERNAME_TOKEN,UserNameToken.getWSUNameToken());
options.setProperty(WSHandlerConstants.MUST_UNDERSTAND,true);


//adding the envelope to the outMsgCxt
outMsgCxt.setEnvelope(envelope);

// adding the MsgContext to the opClient
opClient.addMessageContext(outMsgCxt);

-
When I call execute on opClient and monitor the message, could see that the
security headers are not added.

Could you please give me pointers on how I should proceed further. I have to
do everything dynamic.

May be I need to engage the rampart modules etc.

Any help is greatly appreciated.

Thanks,
cabear

On Wed, Jan 28, 2009 at 2:21 PM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Thanks Sameera.I have downloaded the rampart and understanding the
 samples. Interestingly in the basic one, there is a mention of
 DynamicConfiguration as item 11 but do not see any relevant examples.

 Anyway will try out to have a better understand and get back to you if I
 have more questions.

 Best regards,
 cabear


 On Wed, Jan 28, 2009 at 11:31 AM, Sameera Jayasoma 
 sameera.madus...@gmail.com wrote:



 On Tue, Jan 27, 2009 at 1:55 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Sameera:
 Looked into 240 link. It had the following information for client
 configurations:
 This configuration parameter should be included in the client's axis2.xml
 file and in sample-02 the file is
 rampart-ut-samples/sample02/client.axis2.xml.

 My requirement is to do the WS-Security programmatically. Is it possible
 using rampart and axis2.


 Yes, this should be possible. If you are using  WS-SecurityPolicy to
 indicate the security actions, anyway you need to specify that policy.xml
 file. Please have a look at the Apache Rampart site for more details..

 Following shows, how you should secure SOAP message using Rampart with
 WS-SecurityPolicy. Rampart policy sample02

 public static void main(String[] args) throws Exception {

 if(args.length != 3) {
 System.out.println(Usage: $java Client endpoint_address
 client_repo_path policy_xml_path);
 }

 ConfigurationContext ctx =
 ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1],
 null);

 ServiceClient client = new ServiceClient(ctx, null);
 Options options = new Options();
 options.setAction(urn:echo);
 options.setTo(new EndpointReference(args[0]));
 options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,
 loadPolicy(args[2]));
 client.setOptions(options);

 client.engageModule(addressing);
 client.engageModule(rampart);

 OMElement response = client.sendReceive(getPayload(Hello
 world));

 System.out.println(response);

 }






 Thanks for your time and help,
 cbear

 On Sun, Jan 25, 2009 at 6:32 AM, Sameera Jayasoma 
 sameera.madus...@gmail.com wrote:

 Hi,

 You can achieve WS-Security with Apache Axis2 by using Rampart. Rampart
 is an Axis2 module. For more information please refer following articles.

 http://wso2.org/library/3190
 http://wso2.org/library/240



 On Sat, Jan 24, 2009 at 8:15 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:
 I'm using the Cleint API's (ServiceClient and OperationClient) to
 consume webservices. I have been successful so far writing dynamic 
 clients (
 without using wsdl2java).

 Now want to integrate WSSecurity feature with the dynamic clients.

 Would like to know if there are any examples how to do WS_Security with
 Axis2.

 Thanks for your time and help
 cabear

Rampart dynamic configuration with axis2

2009-01-29 Thread Wishing Carebear
Hello:Read the following of sample 11 for dynamic configuration with axis2
for WSSeurity. But could not find the file in Rampart distribution. Could
someone point me to the location where I can get it:

http://blog.sweetxml.org/2007/12/rampart-basic-examples-how-you-add-ws.html
11. Dynamic configuration : Get rid of the config files ... let's use code!

Both client and servce are configured to first sign and then encrypt the
outgoing message and to decrypt and verify the incoming message using their
key pairs.

Note that we don't use any parameters in the client.axis2.xml, see
org.apache.rampart.samples.sample11.Client's
getOutflowConfiguration() and getInflowConfiguration() methods and their
usage.
Thanks,cabear


Re: Rampart dynamic configuration with axis2

2009-01-29 Thread Wishing Carebear
Got the source code from Googling :)


On Thu, Jan 29, 2009 at 2:08 PM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Hello:Read the following of sample 11 for dynamic configuration with axis2
 for WSSeurity. But could not find the file in Rampart distribution. Could
 someone point me to the location where I can get it:

 http://blog.sweetxml.org/2007/12/rampart-basic-examples-how-you-add-ws.html
 11. Dynamic configuration : Get rid of the config files ... let's use code!

 Both client and servce are configured to first sign and then encrypt the
 outgoing message and to decrypt and verify the incoming message using their
 key pairs.

 Note that we don't use any parameters in the client.axis2.xml, see 
 org.apache.rampart.samples.sample11.Client's
 getOutflowConfiguration() and getInflowConfiguration() methods and their
 usage.
 Thanks,cabear



Re: Rampart dynamic configuration with axis2

2009-01-29 Thread Wishing Carebear
OutflowConfiguration is deprecated.
Right now I'm able to do dynamic invocation using OperationClient and
OutflowConfiguration for WSSecurity. Is there any other equivalent for
OutflowConfiguration that is recommended.

On Thu, Jan 29, 2009 at 4:47 PM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Got the source code from Googling :)



 On Thu, Jan 29, 2009 at 2:08 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:Read the following of sample 11 for dynamic configuration with
 axis2 for WSSeurity. But could not find the file in Rampart distribution.
 Could someone point me to the location where I can get it:


 http://blog.sweetxml.org/2007/12/rampart-basic-examples-how-you-add-ws.html
 11. Dynamic configuration : Get rid of the config files ... let's use
 code!

 Both client and servce are configured to first sign and then encrypt the
 outgoing message and to decrypt and verify the incoming message using their
 key pairs.

 Note that we don't use any parameters in the client.axis2.xml, see 
 org.apache.rampart.samples.sample11.Client's
 getOutflowConfiguration() and getInflowConfiguration() methods and their
 usage.
 Thanks,cabear





Re: WS_Security with Axis2 using ServiceClient and OperationClient

2009-01-28 Thread Wishing Carebear
Thanks Sameera.I have downloaded the rampart and understanding the samples.
Interestingly in the basic one, there is a mention of DynamicConfiguration
as item 11 but do not see any relevant examples.

Anyway will try out to have a better understand and get back to you if I
have more questions.

Best regards,
cabear

On Wed, Jan 28, 2009 at 11:31 AM, Sameera Jayasoma 
sameera.madus...@gmail.com wrote:



 On Tue, Jan 27, 2009 at 1:55 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Sameera:
 Looked into 240 link. It had the following information for client
 configurations:
 This configuration parameter should be included in the client's axis2.xml
 file and in sample-02 the file is
 rampart-ut-samples/sample02/client.axis2.xml.

 My requirement is to do the WS-Security programmatically. Is it possible
 using rampart and axis2.


 Yes, this should be possible. If you are using  WS-SecurityPolicy to
 indicate the security actions, anyway you need to specify that policy.xml
 file. Please have a look at the Apache Rampart site for more details..

 Following shows, how you should secure SOAP message using Rampart with
 WS-SecurityPolicy. Rampart policy sample02

 public static void main(String[] args) throws Exception {

 if(args.length != 3) {
 System.out.println(Usage: $java Client endpoint_address
 client_repo_path policy_xml_path);
 }

 ConfigurationContext ctx =
 ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1],
 null);

 ServiceClient client = new ServiceClient(ctx, null);
 Options options = new Options();
 options.setAction(urn:echo);
 options.setTo(new EndpointReference(args[0]));
 options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,
 loadPolicy(args[2]));
 client.setOptions(options);

 client.engageModule(addressing);
 client.engageModule(rampart);

 OMElement response = client.sendReceive(getPayload(Hello world));

 System.out.println(response);

 }






 Thanks for your time and help,
 cbear

 On Sun, Jan 25, 2009 at 6:32 AM, Sameera Jayasoma 
 sameera.madus...@gmail.com wrote:

 Hi,

 You can achieve WS-Security with Apache Axis2 by using Rampart. Rampart
 is an Axis2 module. For more information please refer following articles.

 http://wso2.org/library/3190
 http://wso2.org/library/240



 On Sat, Jan 24, 2009 at 8:15 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:
 I'm using the Cleint API's (ServiceClient and OperationClient) to
 consume webservices. I have been successful so far writing dynamic clients 
 (
 without using wsdl2java).

 Now want to integrate WSSecurity feature with the dynamic clients.

 Would like to know if there are any examples how to do WS_Security with
 Axis2.

 Thanks for your time and help
 cabear




 --
 Sameera Jayasoma
 Software Engineer
 WSO2 Inc.
 Oxygenating the Web Service Platform.
 http://wso2.org/

 blog: http://tech.jayasoma.org





 --
 Sameera Jayasoma
 Software Engineer
 WSO2 Inc.
 Oxygenating the Web Service Platform.
 http://wso2.org/

 blog: http://tech.jayasoma.org



Re: WS_Security with Axis2 using ServiceClient and OperationClient

2009-01-27 Thread Wishing Carebear
Sameera:
Any pointers to my questions.

Thanks,
cbear

On Mon, Jan 26, 2009 at 12:25 PM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Sameera:
 Looked into 240 link. It had the following information for client
 configurations:
 This configuration parameter should be included in the client's axis2.xml
 file and in sample-02 the file is
 rampart-ut-samples/sample02/client.axis2.xml.

 My requirement is to do the WS-Security programmatically. Is it possible
 using rampart and axis2.

 Thanks for your time and help,
 cbear

  On Sun, Jan 25, 2009 at 6:32 AM, Sameera Jayasoma 
 sameera.madus...@gmail.com wrote:

 Hi,

 You can achieve WS-Security with Apache Axis2 by using Rampart. Rampart is
 an Axis2 module. For more information please refer following articles.

 http://wso2.org/library/3190
 http://wso2.org/library/240



 On Sat, Jan 24, 2009 at 8:15 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:
 I'm using the Cleint API's (ServiceClient and OperationClient) to consume
 webservices. I have been successful so far writing dynamic clients ( without
 using wsdl2java).

 Now want to integrate WSSecurity feature with the dynamic clients.

 Would like to know if there are any examples how to do WS_Security with
 Axis2.

 Thanks for your time and help,

 cabear




 --
 Sameera Jayasoma
 Software Engineer
 WSO2 Inc.
 Oxygenating the Web Service Platform.
 http://wso2.org/

 blog: http://tech.jayasoma.org





Re: setting username/password in soap header programmatically

2009-01-26 Thread Wishing Carebear
Hello Brain:
I'm also planning to do the WS-Security without using the axis2.xml  or
services.xml. Need to do it programmitically.

Could you send some snippets how you have done it for encryption and other
security types.

Thanks,
cabear

On Mon, Jan 26, 2009 at 10:30 AM, brianfm bfmur...@gmail.com wrote:


 Hi,

 thanks for your reply.
 I think I should be more specific about my question.
 I have added the usernametoken to the policy in the services.xml:

  sp:SupportingTokens
 xmlns:sp=http://schemas.xmlsoap.org/ws/2005/07/securitypolicy;
   wsp:Policy
   sp:UsernameToken/
   /wsp:Policy
   /sp:SupportingTokens

 This works fine.
 My problem is how to insert the usernametoken into the soap header
 programmatically in the client. Here is my current attempt:

 SecureServiceStub stub = new
 SecureServiceStub(ctx,http://localhost:8079/axis2/services/SecureService
 );
 ServiceClient sc = stub._getServiceClient();
 sc.engageModule(rampart);
 sc.getOptions().setUserName(brian);
 sc.getOptions().setPassword(brianPasswords);
 --- rest of boiler plate code to set up encryption which works fine

 When i run this client i get the following exception:
 xception in thread main org.apache.axis2.AxisFault: UsernameToken missing
 in request
at

 org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)

 So which api calls do i need to make to insert the token into the header?

 thanks again,

 Brian

 brianfm wrote:
 
  Hi,
 
  My application requires that I programmatically set a username and
  password into the ws-security standard locations in the soap header. Note
  that I do not want to configure Rampart athentication because
  authentication logic will be fully proprietery in the server.
  I intend to just retrieve the usename/password from soap header
  programmtically from server and then authenticate.
 
  thanks,
 
  Brian
 

 --
 View this message in context:
 http://www.nabble.com/setting-username-password-in-soap-header-programmatically-tp21641020p21670839.html
 Sent from the Axis - User mailing list archive at Nabble.com.




Re: WS_Security with Axis2 using ServiceClient and OperationClient

2009-01-26 Thread Wishing Carebear
Sameera:
Looked into 240 link. It had the following information for client
configurations:
This configuration parameter should be included in the client's axis2.xml
file and in sample-02 the file is
rampart-ut-samples/sample02/client.axis2.xml.

My requirement is to do the WS-Security programmatically. Is it possible
using rampart and axis2.

Thanks for your time and help,
cbear

On Sun, Jan 25, 2009 at 6:32 AM, Sameera Jayasoma 
sameera.madus...@gmail.com wrote:

 Hi,

 You can achieve WS-Security with Apache Axis2 by using Rampart. Rampart is
 an Axis2 module. For more information please refer following articles.

 http://wso2.org/library/3190
 http://wso2.org/library/240



 On Sat, Jan 24, 2009 at 8:15 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:
 I'm using the Cleint API's (ServiceClient and OperationClient) to consume
 webservices. I have been successful so far writing dynamic clients ( without
 using wsdl2java).

 Now want to integrate WSSecurity feature with the dynamic clients.

 Would like to know if there are any examples how to do WS_Security with
 Axis2.

 Thanks for your time and help,

 cabear




 --
 Sameera Jayasoma
 Software Engineer
 WSO2 Inc.
 Oxygenating the Web Service Platform.
 http://wso2.org/

 blog: http://tech.jayasoma.org



Re: WS_Security with Axis2 using ServiceClient and OperationClient

2009-01-25 Thread Wishing Carebear
Thanks Sameera. I will read your suggested links.

Wondering if the following is possible with Axis and WSSecurity
1) All my client API's need to be done programmitically
2) I would like to set the properties needs for WSSecurity calling API's and
supplyig the property file and necessary cerificates
3) Is the rampart module should always be available in the module folder.
Also is axis2.xml necessary to write a dynamic client.

Thanks for your time,
cbear


On Sun, Jan 25, 2009 at 6:32 AM, Sameera Jayasoma 
sameera.madus...@gmail.com wrote:

 Hi,

 You can achieve WS-Security with Apache Axis2 by using Rampart. Rampart is
 an Axis2 module. For more information please refer following articles.

 http://wso2.org/library/3190
 http://wso2.org/library/240



 On Sat, Jan 24, 2009 at 8:15 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:
 I'm using the Cleint API's (ServiceClient and OperationClient) to consume
 webservices. I have been successful so far writing dynamic clients ( without
 using wsdl2java).

 Now want to integrate WSSecurity feature with the dynamic clients.

 Would like to know if there are any examples how to do WS_Security with
 Axis2.

 Thanks for your time and help,

 cabear




 --
 Sameera Jayasoma
 Software Engineer
 WSO2 Inc.
 Oxygenating the Web Service Platform.
 http://wso2.org/

 blog: http://tech.jayasoma.org



WS_Security with Axis2 using ServiceClient and OperationClient

2009-01-23 Thread Wishing Carebear
Hello:
I'm using the Cleint API's (ServiceClient and OperationClient) to consume
webservices. I have been successful so far writing dynamic clients ( without
using wsdl2java).

Now want to integrate WSSecurity feature with the dynamic clients.

Would like to know if there are any examples how to do WS_Security with
Axis2.

Thanks for your time and help,

cabear


Re: How to Return XML data from a webservice and how is it consumed?

2009-01-22 Thread Wishing Carebear
Hello:I also have a similar requirement. Don't want to use the java classes
but send raw SAOp XML and retrieve the RAW SOAP XML. How can I achieve this
using AXIS2.

Regards,
cabear

On Thu, Jan 22, 2009 at 9:59 AM, Asensio, Rodrigo 
rodrigo.asen...@gilbarco.com wrote:

 The best way to return raw xml data is using AXIOM I think

 Here is a snippet.

 public OMElement doSomething() {
OMFactory factory = OMAbstractFactory.getOMFactory();
OMElement element = Factory.createElement(myNamespace,
 topelement);
element.addAttribute(somekey, somevalue);
return element;
 }

 Now, I think the services.xml should have as msg receivers these pair.


 #message.receiver.inout=org.apache.axis2.receivers.RawXMLINOutMessageReceiver

 #message.receiver.inonly=org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver




 From: Kamal Chandana Mettananda [mailto:lka...@gmail.com]
 Sent: Thursday, January 22, 2009 3:52 PM
 To: axis-user@ws.apache.org
 Subject: Re: How to Return XML data from a webservice and how is it
 consumed?

 Hi,

 Web service will return a SOAP xml file. By generating the client side
 classes and using Axis you can map the resulting SOAP xml data into the
 required class objects.


 Kamal Mettananda
 http://lkamal.blogspot.com

 On Thu, Jan 22, 2009 at 6:16 PM, Shravan Mahankali 
 shravan.mahank...@catalytic.com wrote:
 Hi,

 Can anyone advise me, how return XML data from a webservice?

 Also, how a client consuming this service should interpret the output, I
 mean what type of data can they expect?

 Thanks in advance.

 Thank You,
 Shravan Kumar. M
 -



 Please be advised that this email may contain confidential information.
  If you are not the intended recipient, please do not read, copy or
 re-transmit this email.  If you have received this email in error,
 please notify us by email by replying to the sender and by telephone
 (call us collect at +1 202-828-0850) and delete this message and any
 attachments.  Thank you in advance for your cooperation and assistance.

 In addition, Danaher and its subsidiaries disclaim that the content of
 this email constitutes an offer to enter into, or the acceptance of,
 any
 contract or agreement or any amendment thereto; provided that the
 foregoing disclaimer does not invalidate the binding effect of any
 digital or other electronic reproduction of a manual signature that is
 included in any attachment to this email.



Re: how to generate the XML in-out stubs

2009-01-20 Thread Wishing Carebear
Thanks Amila/Sameera for your reply.
Yes, I have a sample request in XML String. Want to pass that to the stub
methods directly. Also from the response want to get the XML response back
as String with no java objects involved.

Tried -d none option and the stub has the operation as below :
public  org.apache.axiom.om.OMElement
SearchLink(org.apache.axiom.om.OMElement searchLink)
throws
java.rmi.RemoteException

Wondering what is the parameter org.apache.axiom.om.OMElement searchLink refers
to here. Is it the whole request XML only for the payload or the whole SOAP
envelop.

Thanks for your time and help,
Regards
cbear

On Mon, Jan 19, 2009 at 8:37 PM, Amila Suriarachchi 
amilasuriarach...@gmail.com wrote:

 use  -d none   option

 thanks,
 Amila.


 On Tue, Jan 20, 2009 at 12:15 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:In the userguide :
 http://ws.apache.org/axis2/1_4_1/userguide-creatingclients.html#createclients

 read the following line:
 Axis2 gives you several options when it comes to mapping WSDL to objects
 when generating clients. Three of these options are Axis2 DataBinding
 Framework, XMLBeans, and JiBX databinding. All of these methods involve
 using databinding to create Java objects out of the XML structures used by
 the service, and each has its pros and cons. You can also generate XML
 in-out stubs that are not based on databinding.


 Question: Would like to know how to generate the XML in-out stubs.

 Thanks,
 cbear




 --
 Amila Suriarachchi
 WSO2 Inc.
 blog: http://amilachinthaka.blogspot.com/



Re: how to generate the XML in-out stubs

2009-01-20 Thread Wishing Carebear
Thanks Sameera.

On Tue, Jan 20, 2009 at 9:25 AM, Sameera Jayasoma 
sameera.madus...@gmail.com wrote:



 On Tue, Jan 20, 2009 at 10:38 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Thanks Amila/Sameera for your reply.
 Yes, I have a sample request in XML String. Want to pass that to the stub
 methods directly. Also from the response want to get the XML response back
 as String with no java objects involved.

 Tried -d none option and the stub has the operation as below :
 public  org.apache.axiom.om.OMElement
 SearchLink(org.apache.axiom.om.OMElement searchLink)
 throws
 java.rmi.RemoteException

 Wondering what is the parameter org.apache.axiom.om.OMElement searchLink 
 refers
 to here. Is it the whole request XML only for the payload or the whole SOAP
 envelop.


 AFAIK, this parameter refers to the XML payload.



 Thanks for your time and help,
 Regards
 cbear

 On Mon, Jan 19, 2009 at 8:37 PM, Amila Suriarachchi 
 amilasuriarach...@gmail.com wrote:

 use  -d none   option

 thanks,
 Amila.


 On Tue, Jan 20, 2009 at 12:15 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:In the userguide :
 http://ws.apache.org/axis2/1_4_1/userguide-creatingclients.html#createclients

 read the following line:
 Axis2 gives you several options when it comes to mapping WSDL to objects
 when generating clients. Three of these options are Axis2 DataBinding
 Framework, XMLBeans, and JiBX databinding. All of these methods involve
 using databinding to create Java objects out of the XML structures used by
 the service, and each has its pros and cons. You can also generate XML
 in-out stubs that are not based on databinding.


 Question: Would like to know how to generate the XML in-out stubs.

 Thanks,
 cbear




 --
 Amila Suriarachchi
 WSO2 Inc.
 blog: http://amilachinthaka.blogspot.com/





 --
 Sameera Jayasoma
 Software Engineer
 WSO2 Inc.
 Oxygenating the Web Service Platform.
 http://wso2.org/

 blog: http://tech.jayasoma.org



Re: how to generate the XML in-out stubs

2009-01-20 Thread Wishing Carebear
In SoapUI, the request XML can be generated as below:soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:guit=
http://www.atomic-x.com/xmlservices/GuitarManufWS;
   soapenv:Header/
   soapenv:Body
  guit:SearchLink
 !--Optional:--
 guit:link?/guit:link
  /guit:SearchLink
   /soapenv:Body
/soapenv:Envelope

Wondering if it is possible to generate similar to this using axis2 without
any coding. Tried with the -d none but the OMElement looks like needs to be
created by the client which means understanding the XSD types and
everything. With SoapUI, the request is already in the XML String and just
need to fill in the values.

Any pointers will be very useful.

Thanks,
cbear

On Tue, Jan 20, 2009 at 9:42 AM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Thanks Sameera.


 On Tue, Jan 20, 2009 at 9:25 AM, Sameera Jayasoma 
 sameera.madus...@gmail.com wrote:



 On Tue, Jan 20, 2009 at 10:38 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Thanks Amila/Sameera for your reply.
 Yes, I have a sample request in XML String. Want to pass that to the stub
 methods directly. Also from the response want to get the XML response back
 as String with no java objects involved.

 Tried -d none option and the stub has the operation as below :
 public  org.apache.axiom.om.OMElement
 SearchLink(org.apache.axiom.om.OMElement searchLink)
 throws
 java.rmi.RemoteException

 Wondering what is the parameter org.apache.axiom.om.OMElement searchLink
 refers to here. Is it the whole request XML only for the payload or the
 whole SOAP envelop.


 AFAIK, this parameter refers to the XML payload.



 Thanks for your time and help,
 Regards
 cbear

 On Mon, Jan 19, 2009 at 8:37 PM, Amila Suriarachchi 
 amilasuriarach...@gmail.com wrote:

 use  -d none   option

 thanks,
 Amila.


 On Tue, Jan 20, 2009 at 12:15 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:In the userguide :
 http://ws.apache.org/axis2/1_4_1/userguide-creatingclients.html#createclients

 read the following line:
 Axis2 gives you several options when it comes to mapping WSDL to
 objects when generating clients. Three of these options are Axis2
 DataBinding Framework, XMLBeans, and JiBX databinding. All of these 
 methods
 involve using databinding to create Java objects out of the XML structures
 used by the service, and each has its pros and cons. You can also
 generate XML in-out stubs that are not based on databinding.


 Question: Would like to know how to generate the XML in-out stubs.

 Thanks,
 cbear




 --
 Amila Suriarachchi
 WSO2 Inc.
 blog: http://amilachinthaka.blogspot.com/





 --
 Sameera Jayasoma
 Software Engineer
 WSO2 Inc.
 Oxygenating the Web Service Platform.
 http://wso2.org/

 blog: http://tech.jayasoma.org





Re: Webservice security, session handling in Axis2

2009-01-19 Thread Wishing Carebear
Any input/pointers is appreciated.
Thanks,
Ravi

On Fri, Jan 16, 2009 at 11:22 AM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Hello:I want to use Axis2 to build a client library to do the following
 1) Have access to the wsdl.
 2) Sometimes the wsdl may be behind a security like Http authentication
 3) Should be able to generate the stub for the chosen operation and service
 4) Able to pass java objects or the complete Payload as input to the stub
 5) May need to use WSSecurity for the client invocation

 have tried WSDl2Java to generate the stub. But to include the WSSecurity
 and session related information, not sure how to proceed. Since I want to
 provide a client library, would like the user interaction to be as minimal
 as possible.

 Also one of the requirement is sometimes to pass the XML payload instead of
 dealing with java Objects.

 Let me know if I can achieve this with Axis2.

 Thanks for your help and time.

 Regards,
 Ravi



Re: Webservice security, session handling in Axis2

2009-01-19 Thread Wishing Carebear
Thanks NandanaWill look into it.

On Mon, Jan 19, 2009 at 9:32 AM, Nandana Mihindukulasooriya 
nandana@gmail.com wrote:

 Hope these two tutorials will help regarding the WS Security aspect.

 http://wso2.org/library/3190
 https://wso2.org/library/3415


 thanks,
 nandana


 On Mon, Jan 19, 2009 at 10:36 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Any input/pointers is appreciated.
 Thanks,
 Ravi


 On Fri, Jan 16, 2009 at 11:22 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:I want to use Axis2 to build a client library to do the following
 1) Have access to the wsdl.
 2) Sometimes the wsdl may be behind a security like Http authentication
 3) Should be able to generate the stub for the chosen operation and
 service
 4) Able to pass java objects or the complete Payload as input to the stub
 5) May need to use WSSecurity for the client invocation

 have tried WSDl2Java to generate the stub. But to include the WSSecurity
 and session related information, not sure how to proceed. Since I want to
 provide a client library, would like the user interaction to be as minimal
 as possible.

 Also one of the requirement is sometimes to pass the XML payload instead
 of dealing with java Objects.

 Let me know if I can achieve this with Axis2.

 Thanks for your help and time.

 Regards,
 Ravi





Getting the XML request and response as String

2009-01-19 Thread Wishing Carebear
Hello:Is it possible to get a template of the XML request and the XML
response as string through Axis2. As far as my understanding using Axis2
WSDL2JAVA I could generate the stubs and java classes ( default as ADB
beans).

My requirement is to construct the XML message outside and feed the XML as
String to the stub and get the response back as XML string. Is it possible
using Axis2 to get a sample XML template for the request and response for a
given service and operation.

I'm a newbie to Axis2 and trying to understand how best I can use it for my
project.

Thanks for your time and help
Regards,
cbear


how to generate the XML in-out stubs

2009-01-19 Thread Wishing Carebear
Hello:In the userguide :
http://ws.apache.org/axis2/1_4_1/userguide-creatingclients.html#createclients

read the following line:
Axis2 gives you several options when it comes to mapping WSDL to objects
when generating clients. Three of these options are Axis2 DataBinding
Framework, XMLBeans, and JiBX databinding. All of these methods involve
using databinding to create Java objects out of the XML structures used by
the service, and each has its pros and cons. You can also generate XML
in-out stubs that are not based on databinding.


Question: Would like to know how to generate the XML in-out stubs.

Thanks,
cbear


Re: RPCServiceClient

2009-01-10 Thread Wishing Carebear
Hello:
Could someone give me some pointers.

Thanks,
Ravi

On Fri, Jan 9, 2009 at 9:41 AM, Wishing Carebear wishing.careb...@gmail.com
 wrote:

 Hello: In addition to Service and Operation client, found from one of the
 examples that there is RPCServiceClient. Have couple of questions regarding
 the same:
 1) Is there any examples using RPCServiceClient where the service takes a
 java bean say Class A. Class A has other java beans like Class B and Class
 C.

 2) With Axis1, I used to do the registration for the complex types with the
 Call API. Is it still the same approach with Axis2.

 3) I also need to send the request and get the response XML directly. Is it
 possible with Axis2. With Axis1 it was not possible.

 Thanks for your time and help,

 Regards,
 Ravi



Re: Packaging axis2 with a web application

2009-01-10 Thread Wishing Carebear
Thanks Keith.

On Fri, Jan 9, 2009 at 10:42 PM, keith chapman keithgchap...@gmail.comwrote:

 Hi,

 This
 http://www.keith-chapman.org/2008/10/how-to-embed-axis2-into-existing-web.htmlshould
  help you.

 Thanks,
 Keith.


 On Fri, Jan 9, 2009 at 10:46 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Thanks Sagara. I will try it out. Regards,
 Ravi


 On Fri, Jan 9, 2009 at 9:10 AM, Sagara Gunathunga 
 sagara.gunathu...@gmail.com wrote:

 If you want to integrate Axis2 web service as a part of  your web
 application you can follow these steps.

 1.) Within the WEB-INF directory create directory called services , you
 can place web service's meta information files there (services.xml) . as a
 example for MyService web serivce can have  following directory structure
 WEB-INF/services/MyService/META-INF/services.xml

 2.) Add requred Axis 2 jar files to lib directory of your web
 application.

 3.) Define the servlet mapping for AxisServlet  in web .xml file as
 follows .

 servlet
 servlet-nameAxisServlet/servlet-name

 servlet-classorg.apache.axis2.transport.http.AxisServlet/servlet-class
 load-on-startup1/load-on-startup
   /servlet
   servlet-mapping
 servlet-nameAxisServlet/servlet-name
 url-pattern/services/*/url-pattern
   /servlet-mapping


 Also you can use Maven to package and testing (together with Jetty
 plug-in) . Hope this will help you.



 On Fri, Jan 9, 2009 at 9:58 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello: I have a war created for my enterprise application. Need to
 embed axis2 with that.

 Could someone point me to the instructions need to be followed to
 achieve this if possible.

 Thanks for your time and help,
 Regards,
 Ravi




 --
 Sagara Gunathunga

 Blog - ssagara.blogspot.com
 Web - http://sagaras.awardspace.com/





 --
 Keith Chapman
 Senior Software Engineer
 WSO2 Inc.
 Oxygenating the Web Service Platform.
 http://wso2.org/

 blog: http://www.keith-chapman.org



Packaging axis2 with a web application

2009-01-09 Thread Wishing Carebear
Hello:I have a war created for my enterprise application. Need to embed
axis2 with that.

Could someone point me to the instructions need to be followed to achieve
this if possible.

Thanks for your time and help,
Regards,
Ravi


Re: Packaging axis2 with a web application

2009-01-09 Thread Wishing Carebear
Thanks Sagara. I will try it out.Regards,
Ravi

On Fri, Jan 9, 2009 at 9:10 AM, Sagara Gunathunga 
sagara.gunathu...@gmail.com wrote:

 If you want to integrate Axis2 web service as a part of  your web
 application you can follow these steps.

 1.) Within the WEB-INF directory create directory called services , you
 can place web service's meta information files there (services.xml) . as a
 example for MyService web serivce can have  following directory structure
 WEB-INF/services/MyService/META-INF/services.xml

 2.) Add requred Axis 2 jar files to lib directory of your web application.

 3.) Define the servlet mapping for AxisServlet  in web .xml file as follows
 .

 servlet
 servlet-nameAxisServlet/servlet-name

 servlet-classorg.apache.axis2.transport.http.AxisServlet/servlet-class
 load-on-startup1/load-on-startup
   /servlet
   servlet-mapping
 servlet-nameAxisServlet/servlet-name
 url-pattern/services/*/url-pattern
   /servlet-mapping


 Also you can use Maven to package and testing (together with Jetty plug-in)
 . Hope this will help you.



 On Fri, Jan 9, 2009 at 9:58 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello:I have a war created for my enterprise application. Need to embed
 axis2 with that.

 Could someone point me to the instructions need to be followed to achieve
 this if possible.

 Thanks for your time and help,
 Regards,
 Ravi




 --
 Sagara Gunathunga

 Blog - ssagara.blogspot.com
 Web - http://sagaras.awardspace.com/



RPCServiceClient

2009-01-09 Thread Wishing Carebear
Hello:In addition to Service and Operation client, found from one of the
examples that there is RPCServiceClient. Have couple of questions regarding
the same:
1) Is there any examples using RPCServiceClient where the service takes a
java bean say Class A. Class A has other java beans like Class B and Class
C.

2) With Axis1, I used to do the registration for the complex types with the
Call API. Is it still the same approach with Axis2.

3) I also need to send the request and get the response XML directly. Is it
possible with Axis2. With Axis1 it was not possible.

Thanks for your time and help,

Regards,
Ravi


Re: Parameter name as Param0

2009-01-09 Thread Wishing Carebear
Thanks Keith. Adding the debug flag to the ant script for Java compilation
took care of the issue.

On Thu, Jan 8, 2009 at 10:18 PM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Thanks Keith, I will enable the debug option and try it out.

 Regards,
 Ravi

   On Thu, Jan 8, 2009 at 5:48 PM, keith chapman 
 keithgchap...@gmail.comwrote:

 Hi Ravi,

 Please have a look at http://wso2.org/library/3743 That will give you the
 answer to your problem.

 Thanks,
 Keith.


 On Fri, Jan 9, 2009 at 6:37 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello: I'm new to axis2. Trying the pojoguide samples of Weatherservice
 with a complextype Weather.

 When looking into the wsdl, noticed the Weather complexType has name as
 param0 as shown below:

  xs:element name=setWeather

xs:complexType

 xs:sequence
  xs:element minOccurs=0 name=param0 nillable=true
 type=ax22:Weather/
 /xs:sequence
/xs:complexType
 /xs:element

 Wondering if it is possible to give a logicalname.

 Thanks,
 Ravi





 --
 Keith Chapman
 Senior Software Engineer
 WSO2 Inc.
 Oxygenating the Web Service Platform.
 http://wso2.org/

 blog: http://www.keith-chapman.org





Parameter name as Param0

2009-01-08 Thread Wishing Carebear
Hello:I'm new to axis2. Trying the pojoguide samples of Weatherservice with
a complextype Weather.

When looking into the wsdl, noticed the Weather complexType has name as
param0 as shown below:

xs:element name=setWeather

   xs:complexType

xs:sequence
 xs:element minOccurs=0 name=param0 nillable=true
type=ax22:Weather/
/xs:sequence
   /xs:complexType
/xs:element

Wondering if it is possible to give a logicalname.

Thanks,
Ravi


Re: Parameter name as Param0

2009-01-08 Thread Wishing Carebear
Thanks Keith, I will enable the debug option and try it out.

Regards,
Ravi

On Thu, Jan 8, 2009 at 5:48 PM, keith chapman keithgchap...@gmail.comwrote:

 Hi Ravi,

 Please have a look at http://wso2.org/library/3743 That will give you the
 answer to your problem.

 Thanks,
 Keith.


 On Fri, Jan 9, 2009 at 6:37 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello: I'm new to axis2. Trying the pojoguide samples of Weatherservice
 with a complextype Weather.

 When looking into the wsdl, noticed the Weather complexType has name as
 param0 as shown below:

  xs:element name=setWeather

xs:complexType

 xs:sequence
  xs:element minOccurs=0 name=param0 nillable=true
 type=ax22:Weather/
 /xs:sequence
/xs:complexType
 /xs:element

 Wondering if it is possible to give a logicalname.

 Thanks,
 Ravi





 --
 Keith Chapman
 Senior Software Engineer
 WSO2 Inc.
 Oxygenating the Web Service Platform.
 http://wso2.org/

 blog: http://www.keith-chapman.org



Getting SOAPEnvelope from wsdl and operation

2006-07-17 Thread Wishing Carebear
Hello:I'm trying to build a testing framework for webservices. The requirements are as follows:a. for a given oepration, may be the user can send the parameters valuesb. Show a Sample SOAP envelope and the user can change the value directly.
Is it possible using axis1 to get a sample soap message for a given wsdl and operation.Thanks for your help and time,regardscbear


ServiceLocator versus the bindingstub

2006-07-06 Thread Wishing Carebear
Hello:I have just started out some samples with axis1.4.When the wsdl2java is run for a wsdl, it generates the ServiceLocator as well the BindingStub. Trying to understand the advantages of using the ServiceLocator rather than using the BindingStub directly. 
Thanks for your help and time,Regards,cbear


SAML and axis 1.4.1

2006-06-27 Thread Wishing Carebear
Hello:I want to use SAML and ws-securitywith axis1.4. Is there any example available on this topic. Thanks for your help and time,Regards,cbear


Re: Integration of axis2 for invoking webservices

2006-06-17 Thread Wishing Carebear
Chinthaka:Thanks for your reply. Could you please explain a little bit about ServiceClient. Is this a different opensource or art of axis2.Thanks,cbearOn 6/17/06, 
Ajith Ranabahu [EMAIL PROTECTED] wrote:
Hi,if you are looking into a totally dynamic case also look into thepossibility of using the serviceClient since there is a mode where youcan pass in a WSDL to the constructor and get it fully configured!
AjithOn 6/17/06, Eran Chinthaka [EMAIL PROTECTED] wrote: Wishing Carebear wrote:  Hello:  I want to build a tool that has to talk to different webservices by taking
  in the wsdl and invoke the webservcie by getting the relevant inputs.  You can easily do this by creating stubs using Axis2 code generation. Read Axis2 User guide and code generation guide.
 -- Chinthaka--Ajith Ranabahu-To unsubscribe, e-mail: 
[EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]


Re: Integration of axis2 for invoking webservices

2006-06-17 Thread Wishing Carebear
Thanks for your reply. I will look into it.I have some more question in general. If you feel these are silly questions, I'm very sorry for taking your time.a. If there are complex types in the webservice call, does the ServiceClient takes care of the regsitering the complex type or I have to do it explicitly.
b. With WSDL2Java when the java classes for the client side are generated, in some cases, the wsdl url may be available in a development environment. But in production environment they will be different and so also the end point address, Id there is any way to externalize as properties. I looked into it and could not figure it out.
Thanks for your time and help.regards,cbearOn 6/17/06, Eran Chinthaka [EMAIL PROTECTED]
 wrote:Hi,Its Axis2's client api. In other words that the api client use to invoke
web services with Axis2.I strongly recommend you to read our user guide.-- ChinthakaWishing Carebear wrote: Chinthaka: Thanks for your reply. Could you please explain a little bit about ServiceClient. Is this a
 different opensource or art of axis2. Thanks, cbear On 6/17/06, Ajith Ranabahu [EMAIL PROTECTED] wrote:
 Hi, if you are looking into a totally dynamic case also look into the possibility of using the serviceClient since there is a mode where you can pass in a WSDL to the constructor and get it fully configured!
 Ajith On 6/17/06, Eran Chinthaka [EMAIL PROTECTED] wrote:  Wishing Carebear wrote:   Hello:
   I want to build a tool that has to talk to different webservices by taking   in the wsdl and invoke the webservcie by getting the relevant inputs.  
   You can easily do this by creating stubs using Axis2 code generation.  Read Axis2 User guide and code generation guide.   -- Chinthaka
 -- Ajith Ranabahu -
 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: 
[EMAIL PROTECTED]


Integration of axis2 for invoking webservices

2006-06-16 Thread Wishing Carebear
Hello:
I want to build a tool that has to talk to different webservices by
taking in the wsdl and invoke the webservcie by getting the relevant
inputs.

I have just started to look into axis. Wondering if there is any
documentation that talks about how to do the integration with axis2.

Thanks,
cbear