Problem with secure connections via https

2008-04-03 Thread Alpin, Luba
You are right! I do it right now.

I have a problem with secure connections via https, 

I tried JaxWsServerFactoryBean/JaxWsProxyFactoryBean and 
ServerFactoryBean/ClientProxyFactoryBean result the same - service
publishing succeeded, but client methods call fails.
I got different exceptions depends on my configuration. Current my
sample for instance used Interceptor action -
WSHandlerConstants.USERNAME_TOKEN and failed with following exception:
(application provided null or empty password) Next to the exception you
can see my client configuration code, with password and user name
supplied. ('configClientInterceptors' method) and my client creation
code ('TestJaxWsProxyFactoryBean' method)
I haven't any working sample to start with to use https.
Can somebody help me please.
Regards,
Luba.

org.apache.cxf.binding.soap.SoapFault: Security processing failed.
at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
OutInterceptor.java:184)
at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
OutInterceptor.java:43)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:220)
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at
org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
at $Proxy15.sayHi(Unknown Source)
at
cxf_client.TestClient.TestClientProxyFactoryBean(TestClient.java:557)
at cxf_client.TestClient.main(TestClient.java:104)
Caused by: org.apache.ws.security.WSSecurityException: WSHandler:
application provided null or empty password
at
org.apache.ws.security.handler.WSHandler.getPassword(WSHandler.java:638)
at
org.apache.ws.security.action.UsernameTokenAction.execute(UsernameTokenA
ction.java:31)
at
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:1
92)
at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
OutInterceptor.java:169)
... 9 more
Hit uncaught exception org.apache.cxf.binding.soap.SoapFault

private void configClientInterceptors(Client client) {
String name = myname;
String password = mypassword;
String passwordKey = password;
String actions = WSHandlerConstants.USERNAME_TOKEN;
//in
WSS4JInInterceptor wsIn = new WSS4JInInterceptor();
wsIn.setProperty(WSHandlerConstants.ACTION, actions);
wsIn.setProperty(WSHandlerConstants.USER, name);
wsIn.setProperty(passwordKey, password);
client.getInInterceptors().add(wsIn);
client.getInInterceptors().add(new SAAJInInterceptor());
//out
WSS4JOutInterceptor wsOut = new WSS4JOutInterceptor();
wsOut.setProperty(WSHandlerConstants.ACTION, actions);
wsOut.setProperty(WSHandlerConstants.USER, name);
wsOut.setProperty(passwordKey, password);

client.getOutInterceptors().add(wsOut);
client.getOutInterceptors().add(new SAAJOutInterceptor());
}

public void TestJaxWsProxyFactoryBean() {
JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
Client client;
proxyFac.setServiceClass(HelloWorld.class);
proxyFac.setAddress(ADDRESS + /HelloWorld);

HelloWorld echo = (HelloWorld) proxyFac.create();

client = ClientProxy.getClient(echo);
HTTPConduit httpConduit = (HTTPConduit) client.getConduit(); 
TLSClientParameters tlsParams = new TLSClientParameters();
tlsParams.setSecureSocketProtocol(SSL); 
httpConduit.setTlsClientParameters(tlsParams); 

HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();

httpClientPolicy.setConnectionTimeout(36000);
httpClientPolicy.setAllowChunking(false); 
httpConduit.getClient().setAutoRedirect(true); 
httpConduit.setClient(httpClientPolicy); 
configClientInterceptors(client);
echo.sayHi(Luba);
}






-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 02, 2008 6:55 PM
To: cxf-user@incubator.apache.org
Subject: Re: Problem deserializing pojos (fields not initialized)

Why don't you send in a new email message with a new subject line that
describes exactly what you did and what didn't work. This thread was
about
the very specific question of the new configuration system for Aegis.

On Wed, Apr 2, 2008 at 10:33 AM, Alpin, Luba [EMAIL PROTECTED] wrote:

 I need use secure SOAP.
 I succeeded with publish my services on
 https://localhost:8080/ServiceName;
 But client methods call fails.
 Thanks for your time.
 Regards,
 Luba.



 -Original Message-
 From: Benson Margulies [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 02, 2008 5:27 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: Problem

RE: Problem with secure connections via https

2008-04-03 Thread Alpin, Luba
The reason that I selected frontend is:
I don't start from the zero point, I have 64 services with hundreds
methods and I didn't use *.wsdl files creation with other frameworks
that I used in past (GLUE(WebMethods) and XFire), so start create 64
wsdls contains hundreds operations description looks me crazy. CXF (at
least frontends) spend much more memory for publishing and so hard for
SSL configuration - that is my first impression. I would like it will be
by my mistake.
Regards,
Luba.
  

-Original Message-
From: Glen Mazza [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 03, 2008 3:13 PM
To: cxf-user@incubator.apache.org
Subject: Re: Problem with secure connections via https

I only know the wsdl2java way of doing this, and Luba in past has not
desired to go this route.  As I've said earlier, I don't think SSL with
the simple front end is a robust design that should be taught to
users.  

[1] shows how to create a wsdl2java-based web service client with a
cxf.xml file (whose contents are not relevant for SSL); the example at
the top of [2] gives a CXF.xml file that can be used at the client
(Although just looking at it, I don't think that cxf.xml is correct
because nowhere is it declaring SSL to be the protocol.  If no one else
does, I'll take a look at it.  Per Olsen's blog entry referenced at the
top of [2] gives a better example of a starter cxf.xml configuration
file for SSL.)

Glen

[1] http://www.jroller.com/gmazza/date/20070817
[2]
http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-sup
port.html
 

Am Donnerstag, den 03.04.2008, 07:35 -0400 schrieb Benson Margulies:
 I'm not very useful, personally, on https, hopefully Glen or someone
will
 wade in now that you've given us a full picture.
 
 On Thu, Apr 3, 2008 at 5:52 AM, Alpin, Luba [EMAIL PROTECTED]
wrote:
 
  You are right! I do it right now.
 
  I have a problem with secure connections via https,
 
  I tried JaxWsServerFactoryBean/JaxWsProxyFactoryBean and
  ServerFactoryBean/ClientProxyFactoryBean result the same - service
  publishing succeeded, but client methods call fails.
  I got different exceptions depends on my configuration. Current my
  sample for instance used Interceptor action -
  WSHandlerConstants.USERNAME_TOKEN and failed with following
exception:
  (application provided null or empty password) Next to the exception
you
  can see my client configuration code, with password and user name
  supplied. ('configClientInterceptors' method) and my client creation
  code ('TestJaxWsProxyFactoryBean' method)
  I haven't any working sample to start with to use https.
  Can somebody help me please.
  Regards,
  Luba.
 
  org.apache.cxf.binding.soap.SoapFault: Security processing failed.
 at
 
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
  OutInterceptor.java:184)
 at
 
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
  OutInterceptor.java:43)
 at
 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
  hain.java:220)
 at
  org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
 at
  org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
 at
  org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
 at
  org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
 at $Proxy15.sayHi(Unknown Source)
 at
 
cxf_client.TestClient.TestClientProxyFactoryBean(TestClient.java:557)
 at cxf_client.TestClient.main(TestClient.java:104)
  Caused by: org.apache.ws.security.WSSecurityException: WSHandler:
  application provided null or empty password
 at
 
org.apache.ws.security.handler.WSHandler.getPassword(WSHandler.java:638)
 at
 
org.apache.ws.security.action.UsernameTokenAction.execute(UsernameTokenA
  ction.java:31)
 at
 
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:1
  92)
 at
 
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
  OutInterceptor.java:169)
 ... 9 more
  Hit uncaught exception org.apache.cxf.binding.soap.SoapFault
 
 private void configClientInterceptors(Client client) {
 String name = myname;
 String password = mypassword;
 String passwordKey = password;
 String actions = WSHandlerConstants.USERNAME_TOKEN;
  //in
 WSS4JInInterceptor wsIn = new WSS4JInInterceptor();
 wsIn.setProperty(WSHandlerConstants.ACTION, actions);
 wsIn.setProperty(WSHandlerConstants.USER, name);
 wsIn.setProperty(passwordKey, password);
 client.getInInterceptors().add(wsIn);
 client.getInInterceptors().add(new SAAJInInterceptor());
  //out
 WSS4JOutInterceptor wsOut = new WSS4JOutInterceptor();
 wsOut.setProperty(WSHandlerConstants.ACTION, actions);
 wsOut.setProperty(WSHandlerConstants.USER, name);
 wsOut.setProperty(passwordKey, password

RE: Problem deserializing pojos (fields not initialized)

2008-04-02 Thread Alpin, Luba
I really would like to help, but I don't know I don't use it.
Regards,
Luba.


-Original Message-
From: Valerio Schiavoni [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 02, 2008 4:02 PM
To: cxf-user@incubator.apache.org
Subject: Re: Problem deserializing pojos (fields not initialized)

Hello ,

your code works fine, and infact my tests are now green-like-grass.

The only minor issue is that:

AegisDatabinding.WRITE_XSI_TYPE_KEY

is deprecated in the 2.1-SNAPSHOT release I've been using.

What should I use instead ?

On Tue, Apr 1, 2008 at 2:38 PM, Alpin, Luba [EMAIL PROTECTED] wrote:

 Following works good:

 Server:
 ---
 ServerFactoryBean  svrFactory = new ServerFactoryBean();
HashMapString, Object props = new HashMapString, Object();
props.put(AegisDatabinding.WRITE_XSI_TYPE_KEY, true);
ArrayListString l = new ArrayListString();
l.add(YourCustomClassName.class.getName());
props.put(AegisDatabinding.OVERRIDE_TYPES_KEY, l);

svrFactory.setServiceClass(InterfaceClassName.class);
svrFactory.setAddress(address);
svrFactory.setServiceBean(InterfaceImpl);
svrFactory.getServiceFactory().setDataBinding(new
 AegisDatabinding());
svrFactory.setProperties(props);
svrFactory.getServiceFactory().setProperties(props);
svrFactory.create();

 Client (not dynamic):
 -
 MapString, Object props = new HashMapString, Object();
 props.put(AegisDatabinding.WRITE_XSI_TYPE_KEY,
 Boolean.TRUE);
 //props.put(AegisDatabinding.READ_XSI_TYPE_KEY,
 false);
 ListString l = new ArrayListString();
 l.add(YourCustomClassName.class.getName());
 props.put(AegisDatabinding.OVERRIDE_TYPES_KEY, l);
ClientProxyFactoryBean factory = new
 ClientProxyFactoryBean();
factory.setProperties(props);
factory.getServiceFactory().setProperties(props);
factory.setServiceClass(InterfaceClassName.class);
factory.setAddress(address);
factory.getServiceFactory().setDataBinding(new
 AegisDatabinding());

 InterfaceClassName client = factory.create();

Object o = client.yourMethod();




 -Original Message-
 From: Valerio Schiavoni [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2008 2:43 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: Problem deserializing pojos (fields not initialized)

 ehm..i forgot to had copy/paste this line to the example code
showcasing
 the
 problem:

 wsServerFactoryBean.getServiceFactory().setDataBinding(new
 AegisDatabinding());


 so: same error as before..


 --
 http://www.linkedin.com/in/vschiavoni
 http://jroller.com/vschiavoni




-- 
http://www.linkedin.com/in/vschiavoni
http://jroller.com/vschiavoni


RE: Problem deserializing pojos (fields not initialized)

2008-04-02 Thread Alpin, Luba
Thanks,
I need help to run it on https.
Regards,
Luba. 

-Original Message-
From: Valerio Schiavoni [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 02, 2008 5:03 PM
To: cxf-user@incubator.apache.org
Subject: Re: Problem deserializing pojos (fields not initialized)

It works fine

On Wed, Apr 2, 2008 at 3:06 PM, Benson Margulies [EMAIL PROTECTED]
wrote:

 Create an AegisContext, set the flag in there, push it into the
 AegisDatabinding.


For the curious ones, here's the code for the client (server is the
same):

clientProxyfactoryBean = new ClientProxyFactoryBean();
clientProxyfactoryBean.setServiceClass(clazz);
clientProxyfactoryBean.setAddress(address);
final AegisDatabinding aegisDatabinding = new
AegisDatabinding();
AegisContext aegisCtx = new AegisContext();
aegisCtx.setReadXsiTypes(true);
aegisDatabinding.setAegisContext(aegisCtx);
clientProxyfactoryBean.getServiceFactory().setDataBinding(
aegisDatabinding);

-- 
http://www.linkedin.com/in/vschiavoni
http://jroller.com/vschiavoni


RE: Problem deserializing pojos (fields not initialized)

2008-04-02 Thread Alpin, Luba
I need use secure SOAP.
I succeeded with publish my services on
https://localhost:8080/ServiceName;
But client methods call fails.
Thanks for your time.
Regards,
Luba.



-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 02, 2008 5:27 PM
To: cxf-user@incubator.apache.org
Subject: Re: Problem deserializing pojos (fields not initialized)

I don't see what https has to do with this.


RE: Problem deserializing pojos (fields not initialized)

2008-04-01 Thread Alpin, Luba
Following works good:

Server:
---
ServerFactoryBean  svrFactory = new ServerFactoryBean();
HashMapString, Object props = new HashMapString, Object();
props.put(AegisDatabinding.WRITE_XSI_TYPE_KEY, true);
ArrayListString l = new ArrayListString();
l.add(YourCustomClassName.class.getName());
props.put(AegisDatabinding.OVERRIDE_TYPES_KEY, l);

svrFactory.setServiceClass(InterfaceClassName.class);
svrFactory.setAddress(address);
svrFactory.setServiceBean(InterfaceImpl);
svrFactory.getServiceFactory().setDataBinding(new
AegisDatabinding());
svrFactory.setProperties(props);
svrFactory.getServiceFactory().setProperties(props);
svrFactory.create();

Client (not dynamic):
-
MapString, Object props = new HashMapString, Object();
 props.put(AegisDatabinding.WRITE_XSI_TYPE_KEY,
Boolean.TRUE);
 //props.put(AegisDatabinding.READ_XSI_TYPE_KEY,
false);
 ListString l = new ArrayListString();
 l.add(YourCustomClassName.class.getName());
 props.put(AegisDatabinding.OVERRIDE_TYPES_KEY, l);
ClientProxyFactoryBean factory = new
ClientProxyFactoryBean();
factory.setProperties(props);
factory.getServiceFactory().setProperties(props);
factory.setServiceClass(InterfaceClassName.class);
factory.setAddress(address);
factory.getServiceFactory().setDataBinding(new
AegisDatabinding());

 InterfaceClassName client = factory.create();

Object o = client.yourMethod();




-Original Message-
From: Valerio Schiavoni [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 01, 2008 2:43 PM
To: cxf-user@incubator.apache.org
Subject: Re: Problem deserializing pojos (fields not initialized)

ehm..i forgot to had copy/paste this line to the example code showcasing
the
problem:

wsServerFactoryBean.getServiceFactory().setDataBinding(new
AegisDatabinding());


so: same error as before..


-- 
http://www.linkedin.com/in/vschiavoni
http://jroller.com/vschiavoni


CXF via https - Client can't send message ( simple frontend java configuration ServerFactoryBean/ClientProxyFactoryBean)

2008-04-01 Thread Alpin, Luba
I need a help with client side.
In 'apache-cxf-2.0.5-incubator\samples' directory doesn't exist sample
of using https with configuration of simple frontend. And existing
sample I can't do working.
Please help me with working example.
Regards,
Luba.


RE: Client can't communicate with CXE Server when using SSl (used ServerFactoryBean/ClientProxyFactoryBean) jetty container, java configuration

2008-03-30 Thread Alpin, Luba
 org.apache.cxf.interceptor.Fault

-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 29, 2008 12:02 AM
To: cxf-user@incubator.apache.org
Cc: Alpin, Luba
Subject: Re: Client can't communicate with CXE Server when using SSl
(used ServerFactoryBean/ClientProxyFactoryBean) jetty container, java
configuration



Looking at the cipher suites, it looks like only the export grade suites

are being selected (thus, none of the 128bit suites).  The service may 
be requiring one of those.   You could configure the cipher suites on 
the client to add in all the other suites.

The other option would be to test it with the 2.0.5 build.
http://people.apache.org/~dkulp/stage_cxf/2.0.5-incubator/
2.0.5 sets up a much more sensible set of ciphers.

Dan



On Thursday 27 March 2008, Alpin, Luba wrote:
 Any help will be very appreciated.

 This is an exception:

 Mar 27, 2008 11:28:21 AM org.apache.cxf.transport.https.SSLUtils
 getCiphersuites

 INFO: The cipher suites have not been configured, falling back to
 cipher suite filters.

 Mar 27, 2008 11:28:21 AM org.apache.cxf.transport.https.SSLUtils
 getCiphersuites

 INFO: The cipher suite filters have not been configured, falling back
 to default filters.

 Mar 27, 2008 11:28:21 AM org.apache.cxf.transport.https.SSLUtils
 getCiphersFromList

 INFO: The cipher suites have been set to SSL_RSA_WITH_DES_CBC_SHA,
 SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA,
 SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA,
 SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,
 SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA, SSL_RSA_WITH_NULL_MD5,
 SSL_RSA_WITH_NULL_SHA, SSL_DH_anon_WITH_DES_CBC_SHA,
 SSL_DH_anon_EXPORT_WITH_RC4_40_MD5,
 SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA, TLS_KRB5_WITH_DES_CBC_SHA,
 TLS_KRB5_WITH_DES_CBC_MD5, TLS_KRB5_EXPORT_WITH_RC4_40_SHA,
 TLS_KRB5_EXPORT_WITH_RC4_40_MD5, TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA,
 TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5.

 Mar 27, 2008 11:28:21 AM org.apache.cxf.transport.http.HTTPConduit
 prepare

 INFO: AutoRedirect is turned on.

 Mar 27, 2008 11:28:25 AM org.apache.cxf.phase.PhaseInterceptorChain
 doIntercept

 INFO: Interceptor has thrown exception, unwinding now

 org.apache.cxf.interceptor.Fault: Could not send Message.

 at
 org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndin
gI nterceptor.handleMessage(MessageSenderInterceptor.java:64)

 at
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
rC hain.java:208)

 at
 org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)

 at
 org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)

 at
 org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)

 at
 org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)

 at $Proxy15.sayHi1(Unknown Source)

 at cxf_client.TestClient.testSSL(TestClient.java:677)

 at cxf_client.TestClient.main(TestClient.java:131)

 Caused by: java.io.IOException: Not Found

 at
 org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRe
sp onse(HTTPConduit.java:1888)

 at
 org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HT
TP Conduit.java:1791)

 at
 org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66
)

 at
 org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)

 at
 org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndin
gI nterceptor.handleMessage(MessageSenderInterceptor.java:62)

 ... 8 more

 Hit uncaught exception org.apache.cxf.interceptor.Fault



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog


RE: HTTPS and CXF Protocol mismatch: engine's protocol is http, the url protocol is https

2008-03-27 Thread Alpin, Luba
Thanks for replaying!

The same is that we can't use https with client, but seems that I have
different problem. Does it tell you what it is?
Regards,
Luba.

INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Connection refused: connect
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(
AbstractOutDatabindingInterceptor.java:75)
at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInter
ceptor.java:68)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:208)
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at
org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
at $Proxy15.sayHi(Unknown Source)
at
cxf_client.TestFromSSLClientExample.TestClient(TestFromSSLClientExample.
java:73)
at
cxf_client.TestFromSSLClientExample.main(TestFromSSLClientExample.java:1
7)
Caused by: com.ctc.wstx.exc.WstxIOException: Connection refused: connect
at
com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(
AbstractOutDatabindingInterceptor.java:73)
... 9 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:507)
at sun.net.NetworkClient.doConnect(NetworkClient.java:152)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
at
sun.net.www.protocol.https.HttpsClient.init(HttpsClient.java:280)
at
sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:337)
at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttp
Client(AbstractDelegateHttpsURLConnection.java:176)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnecti
on.java:744)
at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Ab
stractDelegateHttpsURLConnection.java:162)
at
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConne
ction.java:836)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsU
RLConnectionImpl.java:230)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHead
ersTrustCaching(HTTPConduit.java:1766)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWri
te(HTTPConduit.java:1734)
at
org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutpu
tStream.java:42)
at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:96)
at
com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
at
com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311)
... 10 more
Hit uncaught exception org.apache.cxf.interceptor.Fault

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 27, 2008 4:56 PM
To: cxf-user@incubator.apache.org
Subject: Re: HTTPS and CXF Protocol mismatch: engine's protocol is http,
the url protocol is https

Dear Alpin Luba (I don't know what your name is sorry),
I wish I could help you!

Unfortunately I think I have understood the problem but I don't know 
how to solve it:
faultCode=PARSER_ERROR: Problem parsing 'https://localhost:
9000/helloWorld?wsdl'.: javax.net.ssl.SSLHandshakeException: sun.
security.validator.ValidatorException: PKIX path building failed: sun.
security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target

As far as i know, this exception is raised because I am using a self 
made cert (see: http://blogs.sun.
com/andreas/entry/no_more_unable_to_find); I followed the instructions 
in this website (basically add the server cert to your keystore) 
without success. 
I don't know what to do.

Suggestions?
Bye



__

Voce Senza Limiti: chiama in tutta Italia a 0 cent. SOLO 9,90 EURO AL
MESE fino al 27/03/08!
http://abbonati.tiscali.it/promo/vocesenzalimiti_2603/



How I can set 'Home' or 'Root' or 'Docbase' directory?

2008-03-24 Thread Alpin, Luba
Hi CXF-User-List,
I need your help with my three questions, please HELP!

1. I want to publish 68 services using ServerFactoryBean I create 68
instances ServerFactoryBean - one for each service, is it correct usage
of ServerFactoryBean? After 34 services I get OutOfMemory exception and
this enforces me increase memory to -Xmx128m , while XFire enable do it
with a default 64.

2. I want create webserver root directory to store files for downloading
client.
With XFire this is root directory located in root of Jetty server. How I
do it with CXF? Do I need create Jetty server and start it additional to
calling create method for each ServerFactoryBean instance?

3. Https? Please link to example.

Thanks for help.
Luba Alpin.


RE: How I can set 'Home' or 'Root' or 'Docbase' directory?

2008-03-24 Thread Alpin, Luba
Hi Glen Mazza!
Thank you for replay!
I want show you snip from my server code for clarify my questions. I
don't use explicitly wsdl or xml configuration or servlet container I
run class that execute binary of following code for Services Test(1-68)

HashMapString, Object props = new HashMapString, Object();
props.put(AegisDatabinding.WRITE_XSI_TYPE_KEY, true);
ArrayListString l = new ArrayListString();
l.add(CustomType1.class.getName());
l.add(CustomType2.class.getName());
l.add(CustomType3.class.getName());
props.put(AegisDatabinding.OVERRIDE_TYPES_KEY, l);

//publishing first service Test1
ServerFactoryBean svrFactory = new ServerFactoryBean();
Test1 impl = new Test1Impl();
svrFactory.setServiceClass(Test1.class);
svrFactory.setAddress(ADDRESS + Test1);
svrFactory.setProperties(props);
svrFactory.setServiceBean(impl);
svrFactory.getServiceFactory().setDataBinding(new
AegisDatabinding());
svrFactory.getServiceFactory().setProperties(props);
svrFactory.create();

 //publishing second service Test2
ServerFactoryBean svrFactory1 = new ServerFactoryBean();
Test2 impl = new Test2Impl();
svrFactory1.setServiceClass(Test2.class);
svrFactory1.setAddress(ADDRESS + Test2);
svrFactory1.setProperties(props);
svrFactory1.setServiceBean(impl);
svrFactory1.getServiceFactory().setDataBinding(new
AegisDatabinding());
svrFactory1.getServiceFactory().setProperties(props);
svrFactory1.create();

the same for (Test2...68)

-Original Message-
From: Glen Mazza [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 24, 2008 5:47 PM
To: cxf-user@incubator.apache.org
Subject: Re: How I can set 'Home' or 'Root' or 'Docbase' directory?


1.  That seems strange.  Unless I'm not understanding you correctly, I
would
think you just want to create one WSDL with 68 services
(wsdl:operations),
and then proceed as follows: http://www.jroller.com/gmazza/date/20071019


2.  It depends on your servlet container, not the web service stack.  A
simple way, for starters at least, is to rely on your classpath--see my
last
comment at the very bottom of:
http://www.jroller.com/gmazza/date/20071102.

3.
http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-sup
port.html. 
Read carefully.  The upcoming 2.0.5 (in a week or two) will make things
a
little bit simpler: http://www.jroller.com/gmazza/date/20080322

Glen


Alpin, Luba wrote:
 
 Hi CXF-User-List,
 I need your help with my three questions, please HELP!
 
 1. I want to publish 68 services using ServerFactoryBean I create 68
 instances ServerFactoryBean - one for each service, is it correct
usage
 of ServerFactoryBean? After 34 services I get OutOfMemory exception
and
 this enforces me increase memory to -Xmx128m , while XFire enable do
it
 with a default 64.
 
 2. I want create webserver root directory to store files for
downloading
 client.
 With XFire this is root directory located in root of Jetty server. How
I
 do it with CXF? Do I need create Jetty server and start it additional
to
 calling create method for each ServerFactoryBean instance?
 
 3. Https? Please link to example.
 
 Thanks for help.
 Luba Alpin.
 
 

-- 
View this message in context:
http://www.nabble.com/Override-schemalocation-when-creating-a-client-tp1
6228867p16254688.html
Sent from the cxf-user mailing list archive at Nabble.com.