You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Stephen Souness <so...@hotmail.com> on 2007/12/19 21:19:30 UTC

[axis2] wsdl with policy

Hi all,

Can anyone direct me to an example of a WSDL which includes valid policy 
references, which wsdl2java can interpret and generate an appropriate 
client stub from?

Alternatively, is there a better way to generate the client code?

--
Stephen


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


Re: [axis2] wsdl with policy

Posted by Stephen Souness <so...@hotmail.com>.
The code that my setup has generated doesn't look much like that.

I suspect that I need something more configured, so that the details for:
  AXIS2_XML
  AXIS2_REPOSITORY

and
   stub._getServiceClient().engageModule("rampart");

will be available to the wsdl2java tool.



PS - the "WSDL for endpoints" link for the "WS-Policy" section on 
http://131.107.72.15/ilab/ is broken (404 error).



--
Stephen


Amila Suriarachchi wrote:
> When you generate the code it adds the security policies to input and 
> output messages.
> Here codegen tool normalize the policy and attached it as a string so 
> that runtime
> it builds the policy from that.
> 
> See the attached test case.
> 
> Amila.
> 
> 
> 
> On Dec 21, 2007 2:59 AM, Stephen Souness <sounie@hotmail.com 
> <ma...@hotmail.com>> wrote:
> 
>     Thanks for that Amila.
> 
>     I've tried the following:
> 
>     wsdl2java -pn A12Binding -o generated -uri C:\interop.wsdl
> 
> 
>     I haven't noticed anything in the generated EchoServiceStub.java that
>     deals with the X509 or other security aspects specified in the
>     A12Binding_policy policy.
> 
>     Is their some additional axis2 setup required?
> 
> 
>     --
>     Stephen
> 
> 
> 
>     Amila Suriarachchi wrote:
>      > see some security samples here
>      > http://131.107.72.15/ilab/
>      >
>      > Amila
>      >
>      > On Dec 20, 2007 1:49 AM, Stephen Souness < sounie@hotmail.com
>     <ma...@hotmail.com>
>      > <mailto: sounie@hotmail.com <ma...@hotmail.com>>> wrote:
>      >
>      >     Hi all,
>      >
>      >     Can anyone direct me to an example of a WSDL which includes valid
>      >     policy
>      >     references, which wsdl2java can interpret and generate an
>     appropriate
>      >     client stub from?
>      >
>      >     Alternatively, is there a better way to generate the client code?
>      >
>      >     --
>      >     Stephen
>      >
>      >
>      >    
>     ---------------------------------------------------------------------
>      >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>>
>      >     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>      >     <mailto: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>>
>      >
>      >
>      >
>      >
>      > --
>      > Amila Suriarachchi,
>      > WSO2 Inc.
> 
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
> 
> 
> 
> 
> -- 
> Amila Suriarachchi,
> WSO2 Inc.
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org


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


Re: [axis2] wsdl with policy

Posted by Amila Suriarachchi <am...@gmail.com>.
On Jan 8, 2008 5:51 AM, Stephen Souness <so...@hotmail.com> wrote:

> Does this mean that the client stubs generated by wsdl2java shouldn't be
> expected to include anything extra if the WSDL contains policy
> information?


yes.  A normal wsdl (lets say MS  interop wsdl) would only display standard
security policies.
obviously it does not know about the rampart specific things.
So you have to manually set those rampart specific things.

>
>
> The stubs that I have generated do not expose a getServiceContext() or
> _getServiceContext() method.
>
> The tutorial at:
> http://www.shellysaunders.co.uk/Blog/tabid/65/EntryID/2/Default.aspx
> looks promising, but also indicates the _getServiceContext() method
> should be present.
>
> Are you able to direct me to a simple complete example?

I am not aware of such. The code I showed to you I used to check this with
the
MS interop site.

>
>
> At the moment I have pieces from different sources that won't match up:
> - a WSDL file from http://131.107.72.15/ilab/ (which is no longer
> accessible)
> - the example Test class that was posted earlier
> - some somewhat vague instructions in the axis2 documentation
>
>
> --
> Stephen
>
>
>
> Amila Suriarachchi wrote:
> >
> >
> > On Jan 7, 2008 5:31 AM, Stephen Souness <sounie@hotmail.com
> > <ma...@hotmail.com>> wrote:
> >
> >     Do I need to provide a policy file, and if so how do I tell
> WSDL2Java
> >     where to look for it?
> >
> >
> > see the test java file I have given. you have to give the rampart
> > specific policy file to the stub.
> > normally in a wsdl file you get only the security policies.
> >
> > in this example it is give as an Policy object
> > CryptoConfig signcriptoInfo = new CryptoConfig();
> >         signcriptoInfo.setProvider(Merlin.class.getName());
> >         Properties properties = new Properties();
> >
> > properties.setProperty("
> org.apache.ws.security.crypto.merlin.keystore.type",
> > "JKS");
> >
> > properties.setProperty("org.apache.ws.security.crypto.merlin.file",
> > "security_client_wcf/conf/sec.jks");
> >
> > properties.setProperty("
> org.apache.ws.security.crypto.merlin.keystore.password",
> > "password");
> >         signcriptoInfo.setProp(properties);
> >
> >         CryptoConfig encriptcriptoInfo = new CryptoConfig();
> >         encriptcriptoInfo.setProp(properties);
> >         encriptcriptoInfo.setProvider(Merlin.class.getName());
> >
> >         RampartConfig config = new RampartConfig();
> >         config.setUser("alice");
> >         config.setEncryptionUser("bob");
> >         config.setPwCbClass("util.PasswordCallbackHandler");
> >         config.setSigCryptoConfig(signcriptoInfo);
> >         config.setEncrCryptoConfig(encriptcriptoInfo);
> >
> >         ramapConfigPolicy = new Policy();
> >         ramapConfigPolicy.addAssertion(config);
> >
> > but you may do the following as well using a policy file.
> >
> >   StAXOMBuilder builder = new StAXOMBuilder(SECURITY_POLICY_FILE);
> >         Policy securityPolicy =
> > PolicyEngine.getPolicy(builder.getDocumentElement());
> >
> >
> > serviceClient.getServiceContext().getConfigurationContext().setProperty(
> RampartMessageData.KEY_RAMPART_POLICY,
> > securityPolicy);
> >
> >
> > thanks,
> > Amila.
> >
> >
> >
> >
> >     Amila Suriarachchi wrote:
> >      > When you generate the code it adds the security policies to input
> and
> >      > output messages.
> >      > Here codegen tool normalize the policy and attached it as a
> string so
> >      > that runtime
> >      > it builds the policy from that.
> >      >
> >      > See the attached test case.
> >      >
> >      > Amila.
> >      >
> >      >
> >      >
> >      > On Dec 21, 2007 2:59 AM, Stephen Souness <sounie@hotmail.com
> >     <ma...@hotmail.com>
> >      > <mailto:sounie@hotmail.com <ma...@hotmail.com>>> wrote:
> >      >
> >      >     Thanks for that Amila.
> >      >
> >      >     I've tried the following:
> >      >
> >      >     wsdl2java -pn A12Binding -o generated -uri C:\interop.wsdl
> >      >
> >      >
> >      >     I haven't noticed anything in the generated
> >     EchoServiceStub.java that
> >      >     deals with the X509 or other security aspects specified in
> the
> >      >     A12Binding_policy policy.
> >      >
> >      >     Is their some additional axis2 setup required?
> >      >
> >      >
> >      >     --
> >      >     Stephen
> >      >
> >      >
> >      >
> >      >     Amila Suriarachchi wrote:
> >      >      > see some security samples here
> >      >      > http://131.107.72.15/ilab/
> >      >      >
> >      >      > Amila
> >      >      >
> >      >      > On Dec 20, 2007 1:49 AM, Stephen Souness <
> >     sounie@hotmail.com <ma...@hotmail.com>
> >      >     <mailto:sounie@hotmail.com <ma...@hotmail.com>>
> >      >      > <mailto: sounie@hotmail.com <ma...@hotmail.com>
> >     <mailto:sounie@hotmail.com <ma...@hotmail.com>>>> wrote:
> >      >      >
> >      >      >     Hi all,
> >      >      >
> >      >      >     Can anyone direct me to an example of a WSDL which
> >     includes valid
> >      >      >     policy
> >      >      >     references, which wsdl2java can interpret and generate
> an
> >      >     appropriate
> >      >      >     client stub from?
> >      >      >
> >      >      >     Alternatively, is there a better way to generate the
> >     client code?
> >      >      >
> >      >      >     --
> >      >      >     Stephen
> >      >      >
> >      >      >
> >      >      >
> >      >
> >
> ---------------------------------------------------------------------
> >      >      >     To unsubscribe, e-mail:
> >     axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >      >     <mailto:axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>>
> >      >      >     <mailto: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >      >     <mailto:axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>>>
> >      >      >     For additional commands, e-mail:
> >     axis-user-help@ws.apache.org <ma...@ws.apache.org>
> >      >     <mailto:axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>>
> >      >      >     <mailto: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >      >     <mailto:axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>>>
> >      >      >
> >      >      >
> >      >      >
> >      >      >
> >      >      > --
> >      >      > Amila Suriarachchi,
> >      >      > WSO2 Inc.
> >      >
> >      >
> >      >
> >
> ---------------------------------------------------------------------
> >      >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >      >     <mailto:axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>>
> >      >     For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >      >     <mailto:axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>>
> >      >
> >      >
> >      >
> >      >
> >      > --
> >      > Amila Suriarachchi,
> >      > WSO2 Inc.
> >      >
> >      >
> >      >
> >
> ------------------------------------------------------------------------
> >      >
> >      >
> ---------------------------------------------------------------------
> >      > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >      > For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >
> >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: [axis2] wsdl with policy

Posted by Stephen Souness <so...@hotmail.com>.
Does this mean that the client stubs generated by wsdl2java shouldn't be 
expected to include anything extra if the WSDL contains policy information?

The stubs that I have generated do not expose a getServiceContext() or 
_getServiceContext() method.

The tutorial at:
http://www.shellysaunders.co.uk/Blog/tabid/65/EntryID/2/Default.aspx
looks promising, but also indicates the _getServiceContext() method 
should be present.

Are you able to direct me to a simple complete example?

At the moment I have pieces from different sources that won't match up:
- a WSDL file from http://131.107.72.15/ilab/ (which is no longer 
accessible)
- the example Test class that was posted earlier
- some somewhat vague instructions in the axis2 documentation


--
Stephen



Amila Suriarachchi wrote:
> 
> 
> On Jan 7, 2008 5:31 AM, Stephen Souness <sounie@hotmail.com 
> <ma...@hotmail.com>> wrote:
> 
>     Do I need to provide a policy file, and if so how do I tell WSDL2Java
>     where to look for it?
> 
> 
> see the test java file I have given. you have to give the rampart 
> specific policy file to the stub.
> normally in a wsdl file you get only the security policies.
> 
> in this example it is give as an Policy object
> CryptoConfig signcriptoInfo = new CryptoConfig();
>         signcriptoInfo.setProvider(Merlin.class.getName());
>         Properties properties = new Properties();
>         
> properties.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", 
> "JKS");
>         
> properties.setProperty("org.apache.ws.security.crypto.merlin.file", 
> "security_client_wcf/conf/sec.jks");
>         
> properties.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", 
> "password");
>         signcriptoInfo.setProp(properties);
> 
>         CryptoConfig encriptcriptoInfo = new CryptoConfig();
>         encriptcriptoInfo.setProp(properties);
>         encriptcriptoInfo.setProvider(Merlin.class.getName());
> 
>         RampartConfig config = new RampartConfig();
>         config.setUser("alice");
>         config.setEncryptionUser("bob");
>         config.setPwCbClass("util.PasswordCallbackHandler");
>         config.setSigCryptoConfig(signcriptoInfo);
>         config.setEncrCryptoConfig(encriptcriptoInfo);
> 
>         ramapConfigPolicy = new Policy();
>         ramapConfigPolicy.addAssertion(config);
> 
> but you may do the following as well using a policy file.
> 
>   StAXOMBuilder builder = new StAXOMBuilder(SECURITY_POLICY_FILE);
>         Policy securityPolicy = 
> PolicyEngine.getPolicy(builder.getDocumentElement());
> 
>         
> serviceClient.getServiceContext().getConfigurationContext().setProperty(RampartMessageData.KEY_RAMPART_POLICY, 
> securityPolicy);
>    
> 
> thanks,
> Amila.
> 
> 
> 
> 
>     Amila Suriarachchi wrote:
>      > When you generate the code it adds the security policies to input and
>      > output messages.
>      > Here codegen tool normalize the policy and attached it as a string so
>      > that runtime
>      > it builds the policy from that.
>      >
>      > See the attached test case.
>      >
>      > Amila.
>      >
>      >
>      >
>      > On Dec 21, 2007 2:59 AM, Stephen Souness <sounie@hotmail.com
>     <ma...@hotmail.com>
>      > <mailto:sounie@hotmail.com <ma...@hotmail.com>>> wrote:
>      >
>      >     Thanks for that Amila.
>      >
>      >     I've tried the following:
>      >
>      >     wsdl2java -pn A12Binding -o generated -uri C:\interop.wsdl
>      >
>      >
>      >     I haven't noticed anything in the generated
>     EchoServiceStub.java that
>      >     deals with the X509 or other security aspects specified in the
>      >     A12Binding_policy policy.
>      >
>      >     Is their some additional axis2 setup required?
>      >
>      >
>      >     --
>      >     Stephen
>      >
>      >
>      >
>      >     Amila Suriarachchi wrote:
>      >      > see some security samples here
>      >      > http://131.107.72.15/ilab/
>      >      >
>      >      > Amila
>      >      >
>      >      > On Dec 20, 2007 1:49 AM, Stephen Souness <
>     sounie@hotmail.com <ma...@hotmail.com>
>      >     <mailto:sounie@hotmail.com <ma...@hotmail.com>>
>      >      > <mailto: sounie@hotmail.com <ma...@hotmail.com>
>     <mailto:sounie@hotmail.com <ma...@hotmail.com>>>> wrote:
>      >      >
>      >      >     Hi all,
>      >      >
>      >      >     Can anyone direct me to an example of a WSDL which
>     includes valid
>      >      >     policy
>      >      >     references, which wsdl2java can interpret and generate an
>      >     appropriate
>      >      >     client stub from?
>      >      >
>      >      >     Alternatively, is there a better way to generate the
>     client code?
>      >      >
>      >      >     --
>      >      >     Stephen
>      >      >
>      >      >
>      >      >
>      >    
>     ---------------------------------------------------------------------
>      >      >     To unsubscribe, e-mail:
>     axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>>
>      >      >     <mailto: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>>>
>      >      >     For additional commands, e-mail:
>     axis-user-help@ws.apache.org <ma...@ws.apache.org>
>      >     <mailto:axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>>
>      >      >     <mailto: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>      >     <mailto:axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>>>
>      >      >
>      >      >
>      >      >
>      >      >
>      >      > --
>      >      > Amila Suriarachchi,
>      >      > WSO2 Inc.
>      >
>      >
>      >    
>     ---------------------------------------------------------------------
>      >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>>
>      >     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>      >     <mailto:axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>>
>      >
>      >
>      >
>      >
>      > --
>      > Amila Suriarachchi,
>      > WSO2 Inc.
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > ---------------------------------------------------------------------
>      > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>      > For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
> 
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
> 
> 
> 
> 
> -- 
> Amila Suriarachchi,
> WSO2 Inc.


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


Re: [axis2] wsdl with policy

Posted by Amila Suriarachchi <am...@gmail.com>.
On Jan 7, 2008 5:31 AM, Stephen Souness <so...@hotmail.com> wrote:

> Do I need to provide a policy file, and if so how do I tell WSDL2Java
> where to look for it?


see the test java file I have given. you have to give the rampart specific
policy file to the stub.
normally in a wsdl file you get only the security policies.

in this example it is give as an Policy object
CryptoConfig signcriptoInfo = new CryptoConfig();
        signcriptoInfo.setProvider(Merlin.class.getName());
        Properties properties = new Properties();
        properties.setProperty("
org.apache.ws.security.crypto.merlin.keystore.type", "JKS");
        properties.setProperty("org.apache.ws.security.crypto.merlin.file",
"security_client_wcf/conf/sec.jks");
        properties.setProperty("
org.apache.ws.security.crypto.merlin.keystore.password", "password");
        signcriptoInfo.setProp(properties);

        CryptoConfig encriptcriptoInfo = new CryptoConfig();
        encriptcriptoInfo.setProp(properties);
        encriptcriptoInfo.setProvider(Merlin.class.getName());

        RampartConfig config = new RampartConfig();
        config.setUser("alice");
        config.setEncryptionUser("bob");
        config.setPwCbClass("util.PasswordCallbackHandler");
        config.setSigCryptoConfig(signcriptoInfo);
        config.setEncrCryptoConfig(encriptcriptoInfo);

        ramapConfigPolicy = new Policy();
        ramapConfigPolicy.addAssertion(config);

but you may do the following as well using a policy file.

  StAXOMBuilder builder = new StAXOMBuilder(SECURITY_POLICY_FILE);
        Policy securityPolicy = PolicyEngine.getPolicy(
builder.getDocumentElement());

        serviceClient.getServiceContext
().getConfigurationContext().setProperty(
RampartMessageData.KEY_RAMPART_POLICY, securityPolicy);


thanks,
Amila.


>
>
> Amila Suriarachchi wrote:
> > When you generate the code it adds the security policies to input and
> > output messages.
> > Here codegen tool normalize the policy and attached it as a string so
> > that runtime
> > it builds the policy from that.
> >
> > See the attached test case.
> >
> > Amila.
> >
> >
> >
> > On Dec 21, 2007 2:59 AM, Stephen Souness <sounie@hotmail.com
> > <ma...@hotmail.com>> wrote:
> >
> >     Thanks for that Amila.
> >
> >     I've tried the following:
> >
> >     wsdl2java -pn A12Binding -o generated -uri C:\interop.wsdl
> >
> >
> >     I haven't noticed anything in the generated EchoServiceStub.javathat
> >     deals with the X509 or other security aspects specified in the
> >     A12Binding_policy policy.
> >
> >     Is their some additional axis2 setup required?
> >
> >
> >     --
> >     Stephen
> >
> >
> >
> >     Amila Suriarachchi wrote:
> >      > see some security samples here
> >      > http://131.107.72.15/ilab/
> >      >
> >      > Amila
> >      >
> >      > On Dec 20, 2007 1:49 AM, Stephen Souness < sounie@hotmail.com
> >     <ma...@hotmail.com>
> >      > <mailto: sounie@hotmail.com <ma...@hotmail.com>>> wrote:
> >      >
> >      >     Hi all,
> >      >
> >      >     Can anyone direct me to an example of a WSDL which includes
> valid
> >      >     policy
> >      >     references, which wsdl2java can interpret and generate an
> >     appropriate
> >      >     client stub from?
> >      >
> >      >     Alternatively, is there a better way to generate the client
> code?
> >      >
> >      >     --
> >      >     Stephen
> >      >
> >      >
> >      >
> >
> ---------------------------------------------------------------------
> >      >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >      >     <mailto:axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>>
> >      >     For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >      >     <mailto: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>>
> >      >
> >      >
> >      >
> >      >
> >      > --
> >      > Amila Suriarachchi,
> >      > WSO2 Inc.
> >
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >
> >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
> >
> >
> > ------------------------------------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: [axis2] wsdl with policy

Posted by Stephen Souness <so...@hotmail.com>.
Do I need to provide a policy file, and if so how do I tell WSDL2Java 
where to look for it?


Amila Suriarachchi wrote:
> When you generate the code it adds the security policies to input and 
> output messages.
> Here codegen tool normalize the policy and attached it as a string so 
> that runtime
> it builds the policy from that.
> 
> See the attached test case.
> 
> Amila.
> 
> 
> 
> On Dec 21, 2007 2:59 AM, Stephen Souness <sounie@hotmail.com 
> <ma...@hotmail.com>> wrote:
> 
>     Thanks for that Amila.
> 
>     I've tried the following:
> 
>     wsdl2java -pn A12Binding -o generated -uri C:\interop.wsdl
> 
> 
>     I haven't noticed anything in the generated EchoServiceStub.java that
>     deals with the X509 or other security aspects specified in the
>     A12Binding_policy policy.
> 
>     Is their some additional axis2 setup required?
> 
> 
>     --
>     Stephen
> 
> 
> 
>     Amila Suriarachchi wrote:
>      > see some security samples here
>      > http://131.107.72.15/ilab/
>      >
>      > Amila
>      >
>      > On Dec 20, 2007 1:49 AM, Stephen Souness < sounie@hotmail.com
>     <ma...@hotmail.com>
>      > <mailto: sounie@hotmail.com <ma...@hotmail.com>>> wrote:
>      >
>      >     Hi all,
>      >
>      >     Can anyone direct me to an example of a WSDL which includes valid
>      >     policy
>      >     references, which wsdl2java can interpret and generate an
>     appropriate
>      >     client stub from?
>      >
>      >     Alternatively, is there a better way to generate the client code?
>      >
>      >     --
>      >     Stephen
>      >
>      >
>      >    
>     ---------------------------------------------------------------------
>      >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>      >     <mailto:axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>>
>      >     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>      >     <mailto: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>>
>      >
>      >
>      >
>      >
>      > --
>      > Amila Suriarachchi,
>      > WSO2 Inc.
> 
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
> 
> 
> 
> 
> -- 
> Amila Suriarachchi,
> WSO2 Inc.
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org


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


Re: [axis2] wsdl with policy

Posted by Amila Suriarachchi <am...@gmail.com>.
When you generate the code it adds the security policies to input and output
messages.
Here codegen tool normalize the policy and attached it as a string so that
runtime
it builds the policy from that.

See the attached test case.

Amila.



On Dec 21, 2007 2:59 AM, Stephen Souness <so...@hotmail.com> wrote:

> Thanks for that Amila.
>
> I've tried the following:
>
> wsdl2java -pn A12Binding -o generated -uri C:\interop.wsdl
>
>
> I haven't noticed anything in the generated EchoServiceStub.java that
> deals with the X509 or other security aspects specified in the
> A12Binding_policy policy.
>
> Is their some additional axis2 setup required?
>
>
> --
> Stephen
>
>
>
> Amila Suriarachchi wrote:
> > see some security samples here
> > http://131.107.72.15/ilab/
> >
> > Amila
> >
> > On Dec 20, 2007 1:49 AM, Stephen Souness < sounie@hotmail.com
> > <ma...@hotmail.com>> wrote:
> >
> >     Hi all,
> >
> >     Can anyone direct me to an example of a WSDL which includes valid
> >     policy
> >     references, which wsdl2java can interpret and generate an
> appropriate
> >     client stub from?
> >
> >     Alternatively, is there a better way to generate the client code?
> >
> >     --
> >     Stephen
> >
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >
> >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: [axis2] wsdl with policy

Posted by Stephen Souness <so...@hotmail.com>.
Thanks for that Amila.

I've tried the following:

wsdl2java -pn A12Binding -o generated -uri C:\interop.wsdl


I haven't noticed anything in the generated EchoServiceStub.java that 
deals with the X509 or other security aspects specified in the 
A12Binding_policy policy.

Is their some additional axis2 setup required?


--
Stephen



Amila Suriarachchi wrote:
> see some security samples here
> http://131.107.72.15/ilab/
> 
> Amila
> 
> On Dec 20, 2007 1:49 AM, Stephen Souness < sounie@hotmail.com 
> <ma...@hotmail.com>> wrote:
> 
>     Hi all,
> 
>     Can anyone direct me to an example of a WSDL which includes valid
>     policy
>     references, which wsdl2java can interpret and generate an appropriate
>     client stub from?
> 
>     Alternatively, is there a better way to generate the client code?
> 
>     --
>     Stephen
> 
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
> 
> 
> 
> 
> -- 
> Amila Suriarachchi,
> WSO2 Inc.


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


Re: [axis2] wsdl with policy

Posted by Amila Suriarachchi <am...@gmail.com>.
see some security samples here
http://131.107.72.15/ilab/

Amila

On Dec 20, 2007 1:49 AM, Stephen Souness <so...@hotmail.com> wrote:

> Hi all,
>
> Can anyone direct me to an example of a WSDL which includes valid policy
> references, which wsdl2java can interpret and generate an appropriate
> client stub from?
>
> Alternatively, is there a better way to generate the client code?
>
> --
> Stephen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.