CXF deploying in Tomcat checkPermission issue

2008-02-01 Thread Yadav, Yogendra (IT)
Hi,
Having this issue while deploying CXF in Tomcat which has
SecurityManager enabled and can't turn off.
 
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'helloWorld': Invocation of init method failed; nested
exception is java.security.AccessControlException: access denied
(javax.xml.ws.WebServicePermission publishEndpoint) Caused by:
java.security.AccessControlException: access denied
(javax.xml.ws.WebServicePermission publishEndpoint)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.
java:264)
at
java.security.AccessController.checkPermission(AccessController.java:427
)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at
org.apache.cxf.jaxws.EndpointImpl.checkPublishPermission(EndpointImpl.ja
va:349)
 
The EndpointImpl.checkPublishPermission :
protected void checkPublishPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(PUBLISH_PERMISSION);
} else if
(Boolean.getBoolean(CHECK_PUBLISH_ENDPOINT_PERMISSON_PROPERTY)) {
AccessController.checkPermission(PUBLISH_PERMISSION);
 
Where:
private static final WebServicePermission PUBLISH_PERMISSION =
new WebServicePermission(publishEndpoint);
 
thanx
-yogen


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.


RE: SOAPAction Http header

2008-01-29 Thread Yadav, Yogendra (IT)
Hi Dan,
Thanx for the reply.

As per JAX-WS spec there is a way to disable this header, default is
disabled. 
javax.xml.ws.soap.http.soapaction.use Boolean 
Controls whether the SOAPAction HTTP header is used in SOAP/HTTP
requests. Default value is false.
 
I tried to disable it like this, has no effect
CalculatorService ss = new CalculatorService(wsdlURL,
SERVICE_NAME);
Calculator port = ss.getCalculatorJettyHTTPPort();  
BindingProvider provider = (BindingProvider)port;
provider.getRequestContext().put(
BindingProvider.SOAPACTION_USE_PROPERTY, false );

Is it applicable to SOAP 1.2 ?

Thanx
-yogen

-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 24, 2008 10:58 AM
To: cxf-user@incubator.apache.org
Cc: Yadav, Yogendra (IT)
Subject: Re: SOAPAction Http header


With SOAP 1.1, SOAPAction is REQUIRED and must ALWAYS be sent.   That's 
per SOAP 1.1 spec.  
http://www.w3.org/TR/2000/NOTE-SOAP-2508/#_Toc478383528

So, basically, the answer is no.Even if it wasn't put in the wsdl,
we 
would still send an empty SOAPAction.

Dan


On Thursday 24 January 2008, Yadav, Yogendra (IT) wrote:
 Hi,
 I used wsdl2java to generate client code from the WSDL. This client 
 adds SOAPAction field to the http header with empty content. Is there 
 a way of turning it off, so that SOAPAction is not added to the http 
 header at all.

 thanx
 -yogen
 

 NOTICE: If received in error, please destroy and notify sender. Sender

 does not intend to waive confidentiality or privilege. Use of this 
 email is prohibited when received in error.



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


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.


cxf-eclipse-plugin

2008-01-23 Thread Yadav, Yogendra (IT)
Hi,
Anybody's has used CXF-Plugin, want to share your experience ?
Does anybody know if this plugin will make it to production ? And if
this will be available as a standard Eclipse plugin with Features and
Site.xml

Thanx
-yogen

-Original Message-
From: Yadav, Yogendra (IT) 
Sent: Friday, January 18, 2008 10:40 AM
To: [EMAIL PROTECTED]
Subject: cxf-eclipse-plugin

Hi,
What is the plan on including Features in the CXF Eclipse Plugin zip
file, like standard eclipse plugins do ?
And what is the plan on providing site.xml for this plugin so that I can
update plugin from Eclipse directly ?
Thanx
-yogen


NOTICE: If received in error, please destroy and notify sender. Sender
does not intend to waive confidentiality or privilege. Use of this email
is prohibited when received in error.


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.


RE: WSDL retrieval at runtime, is it required?

2008-01-22 Thread Yadav, Yogendra (IT)
Hi Dan,
I looked hard could not find out how to set ENDPOINT_ADDRESS on the
client. The generated service class has nothing to this effect. Do you
have an example for this ?

Thanx
-yogen



-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 21, 2008 4:16 PM
To: cxf-user@incubator.apache.org
Cc: Yadav, Yogendra (IT)
Subject: Re: WSDL retrieval at runtime, is it required?


It's not totally required.You CAN call the service constructor 
passing null for the wsdl and it should create the service fine.   
You'll need to manually set the ENDPOINT_ADDRESS property on the client
to tell it the URL to hit, but that's not too hard to do.

One note: when you run wsdl2java, you CAN specify a wsdlLocation flag 
to specify a different location to be burned in.   A popular setting 
would be the URL of the endpoint with the ?wsdl on it.   

Dan


On Friday 18 January 2008, Yadav, Yogendra (IT) wrote:
 Hi,
 I have already used wsdl2java -client to generate client code to 
 access a CXF service. The WSDL that I provided does include service 
 endpoint information. I see that, now at runtime the client code tries

 to retrieve the WSDL again (see the stacktrace below), why? Does it 
 only do it to extract the service location information? Why didn't the

 generated code cache location information? Is there anyway to avoid 
 it?

 Exception in thread main javax.xml.ws.WebServiceException:
 org.apache.cxf.service.factory.ServiceConstructionException: Failed to

create service.
   at org.apache.cxf.jaxws.ServiceImpl.init(ServiceImpl.java:132)
   at
 org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderIm
pl .java:65)
   at javax.xml.ws.Service.init(Service.java:56)
   at
 msjava.examples.calculator.client.CalculatorService.init(CalculatorS
er vice.java:41)
   at
 msjava.examples.calculator.client.Calculator_CalculatorJettyHTTPPort_C
li ent.main(Calculator_CalculatorJettyHTTPPort_Client.java:53)
 Caused by:
 org.apache.cxf.service.factory.ServiceConstructionException: Failed to

create service.
   at
 org.apache.cxf.wsdl11.WSDLServiceFactory.init(WSDLServiceFactory.jav
a: 83)
   at
 org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:138)
   at org.apache.cxf.jaxws.ServiceImpl.init(ServiceImpl.java:130)
   ... 4 more
 Caused by: javax.wsdl.WSDLException: WSDLException:
 faultCode=PARSER_ERROR: Problem parsing
 'http://pa912c1n5:8091/Calculator/Calculator'.:
 java.net.ConnectException: Connection refused: connect
   at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
   at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
   at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
   at
 org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.j
av a:199)
   at
 org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.ja
va

 :163)

   at
 org.apache.cxf.wsdl11.WSDLServiceFactory.init(WSDLServiceFactory.jav
a: 81)

 Thanx
 -yogen
 

 NOTICE: If received in error, please destroy and notify sender. Sender

 does not intend to waive confidentiality or privilege. Use of this 
 email is prohibited when received in error.



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


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.


WSDL retrieval at runtime, is it required?

2008-01-18 Thread Yadav, Yogendra (IT)
Hi,
I have already used wsdl2java -client to generate client code to
access a CXF service. The WSDL that I provided does include service
endpoint information. I see that, now at runtime the client code tries
to retrieve the WSDL again (see the stacktrace below), why? Does it only
do it to extract the service location information? Why didn't the
generated code cache location information? Is there anyway to avoid it?

Exception in thread main javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException: Failed to
create service.
at org.apache.cxf.jaxws.ServiceImpl.init(ServiceImpl.java:132)
at
org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl
.java:65)
at javax.xml.ws.Service.init(Service.java:56)
at
msjava.examples.calculator.client.CalculatorService.init(CalculatorSer
vice.java:41)
at
msjava.examples.calculator.client.Calculator_CalculatorJettyHTTPPort_Cli
ent.main(Calculator_CalculatorJettyHTTPPort_Client.java:53)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
Failed to create service.
at
org.apache.cxf.wsdl11.WSDLServiceFactory.init(WSDLServiceFactory.java:
83)
at
org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:138)
at org.apache.cxf.jaxws.ServiceImpl.init(ServiceImpl.java:130)
... 4 more
Caused by: javax.wsdl.WSDLException: WSDLException:
faultCode=PARSER_ERROR: Problem parsing
'http://pa912c1n5:8091/Calculator/Calculator'.:
java.net.ConnectException: Connection refused: connect
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at
org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.jav
a:199)
at
org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java
:163)
at
org.apache.cxf.wsdl11.WSDLServiceFactory.init(WSDLServiceFactory.java:
81)

Thanx
-yogen


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.


jetty configuration help

2007-09-04 Thread Yadav, Yogendra \(IT\)
Hi,
I am trying to configure the Jetty thread pool. Looked at this page and
started configuring Jetty thread pool.
http://cwiki.apache.org/CXF20DOC/jetty-configuration.html
 
I created a config file called cxf-jetty-config.xml. Put this in
classpath and started my service with command line arg as
-Dcxf.config.file=cxf-jetty-config.xml. CXF doesn't pick-up this file.
My service is a JAXWS service and I use Endpoint to publish it using a
main() program.
The file looks like this:
  httpj:engine-factory bus=cxf
httpj:engine port=9000
  httpj:threadingParameters minThreads=5 maxThreads=5 /
  httpj:connector
beans:bean class=org.mortbay.jetty.bio.SocketConnector
   beans:property name = port value=9000 /
/beans:bean
  /httpj:connector
  httpj:handlers
beans:bean class=org.mortbay.jetty.handler.DefaultHandler/

  /httpj:handlers
  httpj:sessionSupporttrue/hj:sessionSupport
/httpj:engine
  /httpj:engine-factory
 /beans
 
 
I tried to rename the file as cxf-extension-xml.xml, it still doesn't
pick-up the config. 
 
Any help is appreciated.
thanx
-yogen


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.


Executor thread pool not utilized by JAXWS SEI

2007-08-29 Thread Yadav, Yogendra \(IT\)
Hi,
I have configured / published the POJO service endpoint class using
JAXWS Endpoint API. I am providing executor thread pool to the Endpoint.
I don't see the executor thread pool being used by runtime. All I see is
Jetty transport threads in debugger in EclipseIDE.
 
POJOClass c = new POJOClass();
String address = http://localhost:9000/POJOService;;
ep = Endpoint.create( c );
ExecutorService es = Executors.newFixedThreadPool( 4 );
ep.setExecutor( es );
ep.publish( address );

What am I missing here ?
 
-yogen


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.