Replica aware client

2008-02-13 Thread blacksheep

Hi,

Is there a way to configure CXF generated clients to access WS server stack
with a timeout value ?

Thanks,

Mustafa
-- 
View this message in context: 
http://www.nabble.com/Replica-aware-client-tp15459476p15459476.html
Sent from the cxf-user mailing list archive at Nabble.com.



CXF - username token authentication with SSL

2008-01-31 Thread blacksheep

Hi,

What is the right way to call a secure web service that authenticates the
requests based on username token authentication in CXF ? 

How can I accomplish this with Client Outbound Endpoint ?
Or should I implement my client  ssing a web service client directly ?

Also can I use https connector with CXF-transport  in mule ?

Any help will be appreciated.

Thanks.
-- 
View this message in context: 
http://www.nabble.com/CXF---username-token-authentication-with-SSL-tp15203683p15203683.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: CXF - username token authentication with SSL

2008-01-31 Thread blacksheep

I am sorry I shoud have post this message to mule forum.


blacksheep wrote:
 
 Hi,
 
 What is the right way to call a secure web service that authenticates the
 requests based on username token authentication in CXF ? 
 
 How can I accomplish this with Client Outbound Endpoint ?
 Or should I implement my client  ssing a web service client directly ?
 
 Also can I use https connector with CXF-transport  in mule ?
 
 Any help will be appreciated.
 
 Thanks.
 

-- 
View this message in context: 
http://www.nabble.com/CXF---username-token-authentication-with-SSL-tp15203683p15203686.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: WebServiceContext is null

2007-10-01 Thread blacksheep

Hi Willem,

Any luck ? Please inform me.

Thanks,


blacksheep wrote:
 
 Thanks. I attached my spring configuration file.
 
 On 9/30/07, Willem2 [EMAIL PROTECTED] wrote:


 I just wrote a test case of injecting  the resource to an enhanced object
 by
 CGLIB, and it worked well.
 Currently , I can't inject any resource to the  instance  of JDK
 Dynamical
 Proxy which is also a part of Spring AOP solution.

 Can you send me a same sample of using the tx:annotation-driven ?
 I can test my solution with it, hope it is not implemented with JDK
 Dynamical Proxy.

 Willem.


 blacksheep wrote:
 
  Hi,
 
  I am using tx:annotation-driven/ in my spring.xml .
  What's the workaround for this case ?
 
  Thanks,
 
  Karakoyun
 
 
  On 9/28/07, Willem Jiang [EMAIL PROTECTED] wrote:
 
  Hi ,
 
  How do you set up your endpoint implementor?
 
  I  know there is an issue that if your implementor is came from a
 Spring
  bean which is enhanced by Spirng AOP will not get any
 WebServiceContext
  resource injected.
 
  You can find the detail information about the JIRA here [1]
  [1]https://issues.apache.org/jira/browse/CXF-1074
 
  Willem.
 
 
  Mustafa Egilmezbilek wrote:
   Hi,
  
   I am trying to access WebServiceContext to be able use HttpSession
 as
   described in:
 http://cwiki.apache.org/CXF20DOC/servlet-transport.html
 ,
  but I
   keep getting null. What might be the reason ?
  
  
   @Resource
  
   *public* WebServiceContext wsContext;
protected HttpSession getHttpSession() {
 MessageContext mc = *wsContext*.getMessageContext();
   HttpSession session =
 ((javax.servlet.http.HttpServletRequest
   )mc.get(MessageContext.SERVLET_REQUEST)).getSession();
   return session;
}
  
  
  
   Thanks,
  
   Karakoyun
  
  
 
 
 
 
  --
  Mustafa Egilmezbilek
 
 

 --
 View this message in context:
 http://www.nabble.com/WebServiceContext-is-null-tf4528676.html#a12961806
 Sent from the cxf-user mailing list archive at Nabble.com.


 
 
 -- 
 Mustafa Egilmezbilek
 
 ?xml version=1.0 encoding=UTF-8?
 beans xmlns=http://www.springframework.org/schema/beans;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xmlns:jaxws=http://cxf.apache.org/jaxws;
   xmlns:tx=http://www.springframework.org/schema/tx;
   xsi:schemaLocation=http://www.springframework.org/schema/beans 
   http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
   http://cxf.apache.org/jaxws
 file:///C:/tools/WebServices/apache-cxf-2.0.2-incubator/xsd/jaxws.xsd
   http://www.springframework.org/schema/tx
 http://www.springframework.org/schema/tx/spring-tx-2.0.xsd;
   
   tx:annotation-driven/
   
   import resource=classpath:META-INF/cxf/cxf.xml /
   import resource=classpath:META-INF/cxf/cxf-extension-soap.xml /
   import resource=classpath:META-INF/cxf/cxf-servlet.xml /
   
   jaxws:endpoint id=AFServices
 implementor=#activeFlightInfoOps

 implementorClass=aero.tav.afis.service.ActiveFlightInfoOperationsImpl
 address=/ActiveFlightOperations /
   
 
   bean id=entityManagerFactory
   
 class=org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean
   property name=dataSource ref=dataSource /
   property name=jpaVendorAdapter
   bean
   
 class=org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter
   property name=showSql value=true /
   property name=generateDdl value=true /
   property name=database value=ORACLE /
   /bean
   /property
   property name=loadTimeWeaver
   bean
 class=org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver/

   /property
   /bean
 
   bean id=dataSource
   
 class=org.springframework.jdbc.datasource.DriverManagerDataSource
   property name=driverClassName
   value=oracle.jdbc.driver.OracleDriver /
   property name=url
   value=jdbc:oracle:thin:@localhost:1521:XE /
   property name=username value= /
   property name=password value= /
   /bean
 
   bean id=transactionManager
   class=org.springframework.orm.jpa.JpaTransactionManager
   property name=entityManagerFactory
   ref=entityManagerFactory /
   property name=dataSource ref=dataSource /
   /bean
 
   bean id=activeFlightInfoOps
   class=aero.tav.afis.service.ActiveFlightInfoOperationsImpl
   property name=serviceUsageDao ref=serviceUsageDao /
   /bean
 
   bean id=serviceUsageDao
   class=aero.tav.afis.dao.ServiceUsageDao
   property name=entityManagerFactory 
 ref=entityManagerFactory

Java First Development trouble

2007-08-21 Thread blacksheep

Hi,

I am developing a Adobe Flex web application that will communicate with back
end through WebService tag. Flex uses RPC-literal type communication with
the WS. 

To do this I chose CXF. I used Java First Development style and completed my
JPA entity definitions and JpaDaoSupport classes. Then, I defined an
interface and annotated the methods with JAX-WS2.0 style. I also generated
my wsdl by using java2wsdl tool. 

Next, I followed the CXF Spring sample and finally I got such an endpoint:
jaxws:endpoint id=AFServices implementor=#AFInfoOps
address=/AFOperations /

At this point my first question is whether I have to use wsdl2java to
generate the class files. If so, I will lose JPA annotations. Since I follow
the Spring sample I have not used the wsdl2java tool. 

Then, I started my web app in debug mode let the Flex client makes a call.
Everything went well until the JPA entity get serialized into XML. I got the
following error:

INFO: Interceptor has thrown exception, unwinding now
java.lang.ArrayStoreException
at java.lang.System.arraycopy(Native Method)
at java.util.Arrays.copyOf(Unknown Source)
at java.util.Vector.toArray(Unknown Source)
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:102)
at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:42)
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:92)
at
org.apache.cxf.binding.soap.interceptor.RPCOutInterceptor.handleMessage(RPCOutInterceptor.java:86)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:73)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:78)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:231)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:139)
at 
org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:271)
at 
org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)

Thanks,

Mustafa

-- 
View this message in context: 
http://www.nabble.com/Java-First-Development-trouble-tf4307067.html#a12260810
Sent from the cxf-user mailing list archive at Nabble.com.



Java2Wsdl Error : ClassCastException

2007-08-19 Thread blacksheep

I have defined my JPA entities and then tried to execute the Java2wsdl
command, but I got the following error:

JavaToWSDL Error : java.lang.ClassCastException:
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$5 cannot be cast
to com.sun.xml.bind.v2.model.impl.ClassInfoImpl

I am using JAXB binding and thought the wsdl generation would be no problem.
Any ideas on this problem.

@WebService(name=TestOps, targetNamespace=http://test/;)
@SOAPBinding(style=SOAPBinding.Style.RPC, use=SOAPBinding.Use.LITERAL)
public interface TestOps {

@WebResult(targetNamespace=http://test/;, name=activeUsages,
partName=activeUsages)
@WebMethod(operationName=getServiceUsage, exclude=false)
public ListServiceUsage getServiceUsage();
}

And I attached the entities:

Thanks,

http://www.nabble.com/file/p12221320/Customer.java Customer.java 
http://www.nabble.com/file/p12221320/ServiceUsage.java ServiceUsage.java 
http://www.nabble.com/file/p12221320/ServiceUsageDetail.java
ServiceUsageDetail.java 

-- 
View this message in context: 
http://www.nabble.com/Java2Wsdl-Error-%3A-ClassCastException-tf4293141.html#a12221320
Sent from the cxf-user mailing list archive at Nabble.com.



Re: Urgent - Failed to read schema document 'http://cxf.apache.org/schemas/jaxws.xsd'

2007-08-19 Thread blacksheep

Thanks for your help Juan. Yes I can see the 2 entries in the User Specified
Entries with a little red X  next to them. I other words I still have some
prooblems. Here is my fle content:

?xml version=1.0 encoding=UTF-8 standalone=no?
catalog xmlns=urn:oasis:names:tc:entity:xmlns:xml:catalog
  system
systemId=http://cxf.apache.org/schemas/configuration/cxf-beans.xsd;
uri=jar:file:C:/tools/WebServices/apache-cxf-2.0.1-incubator/lib/cxf-2.0-incubator.jar!/schemas/configuration/cxf-beans.xsd/
  system systemId=http://cxf.apache.org/schemas/jaxws.xsd;
uri=jar:file:C:/tools/WebServices/apache-cxf-2.0.1-incubator/lib/cxf-2.0-incubator.jar!/schemas/jaxws.xsd/
/catalog 




Juan José Vázquez Delgado wrote:
 
 Hi,
 
 Try this:
 
 New document and named, for example cxf.xmlcatalog
 Copy/Paste this:
 
 ?xml version=1.0 encoding=UTF-8 standalone=no?
 catalog xmlns=urn:oasis:names:tc:entity:xmlns:xml:catalog
   system systemId=
 http://cxf.apache.org/schemas/configuration/cxf-beans.xsd;
 uri=jar:file:C:/SW/cxf/apache-cxf-2.0-incubator/lib/cxf-
 2.0-incubator.jar!/schemas/configuration/cxf-beans.xsd/
   system systemId=http://cxf.apache.org/schemas/jaxws.xsd;
 uri=jar:file:C:/SW/cxf/apache-cxf-2.0-incubator/lib/cxf-
 2.0-incubator.jar!/schemas/jaxws.xsd/
 /catalog
 
 where obviously you must change C:/SW/cxf... for your root CXF path, and
 save it.
 
 Eclipse  Window  Preferences  XML Catalog  Advanced  Import 
 Import Files  Browse the cxf.xmlcatalog  Finish
 
 Then you will see two new entries in your Eclipse XML Catalog.
 
 I hope this help you.
 
 Regards,
 
 Juanjo.
 
 On 8/19/07, Mustafa Egilmezbilek [EMAIL PROTECTED] wrote:

 Hi,
 I am developing a service with CXF-Spring in Eclipse 3.3 and I got the
 following error:
 cvc-complex-type.2.4.c: The matching wildcard is strict, but no
 declaration
 can be found for element 'jaxws:endpoint'.

 and the following warning:
 schema_reference.4: Failed to read schema document '
 http://cxf.apache.org/schemas/jaxws.xsd', because 1) could not find the
 document; 2) the document could not be read; 3) the root element of the
 document is not xsd:schema.

 I know that jaxws.xsd is in both cxf-2.0.1-incubator.jar and
 cxf-rt-frontend-jaxws-2.0.1-incubator.jar and I am sure that
 cxf-2.0.1-incubator.jar is in among the libraries for the project. I also
 tried to include cxf-rt-frontend-jaxws-2.0.1-incubator.jar but nothing
 has
 changed :(

 I also defined an XML Catalog for the key:
 http://cxf.apache.org/schemas/jaxws.xsd that points to the
 cxf-2.0.1-incubator.jar then I started to get the error:
 Referenced file contains errors (file:/C:/tools/WebServices/apache-
 cxf-2.0.1-incubator/lib/cxf-2.0.1-incubator.jar).  For more information,
 right click on the message and select Show Details Unfortunately, I
 could not figure out the message to right click to see the details.

 Shortly, I am stuck at this point. Any help will be highly appreciated.

 Thanks.

 --
 Mustafa Egilmezbilek

 
 

-- 
View this message in context: 
http://www.nabble.com/Urgent---Failed-to-read-schema-document-%27http%3A--cxf.apache.org-schemas-jaxws.xsd%27-tf4292426.html#a12223530
Sent from the cxf-user mailing list archive at Nabble.com.