rampart/c client tutorial

2009-12-03 Thread Adam Edgar
Is there a good start to finish tutorial for rampart/c for creating a
client starting with a WSDL file? Basically, right no I have written a
WSDL and used wsdl2c to generate the source for the client but it does
not seem to have any rampart code in it. If I run the server without
WSSE it works but not when I try to secure it. I've managed to find
documentation scattered about but nothing comprehensive. 

All I'm trying to do is use UserName/Password authentication across
https. This is probably real simple but I can't seem to find the last
little bit of info to get it done.

ASE



How axis2 register serializer/deserializer?

2009-12-03 Thread Chatree Srichart
I need to send Map object and List object as OMElement. I found Axis use
MapSerializer class and MapDeserializer class as serializer/deserializer for
Map object.

I would like to know about Axis2 for this task.

Can any one help me?


Compatiblity of Axis 1.4 clients with Axis2 DOWS

2009-12-03 Thread William Walsh
Hi,

We're evaluating Axis2 compatibility with Axis 1.4.  I've reviewed the mailing 
list for previous questions and responses on this and wanted to make sure my 
understanding is correct on the following.

With respect to document-oriented web services (DOWS) (I know RPC is a 
completely different issue), if we migrate our web services from Axis 1.4 to 
Axis2 can we leave our existing Axis 1.4-based clients as-is and not require 
any changes to them or the WSDL they use?  My understanding is that we wouldn't 
have to change them since WSDL and SOAP isolate the client from the Axis2 
implementation.

If that's the case, then what about if our web service consumption is within a 
J2EE container?  That is, we have our application in one ear file and the Axis2 
servlet in another ear file in the same container; our application invokes a 
web service, which is ultimately processed via the servlet back to the same ear 
file.  This entry (http://marc.info/?l=axis-user&m=118658180719352&w=2) warns 
about mixing the two, but in this case they're in two separate ears.

Thanks,
William



The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful. If you are not the intended
addressee please contact the sender and dispose of this e-mail. Thank you.


Disturbing log message regarding axis2.log

2009-12-03 Thread Rafael Barrera Oro
I found the following exception in /var/log/daemon.log

java.io.FileNotFoundException: axis2.log (Permission denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:207)
at java.io.FileOutputStream.(FileOutputStream.java:131)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:133)

at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:97)

at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:689)

at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647)

at
org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:544)

(more)

If i am not mistaken this means that  tomcat was not able to get a hold of
the axis2.log file, but since i dont know where should the file be opened i
dont know where to go to change the permissions in order to fix it.

Also, i am assuming all actions  performed by axis2 are performed with the
tomcat user.

does anyone know where should i look?
does what it said hold water?

Thanks in advance, as usual

Rafael


Re: Problems with https mutual auth

2009-12-03 Thread Philippe A.
Hello Thilina,

I am using the standalone Axis2 server. I had a look at
HttpCoreNIOSSLListener.java and confirmed 
should do the same as client-auth.

Maybe I have missed something. I won't have time to go back to this since we
have decided to stick to one-way auth for now. If anyone successfully
configures two-way auth with the simple axis server, I'd like to hear from
you.

Thanks!

2009/12/3 Thilina Mahesh Buddhika 

> Hi Phillipe,
>
> I think you have to enable "client-auth" in the application server/servlet
> container where you have deployed Axis2.
>
> For example, in Tomcat, there is a parameter named "clientAuth" which is by
> default set to "false" in SSL Configuration section.  By setting its value
> to "true" you can force two-way authentication in SSL handshake.
>
> Thanks.
> /thilina
>
> Thilina Mahesh Buddhika
> http://blog.thilinamb.com
>
>
> On Mon, Nov 30, 2009 at 10:10 PM, Philippe A.  wrote:
>
>> I have successfully setup one way https authentication between my web
>> service client and server. The next step is to enable two-way auth but I'm
>> having problems doing it.
>>
>> To make sure two-way auth kicks in, I wanted to have client auth fail on
>> purpose. However, client requests are not rejected as planned.
>>
>> In axis2.xml, I have added the following:
>>
>> 
>> 
>> trust.jks
>> JKS
>> changeit
>> 
>> 
>> require
>>
>> I volontarily left the trust store empty. I have left services.xml
>> unchanged, as well as my client.
>>
>> Can anyone tell me what I am missing?
>>
>> I'm using Axis2 1.4.1 and Rampart 1.4.
>>
>> Thanks!
>>
>
>


Problem with LoggingModule (from the modules tutorial)

2009-12-03 Thread Rafael Barrera Oro
howdy folks?

I installed the LoggingModule as described in the modules tutorial but i am
not getting any messages in the axis2.log. I modified log4j.properties so
axis2 echoes all debug level messages but i still get nothing...

does this sound familiar to anyone?

thanks in advance!

Rafael


SOAP/ssl: Axis2 1.4.1 (client to remote) vs. IBM WebSphere 6.0.2 AdminClient (to local)

2009-12-03 Thread Christian Gosch
Hi,

in a J2EE web application running on IBM WebSphere 6.0.2 we use Axis2 
1.4.1 as WS client to execute SOAP calls to a remote host via SSL *and* 
the IBM WebSphere AdminClient (from inside the app) to execute tasks on 
the local host.

When AdminClient is used first *before* first use of Axis2 client (ssl), 
everything is fine and both clients work also on subsequent operations.

BUT: When Axis2 client (ssl) is used first *before* first use of 
AdminClient, then AdminClient fails to connect permanently, but Axis2 
runs fine.

Has anybody experienced similar things?

This may include using CXF or other WS client libraries *for ssl 
connections* together with IBM WebSphere AdminClient.


Thanks for any help on this topic. (Yes, there is another instance of 
this topic, but this one is shorter :-)

Regards,
-- 
Dipl.-Inform. Christian Gosch, PMI PMP
Systems Architecture, Project Management

inovex GmbH
Büro Pforzheim
Karlsruher Strasse 71
D-75179 Pforzheim
Tel: +49 (0)7231 3191-85
Fax: +49 (0)7231 3191-91
c.go...@inovex.de
www.inovex.de

Sitz der Gesellschaft: Pforzheim
AG Mannheim, HRB 502126
Geschäftsführer: Stephan Müller 





Configure SSL config for Axis2 1.4.1 client to connect to SOAP/ssl WS

2009-12-03 Thread Christian Gosch
Hi,

I have an Axis2 1.4.1 SOAP client (code generated with wsdl2java using 
XMLBeans) and can use this client successfully to execute operations on 
a remote server which only accepts SOAP/ssl (https) requests. I do not 
configure something special: I simply take the "https:..." URL as it is, 
and use it, and Axis2 together with the accompanying libraries does the 
remaining.

But the client code is part of a J2EE application deployed on IBM 
WebSphere 6.0.2, and this application also has to make calls to the IBM 
WebSphere AdminClient interface to deal with some specific things on the 
local server. The IBM WebSphere AdminClient also makes use of SOAP/ssl 
to contact the desired server which is simply the local host in this 
case.


Now I encounter a silly phenomenon:

When the first SOAP/ssl connection during VM life time is initiated by 
the AdminClient (which is not configurable regarding the SSL connection 
setup) and Axis2 comes behind, everything works fine.

But when the first SOAP/ssl connection during VM life time is initiated 
by Axis2 (which simply uses its default scheme of operation to establish 
a https connection to a remote host), then AdminClient fails to connect 
permanently, but Axis2 keeps being fine all the time.


I raised a PMR at IBM on this issue, but it languishes, and currently 
they suspect that the application's client code is to be blamed. I have 
no problem with that generally, but I cannot see any way to influence 
the actual ssl configuration or setup for Axis2 1.4.1 SOAP client 
operation so as to consort better with the AdminClient.


Does anyone know how to configure Axis2 1.4.1 to explicitly select the 
cipher, algorithm, keystore or the like for ssl? What about that magic 
axis2.xml config file? I did not figure out yet what to put in there at 
all, where to put the file and how to locate it then to make it work for 
a *client*... its all nebulous to me...


Thanks in advance,
-- 
Dipl.-Inform. Christian Gosch, PMI PMP
Systems Architecture, Project Management

inovex GmbH
Büro Pforzheim
Karlsruher Strasse 71
D-75179 Pforzheim
Tel: +49 (0)7231 3191-85
Fax: +49 (0)7231 3191-91
c.go...@inovex.de
www.inovex.de

Sitz der Gesellschaft: Pforzheim
AG Mannheim, HRB 502126
Geschäftsführer: Stephan Müller 





Re: How to run .exe file located inside .aar

2009-12-03 Thread Kevin Alonso




Thank you for your help.

Finally I solved the problem extracting exe from .aar to a temporal
file. and then executing it.

Regards,

Kevin.

Philippe A. escribió:
That doesn't address directly your problem, but I strongly
recommend you have a look at Jakarta Commons Exec. It will save you
lots of trouble.
  
  http://commons.apache.org/
  
  
  2009/11/27 Kevin Alonso 
  I
get the path of the file:

URL url =
"">
                                               
String path = url.getPath();

(Path: C:/Program Files/Apache Software Foundation/Tomcat
6.0/temp/axis2-tmp-5629
138317308731761.tmp/axis2593833549232759380WebService.aar!/execution.ex
e)

But when I put it to execute:

Process p = Runtime.getRuntime().exec(path);


 I receive the following error:

java.io.IOException: Cannot run program "C:/Program": CreateProcess
error=2, The
 system cannot find the file specified

I think that it is becouse of !/

Any idea to solve this?

Thank you in advance.

Kevin.


Deepal jayasinghe escribió:

One way to do this is you can put the exe file somewhere else and you
can define the location from a parameter (in services.xml) and then use
the value of the parameter to load the exe file. One other way is you
can get the URI of the exe file from axisservice, and you may try to
execute it from that
  
classloader.getResource("execution.exe")
  
Thanks,
Deepal
  
Hello,

I have a web service that needs to call an .exe file and it is into
the .aar file.

How can I do this? Which is the path I have to use in the instruction...

Process p = Runtime.getRuntime().exec("execution.exe");

Is there another way to do this?

Thank you in advance.

Kevin.

  
  
  

  
  
  





"no IV used for this cipher"

2009-12-03 Thread P.N.


Hello!

Can somebody please tell me, what it means: "no IV used for this 
cipher"? IV seems to be some security related abbreviation, but I'm not 
an expert in this area :-(


Kind regards

Peter



Re: Axis2 ADB/POJO client and SSL problem

2009-12-03 Thread Thilina Mahesh Buddhika
Hi Peter,

This error occurs mainly due to invalid trust-store properties. Make sure
the keystore pointed by the property "javax.net.ssl.trustStore" contains the
public cert. of the recipient.

Thanks.
/thilina

Thilina Mahesh Buddhika
http://blog.thilinamb.com


On Thu, Dec 3, 2009 at 3:42 PM, P.N.  wrote:

>
> Hello!
>
> I've created a web service client (from WSDL, using ADB). I've set the
> following system properties:
>javax.net.ssl.keyStore
>javax.net.ssl.keyStoreType = JKS
>javax.net.ssl.keyStorePassword
>javax.net.ssl.trustStore
>javax.net.ssl.trustStoreType = JKS
>javax.net.ssl.trustStorePassword
>
>
> When I want to run the client, I'm getting the following message:
>
>
> org.apache.axis2.AxisFault: Transport error: 501 Error: Not Implemented
>at
> org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:295)
>at
> org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:190)
>at
> org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
>at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:389)
>at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:222)
>at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
>at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
>at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
>at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>at
> com.semiramis.webservices._2006_01.export.extended.mde_0901.ExportSoapBindingStub.export(ExportSoapBindingStub.java:123)
>at
> com.dvb.app.ws.client.export.ExportClient.(ExportClient.java:66)
>at
> com.dvb.app.ws.client.export.ExportClient.main(ExportClient.java:41)
>
>
> Additional information with javax.net.debug=true:
>
> [snip: hexadecimal dump, containing also '']
> main, WRITE: TLSv1 Application Data, length = 640
> [Raw write]: length = 645
> [snip: hexadecimal dump]
> main, handling exception: java.net.SocketException: Software caused
> connection abort: recv failed
> %% Invalidated:  [Session-1, SSL_RSA_WITH_RC4_128_MD5]
> main, SEND TLSv1 ALERT:  fatal, description = unexpected_message
> Padded plaintext before ENCRYPTION:  len = 18
> : 02 0A B2 3E AB 3E A0 73   ED 12 BC 8C C7 47 9A F5  ...>.>.s.G..
> 0010: 99 76  .v
> main, WRITE: TLSv1 Alert, length = 18
> main, Exception sending alert: java.net.SocketException: Software caused
> connection abort: socket write error
>
>
> IMHO, it looks like the problem occurred probably after transmission of
> data. tcldump seems to have a problem with SSL, cannot see the data
> transmitted.
>
>
> Kind regards
>
> Peter
>
>


Re: Problems with https mutual auth

2009-12-03 Thread Thilina Mahesh Buddhika
Hi Phillipe,

I think you have to enable "client-auth" in the application server/servlet
container where you have deployed Axis2.

For example, in Tomcat, there is a parameter named "clientAuth" which is by
default set to "false" in SSL Configuration section.  By setting its value
to "true" you can force two-way authentication in SSL handshake.

Thanks.
/thilina

Thilina Mahesh Buddhika
http://blog.thilinamb.com


On Mon, Nov 30, 2009 at 10:10 PM, Philippe A.  wrote:

> I have successfully setup one way https authentication between my web
> service client and server. The next step is to enable two-way auth but I'm
> having problems doing it.
>
> To make sure two-way auth kicks in, I wanted to have client auth fail on
> purpose. However, client requests are not rejected as planned.
>
> In axis2.xml, I have added the following:
>
> 
> 
> trust.jks
> JKS
> changeit
> 
> 
> require
>
> I volontarily left the trust store empty. I have left services.xml
> unchanged, as well as my client.
>
> Can anyone tell me what I am missing?
>
> I'm using Axis2 1.4.1 and Rampart 1.4.
>
> Thanks!
>


Axis2 ADB/POJO client and SSL problem

2009-12-03 Thread P.N.


Hello!

I've created a web service client (from WSDL, using ADB). I've set the 
following system properties:

javax.net.ssl.keyStore
javax.net.ssl.keyStoreType = JKS
javax.net.ssl.keyStorePassword
javax.net.ssl.trustStore
javax.net.ssl.trustStoreType = JKS
javax.net.ssl.trustStorePassword


When I want to run the client, I'm getting the following message:


org.apache.axis2.AxisFault: Transport error: 501 Error: Not Implemented
at 
org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:295)
at 
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:190)
at 
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:389)
at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:222)

at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at 
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at 
com.semiramis.webservices._2006_01.export.extended.mde_0901.ExportSoapBindingStub.export(ExportSoapBindingStub.java:123)
at 
com.dvb.app.ws.client.export.ExportClient.(ExportClient.java:66)
at 
com.dvb.app.ws.client.export.ExportClient.main(ExportClient.java:41)



Additional information with javax.net.debug=true:

[snip: hexadecimal dump, containing also '']
main, WRITE: TLSv1 Application Data, length = 640
[Raw write]: length = 645
[snip: hexadecimal dump]
main, handling exception: java.net.SocketException: Software caused 
connection abort: recv failed

%% Invalidated:  [Session-1, SSL_RSA_WITH_RC4_128_MD5]
main, SEND TLSv1 ALERT:  fatal, description = unexpected_message
Padded plaintext before ENCRYPTION:  len = 18
: 02 0A B2 3E AB 3E A0 73   ED 12 BC 8C C7 47 9A F5  ...>.>.s.G..
0010: 99 76  .v
main, WRITE: TLSv1 Alert, length = 18
main, Exception sending alert: java.net.SocketException: Software caused 
connection abort: socket write error



IMHO, it looks like the problem occurred probably after transmission of 
data. tcldump seems to have a problem with SSL, cannot see the data 
transmitted.



Kind regards

Peter



XSLT link in WSDL removed when deployed

2009-12-03 Thread Håkon Sagehaug
Hi all,

I got a service with a WSDL that contains a link to a XSLT stylesheet, but
when i deploy my service it looks like the link is removed from the WSDL,
anyone experienced this before ?



cheers, Håkon