Re: Axis2 - Bug with Proxy and HTTP/1.1?

2008-11-14 Thread StrongSteve

Hi Paul,

Thanks for your quick reply.

So it could be, that our proxy server does not support HTTP/1.1 - or to be
specific "Chunking" and returns this error message back to the caller - me.

That is indeed a great tip. I will check with our network guys on Monday!

Thanks again!

Greetings
Stefan 


pzfreo wrote:
> 
> Stefan
> 
> Its not the Axis2 client reporting Not Implemented. Its either the
> proxy or the server (Hard to tell which without seeing a wire trace or
> the logs from those systems). I'm guessing its the proxy. Axis2 is
> sending the message successfully and its the other system that can't
> handle HTTP 1.1.
> 
> Paul
> 
> On Fri, Nov 14, 2008 at 9:59 AM, StrongSteve <[EMAIL PROTECTED]> wrote:
>>
>> Hi Everybody!
>>
>> Recently I have stumbled across a curious behavior of the Axis2
>> Framework.
>> As I am not sure whether I am doing something wrong or if it is a bug, I
>> try
>> to outline my experience.
>> Perhaps someone has made the same experiences.
>>
>> Basically I have an application, that uses the Axis2 Framework to contact
>> a
>> web service. So it can be seen as kind of a web service client.
>>
>> As I am working behind a companies proxy server, I added my proxy setting
>> to
>> the startup of the program, as usual.
>> This looks something like:
>>
>> java -Dhttp.proxyHost=MyProxyhost -Dhttp.proxyPort=MyProxyPort
>> -Dhttp.nonProxyHosts=MyExcludedHosts gov.nist.registry.xdstest2.XdsTest
>> $*
>>
>> Funny thing, the program finished with the following stacktrace (only an
>> extract):
>>
>> Transport error: 501 Error: Not Implemented
>> org.apache.axis2.AxisFault: Transport error: 501 Error: Not Implemented
>>at
>> org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:296)
>>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:371)
>>at
>> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
>>at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
>>at
>> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
>>at
>> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
>>at
>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>>at
>> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)
>>at
>> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>>at gov.nist.registry.common2.registry.Soap.soapCall(Soap.java:60)
>>at
>> gov.nist.registry.xdstest2.StoredQueryTransaction.runSQ(StoredQueryTransaction.java:99)
>>at
>> gov.nist.registry.xdstest2.StoredQueryTransaction.run(StoredQueryTransaction.java:41)
>>at
>> gov.nist.registry.xdstest2.StepContext.run(StepContext.java:153)
>>at
>> gov.nist.registry.xdstest2.PlanContext.run(PlanContext.java:138)
>>at gov.nist.registry.xdstest2.Xdstest2.runTest(Xdstest2.java:263)
>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>at java.lang.reflect.Method.invoke(Unknown Source)
>>at
>> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:95)
>>at
>> org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:599)
>>at
>> groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1077)
>>at
>> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:744)
>>at
>> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:167)
>>at
>> gov.nist.registry.xdstest2.XdsTest$_run_closure6.doCall(XdsTest.groovy:353)
>>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>at java.lang.reflect.Method.invoke(Unknown Source)
>>at
>> org.codehaus.groovy.refl

Axis2 - Bug with Proxy and HTTP/1.1?

2008-11-14 Thread StrongSteve

Hi Everybody!

Recently I have stumbled across a curious behavior of the Axis2 Framework.
As I am not sure whether I am doing something wrong or if it is a bug, I try
to outline my experience.
Perhaps someone has made the same experiences.

Basically I have an application, that uses the Axis2 Framework to contact a
web service. So it can be seen as kind of a web service client.

As I am working behind a companies proxy server, I added my proxy setting to
the startup of the program, as usual. 
This looks something like:

java -Dhttp.proxyHost=MyProxyhost -Dhttp.proxyPort=MyProxyPort
-Dhttp.nonProxyHosts=MyExcludedHosts gov.nist.registry.xdstest2.XdsTest $*

Funny thing, the program finished with the following stacktrace (only an
extract):

Transport error: 501 Error: Not Implemented
org.apache.axis2.AxisFault: Transport error: 501 Error: Not Implemented
at
org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:296)
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:371)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
at gov.nist.registry.common2.registry.Soap.soapCall(Soap.java:60)
at
gov.nist.registry.xdstest2.StoredQueryTransaction.runSQ(StoredQueryTransaction.java:99)
at
gov.nist.registry.xdstest2.StoredQueryTransaction.run(StoredQueryTransaction.java:41)
at gov.nist.registry.xdstest2.StepContext.run(StepContext.java:153)
at gov.nist.registry.xdstest2.PlanContext.run(PlanContext.java:138)
at gov.nist.registry.xdstest2.Xdstest2.runTest(Xdstest2.java:263)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:95)
at
org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:599)
at
groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1077)
at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:744)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:167)
at
gov.nist.registry.xdstest2.XdsTest$_run_closure6.doCall(XdsTest.groovy:353)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:95)
at
org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:599)
at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:252)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:740)
at groovy.lang.Closure.call(Closure.java:292)
at groovy.lang.Closure.call(Closure.java:305)
at
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:990)
at
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:967)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:51)
at
org.codehaus.groovy.runtime.metaclass.NewInstanceMetaMethod.invoke(NewInstanceMetaMethod.java:54)
at
org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:599)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:904)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:740)
at
org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:761)
at
org.co

Re: Existing Axis2 Webservice + Additional JSPs

2008-09-03 Thread StrongSteve

Thanks for your answer!

Anyway I must say, that it does not work!

I must admit, that I had the suspicion that it might not work right after
reading your post. Anyway I tried it, but without success.

>From my point of view, this approach can not work as the AxisServlet handles
all request directed to "/services/*". Therefore I am not able to access
JavaServerPages inside the WWW folder.

Or am I getting something wrong?

Thanks in Advance for your answer!

Greetings
Stefan


Deepal Jayasinghe wrote:
> 
> You can do that just adding a folder called "WWW" inside your service
> archive file. Then that will do everything for you
> with that your service archive will look like
> 
> myservice.aar
>   META-INF
>  services.xml
>   org
>  ...
>   WWW
>  index.jsp
> 
> 
> Thank you!
> Deepal
> 
> StrongSteve wrote:
>> Hi Everybody!
>>
>> I have developed a more or less complex Axis2 Webservice.
>>
>> My folder structure within Tomcat looks something like:
>>
>> http://www.nabble.com/file/p19289317/hierarchie.jpg 
>>
>> Now I must add some simple JSP-Pages on my server, that are able to use
>> some
>> of the business logic, that resides in the classes within my deployed
>> web-service. Theses classes are in the folder
>> "../DocumentRepositoryService/com/...".
>>
>> Can anyone be so kind to point out the steps required to achive this
>> goal?
>>
>> I already tried several approaches ranking from Tomcat config files, to
>> alterations in the axis2.xml. Sadly to say, without success. :(
>>
>> Thanks in Advance for both your time and your knowledge!
>>
>> Greetings
>> Stefan
>>   
> 
> -- 
> Thanks,
> Deepal
> 
> http://blogs.deepal.org/
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Existing-Axis2-Webservice-%2B-Additional-JSPs-tp19289317p19304247.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Existing Axis2 Webservice + Additional JSPs

2008-09-03 Thread StrongSteve

Hi Everybody!

I have developed a more or less complex Axis2 Webservice.

My folder structure within Tomcat looks something like:

http://www.nabble.com/file/p19289317/hierarchie.jpg 

Now I must add some simple JSP-Pages on my server, that are able to use some
of the business logic, that resides in the classes within my deployed
web-service. Theses classes are in the folder
"../DocumentRepositoryService/com/...".

Can anyone be so kind to point out the steps required to achive this goal?

I already tried several approaches ranking from Tomcat config files, to
alterations in the axis2.xml. Sadly to say, without success. :(

Thanks in Advance for both your time and your knowledge!

Greetings
Stefan
-- 
View this message in context: 
http://www.nabble.com/Existing-Axis2-Webservice-%2B-Additional-JSPs-tp19289317p19289317.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Re: Log Incoming/Outgoing SOAP Messages

2008-09-02 Thread StrongSteve

The SOAP Part would be enough.
Can you give my an example on how to achive this goal?

Thanks!
Stefan


Thilina Gunarathne wrote:
> 
> Also do u really need to log all the large attachments in your log file...
> I would recommend logging only the SOAP part..
> 
> thanks,
> Thilina
> 
> On Tue, Sep 2, 2008 at 7:07 AM, keith chapman
> <[EMAIL PROTECTED]>wrote:
> 
>> Oh this is because env.serialize will still build the axiom object model
>> for you.  env.serializeAndConsume can do the trick (serializes the
>> message
>> without building the object model) but the issue is that it will also
>> consume the stream. May be you can try this as a workaround.
>>
>> Have you enabled file caching on the server? you can do this by setting
>> the
>> following properties in the axis2.xml
>>
>> optional
>> true
>> work/mtom
>> 4000
>>
>> This will write the attachments which are large in size to the file
>> system.
>>
>>
>> Thanks,
>> Keith.
>>
>>
>> On Tue, Sep 2, 2008 at 4:08 PM, StrongSteve <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> I am not quite sure where the exception occurs, but your approach with
>>> env.serialize(out) does not work either... :(
>>>
>>>
>>>
>>> keith chapman wrote:
>>> >
>>> > Does it happen when you performSOAPEnvelope env =
>>> > arg0.getEnvelope(); or  env.toString(). Ithink it should be at the
>>> later
>>> > cause env.toString() would cause the whole message to be read into
>>> memory.
>>> > May be you can try env.serialize(out); instead of
>>> > out.write(env.toString());
>>> >
>>> > Thanks,
>>> > Keith.
>>> >
>>> > On Tue, Sep 2, 2008 at 3:31 PM, StrongSteve <[EMAIL PROTECTED]>
>>> wrote:
>>> >
>>> >>
>>> >> Hi Everybody!
>>> >>
>>> >> I have currently developed a simple Axis handler, that logs all
>>> >> incoming/outgoing messages to files on the local HDD.
>>> >>
>>> >> Here is my current code:
>>> >>
>>> >> @Override
>>> >>public InvocationResponse invoke(MessageContext arg0) throws
>>> >> AxisFault {
>>> >>
>>> >>logger.debug("entering invoke");
>>> >>
>>> >>SOAPEnvelope env = arg0.getEnvelope();
>>> >>
>>> >>String fileName = this.MESSAGE_LOGGING_DIR +
>>> >> this.FILE_PRAEFIX + new
>>> >> Date().getTime() +".xml";
>>> >>
>>> >>try {
>>> >>File msgFile = new File(fileName);
>>> >>FileWriter out = new FileWriter(msgFile);
>>> >>out.write(env.toString());
>>> >>out.close();
>>> >>} catch (IOException ioex) {
>>> >>logger.error(ioex.getMessage());
>>> >>}
>>> >>
>>> >>return InvocationResponse.CONTINUE;
>>> >>}
>>> >>
>>> >>
>>> >> Unfortunately this code fails as soon as I send attachments. In this
>>> >> case,
>>> >> the call "SOAPEnvelope env = arg0.getEnvelope();" fails with an
>>> >> OutOfMemory
>>> >> Exception as not the whole SOAPEnvelope can be read into the memory.
>>> >>
>>> >> Does anyone have a solution or a hint on how to achive this goal with
>>> a
>>> >> Streaming approach?
>>> >>
>>> >> Thanks in Advance for both your time and your knowledge!
>>> >>
>>> >> Greetings
>>> >> Stefan
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267334.html
>>> >> Sent from the Axis - User mailing list archive at Nabble.com.
>>> >>
>>> >>
>>> >> -
>>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > Keith Chapman
>>> > Senior Software Engineer
>>> > WSO2 Inc.
>>> > Oxygenating the Web Service Platform.
>>> > http://wso2.org/
>>> >
>>> > blog: http://www.keith-chapman.org
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267813.html
>>> Sent from the Axis - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>> --
>> Keith Chapman
>> Senior Software Engineer
>> WSO2 Inc.
>> Oxygenating the Web Service Platform.
>> http://wso2.org/
>>
>> blog: http://www.keith-chapman.org
>>
> 
> 
> 
> -- 
> Thilina Gunarathne - http://thilinag.blogspot.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19283273.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Re: Log Incoming/Outgoing SOAP Messages

2008-09-02 Thread StrongSteve

I am not quite sure where the exception occurs, but your approach with
env.serialize(out) does not work either... :(



keith chapman wrote:
> 
> Does it happen when you performSOAPEnvelope env =
> arg0.getEnvelope(); or  env.toString(). Ithink it should be at the later
> cause env.toString() would cause the whole message to be read into memory.
> May be you can try env.serialize(out); instead of
> out.write(env.toString());
> 
> Thanks,
> Keith.
> 
> On Tue, Sep 2, 2008 at 3:31 PM, StrongSteve <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hi Everybody!
>>
>> I have currently developed a simple Axis handler, that logs all
>> incoming/outgoing messages to files on the local HDD.
>>
>> Here is my current code:
>>
>> @Override
>>public InvocationResponse invoke(MessageContext arg0) throws
>> AxisFault {
>>
>>logger.debug("entering invoke");
>>
>>SOAPEnvelope env = arg0.getEnvelope();
>>
>>String fileName = this.MESSAGE_LOGGING_DIR +
>> this.FILE_PRAEFIX + new
>> Date().getTime() +".xml";
>>
>>try {
>>File msgFile = new File(fileName);
>>FileWriter out = new FileWriter(msgFile);
>>out.write(env.toString());
>>out.close();
>>} catch (IOException ioex) {
>>logger.error(ioex.getMessage());
>>}
>>
>>return InvocationResponse.CONTINUE;
>>}
>>
>>
>> Unfortunately this code fails as soon as I send attachments. In this
>> case,
>> the call "SOAPEnvelope env = arg0.getEnvelope();" fails with an
>> OutOfMemory
>> Exception as not the whole SOAPEnvelope can be read into the memory.
>>
>> Does anyone have a solution or a hint on how to achive this goal with a
>> Streaming approach?
>>
>> Thanks in Advance for both your time and your knowledge!
>>
>> Greetings
>> Stefan
>> --
>> View this message in context:
>> http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267334.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
> 
> blog: http://www.keith-chapman.org
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267813.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Log Incoming/Outgoing SOAP Messages

2008-09-02 Thread StrongSteve

Hi Everybody!

I have currently developed a simple Axis handler, that logs all
incoming/outgoing messages to files on the local HDD.

Here is my current code:

@Override
public InvocationResponse invoke(MessageContext arg0) throws AxisFault {

logger.debug("entering invoke");

SOAPEnvelope env = arg0.getEnvelope();   

String fileName = this.MESSAGE_LOGGING_DIR + this.FILE_PRAEFIX 
+ new
Date().getTime() +".xml";

try {
File msgFile = new File(fileName);
FileWriter out = new FileWriter(msgFile);
out.write(env.toString());
out.close();
} catch (IOException ioex) {
logger.error(ioex.getMessage());
}

return InvocationResponse.CONTINUE;
}


Unfortunately this code fails as soon as I send attachments. In this case,
the call "SOAPEnvelope env = arg0.getEnvelope();" fails with an OutOfMemory
Exception as not the whole SOAPEnvelope can be read into the memory.

Does anyone have a solution or a hint on how to achive this goal with a
Streaming approach?

Thanks in Advance for both your time and your knowledge!

Greetings
Stefan
-- 
View this message in context: 
http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267334.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Re: Axis 2 - SSL with Client Authentication

2008-08-27 Thread StrongSteve

SSL is set up correctly, but it is also set up to "clientAuth=true".
Therefore I need to import my client certificate in the browser, in order to
be able to complete the SSL Handshake with the Server.

Any ideas on how to do this?

Thanks!
Stefan


SGruverman wrote:
> 
> StrongSteve <[EMAIL PROTECTED]> wrote on 08/27/2008 10:06:57 AM:
>>
>> 1.) When browsing to the WSDL-File with Firefox, I can not see anything,
> as
>> I do not have a valid client certificate. I tried to import a
> certificate,
>> that I exported with the keytool from the client's .keystore, but it is
>> rejected as it is not a valid PK-12. Any hints?
> 
> If SSL is set up correctly, then browsing to the WSDL should prompt you to
> trust the SSL cert the first time you go to that server.
> I have only worked with JKS stores, but I don't think the type of store
> would affect this behavior.
> 
> __
> Steve Gruverman, Programmer
> IntelliCare, Inc. | A Medco Health Solutions Company
> 
> 500 Southborough Drive | South Portland ME 04106
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Axis-2---SSL-with-Client-Authentication-tp19180080p19194607.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Re: Axis 2 - SSL with Client Authentication

2008-08-27 Thread StrongSteve

I kinda seem to have solved problem 2.) by removing the part
http from the services.xml.

Is this the right way to do?



StrongSteve wrote:
> 
> Hi Everyone!
> 
> First of all, thanks for the quick answers.
> 
> I think now I am a step further, but I haven't quite reached the goal.
> 
> Thanks for the introduction on the client side, this is exactly what I am
> doing! ;)
> 
> On the server side I have two file:
> 
>- The .keystore contains my server certificate (key)
>- The .truststore contains the certificate (key) [This key comes from
> the client's .keystore]
> 
> I was missing the entry "clientAuth=true" in the Tomcat's server.xml.
> Thanks for the tip!
> 
> After changing this and restarting the Tomcat I have come accross two
> problems:
> 
> 1.) When browsing to the WSDL-File with Firefox, I can not see anything,
> as I do not have a valid client certificate. I tried to import a
> certificate, that I exported with the keytool from the client's .keystore,
> but it is rejected as it is not a valid PK-12. Any hints?
> 
> 2.) My client can connect to the server, and I think that everything is
> working - at least from the view of SSL. But the problem is that I get the
> following error message: "Exception in thread "main"
> org.apache.axis2.AxisFault: The service cannot be found for the endpoint
> reference (EPR) https://:8443/axis2/services/RepositoryService";
> 
> How can I configure this EPR in the services.xml?
> 
> Thanks in Advance!
> Stefan
> 
> 
> SGruverman wrote:
>> 
>> First, I haven't used any of the Axis2 HTTPS support you mentioned. I
>> don't
>> know if this is typical of Axis2 web services, but most references I've
>> seen to SSL use the facilities of the app server and javax.net.
>> 
>> Couple of questions to get started:
>>Is the "standard" SSL working (other than the client authentication)?
>>Does your Tomcat config include clientAuth="true"?
>>Does your Tomcat config include settings for keystorefile and
>>keystorepass as well as truststorefile and truststorepass?
>>On the server, the keystore contains the SSL certificate and the
>>truststore contains the certificate *of the Certificate Authority that
>>signed the certificate that the client is using for client
>>authentication.*
>>(I find this confusing - to keep it simple, I use the same keystore
>> for
>>both. Not a "best practice", I think).
>> 
>>Does your client System.setProperty() for javax.net.ssl.trustStore,
>>trustStorePassword, keyStore and keyStorePassword?
>>Here.  the keystore contains the SSL client authentication certificate
>>and the truststore contains the certificate *of the Certificate
>>Authority that signed the server SSL certificate*.
>> 
>> Another useful property to set is javax.net.debug - set it to "ssl" to
>> get
>> a bunch of SSL diagnostics.
>> 
>> I'm still pretty new to this stuff, so I'm not certain of this
>> information
>> (but it seems to work for us). Please jump in and correct me if I'm
>> wrong!
>> 
>> Anyway, I hope this helps.
>> 
>> - Steve
>> 
>> __
>> Steve Gruverman, Programmer
>> IntelliCare, Inc. | A Medco Health Solutions Company
>> 
>> 500 Southborough Drive | South Portland ME 04106
>> 
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Axis-2---SSL-with-Client-Authentication-tp19180080p19182082.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Re: Axis 2 - SSL with Client Authentication

2008-08-27 Thread StrongSteve

Hi Everyone!

First of all, thanks for the quick answers.

I think now I am a step further, but I haven't quite reached the goal.

Thanks for the introduction on the client side, this is exactly what I am
doing! ;)

On the server side I have two file:

   - The .keystore contains my server certificate (key)
   - The .truststore contains the certificate (key) [This key comes from the
client's .keystore]

I was missing the entry "clientAuth=true" in the Tomcat's server.xml. Thanks
for the tip!

After changing this and restarting the Tomcat I have come accross two
problems:

1.) When browsing to the WSDL-File with Firefox, I can not see anything, as
I do not have a valid client certificate. I tried to import a certificate,
that I exported with the keytool from the client's .keystore, but it is
rejected as it is not a valid PK-12. Any hints?

2.) My client can connect to the server, and I think that everything is
working - at least from the view of SSL. But the problem is that I get the
following error message: "Exception in thread "main"
org.apache.axis2.AxisFault: The service cannot be found for the endpoint
reference (EPR) https://:8443/axis2/services/RepositoryService";

How can I configure this EPR in the services.xml?

Thanks in Advance!
Stefan


SGruverman wrote:
> 
> First, I haven't used any of the Axis2 HTTPS support you mentioned. I
> don't
> know if this is typical of Axis2 web services, but most references I've
> seen to SSL use the facilities of the app server and javax.net.
> 
> Couple of questions to get started:
>Is the "standard" SSL working (other than the client authentication)?
>Does your Tomcat config include clientAuth="true"?
>Does your Tomcat config include settings for keystorefile and
>keystorepass as well as truststorefile and truststorepass?
>On the server, the keystore contains the SSL certificate and the
>truststore contains the certificate *of the Certificate Authority that
>signed the certificate that the client is using for client
>authentication.*
>(I find this confusing - to keep it simple, I use the same keystore for
>both. Not a "best practice", I think).
> 
>Does your client System.setProperty() for javax.net.ssl.trustStore,
>trustStorePassword, keyStore and keyStorePassword?
>Here.  the keystore contains the SSL client authentication certificate
>and the truststore contains the certificate *of the Certificate
>Authority that signed the server SSL certificate*.
> 
> Another useful property to set is javax.net.debug - set it to "ssl" to get
> a bunch of SSL diagnostics.
> 
> I'm still pretty new to this stuff, so I'm not certain of this information
> (but it seems to work for us). Please jump in and correct me if I'm wrong!
> 
> Anyway, I hope this helps.
> 
> - Steve
> 
> __
> Steve Gruverman, Programmer
> IntelliCare, Inc. | A Medco Health Solutions Company
> 
> 500 Southborough Drive | South Portland ME 04106
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Axis-2---SSL-with-Client-Authentication-tp19180080p19181697.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Axis 2 - SSL with Client Authentication

2008-08-27 Thread StrongSteve

Hi Everybody!

I am really stuck with the problem below, but I am looking forward that
someone can help me! ;)
(Or give me at least a useful hint on were to search for more
information...)

Basically I have a running webservice based on AXIS 2. 

Now I have to make it secure. Be secure I mean the following to things:
   - Transport via SSL (Https)
   - Client Authentication using a Client Certificate

Basically all messages have to be transferred over https and only "trusted"
clients - whoses certificates reside in the server's .truststore - shall be
worked with.

After one and a half day of browsing the internet, I have no really come
across a solution.

What I did till now is the following:
   - Enable https in Tomcat 6 after generating a server key
   - If I import this server key into the client's .truststore I can call me
webservice by passing a https in the existing endpointreference

The problem I am really stuck with is the part with the client certificates
and I have nearly no clue on which steps are to be performed... :(

I already tried uncommenting the following block in the Axis2.xml, as I
think that this is the part that I need, but I just results in a
NullPointerException when starting my tomcat.

 


 


[INFO]
java.lang.NullPointerException
at
org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener.getSSLContext(HttpCoreNIOSSLListener.java:9
6)
at
org.apache.axis2.transport.nhttp.HttpCoreNIOListener.init(HttpCoreNIOListener.java:151)
at
org.apache.axis2.engine.ListenerManager.start(ListenerManager.java:125)
at
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:442)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:516)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Thanks in Advance for both your time and your knowledge!

Greetings
Stefan
-- 
View this message in context: 
http://www.nabble.com/Axis-2---SSL-with-Client-Authentication-tp19180080p19180080.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Re: Axis2 - Handler to log all messages without attachments

2008-08-12 Thread StrongSteve

Like this:


 Attachments attachments = arg0.getAttachmentMap();
 String[] attachmentIds = attachments.getAllContentIDs();
 
 for (int i = 0; i < attachmentIds.length; i++) {
 arg0.removeAttachment(attachmentIds[i]);
 }

 SOAPEnvelope env = arg0.getEnvelope();
 System.out.println(env.toString());




Samisa Abeysinghe-2 wrote:
> 
> StrongSteve wrote:
>> Hi!
>>
>> Thanks for your quick reply.
>> I already know how to get to the attachments, but what I want to do, is
>> log
>> everything EXCEPT the attachments! ;)
>>
>> Removing them from the message, does not work. I do not know why... :(
>>   
> 
> How did you remove them?
> 
> Samisa...
> 
>> And hints for me?
>>
>> Thanks in Advance!
>>
>> Greetings
>> Stefan
>>
>>
>> Thilina Gunarathne wrote:
>>   
>>> Make sure you try the second method first :)..
>>>
>>> On Tue, Aug 12, 2008 at 12:01 AM, Thilina Gunarathne
>>> <[EMAIL PROTECTED]>wrote:
>>>
>>> 
>>>> You can try traversing the whole envelope looking for 
>>>> elements and then detach those elements from the tree.. But doing this
>>>> will
>>>> cause the attachment information in the SOAP envelope to be lost and ur
>>>> services may not function properly.
>>>>
>>>> One other thing you can try is to access the SOAP part data handler and
>>>> log
>>>> it's contents. You can do that by getting the soap part part content id
>>>> using the Attachments.getSOAPPartContentID() and then using
>>>> Attachments.getDataHandler(SOAPPartContentID) to get access to the SOAP
>>>> part
>>>> DataHandler. Then just write the contents of the DataHandler to the
>>>> output
>>>> stream.
>>>>
>>>> You can get access to the Attachments using msgCntx.getAttachmentMap()
>>>> method.
>>>>
>>>> thanks,
>>>> Thilina
>>>>
>>>>
>>>> On Mon, Aug 11, 2008 at 10:51 PM, StrongSteve
>>>> <[EMAIL PROTECTED]>wrote:
>>>>
>>>>   
>>>>> Hi Everybody!
>>>>>
>>>>> I am currently developing an Axis2 Handler that logs all SOAP Messages
>>>>> targeted at my server into separate files.
>>>>> The problem is, that many of these SOAP Messages contain files (binary
>>>>> MTOM), which I do not want to log of course, as they just blow up the
>>>>> file
>>>>> size. (Instead of the binary attachment transmission I want to add a
>>>>> simple
>>>>> String like  or something like this.
>>>>>
>>>>> I already have everything working, except the attachment handling.
>>>>> Here
>>>>> is
>>>>> my code till now. (I have nothing with files or so on, I test it with
>>>>> plain
>>>>> System.out.printlns)
>>>>>
>>>>> public class LoggingHandler extends AbstractHandler {
>>>>>
>>>>>public InvocationResponse invoke(MessageContext msgCtx) throws
>>>>> AxisFault {
>>>>>
>>>>>SOAPEnvelope env = msgCtx.getEnvelope();
>>>>>
>>>>>System.out.println(env.toString());
>>>>>
>>>>>return InvocationResponse.CONTINUE;
>>>>>
>>>>>}
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>> So can anyone please help me with extracting the attachments?
>>>>> I would be very glad! ;)
>>>>>
>>>>> (Removing the Attachments with msgCtx.removeAttachment(AttachmentID),
>>>>> does
>>>>> not work!!!)
>>>>>
>>>>> Thanks in Advance for both your time and your knowledge!
>>>>>
>>>>> Greeting
>>>>> Stefan
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Axis2---Handler-to-log-all-messages-without-attachments-tp18938449p18938449.html
>>>>> Sent from the Axis - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> -
>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>
>>>>>
>>>>> 
>>>> --
>>>> Thilina Gunarathne - http://thilinag.blogspot.com
>>>>
>>>>   
>>>
>>> -- 
>>> Thilina Gunarathne - http://thilinag.blogspot.com
>>>
>>>
>>> 
>>
>>   
> 
> 
> -- 
> Samisa Abeysinghe
> 
> http://people.apache.org/~samisa/
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Axis2---Handler-to-log-all-messages-without-attachments-tp18938449p18945302.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Re: Axis2 - Handler to log all messages without attachments

2008-08-12 Thread StrongSteve

Hi!

Thanks for your quick reply.
I already know how to get to the attachments, but what I want to do, is log
everything EXCEPT the attachments! ;)

Removing them from the message, does not work. I do not know why... :(

And hints for me?

Thanks in Advance!

Greetings
Stefan


Thilina Gunarathne wrote:
> 
> Make sure you try the second method first :)..
> 
> On Tue, Aug 12, 2008 at 12:01 AM, Thilina Gunarathne
> <[EMAIL PROTECTED]>wrote:
> 
>> You can try traversing the whole envelope looking for 
>> elements and then detach those elements from the tree.. But doing this
>> will
>> cause the attachment information in the SOAP envelope to be lost and ur
>> services may not function properly.
>>
>> One other thing you can try is to access the SOAP part data handler and
>> log
>> it's contents. You can do that by getting the soap part part content id
>> using the Attachments.getSOAPPartContentID() and then using
>> Attachments.getDataHandler(SOAPPartContentID) to get access to the SOAP
>> part
>> DataHandler. Then just write the contents of the DataHandler to the
>> output
>> stream.
>>
>> You can get access to the Attachments using msgCntx.getAttachmentMap()
>> method.
>>
>> thanks,
>> Thilina
>>
>>
>> On Mon, Aug 11, 2008 at 10:51 PM, StrongSteve
>> <[EMAIL PROTECTED]>wrote:
>>
>>>
>>> Hi Everybody!
>>>
>>> I am currently developing an Axis2 Handler that logs all SOAP Messages
>>> targeted at my server into separate files.
>>> The problem is, that many of these SOAP Messages contain files (binary
>>> MTOM), which I do not want to log of course, as they just blow up the
>>> file
>>> size. (Instead of the binary attachment transmission I want to add a
>>> simple
>>> String like  or something like this.
>>>
>>> I already have everything working, except the attachment handling. Here
>>> is
>>> my code till now. (I have nothing with files or so on, I test it with
>>> plain
>>> System.out.printlns)
>>>
>>> public class LoggingHandler extends AbstractHandler {
>>>
>>>public InvocationResponse invoke(MessageContext msgCtx) throws
>>> AxisFault {
>>>
>>>SOAPEnvelope env = msgCtx.getEnvelope();
>>>
>>>System.out.println(env.toString());
>>>
>>>return InvocationResponse.CONTINUE;
>>>
>>>}
>>>
>>> }
>>>
>>>
>>>
>>> So can anyone please help me with extracting the attachments?
>>> I would be very glad! ;)
>>>
>>> (Removing the Attachments with msgCtx.removeAttachment(AttachmentID),
>>> does
>>> not work!!!)
>>>
>>> Thanks in Advance for both your time and your knowledge!
>>>
>>> Greeting
>>> Stefan
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Axis2---Handler-to-log-all-messages-without-attachments-tp18938449p18938449.html
>>> Sent from the Axis - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>> --
>> Thilina Gunarathne - http://thilinag.blogspot.com
>>
> 
> 
> 
> -- 
> Thilina Gunarathne - http://thilinag.blogspot.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Axis2---Handler-to-log-all-messages-without-attachments-tp18938449p18941523.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Axis2 - Handler to log all messages without attachments

2008-08-11 Thread StrongSteve

Hi Everybody!

I am currently developing an Axis2 Handler that logs all SOAP Messages
targeted at my server into separate files.
The problem is, that many of these SOAP Messages contain files (binary
MTOM), which I do not want to log of course, as they just blow up the file
size. (Instead of the binary attachment transmission I want to add a simple
String like  or something like this.

I already have everything working, except the attachment handling. Here is
my code till now. (I have nothing with files or so on, I test it with plain
System.out.printlns)

public class LoggingHandler extends AbstractHandler {
 
public InvocationResponse invoke(MessageContext msgCtx) throws 
AxisFault {

SOAPEnvelope env = msgCtx.getEnvelope();

System.out.println(env.toString());
   
return InvocationResponse.CONTINUE; 

}
 
}



So can anyone please help me with extracting the attachments?
I would be very glad! ;)

(Removing the Attachments with msgCtx.removeAttachment(AttachmentID), does
not work!!!)

Thanks in Advance for both your time and your knowledge!

Greeting
Stefan
-- 
View this message in context: 
http://www.nabble.com/Axis2---Handler-to-log-all-messages-without-attachments-tp18938449p18938449.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Axis 2.0 - Logging with log4j

2008-08-11 Thread StrongSteve

Hi Everybody!

I have stumbled across a big problem.
Currently I am developing several web services (mostly test projects).

What I want to do is have a seperate log4.properties file (XML or File) for
each webservice and a configuration, so that every call to Logger logger =
Logger.getLogger(SomeClass.class) gets the logger, defined in the property
file of this very webservice.

Till now I have come across the problem, that the log4j.property file,
provided by Axis2, defines my logger and loading a new configuration for one
service, overwrites this file.

Can anyone please help?

Thanks in Advance for both your time and your knowledge!

Greetings
Stefan
-- 
View this message in context: 
http://www.nabble.com/Axis-2.0---Logging-with-log4j-tp18927406p18927406.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Re: Webservice (HTTP-GET, Image Transfer) Problem

2006-03-26 Thread StrongSteve

No one?

Please help!
--
View this message in context: 
http://www.nabble.com/Webservice-%28HTTP-GET%2C-Image-Transfer%29-Problem-t1335359.html#a3595106
Sent from the Axis - User forum at Nabble.com.



Webservice (HTTP-GET, Image Transfer) Problem

2006-03-24 Thread StrongSteve

Hi everybody!

I have a SOAP Webservice for retrieving images from a database.
To put in a nutshell, you call a webservice-method using an image-ID and you
get the found picture returned, using SOAP.

Now I want to provide the same thing using not SOAP but HTTP-GET.

However I think Axis is not capable to do this. 
When I write a appropriate WSDL and run WSDL2JAVA to generate the server
stub, it remain empty...

So I would need some help, for example a sample webservice, that returns
images via HTTP-GET, perhaps a tutorial from the web. 
I am sorry to say, but I did not find anything.

Can someone help me? I am really stuck!

Thanks in Advance!
Stef

--
View this message in context: 
http://www.nabble.com/Webservice-%28HTTP-GET%2C-Image-Transfer%29-Problem-t1335359.html#a3567989
Sent from the Axis - User forum at Nabble.com.