Re: client interceptor to send parameters with headers

2008-04-23 Thread Daniel Kulp
On Wednesday 23 April 2008, sudip shrestha wrote:
 Ulhas:

 *In the method: public java.util.ListHeader
 http://incubator.apache.org/cxf/javadoc/latest/org/apache/cxf/headers
/Header.html **getHeaders()

 **as the list has the type of Header, the add method does not accept
 org.w3c.dom.Element as the parameter.

Just do new Header(
   new QName(el.getNamespaceURI(),
 el.getLocalName()),
   el)

That should be it.

Dan





 Thanks
 *

 On Wed, Apr 23, 2008 at 10:53 AM, Ulhas Bhole [EMAIL PROTECTED] 
wrote:
  Hi Olanga,
 
  try skipping the SoapHeader creation and add the DOM element
  directly into the Header list like msg.getHeaders().add(param1).
 
  -- Ulhas Bhole
 
  olanga henry wrote:
   Hi all, this was so easy in XFire with the handlers.  I am a bit
   struggling due to lack of clear examples.  I am trying to write a
   simple interceptor on the client side (am not clear on which
   abstractInterceptor to extend out of several available in cxf, so
   in this example I just extended AbstractSoapInterceptor) so that I
   can send some parameters in the soap headers.  Here is what I
   did:public class AddHeaderInterceptor extends
   AbstractSoapInterceptor {  public AddHeaderInterceptor() {
   super(Phase.WRITE);  }  public void handleMessage(SoapMessage msg)
   throws SoapFault { Document d = DOMUtils.createDocument();
   Element param1 = d.createElement(my_param1);
   param1.setTextContent(my param1); SoapHeader sh_param1 = new
   SoapHeader(new QName(http://spring.demo;, HelloWorldImplPort),
   param1);  msg.getHeaders().add( sh_param1 ); }}Then I attached
   the interceptor to the factory in the actual client code:
   JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
   factory.setServiceClass( HelloWorld.class ); factory.setAddress(
   http://wsdev.adestagroup.com/services/HelloWorld; ); 
 factory.getOutInterceptors().add(new
   AddHeaderInterceptor());//---
HelloWorld client = (HelloWorld) factory.create();
  System.out.println( client.sayHi(test) );But I can't seem
   to intercept the headers at the server side.  What am I doing
   wrong here?Highly appreciate any help. Thanks
   _
   Make i'm yours.  Create a custom banner to support your cause.
  
   http://im.live.com/Messenger/IM/Contribute/Default.aspx?source=TXT
  _TAGHM_MSN_Make_IM_Yours
 
  
  IONA Technologies PLC (registered in Ireland)
  Registered Number: 171387
  Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
  Ireland



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


Re: Failed to read schema document 'http://schemas.xmlsoap.org/wsdl/'

2008-04-23 Thread Daniel Kulp
On Wednesday 23 April 2008, Abid Hussain wrote:
 Hi Daniel,

 today everything works fine. As you said, it seems that
 http://schemas.xmlsoap.org/ was kind of down.

 Is there anything one can do if this happens again...?

Upgrade to 2.0.5?

Dan


 Best regards,

 Abid

 Daniel Kulp schrieb:
  Yea, it looks like:
  http://schemas.xmlsoap.org/
  is pretty much hosed.   None of the schemas from there are working
  correctly.
 
  Dan
 
  On Tuesday 22 April 2008, Daniel Kulp wrote:
  Is this with CXF 2.0.5 or an older version?
 
  From the stack trace, it LOOKS like it's due to:
  https://issues.apache.org/jira/browse/CXF-1272
  which should have been fixed/worked around in 2.0.5.
 


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


Re: client interceptor to send parameters with headers

2008-04-23 Thread Daniel Kulp

Can you add the Logging interceptors to the server side to see if the 
headers are even making it there..

The client side interceptor is probably running too late and thus the 
headers aren't being written.   I think super(Phase.WRITE) is too late.  
Try moving that to Phase.USER_LOGICAL.   

Dan


On Wednesday 23 April 2008, olanga henry wrote:
 Dan: I am afraid that I am still not seeing any headers on the server
 side even after I tried sending the Header the way you suggested.

 I am using the following interceptor (as I found from the discussion
 threads) in the server side applied to JAX-WS HelloWorld service:

 public class MySoapInterceptor extends AbstractSoapInterceptor {

 public MySoapInterceptor() { super(Phase.UNMARSHAL);}

   public void handleMessage(SoapMessage msg) throws SoapFault {
   System.out.println(Interceptor  + this.getPhase());
   ListHeader lista = msg.getHeaders();for (Header h : lista) {  
Element el = (Element) h.getObject();   
 System.out.println(Header XML :);  XMLUtils.printDOM(el);   
Node node = DOMUtils.getChild(el, null); 
 printNode(node); while ( ((node = DOMUtils.getNext(node, null,
 node.getNodeType()) ) != null) ) {  printNode(node);  }  }
 }

  public void printNode(Node node) {System.out.println(Node : ); 
System.out.println(node.getNodeName()); 
 System.out.println(Node value : ); 
 System.out.println(DOMUtils.getContent(node)); } }


 and here is my service config:


 bean id=hello class=demo.spring.HelloWorldImpl /   
 jaxws:endpoint   id=helloWorld  
 implementor=#hello   address=/services/HelloWorld
 jaxws:inInterceptorsref
 bean=myInterceptor /  /jaxws:inInterceptors  
/jaxws:endpointThank you.

  From: [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Subject:
  Re: client interceptor to send parameters with headers Date: Wed,
  23 Apr 2008 13:00:24 -0400 CC: [EMAIL PROTECTED]  On Wednesday 23
  April 2008, sudip shrestha wrote:  Ulhas:   *In the method:
  public java.util.ListHeader 
  http://incubator.apache.org/cxf/javadoc/latest/org/apache/cxf/heade
 rs /Header.html **getHeaders()   **as the list has the type
  of Header, the add method does not accept  org.w3c.dom.Element as
  the parameter.  Just do new Header( new
  QName(el.getNamespaceURI(), el.getLocalName()), el)  That
  should be it.  Dan   Thanks  *   On Wed, Apr 23,
  2008 at 10:53 AM, Ulhas Bhole [EMAIL PROTECTED]  wrote:  
  Hi Olanga, try skipping the SoapHeader creation and add
  the DOM element   directly into the Header list like
  msg.getHeaders().add(param1). -- Ulhas Bhole
  olanga henry wrote:Hi all, this was so easy in XFire with
  the handlers. I am a bitstruggling due to lack of clear
  examples. I am trying to write asimple interceptor on the
  client side (am not clear on whichabstractInterceptor to
  extend out of several available in cxf, soin this example I
  just extended AbstractSoapInterceptor) so that Ican send
  some parameters in the soap headers. Here is what I   
  did:public class AddHeaderInterceptor extends   
  AbstractSoapInterceptor { public AddHeaderInterceptor() {   
  super(Phase.WRITE); } public void handleMessage(SoapMessage msg) 
throws SoapFault { Document d = DOMUtils.createDocument();   
   Element param1 = d.createElement(my_param1);
  param1.setTextContent(my param1); SoapHeader sh_param1 = new  
   SoapHeader(new QName(http://spring.demo;, HelloWorldImplPort),
 param1); msg.getHeaders().add( sh_param1 ); }}Then I attached
 the interceptor to the factory in the actual client code:  
   JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();  
   factory.setServiceClass( HelloWorld.class ); factory.setAddress(
 http://wsdev.adestagroup.com/services/HelloWorld; );
  factory.getOutInterceptors().add(newAddHeaderInterceptor());
  //---HelloWorld client = (HelloWorld)
  factory.create();System.out.println( client.sayHi(test)
  );But I can't seemto intercept the headers at the server
  side. What am I doingwrong here?Highly appreciate any help.
  Thanks   
  _ 
Make i'm yours. Create a custom banner to support your cause. 
  
  http://im.live.com/Messenger/IM/Contribute/Default.aspx?source=TXT
_TAGHM_MSN_Make_IM_Yours
     IONA Technologies PLC (registered
  in Ireland)   Registered Number: 171387   Registered Address:
  The IONA Building, Shelbourne Road, Dublin 4,   Ireland--
   J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED]
  http://www.dankulp.com/blog

 _
 Spell a grand slam in this game where word skill meets World Series.
 Get in the game.
 http://club.live.com/word_slugger.aspx

Re: Failed to read schema document 'http://schemas.xmlsoap.org/wsdl/'

2008-04-22 Thread Daniel Kulp
) at
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycle
Support.java:120) at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:41
48) at
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
 at
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
 at
 org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
 at
 org.apache.catalina.core.StandardService.start(StandardService.java:44
8) at
 org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:552) 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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)



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


Re: Eclipse XSD validation for jaxws.xsd

2008-04-22 Thread Daniel Kulp

Well, the other thing that should make it better in the upcoming week or 
two (providing infrastructure actually gets around to it) is that 
cxf.apache.org should actually go live at which point we can add the 
schemas there.  

Dan



On Tuesday 22 April 2008, Ian Roberts wrote:
 paulbrickell wrote:
  This is quite painful, but having followed the steps described above
  eclipse is now happy that my XML files are valid. But what happens
  when I deploy my project?
 
  Hard coded paths are not gonna do it really.
 
  Is there a 'real' solution for this?

 Using a catalog *is* the real solution.  Spring has its own internal
 catalog built from all the META-INF/spring.schemas files it finds on
 the classpath that does the same job at runtime that it uses to
 resolve the http://cxf.apache.org/schemas/... URIs to
 Class.getResource locations (i.e. inside the JAR files).

 Ian



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


Re: Failed to read schema document 'http://schemas.xmlsoap.org/wsdl/'

2008-04-22 Thread Daniel Kulp

Yea, it looks like:
http://schemas.xmlsoap.org/
is pretty much hosed.   None of the schemas from there are working 
correctly.

Dan


On Tuesday 22 April 2008, Daniel Kulp wrote:
 Is this with CXF 2.0.5 or an older version?

 From the stack trace, it LOOKS like it's due to:
 https://issues.apache.org/jira/browse/CXF-1272
 which should have been fixed/worked around in 2.0.5.

 Dan

 On Tuesday 22 April 2008, Abid Hussain wrote:
  Hi everybody,
 
  I've a service in my web application. Yesterday everything worked
  fine. But today I tried to start my Tomcat and encountered this
  strange error (stack trace below) which causes Tomcat fail to start.
  It obviously seems that the WSDL-schema can't be read...
 
  Haven't made any changes since yesterday.
 
  Anybody got an idea, what's going on here?
 
  Regards,
 
  Abid
 
  org.xml.sax.SAXParseException: schema_reference.4: Failed to read
  schema document 'http://schemas.xmlsoap.org/wsdl/', because 1) could
  not f ind the document; 2) the document could not be read; 3) the
  root element of the document is not xsd:schema.
  at
  org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(U
 nk nown Source)
  at org.apache.xerces.util.ErrorHandlerWrapper.warning(Unknown
  Source) at
  org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
  at
  org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaWarning(
 Un known Source)
  at
  org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Un
 kn own Source)
  at
  org.apache.xerces.impl.xs.traversers.XSDHandler.resolveSchema(Unknow
 n Source)
  at
  org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unkno
 wn Source)
  at
  org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unkno
 wn Source)
  at
  org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown
  Source)
  at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown
  Source) at
  org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unkno
 wn Source)
  at
  org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unkn
 ow n Source)
  at
  org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown
  Source)
  at
  org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unk
 no wn Source)
  at
  org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentConten
 tD ispatcher.dispatch(Unknown Source)
  at
  org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(U
 nk nown Source)
  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
  Source) at
  org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at
  org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at
  org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at
  org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocu
 me nt(DefaultDocumentLoader.java:76) at
  org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoad
 Be anDefinitions(XmlBeanDefinitionReader.java:351) at
  org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBe
 an Definitions(XmlBeanDefinitionReader.java:303) at
  org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBe
 an Definitions(XmlBeanDefinitionReader.java:280) at
  org.springframework.beans.factory.support.AbstractBeanDefinitionRead
 er .loadBeanDefinitions(AbstractBeanDefinitionReader.java:131) at
  org.springframework.beans.factory.support.AbstractBeanDefinitionRead
 er .loadBeanDefinitions(AbstractBeanDefinitionReader.java:147) at
  org.springframework.web.context.support.XmlWebApplicationContext.loa
 dB eanDefinitions(XmlWebApplicationContext.java:124) at
  org.springframework.web.context.support.XmlWebApplicationContext.loa
 dB eanDefinitions(XmlWebApplicationContext.java:92) at
  org.springframework.context.support.AbstractRefreshableApplicationCo
 nt ext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:
  100) at
  org.springframework.context.support.AbstractApplicationContext.refre
 sh (AbstractApplicationContext.java:313) at
  org.springframework.web.context.ContextLoader.createWebApplicationCo
 nt ext(ContextLoader.java:241) at
  org.springframework.web.context.ContextLoader.initWebApplicationCont
 ex t(ContextLoader.java:184) at
  org.springframework.web.context.ContextLoaderListener.contextInitial
 iz ed(ContextLoaderListener.java:49) at
  org.apache.catalina.core.StandardContext.listenerStart(StandardConte
 xt .java:3764) at
  org.apache.catalina.core.StandardContext.start(StandardContext.java:
 42 16) at
  org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014
 ) at
  org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
  at
  org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014
 ) at
  org.apache.catalina.core.StandardEngine.start(StandardEngine.java:44
 3

Re: Attributes portName, serviceName and endpointInterface are not allowed in the @WebService annotation

2008-04-22 Thread Daniel Kulp

As Ian and Glen pointed out, some of the attributes on @WebService are 
only allowed on the SEI interface and others are only allowed on the 
implementation.   

IMO, it's kind of bogus.  If certain attributes are only allowed in 
certain areas, they should have had separate annotations for the SEI 
compared with the impl, but that's definitely out of our hands.   That's 
a JWS spec issue.

Dan


On Tuesday 22 April 2008, jblack wrote:
 I am using the example code from the link below as a reference, but
 the webapp fails to initialize with the a stack trace.
 http://www.lumidant.com/blog/web-services-tutorial-with-apache-cxf/
 http://www.lumidant.com/blog/web-services-tutorial-with-apache-cxf/

 I also found a number of examples where the @Webservice annotation has
 multiple combinations of the attributes in question, so I'm looking
 for some definitive help.

 I tried using cxf 2.0.2-incubator, 2.0.4-incubator, 2.0.5-incubator
 all with the same issue (on Tomcat 6.0.16).


 Apr 22, 2008 11:29:23 AM org.apache.catalina.core.ApplicationContext
 log INFO: Initializing Spring root WebApplicationContext
 Apr 22, 2008 11:29:28 AM org.apache.catalina.core.StandardContext
 listenerStart
 SEVERE: Exception sending context initialized event to listener
 instance of class
 org.springframework.web.context.ContextLoaderListener
 org.springframework.beans.factory.BeanCreationException: Error
 creating bean with name 'userAdd': Invocation of init method failed;
 nested exception is javax.xml.ws.WebServiceException: Attributes
 portName, serviceName and endpointInterface are not allowed in the
 @WebService annotation of an SEI. Caused by:
 javax.xml.ws.WebServiceException: Attributes portName, serviceName and
 endpointInterface are not allowed in the @WebService annotation of an
 SEI.
   at
 org.apache.cxf.jaxws.support.JaxWsImplementorInfo.initialise(JaxWsImpl
ementorInfo.java:291) at
 org.apache.cxf.jaxws.support.JaxWsImplementorInfo.init(JaxWsImplemen
torInfo.java:57) at
 org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:253) at
 org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:232) at
 org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:183)



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


Re: create artifacts from WSDL published on the internet

2008-04-22 Thread Daniel Kulp
On Tuesday 22 April 2008, Davide Gesino wrote:
 It is possible to generate java artifacts and stubs with wsdl2java
 loading the wsdl file from the internet? (something like
 http://myhost:myport/service?wsdl )

It should just work if you use that url as a the wsdl location on the 
command line.   The tricky part may be some of the special characters 
in the url like the : and the ?.   You might need to escape them or 
maybe put the whole thing in quotes  (cannot remember if it's single or 
double quotes) to make sure the shell doesn't try to do something wacky 
with it.

For example, I can run:
wsdl2java -d gen \
http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl

just fine.


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


Re: Using JAXB--can I obtain the underlying XML of SOAP request?

2008-04-22 Thread Daniel Kulp

With pure JAXWS/JAXB, the only ways to do it are:

1) Provider based service
2) Implement a SOAPMessageHandler (or LogicalHandler if all you need is 
the logical parts) that stores the XML in the context with scope of 
Application.   You could then pick it up from the WebServiceContext.

With CXF, you MIGHT be able to just configure the SAAJInInterceptor and 
then cast the WebServiceContext to the CXF implementation and dig into 
it to find the SAAJ model.  Haven't really tried that though.

Dan


On Tuesday 22 April 2008, Glen Mazza wrote:
 I believe the answer to my following question is no, that I would
 need to use the JAX-WS provider interface[1] if I wanted to do this,
 but here goes:

 For a SEI implementation as [2] below, *within* the method
 doubleIt(BigInteger numberToDouble) {}, is there a way for me to
 retrieve the underlying XML that constitutes the SOAP request--all I
 really need is the SOAP request body because it's already in the XML
 format I need.

 (Note I think I'll probably still use the provider interface anyway, I
 would just like to know if I have that option using JAXB above.)

 Thanks,
 Glen

 [1] http://www.javapassion.com/handsonlabs/wsjaxwsadv/#Exercise_2
 [2] http://www.jroller.com/gmazza/date/20080417#WFstep6



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


Re: Exception logging on server:

2008-04-22 Thread Daniel Kulp
On Monday 21 April 2008, greenstar wrote:
 It appears to print Exception.getMessage().  NullPointerException has
 no message, which explains why it prints null in this case.

 How can I configure CXF to print the exception class and optionally
 the stack trace (on the server)?

This actually changed in 2.0.5.  In 2.0.4, we logged stack traces for 
everything, which users complained about as they got stack traces for 
all the exceptions/faults that the wanted sent back to the clients.

In anycase, if you set the logging level for the java.util.logging to 
FINE for the org.apache.cxf.phase.PhaseInterceptorChain logger, the 
stack traces should show up.

Dan



 greenstar wrote:
  I have recently upgraded from XFire 1.2.6 to CXF 2.0.5, (within
  JBoss 4.2.0.GA/Java1.6.0_06).
 
  When using JAXWS, when my services throws an exception from the
  business code, the exception stack is not logged.  For example,
  when my application throws a NullPointerException, only the
  following is mentioned in the log (instead of printing that stack
  trace or the exception class at the very least):
 
15:36:41,796 ERROR [STDERR] Apr 21, 2008 3:36:41 PM
  org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Application has thrown exception, unwinding now: null
 
  ...



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


Re: soap fault question

2008-04-22 Thread Daniel Kulp

This should be fixed in the latest 2.0.6/2.1 snapshots.If you could 
give it a quick test as a double check before I do final builds 
tomorrow, that would be GREAT.
http://people.apache.org/repo/m2-snapshot-repository/org/apache/cxf/apache-cxf/2.0.6-SNAPSHOT/
http://people.apache.org/repo/m2-snapshot-repository/org/apache/cxf/apache-cxf/2.1-SNAPSHOT/

Thanks!
Dan


On Tuesday 22 April 2008, sadhu wrote:
 David Castañeda wrote:
  Hi, I'm still fighting with fault generation... can anybody give me
  a pointer where to get some examples or some information about this?
 
  in a service that I'm exposing, I'm trying to do
 
  SoapFault fault = new SoapFault(message,
  SoapFault.FAULT_CODE_CLIENT);
  throw fault;
 
  but it always end in ...
 
  soap:Envelope
  xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body
soap:Fault
   faultcodesoap:Server/faultcode
   faultstringMessage is OK/faultstring
/soap:Fault
 /soap:Body
  /soap:Envelope
 
  I'm expecting to produce a Client Fault but soap:Server is returned.
 
  I'm using a jaxws:endpoint
 
 
  --
  David Castañeda R.

 hey David .
 Did u get the solution...
 please if so post me the details also..
 i'm also struggling to solve this issues..

 Thanks in advance


 Regards

 Suzane



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


Re: Using CXF In Existing Spring Context

2008-04-22 Thread Daniel Kulp
On Tuesday 22 April 2008, Urciolo, Kevin wrote:
 I would like to use CXF in an existing spring context.  The examples
 appear to have a CXF Servlet read a spring configuration file and
 create a separate context.  I want to inject beans I have defined in
 an existing context in to my CXF services.  What is the best way to
 accomplish this?

 Thanks

There's a pretty good tutorial about it at:
http://wheelersoftware.com/articles/spring-cxf-web-services.html

I keep meaning to change the samples over to using the standard spring 
context stuff.  Just haven't had the time.   For the most part, it's 
just import the cxf stuff you want, then define your beans, configure 
the CXFServlet on the context you want (and don't create a 
cxf-servlet.xml), and it works.   


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


Re: Fwd: Problem when trying to test JAX-RS service

2008-04-22 Thread Daniel Kulp

You should probably grab the latest 2.1-SNAPSHOT (note: non-incubator) 
from:
http://people.apache.org/repo/m2-snapshot-repository/org/apache/cxf/apache-cxf/2.1-SNAPSHOT/
Note that there are src packages in there as well that would directly 
match up the stack traces with their binary packages.

That said, my biggest question mark is the line:

org.apache.cxf.transport.ChainInitiationObserver.setExchangeProperties
(ChainInitiationObserver.java:100)

The 2.1 codebase doesn't have any code on line 100.   That kind of 
worries me.


Dan



On Tuesday 22 April 2008, Brad wrote:
 Thanks Sergey, that fixed that problem. Eclipse doesn't like those
  schema locations but its fine at runtime.

  I'm now getting a NullPointerException when I hit my test service.
 I'm guessing I've misconfigured somewhere?

  By the way, I tried looking into the NPE myself but with my limited
  experience of this project the only 2.1 code I could find was at
 
 https://svn.apache.org/repos/asf/incubator/cxf/tags/cxf-2.1-incubator-
beta-1/. IS that the right place to be looking?

  INFO: Server startup in 2763 ms
  22-Apr-2008 09:28:16 org.apache.catalina.core.StandardWrapperValve
 invoke SEVERE: Servlet.service() for servlet CXFServlet threw
 exception java.lang.NullPointerException
 at
 org.apache.cxf.transport.ChainInitiationObserver.setExchangeProperties
(ChainInitiationObserver.java:100) at
 org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitia
tionObserver.java:63) at
 org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletD
estination.java:79) at
 org.apache.cxf.transport.servlet.ServletController.invokeDestination(S
ervletController.java:264) at
 org.apache.cxf.transport.servlet.ServletController.invoke(ServletContr
oller.java:123) at
 org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXF
Servlet.java:170) at
 org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFS
ervlet.java:152) at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
cationFilterChain.java:290) at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
lterChain.java:206) at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
lve.java:233) at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
lve.java:175) at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
va:128) at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
va:102) at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv
e.java:109) at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
:286) at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
844) at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proces
s(Http11Protocol.java:583) at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447
) at java.lang.Thread.run(Thread.java:595)



  On Mon, Apr 21, 2008 at 5:43 PM, Sergey Beryozkin

  [EMAIL PROTECTED] wrote:
   This entry might be a problem :
  http://cxf.apache.org/jaxrs
  
   C:\workspace\eclipse33\cxf_REST_Web\WebContent\WEB-INF\schema\jaxrs
  .xsd
  
  
  
There's a spring.schemas file wich matches the
   http://cxf.apache.org/schemas/jaxrs.xsd location to the local class
   resource schemas/jaxrs.xsd, so please try
  
 http://cxf.apache.org/jaxrs
 http://cxf.apache.org/schemas/jaxrs.xsd;
  
Cheers, Sergey
  

IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
   Ireland



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


Re: Exception logging on server:

2008-04-22 Thread Daniel Kulp
On Tuesday 22 April 2008, Jeremy Norris wrote:
 I think not logging the stack traces by default is a good idea. 
 However, In my opinion, the Exception class name should be logged by
 default. Currently, only Exception.getMessage() is logged, which makes
 it difficult to see what kinds of exceptions are being thrown when no
 exception message is set (ie: NullPointerException, or any exception
 for which the semantics of the exception are not included in
 message).

Hmm...  good point.   I'll change this to:

Application has thrown exception, unwinding now: 
+ ex.getClass().getName() + : 
+ ex.getMessage());

That should help.

Thanks!

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


Re: WS-Addressing in CXF (webapp)

2008-04-22 Thread Daniel Kulp
On Tuesday 22 April 2008, Bharath Thippireddy wrote:
 Does CXF use WS-Addressing for Asynchronous callbacks?(Apache axis
 does this)

 When CXF is deployed as an webapplication, are there any additional
 configuration changes that have to be taken care off other than adding
 the following feature to the cxf-servlet.xml endpoints.

 cxf:features
 wsa:addressing/
 /cxf:features

 thanks and regards,
 Bharath

In theory, that's all that should be neccessary.  I'm not sure if it's 
been completely tried though.



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


Re: IndexOutOfBoundsException in MessageContentsList

2008-04-22 Thread Daniel Kulp
 transmitted with it may contain
 confidential and or proprietary information and is provided for the
 use of the intended recipient only. Any review, retransmission or
 dissemination of this information by anyone other than the intended
 recipient is prohibited.  If you receive this email in error, please
 contact the sender and delete this communication and any copies
 immediately. Thank you. http://www.encana.com



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


Re: CXF 2.1 Release Date

2008-04-22 Thread Daniel Kulp

If things go well with the TCK's and stuff tonight, I'll be doing the 
build tomorrow.  Then the vote for a few days

Dan


On Tuesday 22 April 2008, smodekurti wrote:
 Hi there,
 I belong to the enterprise architecture team of a large retail
 corporation. We are in the process of adopting a jax-ws stack for our
 Web Services implementation. After comparing the features offered by
 different stacks, we have decided to go with CXF. But some of the
 features that we wanted to implement in our framework would need cxf
 2.1 runtime which I believe is not stable yet. Is there any defined
 date that you are looking at to release 2.1. We would love to use CXF
 provide we are able to get a stable release for 2.1 at the earliest.

 Srinivas



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


Re: Eclipse XSD validation for jaxws.xsd

2008-04-22 Thread Daniel Kulp
On Tuesday 22 April 2008, Benson Margulies wrote:
 Dan,

 Don't we automatically provide a catalog for this stuff at runtime?

 --benson

Yea.  Spring picks them up fine from the spring schemas stuff in 
META-INF.  However, if you load your beans.xml file into eclipse editor 
to edit it as XML and have it set to validate, eclipse needs to find it 
and eclipse doesn't know about the spring stuff in META-INF.   Thus, a 
separate catalog is needed for eclipse if they aren't resolvable online.  
This is the same for any XML editor.


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


Re: Attributes portName, serviceName and endpointInterface are not allowed in the @WebService annotation

2008-04-22 Thread Daniel Kulp
On Tuesday 22 April 2008, jblack4 wrote:
 Got it.  I was actually going in the java - wsdl direction.
 Since the spec says those 3 attributes are optional, I just dropped
 them all (no longer in SEI or SEI implementation).  Now it just works.

 I have not seen an examples setup like this, using a bare @Webservice,
 nor do I know any future ramifications of doing so.  For now, this is
 the direction we are going.

The only real ramification is that the defaults are not always ideal 
and sometime result in funny wsdls for the ?wsdl generated wsld.   For 
example, if the interface and the impl are in different packages, they 
would get different namespaces and thus you have a wsdl for the service 
that has to import the wsdl for the portType.For the most part, the 
defaults work fine, but double check the ?wsdl to make sure it looks OK.

Dan



 Glen Mazza wrote:
  You're placing those attributes in the SEI (service endpoint
  interface, which is autogenerated by wsdl2java), which is
  incorrect--they are supposed to go with the SEI *implementation*
  (the class that implements it).
 
  See sample here: 
  http://www.jroller.com/gmazza/date/20080417#WFstep6
 
  DoubleItPortTypeImpl is the SEI impl, the autogenerated
  DoubleItPortType is the SEI.
 
  HTH,
  Glen
 
  jblack4 wrote:
  I am using the example code from the link below as a reference, but
  the webapp fails to initialize with the a stack trace.
  
  http://www.lumidant.com/blog/web-services-tutorial-with-apache-cxf/
  http://www.lumidant.com/blog/web-services-tutorial-with-apache-cxf/
 
  I also found a number of examples where the @Webservice annotation
  has multiple combinations of the attributes in question, so I'm
  looking for some definitive help.
 
  I tried using cxf 2.0.2-incubator, 2.0.4-incubator, 2.0.5-incubator
  all with the same issue (on Tomcat 6.0.16).
 
 
  Apr 22, 2008 11:29:23 AM
  org.apache.catalina.core.ApplicationContext log INFO: Initializing
  Spring root WebApplicationContext
  Apr 22, 2008 11:29:28 AM org.apache.catalina.core.StandardContext
  listenerStart
  SEVERE: Exception sending context initialized event to listener
  instance of class
  org.springframework.web.context.ContextLoaderListener
  org.springframework.beans.factory.BeanCreationException: Error
  creating bean with name 'userAdd': Invocation of init method
  failed; nested exception is javax.xml.ws.WebServiceException:
  Attributes portName, serviceName and endpointInterface are not
  allowed in the @WebService annotation of an SEI.
  Caused by: javax.xml.ws.WebServiceException: Attributes portName,
  serviceName and endpointInterface are not allowed in the
  @WebService annotation of an SEI.
 at
  org.apache.cxf.jaxws.support.JaxWsImplementorInfo.initialise(JaxWsI
 mplementorInfo.java:291) at
  org.apache.cxf.jaxws.support.JaxWsImplementorInfo.init(JaxWsImple
 mentorInfo.java:57) at
  org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:253)
  at
  org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:232)
  at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:183)



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


Re: CXF 2.1 Release Date

2008-04-22 Thread Daniel Kulp

I would say Monday.   It's normally 72 hours for the vote, but that 
places it on the weekend.  My honey do list is already too long for 
the weekend so I probably won't get to do the uploads and syncs and 
stuff till Monday.

Dan

On Tuesday 22 April 2008, Vasu Modekurti wrote:
 Dan,
 Thank you very much for the quick response. What could be a possible
 date for official release after tomorrow's build, provided no road
 blocks.

 Srinivas

 On Tue, Apr 22, 2008 at 5:27 PM, Daniel Kulp [EMAIL PROTECTED] wrote:
  If things go well with the TCK's and stuff tonight, I'll be doing
  the build tomorrow.  Then the vote for a few days
 
  Dan
 
  On Tuesday 22 April 2008, smodekurti wrote:
   Hi there,
   I belong to the enterprise architecture team of a large retail
   corporation. We are in the process of adopting a jax-ws stack for
   our Web Services implementation. After comparing the features
   offered by different stacks, we have decided to go with CXF. But
   some of the features that we wanted to implement in our framework
   would need cxf 2.1 runtime which I believe is not stable yet. Is
   there any defined date that you are looking at to release 2.1. We
   would love to use CXF provide we are able to get a stable release
   for 2.1 at the earliest.
  
   Srinivas
 
  --
  J. Daniel Kulp
  Principal Engineer, IONA
  [EMAIL PROTECTED]
  http://www.dankulp.com/blog



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


Re: How to use wsdl2js output?

2008-04-21 Thread Daniel Kulp

One of the IONA folks did a video podcast thing that shows how to use the 
js stuff to access services from an iPhone:

http://open.iona.com/wiki/display/ProdInfo/FMCS+No.+3+-+Accelerate+Web+Development+on+the+iPhone+-+Roland+Tritsch

That might provide another useful starting point.

Dan



On Sunday 20 April 2008, Tim Perrett wrote:
 Hey chaps,

 Just having a play around with the wsdl2js stuff in 2.1 snapshot. I've
 generated a tester service based on
 http://webservices.daelab.net/temperatureconversions/TemperatureConver
sions.wso?WSDL but Im not sure how to use that outputed JS file?

 All the prototype classes are in there, but I cant see which one I
 would need to call? Has anyone got any advice?

 Cheers

 Tim



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


Re: problem serializing class hierarchy

2008-04-21 Thread Daniel Kulp

As Ian mentioned, this is quite a bit easier with JAXWS/JAXB 2.1.  With 
the 2.1 snapshots, you can add

@XmlSeeAlso(FooBar.class) to the IFake interface or to the Foo object to 
allow the runtime to know that the FooBar class should also be added to 
the JAXBContext.  

Alternatively, for CXF 2.0.5 and 2.1, if Foo.java and FooBar.java are in 
the same package, you can add a file called jaxb.index to the package 
that just contains a single line:
FooBar
(don't put a package qualifier there as the jaxb.index only loades 
classes from the same package)  The JAXB databinding will pick that up 
and load those classes as well.

Dan


On Sunday 20 April 2008, Rafael Ribeiro wrote:
 Hi all,

  I have an webmethod that returns an arbitrary class. The problem is,
 on some of its executions it might return some subclass of the class
 that is expressed on the method signature. Instead of getting the
 actual class that was serialized from the webservice the client is
 getting the class that is expressed on the method. Do I have to
 specify anything on the classes that I need to serialize or on the
 method in order for it to correct serialize the expected class?
 I am sending a sample I did to reproduce the problem described above
 (it is deployed on tomcat using CXFNonSpringServlet and service is
 registered using an startupservlet):

  IFake.java
 -

 package fake;

 import javax.jws.WebService;

 @WebService
 public interface IFake {
 public Foo fooOp();
 }

  FakeImpl.java
 -

 package fake;

 public class FakeImpl implements IFake {

 public Foo fooOp() {
 return new FooBar();
 }

 }


  FakeCli.java
 -

 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

 import fake.IFake;

 public class FakeCli {
 private static IFake fakeClient;

 public static void main(String[] args) {
 System.out.println(getFakeClient().fooOp());
 }

 public static IFake getFakeClient() {
 if (fakeClient == null) {
 JaxWsProxyFactoryBean factory = new
 JaxWsProxyFactoryBean(); factory.setServiceClass(IFake.class);
 factory
 .setAddress(
 http://localhost:8080/mywebapp/services/fake;);
 fakeClient = (IFake) factory.create();
 }
 return fakeClient;
 }
 }

  Foo.java
 -

 package fake;

 public class Foo {
 private String foo;

 public String getFoo() {
 return foo;
 }

 public void setFoo(String foo) {
 this.foo = foo;
 }

 }

  FooBar.java
 -

 package fake;

 public class FooBar extends Foo {
 private String fooBar;

 public String getFooBar() {
 return fooBar;
 }

 public void setFooBar(String fooBar) {
 this.fooBar = fooBar;
 }

 }

 --
--

  This webservice is registered by this call on the startupservlet:
 Endpoint.publish(/fake, new FakeImpl());

 and the result of the execution of FakeCli is something like:
 [EMAIL PROTECTED]

 If I try to cast it to FooBar I get a ClassCastException, as expected
 since this class was really instantiated as Foo instead of FooBar



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


Re: Does JavaToWSDL support generics ?

2008-04-21 Thread Daniel Kulp
On Monday 21 April 2008, stlecho wrote:
 Ian,

 Unfortunately, Car is an interface and not a concrete class.

Yea, that would be the issue.  JAXB doesn't support interfaces directly, 
just concrete beans.   To get this to work, you would need to write an 
XmlJavaTypeAdapter to convert the Car objects to a concrete CarImpl or 
something that JAXB can deal with.   That said, I think that will only 
work with 2.1.  We actually have a sample that shows the TypeAdapters in 
the 2.1 kits in the sample/java_first_jaxws directory.

Dan



 Regards, Stefan Lecho.

 ianroberts wrote:
  stlecho wrote:
  Hi,
 
  I would like to generate a WSDL for the following method: public
  ListCar
  getAllCars();.
 
  This should work as you expect, so long as Car is a concrete class
  and not an interface.  If it's an interface things get more
  difficult, but if you search for interface in the list archives
  you should find several threads to help.
 
  Ian
 
  --
  Ian Roberts   | Department of Computer Science
  [EMAIL PROTECTED]  | University of Sheffield, UK



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


Re: Using HTTPClient as a transport

2008-04-21 Thread Daniel Kulp
On Monday 21 April 2008, Paulo Ramos wrote:
 I am a trying to use HTTPClient to send request i CXF HTTP
 transport. I have implemented the Conduit API with HTTPClient but i
 don't understand how do i configure CXF to use my implementation.
 Can anyone help me?

You'll want to create two files:

1) META-INF/cxf/cxf.extension 
This file would just contain the line:
META-INF/cxf/cxf-extension-http-commons.xml
which points to file #2:

2) META-INF/cxf/cxf-extension-http-commons.xml
Is a spring module that would look something like:

beans xmlns=http://www.springframework.org/schema/beans;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xmlns:foo=http://cxf.apache.org/configuration/foo;
   xsi:schemaLocation=
http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd;

import resource=classpath:META-INF/cxf/cxf-extension-http.xml /

bean 
class=org.apache.cxf.transport.http_commons.CommonsHTTPTransportFactory
  id=org.apache.cxf.transport.http_commons.CommonsHTTPTransportFactory
lazy-init=false   
depends-on=org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory
property name=bus ref=cxf/
property name=transportIds
list
valuehttp://schemas.xmlsoap.org/soap/http/value
valuehttp://schemas.xmlsoap.org/wsdl/http//value
valuehttp://schemas.xmlsoap.org/wsdl/soap/http/value

valuehttp://www.w3.org/2003/05/soap/bindings/HTTP//value

valuehttp://cxf.apache.org/transports/http/configuration/value
valuehttp://cxf.apache.org/bindings/xformat/value
/list
/property
/bean
/beans


What that file does it forces your bean to be created/registered after 
the standard one we have in CXF.  Your TransportFactory would then 
have a @PostConstruct method that would register your factory with the 
bus's ConduitInitiatorManager.   Since you would be called after the 
standard ClientOnlyHTTPTransport, you would overwrite what it 
registers and your Conduit stuff would be called.


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


Re: CXF 2.1 B2

2008-04-18 Thread Daniel Kulp
On Thursday 17 April 2008, Arul Dhesiaseelan wrote:
 Hi Dan,

 Is there a plan to release 2.1 beta2 in the coming days?

 Cheers,
 Arul

I was actually hoping to do the full 2.1 release today, but getting all 
the incubator stuff stripped out (without breaking everything) has taken 
more work than I thought.  Thus, I expect to have full 2.0.6 and 2.1 
releases ready to be voted on early/mid next week.  

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


Re: Does JavaToWSDL support generics ?

2008-04-17 Thread Daniel Kulp

What version of CXF?   That should definitely be working.

Dan


On Thursday 17 April 2008, stlecho wrote:
 Hi,

 I would like to generate a WSDL for the following method: public
 ListCar getAllCars();. In the generated WSDL I expect to have
 something similar to 'xs:element
 name=getAllCarsResponsexs:complexTypexs:sequencexs:element
 minOccurs=0 name=return nillable=true
 type=xxx:Car//xs:sequence/xs:complexType/xs:element'.

 When using JavaToWSDL, the generated WSDL contains 'xsd:element
 name=getAllCars type=tns:getAllCars /xsd:complexType
 name=getAllCarsxsd:sequence //xsd:complexTypexsd:element
 name=getAllCarsResponse type=tns:getAllCarsResponse
 /xsd:complexType
 name=getAllCarsResponsexsd:sequencexsd:element
 maxOccurs=unbounded minOccurs=0 name=return
 //xsd:sequence/xsd:complexType'. There is no reference to the
 'Car' element :o(.

 Based on this experience I was wondering if JavaToWSDL supports
 generics or should I specify an additional parameter to generate a
 reference to the 'Car' element in the 'getAllCarsResponse' element ?

 Regards, Stefan Lecho.



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


Re: Invalid SOAP message

2008-04-16 Thread Daniel Kulp

Those extra character are due to the Transfer-Encoding: chunked.  It 
looks like the cobol server doesn't support the chunked encoding.You 
can look at the docs for the HTTPConduit at:
http://cwiki.apache.org/CXF20DOC/client-http-transport.html
to turn off the chunking.  Via code, it would look like:

  // Okay, are you sick of configuration files ?
  // This will show you how to configure the http conduit dynamically
  Client client = ClientProxy.getClient(poltim);
  HTTPConduit http = (HTTPConduit) client.getConduit();
  HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
  httpClientPolicy.setAllowChunking(false);
  http.setClient(httpClientPolicy);


Dan 


On Wednesday 16 April 2008, Jan Pechanec wrote:
 I have problem with SOAP request message generated with Apache CXF
 2.0.4. I generated java client from WSDL (wsdl2java), and tried to
 call web service running in the cobol MicroFocus Enteprise Server -
 the response was following:
 ...
 faultcodeClient/faultcode
 faultstringError in client request message/faultstring
 ...

 I suppose it means that SOAP request message is bad for the server
 side of web service.
 I tried following:
 Apache CFX client - cobol server : Error in client request message
 soapUI client generated from WSDL - cobol server : OK
 Apache CFX client - soapUI Mock service generated from WSDL : OK

 In the tcpmon I can see that there are strange chars (ed, 0)
 around SOAP message.
 I suppose this is the problem, but why there are these chars?
 See below.

 
 POST / HTTP/1.1
 Content-Type: text/xml; charset=UTF-8
 SOAPAction: 
 Accept: *
 Cache-Control: no-cache
 Pragma: no-cache
 User-Agent: Java/1.6.0_04
 Host: localhost:8081
 Connection: keep-alive
 Transfer-Encoding: chunked

 ed
 soap:Envelope
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:BodyRea
d
 xmlns=http://tempuri.org/wmapserv;BookStockno/BookStocknoBo
okTitle/BookTitleBookAuthor/BookAuthor/Read/soap:Body/soap:
Envelope 0
 --

 Thank you for any help, any hint,
 Jan



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


Re: soap requests with no attributes or elements

2008-04-16 Thread Daniel Kulp
On Wednesday 16 April 2008, Fazle Khan wrote:
 I'm using spring-ws contract-first wsdl generation so I'll see if the
 users on that form have a suggestion.

 btw,  I did find 2 work arounds till I find a better solution

 1.  pass in an empty string for the Object parameter of the service.
 2.  Add an empty complexType to the Request that way a typed parameter
 is used in the service method and the class is generated.

   xs:element name=AllInstrumentsRequest
  xs:complexType /
  /xs:element

This is actually the proper way to do it.   According to the schema spec, 
if you do:

xs:element name=AllInstrumentsRequest/

The type of the element is actually a xsd:anyType, not a nothing.   
Thus, anything can be set into that element which is why it's mapped to 
a java.lang.Object from the code generator.   

By putting an empty complexType in there, you are giving it an explicit 
type instead of anyType.  (it's an anonymous type, but it IS a type)


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


Re: CXF, WS-Policy and Spring

2008-04-16 Thread Daniel Kulp

 Would it work if I used WSDL first? However, I guess I won't be able
 to use Spring's dependency injection then, will I? :-(

Yes you can.  The wsdl first stuff doesn't change the spring injection 
stuff at all.   All it really does is tell the runtime to publish that 
specific wsdl instead of generating one dynamically at runtime.  

Dan



On Wednesday 16 April 2008, Gerhard Schlager wrote:
 Hello Sergey,

 Sergey Beryozkin wrote:
  I'm sorry to say it but I've never got to ensuring that for
  java-first services WS-Policy expressions get automatically added to
  a (generated) WSDL. I can't commit myself to fixing this issue at
  this stage, but whenever I get a chance to look at a WS-Policy
  stuff, I'll get it fixed first as it's obvious it's a major blocket
  to utilizing the CXF WS-Policy framework at a wider scale.
 
  Current WS-Policy implementation is a bit complicated, but the fix
  for this issue should be reasonably simple, it would probably
  require an update to a WS-PolicyFeature implementation which should
  register the policy extensors it discovers from a spring
  configuration with either the Endpoint or WSDLManager...

 Now I'm a little bit confused. After reading [1] I thought it would be
 possible to configure the WS-Policy with Spring. I just couldn't get
 it working because of some exceptions (I can post them in a few hours
 if you need them) that Spring was throwing at me. ;-)
 So, are you saying it currently can't be done at all? That would be
 too bad. I had some problems with Sun's Metro in conjunction with
 Spring and Hibernate so I switched back to CXF. It looks like I can't
 use both of them. Writing my own patch is not possible since I need a
 solution within the next few days.

 Would it work if I used WSDL first? However, I guess I won't be able
 to use Spring's dependency injection then, will I? :-(

 [1]
 http://netzooid.com/blog/2007/04/23/cxf-spring-and-ws-policy-internals
/



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


Re: Q: Issues when attempting to send . Wind up with gt;

2008-04-16 Thread Daniel Kulp

Don't pre-escape it.   Let the CXF runtime escape it.   The runtime 
doesn't know if a string that is being passed in is XML or just a 
straight string.   Thus, it will always escape any of the XML special 
characters.  You don't need to do it.

Dan


On Wednesday 16 April 2008, adam_j_bradley wrote:
 Interestingly, when I inspect the variable I see
 http://www.papernapkin.org/pastebin/view/500/

 But the result in the trace to the Console via the
 LoggingOutInterceptor is still incorrect.

 Adam



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


Re: Embedded jetty with session support

2008-04-16 Thread Daniel Kulp
On Tuesday 15 April 2008, versus wrote:
 Hi Dan,

 thanks for your fast answer. The proposed solutions worked.
 Now I have another question:
 - I'm writing unit tests for web service implementation which gets
 some config through the session
 (servlet reads the init params and stores the config in the session).
 Unfortunately, the implementation can't be changed. Somehow I need to
 pass this config from the client.
 What are possible options? I'm interested in easy solution.

Hmm about the only thing I can think of is to write a quick 
interceptor that fills in the session data with the data required for 
your testing environment.  Register that on the endpoint once it's 
published.

Dan




 Keep up the great job! I already convinced a friend developer to
 switch to CXF ;-)

 dkulp wrote:
  Hm...  well, this isn't quite as easy as I had hoped it would be due
  to a protected method that probably should be public.
 
  Right now, the ONLY way to configure the session support is via a
  spring config.   Thus, in your test, you could have a spring xml
  config to configure the session support and create a Bus based on
  that prior to publishing your service.The OTHER option is to
  publish a dummy service on the port you want so the jetty engine
  starts up, grab the JettyHTTPServerEngineFactory from the bus, get
  the JettyHTTPServerEngine for the port, call the
  setSessionSupport(true) method, then publish the real service you
  want.
 
  The main problem is that the method:
  JettyHTTPServerEngine createJettyHTTPServerEngine(int port, String
  protocol)
  on the JettyHTTPServerEngineFactory is not public.   I'm going to
  make it public in my next commit.   Ideally, you would get the
  JettyHTTPServerEngineFactory from the Bus, call that method to get
  the engine for the port you want, configure it, then publish your
  service. Right now, the dummy service needs to be published first to
  make sure that method is called.
 
  Dan
 
  On Monday 14 April 2008, versus wrote:
  Hi all,
 
  where can I find more information regarding jetty-configuration?
  I took a look at the
  http://cwiki.apache.org/CXF20DOC/jetty-configuration.html page, but
  some things are still unclear to me, e.g. how does this fit in the
  server configuration/initialization and what should be done on the
  client side?
 
  What I want to setup is: unit testing framework = cxf + embedded
  jetty with session support
  The setup should be as easy as possible.
 
  Thanks for any help!
 
  --
  J. Daniel Kulp
  Principal Engineer, IONA
  [EMAIL PROTECTED]
  http://www.dankulp.com/blog



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


Re: ws-transaction

2008-04-16 Thread Daniel Kulp
On Monday 14 April 2008, sudip shrestha wrote:
 Are there any plans on implementing ws-transaction specs with apache
 cxf or is there any work going on regarding this yet?
 Thanks,

As far as I know, there hasn't been any work started on this.   There 
really hasn't been much demand. 

We'd LOVE to see someone pick this up and start working on it.  I just 
don't know if any of us would have the time to prioritize it.  If you 
are interested in  doing so, I'd be happy to be a mentor and help you 
get started.

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


Fwd: CXF has graduated!

2008-04-16 Thread Daniel Kulp

Forwarding this to cxf-user as it's as important for them as well. 

Dan

--  Forwarded Message  --

Subject: CXF has graduated!
Date: Wednesday 16 April 2008
From: Jim Jagielski [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

I am happy and proud to announce that at this month's board
meeting, we have approved CXF's graduation out of the Incubator
and as a TLP. Dan Kulp was approved as VP of the PMC.

Congrats to one and all!

---

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


Re: [2.0.5] no write methods....

2008-04-15 Thread Daniel Kulp

It might be due to the setVersion method being protected, not public.  
Thus, it might not see it as a propery as there aren't public getters 
and setters.  Not really sure though.

Dan


On Tuesday 15 April 2008, Benson Margulies wrote:
 I've never heard of @Version. I very much doubt that Aegis sees it.

 What version of CXF are you using? Could you please post a
 self-contained test case to Jira?


 On Mon, Apr 14, 2008 at 10:03 PM, Mick Knutson [EMAIL PROTECTED]

 wrote:
  I am getting this error now:
 
  *INFO: Interceptor has thrown exception, unwinding now
  java.lang.RuntimeException:
  org.apache.cxf.aegis.DatabindingException: No write method for
  property {http://domain.baselogic.com}version in class
  com.baselogic.domain.Address
 at
 
  org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD
 ataReader.java:92) at
 
  org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD
 ataReader.java:44) *
  Here is my address object and versioned objects:
 
  *Address:*
  [EMAIL PROTECTED]
  @Table(name = address)
  public class Address extends IdentifiedObject implements
  Serializable {
 
 private static final long serialVersionUID =
  3617859655330969141L; protected String address;
 protected String city;
 protected String province;
 protected String country;
 protected String postalCode;
 
 public Address() {
 }
 
 public Address(Long id) {
 setId(id);
 }
 
  *
 
  *VersionedObject:
  [EMAIL PROTECTED]
  public class VersionedObject implements Serializable {
 private static final long serialVersionUID = 1L;
 
 protected Integer version;
 
 @Version
 public Integer getVersion() {
 return version;
 }
 
 protected void setVersion(Integer version) {
 this.version = version;
 }
 
  }
  *
 
 
  So what is the issue with @Version?
  When I remove this set/get method, everything is fine.
 
 
 
  --
  Thanks,
  Mick Knutson
 
  http://www.baselogic.com
  http://www.blincmagazine.com
  http://www.linkedin.com/in/mickknutson
  http://www.djmick.com
  http://www.myspace.com/mickknutson
  http://www.myspace.com/BLiNCMagazine
  http://tahoe.baselogic.com
  ---



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


Re: [2.0.5] no write methods....

2008-04-15 Thread Daniel Kulp
On Tuesday 15 April 2008, Benson Margulies wrote:
 Aegis doesn't know from DAO and Domain objects. It just knows that you
 want to map a class to XML. It requires a way to both retrieve and set
 a field. Dan, is JAXB more permissive here? If so, I guess we could
 change Aegis to permit Java-XML and throw on XML-Java.

Well, JAXB CAN be more permissive as you can tell jaxb to completely 
ignore the getter/setters and access the fields directly.   That's 
actually the default if you annotate the field with the @XmlElement 
annotation instead of the getter.   Since most people annotate the field 
instead of the methods, it will normally access the field directly.

However, if you DON'T put @XmlElement annotations on things, then the 
default behavior for JAXB would be exactly the same.   It wouldn't find 
a public property named version as there wouldn't be a setter 
available.


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


Re: Qualified/unqualified namespace interoperability problem

2008-04-14 Thread Daniel Kulp
 buggy ... :-(

 Thank you very much for any comments.

 Best regards,
 Pierre



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


Re: [CXF] deployment problems

2008-04-14 Thread Daniel Kulp
On Monday 14 April 2008, Cencio wrote:
 If i remove the wsdlLocation, the wsdl is correctly generated and
 everything works fine (all calls are replyed with my message). If i
 leave, the http://localhost:8080/ese6/ordine?wsdl is correctly showign
 WEB-INF/ordini.wsdl but all calls are threat as oneway... if u need i
 can send the war and sources.

If you could, that would be GREAT!  Having a reproducable testcase makes 
it MUCH easier to figure out what's going on.

You can send it directly to me at [EMAIL PROTECTED] to avoid the apache 
spam filters that tend to rip of attachments.

Dan





 Thx for any help,
 Lorenzo



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


Re: [CXF] deployment problems

2008-04-14 Thread Daniel Kulp

I got the testcase, thanks.


Just to clarify, I need to uncomment the operation in the wsdl as well.


That said, if I do that, it actually works for me with the 2.1 trunk.  I 
get:

 [java] Invoking notifica...
 [java] Invoking submitOrdine...
 [java] submitOrdine.result=123456

That said, it's wrong.  If I wireshark the actual wire transfer, the 
notifica operation is returning an empty soap message response.   Thus, 
there is an issue. 

Actually, now that I think about it, there were a LOT of changes in the 
one-way stuff for 2.1 as the 2.1 JAX-WS TCK has a WHOLE bunch of new 
tests for one-ways that the 2.0 tck doesn't have.   Thus, it may be 
working just because of those changes.   I'll have to get a 2.0.x 
environment setup.   That will take a bit longer, but I do want to get 
it properly working for 2.1 since we hope to release 2.1 later this week 
so that's actually going to be my priority for today.

Dan


On Monday 14 April 2008, Cencio1980 wrote:
 Hi Dan,

 that's my testcase.

 As i told you in the last mail i found that removing OneWay operation
 the request/response one now works. if i add it all operations works
 as oneway.

 check build.xml for the tomcat path..

 ant deployto deploy
 ant run_Client   to run the client



 (edit
 client/org/rivenditore/ordine/OrdineInterface_OrdineInterfaceEndpoint_
Client.java uncomment the call for oneway operation to add it)



 Thx, Lorenzo


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


Re: [2.0.5] Help to get soap message from Spring service...

2008-04-14 Thread Daniel Kulp

Few questions: 

1) Is there a wsdl for this service?

2) How is your factory configured/created?  Do you have the code?

3) Is your factory a simple frontend or jaxws?   If jaxws, is the 
UserManager class properly annotated?

It looks like the service is either RPC/Literal or it's using a mix of 
schema qualifications. The schema with the targetNamespace of:
http://service.baselogic.com/
seems to be unqualified and the schema with targetNamespace of:
http://domain.baselogic.com
is qualified.  Do you have generated types for the 
http://service.baselogic.com stuff or are you letting CXF do it?  

Most likely, the best bet is to go with the JAX-WS factory and make sure 
the interface is properly annotated.


Dan



On Monday 14 April 2008, Mick Knutson wrote:
 I am trying to setup a UserService via Spring that takes a userId, and
 returns a User object.

 I setup a LoggingInterceptor, and I seem to be getting a user object
 back: *INFO: Outbound Message
 ---
 Encoding: UTF-8
 Headers: {SOAPAction=[], Accept=[*]}
 Messages:
 Payload: soap:Envelope xmlns:soap=
 http://schemas.xmlsoap.org/soap/envelope/;soap:Bodyns1:getUser
 xmlns:ns1=http://service.baselogic.com/;
 userId-1/userId/ns1:getUser/soap:Body/soap:Envelope
 --
 14-Apr-2008 10:02:32 org.apache.cxf.interceptor.LoggingInInterceptor
 logging INFO: Inbound Message
 
 Encoding: UTF-8
 Headers: {Content-Length=[1576], Date=[Mon, 14 Apr 2008 17:02:32 GMT],
 SOAPAction=[], Server=[Apache-Coyote/1.1],
 content-type=[text/xml;charse t=UTF-8]}
 Messages:
 Message:

 Payload: soap:Envelope xmlns:soap=
 http://schemas.xmlsoap.org/soap/envelope/;soap:Bodyns1:getUserResp
onse xmlns:ns1=http://service.baselogi
 c.com/returnns2:address xmlns:ns2=http://domain.baselogic.com
 ns2:address725 Florida Street #5/ns2:addressns2:citySan
 Francisco/ns2

 :cityns2:countryUS/ns2:countryns2:id-1

 /ns2:idns2:postalCode94110/ns2:postalCodens2:provinceCA/ns2:p
rovincens2:version1/ns2:ve rsion/ns2:addressns2:confirmPassword
 xmlns:ns2=
 http://domain.baselogic.com; xmlns:ns3=
 http://www.w3.org/2001/XMLSchema-instance; ns3:nil=t
 rue /ns2:email xmlns:ns2=http://domain.baselogic.com;
 [EMAIL PROTECTED]/ns2:emailns2:firstName xmlns:ns2=
 http://domain.baselogic.com;

 Mick/ns2:firstNamens2:id

 xmlns:ns2=http://domain.baselogic.com;-1/ns2:idns2:lastName
 xmlns:ns2=http://domain.baselogic.com;Knutson/ns
 2:lastNamens2:password
 xmlns:ns2=http://domain.baselogic.com;12dea96fec20593566ab75692c9949
596833adc9/ns2:passwordns2:passwordHint xmlns:n
 s2=http://domain.baselogic.com;A male
 kitty./ns2:passwordHintns2:phoneNumber xmlns:ns2=
 http://domain.baselogic.com;(415) 555-1804/ns2:pho
 neNumberns2:roles xmlns:ns2=http://domain.baselogic.com;
 xmlns:ns3= http://www.w3.org/2001/XMLSchema-instance; ns3:nil=true
 /ns2:username
 xmlns:ns2=http://domain.baselogic.com;mickknutson/ns2:usernamens2
:version
 xmlns:ns2=http://domain.baselogic.com;1/ns2:versionns2:websit e
 xmlns:ns2=http://domain.baselogic.com;http://baselogic.com
 /ns2:website/return/ns1:getUserResponse/soap:Body/soap:Envelo
pe *


 So when I do this:

 *UserManager userManager = (UserManager) factory.create();*
 then *userManager.getUser(-1);* I get a null User Object. Not the
 object I see in my soap envelope above.

 How do I get my User Object? All the examples I see show me to do the
 same thing I am already doing, but this does not work
 Thanks for your help



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


Re: Embedded jetty with session support

2008-04-14 Thread Daniel Kulp

Hm...  well, this isn't quite as easy as I had hoped it would be due to a 
protected method that probably should be public.  

Right now, the ONLY way to configure the session support is via a spring 
config.   Thus, in your test, you could have a spring xml config to 
configure the session support and create a Bus based on that prior to 
publishing your service.The OTHER option is to publish a dummy 
service on the port you want so the jetty engine starts up, grab the 
JettyHTTPServerEngineFactory from the bus, get the JettyHTTPServerEngine 
for the port, call the setSessionSupport(true) method, then publish the 
real service you want.

The main problem is that the method:
JettyHTTPServerEngine createJettyHTTPServerEngine(int port, String 
protocol)
on the JettyHTTPServerEngineFactory is not public.   I'm going to make it 
public in my next commit.   Ideally, you would get the 
JettyHTTPServerEngineFactory from the Bus, call that method to get the 
engine for the port you want, configure it, then publish your service.   
Right now, the dummy service needs to be published first to make sure 
that method is called.

Dan




On Monday 14 April 2008, versus wrote:
 Hi all,

 where can I find more information regarding jetty-configuration?
 I took a look at the
 http://cwiki.apache.org/CXF20DOC/jetty-configuration.html page, but
 some things are still unclear to me, e.g. how does this fit in the
 server configuration/initialization and what should be done on the
 client side?

 What I want to setup is: unit testing framework = cxf + embedded jetty
 with session support
 The setup should be as easy as possible.

 Thanks for any help!



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


Re: [CXF] deployment problems

2008-04-14 Thread Daniel Kulp

This is now fixed on trunk.   I'll get another 2.1 snapshot out later 
today as there are several other fixes that need to get out to people to 
test as well.

Dan


On Monday 14 April 2008, Daniel Kulp wrote:
 I got the testcase, thanks.


 Just to clarify, I need to uncomment the operation in the wsdl as
 well.


 That said, if I do that, it actually works for me with the 2.1 trunk. 
 I get:

  [java] Invoking notifica...
  [java] Invoking submitOrdine...
  [java] submitOrdine.result=123456

 That said, it's wrong.  If I wireshark the actual wire transfer, the
 notifica operation is returning an empty soap message response.  
 Thus, there is an issue.

 Actually, now that I think about it, there were a LOT of changes in
 the one-way stuff for 2.1 as the 2.1 JAX-WS TCK has a WHOLE bunch of
 new tests for one-ways that the 2.0 tck doesn't have.   Thus, it may
 be working just because of those changes.   I'll have to get a 2.0.x
 environment setup.   That will take a bit longer, but I do want to get
 it properly working for 2.1 since we hope to release 2.1 later this
 week so that's actually going to be my priority for today.

 Dan

 On Monday 14 April 2008, Cencio1980 wrote:
  Hi Dan,
 
  that's my testcase.
 
  As i told you in the last mail i found that removing OneWay
  operation the request/response one now works. if i add it all
  operations works as oneway.
 
  check build.xml for the tomcat path..
 
  ant deployto deploy
  ant run_Client   to run the client
 
 
 
  (edit
  client/org/rivenditore/ordine/OrdineInterface_OrdineInterfaceEndpoin
 t_ Client.java uncomment the call for oneway operation to add it)
 
 
 
  Thx, Lorenzo



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


Re: Really Silly Deploy on Tomcat without Spring

2008-04-14 Thread Daniel Kulp

That message is coming out of the Sun reference implementation, not CXF. 
Somehow, the RI is being picked up in stead of CXF.   Can you make sure 
the CXF jars are properly in the war or available in the app server 
classpath?   In particular, if you aren't using the CXF bundle jar, you 
would need the cxf-rt-frontend-jaxws jar.

Also, is this java 6?   You might also want to try java 5 which doesn't 
have the RI built in to make sure it's not getting confused.

Dan


On Monday 14 April 2008, Rafael Ribeiro wrote:
 Hi all,

  After googling for a few hours, I (think I) am about to run a relly
 silly application using CXF on Tomcat without Spring.
  I made a servlet that extends CXFNonSpringServlet and its init is:
   public void init() throws ServletException {
   super.init();
   Endpoint.publish(http://localhost/foo/services/hello;, new
 FooImpl()); }

 and I get this exception:
 com.sun.xml.internal.ws.model.RuntimeModelerException: runtime modeler
 error: Wrapper class foo.bar.jaxws.Hello is not found. Have you run
 APT to generate them?

 I somehow followed
 http://cwiki.apache.org/CXF20DOC/servlet-transport.html since it is
 too vague and it seems like some steps were accidentally (or
 intentionally) omitted.

 Am I doing everything wrong or I had only missed something really
 stupid (or simple)?

 best regards,
 Rafael Ribeiro



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


Re: Using cxf with external web-services

2008-04-11 Thread Daniel Kulp

For the most part, you can just do:

wsdl2java http://www.webservicex.net/globalweather.asmx?WSDL

Then in your code, just do:

GlobalWeather weather = new GlobalWeather();
GlobalWeatherSoap port = weather.getGlobalWeatherSoap();
String result = port.getWeather(city, country);


Dan



On Friday 11 April 2008, Valerio Schiavoni wrote:
 Hello everyone,
 suppose I want to write a client application to use the  meteo
 webservice at this address:

 http://www.webservicex.net/globalweather.asmx?WSDL

 What are the steps to do so using CXF ?
 I've been using wsdl2java to geneate java classes and interfaces, but
 it's not quite clear how to combine such classes with cxf. In
 particular, up to now I've been using cxf to generate clients using
 the
 ClientProxyFactoryBean...or the DynamicClientfactory to generate the
 client.

 So, help is very appreciated.

 Cheers,
 Valerio



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


Re: Adding headers to soap request?

2008-04-11 Thread Daniel Kulp


OK.  I'm sick of answering this.  :-)

Added to the FAQ:
http://cwiki.apache.org/confluence/display/CXF/FAQ#FAQ-HowcanIaddsoapheaderstotherequest%2Fresponse%3F

Dan


On Friday 11 April 2008, Tim Perrett wrote:
 Hey chaps,

 Is there a way to add headers to the soap request inside the CXF
 service class? (or any other way)

 Cheers, Tim



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


Re: Problems resolving schemas using http, when wsdl is in a jar

2008-04-11 Thread Daniel Kulp

It probably is a bug in CXF.   Feel free to log it.  (and a patch would 
be nice :-)

However, there is another issue that you need to think about:

If the xsd's are to be hosted from the same localhost container as the 
service, the service may not start.  For example, in tomcat, it loads 
and initializes all wars before starting the port listener.  Thus, if we 
try to go back to http://localhost; to get the xsd, there won't be 
anything listening on the port and we won't be able to get the wsdl.   
The service won't start. 


Dan



On Thursday 10 April 2008, [EMAIL PROTECTED] wrote:
 Hi,

 I'm writing some code that will allow me to deploy webservices that
 has been setup as ServicePoints in Hivemind. This way I can build
 components (JARs) with the webservice that I want to deploy and just
 add them to the classpath of my WAR project and they will deployed. No
 need to configure everything in one xml file, distributed
 configuration (maybe something to commit back to CXF when I'm
 done?).
 It works just fine until I realize that I want to import XSD schemas
 in my WSDLs to allow validation of the SOAP requests.
 Now, I have several webservices sharing XSDs (one entity model for
 several services and so on) so I don't want to package the XSDs in the
 JAR that contains the implementation code and the WSDL for the actual
 service. I add an import for a external resource in my test.wsdl:

 xsd:import . schemaLocation=http://localhost/entities/user.xsd;
 /

 Generating Java code with WSDL2JAVA works fine, and I set the
 @Webservice annotation accordingly
 (wsdlLocation=schemas/service/test.wsdl), the WSDL will reside in the
 JAR file that is built with the service code, the XSDs are NOT, they
 reside on a server (in this case localhost).
 Now, when I deploy my WAR file containing the JAR I get an error
 (removing the wsdlLocation from the Webservice annotation - thus
 building service from SEI instead of WSDL - will work just fine, but
 then I lose the validation!) like this:

 ...XMLSchemaException: Unable to locate imported document at
 'http://localhost/entities/user.xsd', relative to
 'jar:file://.../warfile.war/WEB-INF/lib/test.jar!/schemas/services
/test. wsdl'.
 at
 org.apache.cxf.catalog.CatalogXMLSchemaURIResolver.resolveEntity(Catal
ogXMLS chemaURIResolver.java:71).

 Digging down in the code we end up in the ExtendedURIResolver.resolve
 (line 42) that makes a call to resolve in
 org.apache.cxf.resource.URIResolver.resolve.
 This method totally ignores that my URI starts with 'http' it just
 assumes a JAR, CLASSPATH or FILESYSTEM path. This seems kind of silly?
 Any URL should be possible to resolve? If I change the baseUriStr
 (jar:file://) - removing the 'jar:' when debugging I can get it to
 work since then I end up in the tryFileSystem method which actually
 can resolve a HTTP URL, I'm thinking that this should be tried if JAR
 resolving fails? Or maybe even before JAR resolving?
 What do you think? Should I file this as an JIRA issues? I feel it's a
 bug, easy to fix as well, and would to get it fixed in the next
 release of CXF.


 Regards,
 Peter

 
 Peter Liljenberg
 TeliaSonera AB
 Software Architect, TSS-IT Channel Technologies

 Cell: +46 (0)703 790 793
 e-mail: [EMAIL PROTECTED]
 -



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


Re: Using cxf with external web-services

2008-04-11 Thread Daniel Kulp


The jaxws-api jar is missing of the classpath somehow.   That class comes 
from that jar.

Dan


On Friday 11 April 2008, Tim Perrett wrote:
 This interested me, as Im trying to get to grips with CXF.

 I just tried to put together a basic client (and even tried the WSDL
 below) but im getting odd problems when trying to run it. Even in its
 most simple form (very similar to the hello world on the wiki -
 http://cwiki.apache.org/CXF20DOC/developing-a-consumer.html ) I get
 this error:

 timperrett$ java com.timperrett.soap.temperature.App
 Starting...
 Exception in thread main java.lang.NoClassDefFoundError: javax/xml/
 ws/Service
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
  at
 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124
) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at
 java.net.URLClassLoader.access$100(URLClassLoader.java:56) at
 java.net.URLClassLoader$1.run(URLClassLoader.java:195) at
 java.security.AccessController.doPrivileged(Native Method) at
 java.net.URLClassLoader.findClass(URLClassLoader.java:188) at
 java.lang.ClassLoader.loadClass(ClassLoader.java:316) at
 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java: 280)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
 374)
  at com.timperrett.soap.temperature.App.main(App.java:31)

 Line 31 in my (extremely basic) application reads:

 31: GlobalWeather weather = new GlobalWeather();

 I have all the relevant imports etc but still no joy - any ideas?

 Cheers

 Tim

 On 11 Apr 2008, at 16:37, Daniel Kulp wrote:
  For the most part, you can just do:
 
  wsdl2java http://www.webservicex.net/globalweather.asmx?WSDL
 
  Then in your code, just do:
 
  GlobalWeather weather = new GlobalWeather();
  GlobalWeatherSoap port = weather.getGlobalWeatherSoap();
  String result = port.getWeather(city, country);



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


Re: [CXF] deployment problems

2008-04-11 Thread Daniel Kulp
){
   System.out.println(Errore SOAP:  + soapex);
   soapex.printStackTrace();
   }
   catch(Exception ex){
   System.out.println(Errore SOAP:  + ex);
   ex.printStackTrace();
   }

   return res;
   }
 }







 Any tip?


 Thx all,
 Lorenzo



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


Re: bi-directional relationships

2008-04-11 Thread Daniel Kulp

Wow.   This is neet.   I didn't know about this one at all.  I honestly 
though JAXB wouldn't do it.   I learned something today.  :-)

Thanks Glen!
Dan


On Thursday 10 April 2008, Glen Mazza wrote:
 Here you go:
 https://jaxb.dev.java.net/guide/Mapping_cyclic_references_to_XML.html

 Glen

 Am Donnerstag, den 10.04.2008, 16:12 -0700 schrieb

 [EMAIL PROTECTED]:
  I'm using CXF 2.0.5. My Web Service is as follows:
  @WebService(endpointInterface = com.sybase.it.quoting.QuoteBroker,
  portName = QuoteBroker, targetNamespace =
  http://quoting.it.sybase.com;, name = QuoteBroker)
  @SOAPBinding(parameterStyle = ParameterStyle.WRAPPED, style =
  Style.DOCUMENT, use = Use.LITERAL)
  @Service(quoteBroker)
  public abstract class QuoteBrokerImpl implements QuoteBroker ...
 
 
  I am returning DTO's from my web service that are populated with
  data from my Hibernate objects. The problem that I am running into
  now is the following exception:
 
  INFO: Interceptor has thrown exception, unwinding now
  org.apache.cxf.interceptor.Fault: Marshalling Error: A cycle is
  detected in the object graph. This will cause infinitely deep XML:
  [EMAIL PROTECTED] -
  [EMAIL PROTECTED] -
  [EMAIL PROTECTED]
 
  This is due to the relationship that is defined.  Quote -
  QuoteLineItem - Quote
  Because the relationship is bi-directional I am seeing this
  exception occurring. The Web Service is a replacement of an old Axis
  1.0 RPC/Encoded web service. Now that I have it running with CXF
  using
  Document/Literal/Wrapped I am seeing this issue.
 
  How have others resolved/worked around this issue?
 
  Thanks...
 
  Chris Mathrusse
  [EMAIL PROTECTED]
  Sybase, Inc
  One Sybase Drive
  Dublin, CA 94568
  (925) 236-5553



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


Re: NPE org.apache.cxf.attachment.AttachmentSerializer.writeAttachments

2008-04-11 Thread Daniel Kulp
ination.java:92) at
 org.apache.cxf.transport.servlet.ServletController.invokeDestination(S
ervletController.java:213) at
 org.apache.cxf.transport.servlet.ServletController.invoke(ServletContr
oller.java:150) at
 org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXF
Servlet.java:170) at
 org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXF
Servlet.java:148) 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(Appli
cationFilterChain.java:269) at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
lterChain.java:188) at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
lve.java:213) at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
lve.java:174) at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticat
orBase.java:525) at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
va:127) at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
va:117) at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv
e.java:108) at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
:174) at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
874) at
 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.pr
ocessConnection(Http11BaseProtocol.java:665) at
 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoi
nt.java:528) at
 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFoll
owerWorkerThread.java:81) at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo
ol.java:689) at java.lang.Thread.run(Thread.java:595)
 Caused by: javax.xml.stream.XMLStreamException: Trying to output
 second root, soap:Fault
 at
 com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.jav
a:1473) at
 com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.jav
a:1480) at
 com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.j
ava:1508) at
 com.ctc.wstx.sw.BaseNsStreamWriter.checkStartElement(BaseNsStreamWrite
r.java:444) at
 com.ctc.wstx.sw.SimpleNsStreamWriter.writeStartOrEmpty(SimpleNsStreamW
riter.java:260) at
 com.ctc.wstx.sw.BaseNsStreamWriter.writeStartElement(BaseNsStreamWrite
r.java:319) at
 org.apache.cxf.binding.soap.interceptor.Soap11FaultOutInterceptor.hand
leMessage(Soap11FaultOutInterceptor.java:71) ... 29 more

 Can anybody explain me what happens here and how I can change my code
 this exception disappears?

 Help is appreciated,
 Christoph



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


Re: JiBX and CXF

2008-04-11 Thread Daniel Kulp

No one really ended up with having the time to implement it.  :-(

Unfortunately, it hasn't really been a priority for me as none of IONA's 
paying customers have even asked for it at all.  (plus, the fact many of 
us have never even used JiBX at all doesn't help)Even the xmlbeans 
support is limitted right now.   I started working on it when there was 
some interest, but the interested party changed to JAXB and I never 
really had time to go back and do the tooling side of things as other 
priorities kept popping up.

That said, if you are interested in working on it, I'd be more than happy 
to help be a mentor.  Getting basic runtime support working is probably 
not very hard since JiBX has stax API's already. (if I remember 
correctly)  Tooling might be trickier as the only data model we have in 
the tooling right now is jaxb so I'm not sure how abstracted out it is 
yet.  (From experience, if code supposedly supports N plugins, if N==1, 
there is usually something that was forgotten or not properly abstracted 
to fully support the N1 case.)


Dan



On Thursday 10 April 2008, ron_honeyman wrote:
 I noticed on the CXF Roadmap
 (http://cwiki.apache.org/confluence/display/CXF/Roadmap) page it
 references JiBX and the possiblility that it may be in version 2.1 or
 may slip to version 2.2. I was curious if anyone could tell me if it
 has been included with 2.1 or not? If it has is there any
 documentation I could look at for integrating with it.

 Thanks

 Ron Honeyman



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


Re: Problem with CXF WAS Deployment

2008-04-11 Thread Daniel Kulp


Just fyi, I finally managed to get tomcat running from a dir with spaces 
in it (had to hack the catalina.sh script a bit) and it seems to work 
fine with the latest  CXF code.   I deployed a bunch of wars with wsdl's 
and imports and such and they all seemed to work.

Dan

On Wednesday 09 April 2008, Daniel Kulp wrote:
 Any chance you can try with CXF 2.0.5?   I know I fixed a BUNCH of
 issues with URL's with spaces in them a little while ago.  It MAY have
 been for 2.0.4, but definitely 2.0.5.

 Meanwhile, I'll try testing some stuff here.  I cannot even get tomcat
 to start from a dir with a space in it to test this.  :-(


 Dan

 On Wednesday 09 April 2008, Bharath Thippireddy wrote:
  Hi Dan,
 
  We could see the root cause for this issue.It happens only when the
  App Server is installed in a folder path which has a space(in any of
  the folder names).We tried it on JBoss which resulted in the same
  exception.
 
  1) What version of CXF?
 
  We are using CXF 2.0.3
  wsdl location is WEB-INF/wsdl/Auth.wsdl
 
  2) What are you using for the wsdlLocation? (WEB-INF/foo.wsdl, or
   just foo.wsdl, or)
  We use the cxf-servlet.xml file for the configuration.
 
  3)How are you configuring the wsdl location?  (@WebService
  annotation, in a xml config file, etc..)
  Can you please let me know how this can be resolved while having
  spaces in the foder names.
 
  thanks and regards,
  Bharath
 
  Daniel Kulp [EMAIL PROTECTED] wrote on 04/09/2008 04:08:34 PM:
   Couple questions:
  
   1) What version of CXF?
  
   2) What are you using for the wsdlLocation? (WEB-INF/foo.wsdl,
   or just foo.wsdl, or)
  
   3) How are you configuring the wsdl location?  (@WebService
   annotation, in a xml config file, etc..)
  
   Dan
  
   On Tuesday 08 April 2008, bharath_t19 wrote:
We are trying to deploy our CXF application on WebSphere 6.1 and
we see the following problem
   
ServletWrappe E   SRVE0100E: Did not realize  init() exception
thrown by servlet cxf:
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'AuthenticationService': Invocation of
init method failed; nested exception is
java.lang.IncompatibleClassChangeError Caused by:
java.lang.IncompatibleClassChangeError
   at
org.apache.cxf.wsdl11.WSDLServiceBuilder.copyExtensionAttributes
   (W SDLS erviceBuilder.java:117) at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServi
   ce Buil der.java:218) at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServi
   ce Buil der.java:150) at
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFacto
   ry .jav a:117)
   
   
This was fixed by following the instruction in the CXF App
Server Guide.
   
But now we see the following exception.Looks like its seaching
the XSDs in the server root folder instead of searching for them
relative to the wsdl files.All the wsdl files are under the
web-inf folder of the webapplication and the XSDs imported in
the WSDLs go in to the same directory.We see the same exception
when we try both the options in the App Server Guide.
   
1)put jar in the endorsed folder
2)Add your own class loader
   
 0018 ServletWrappe E   SRVE0100E: Did not realize  init()
exception thrown by servlet cxf:
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'AuthenticationService': Invocation of
init method failed; nested exception is
org.apache.cxf.service.factory.ServiceConstructionException:
Failed to create service.
Caused by:
org.apache.cxf.service.factory.ServiceConstructionException:
Failed to create service.
   at
org.apache.cxf.wsdl11.WSDLServiceFactory.init(WSDLServiceFacto
   ry .jav a:83) at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buil
   dS ervi ceFromWSDL(ReflectionServiceFactoryBean.java:256) at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.init
   ia lize ServiceModel(ReflectionServiceFactoryBean.java:331) at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.crea
   te (Ref lectionServiceFactoryBean.java:151) at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxW
   sS ervi ceFactoryBean.java:93) at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createE
   nd poin t(AbstractWSDLBasedEndpointFactory.java:74) at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBe
   an .jav a:108) at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFa
   ct oryB ean.java:147) at
org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:28
   8) at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:22
   8) at
org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:179)
at
org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:341)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method

Re: Local transport is both up and down at the same time, sort of.

2008-04-10 Thread Daniel Kulp
On Thursday 10 April 2008, Benson Margulies wrote:
 Willem,

 The log messages from RSFB are a bit confusing. Notice that the first
 set ends with a publish address and the second with a destination
 address.

 I'll go read the code, but now that I'm awake I can't imagine how the
 local transport would sneak across webapp class loader boundaries if
 no code is loaded into the system class loader.

Yea.  That probably won't work.   More over, I think the two need to 
share the same bus which makes it even harder to setup in different 
classloaders.

Dan



 --benson


 On Thu, Apr 10, 2008 at 7:34 AM, Benson Margulies
 [EMAIL PROTECTED]

 wrote:
  I see your point. Maybe I made a cut-and-paste error and set up the
  service factory instead of the proxy factory.
 
 
  On Thu, Apr 10, 2008 at 4:14 AM, Willem Jiang
  [EMAIL PROTECTED]
 
  wrote:
   Hi Benson,
  
   I am confused about the Webapp#2's log.
  
  [java] Apr 9, 2008 9:11:35 PM
   org.apache.cxf.transport.local.LocalTransportFactory
   createDestination [java] INFO: Creating destination for address
   local://RosetteTextAnalyzer
  
   It looks you create the same local transport destination in
   Webapp#2.
  
   AFAIK , if your two application are in the same JVM , the local
   transport should work :)
  
  
   Willem
  
   Benson Margulies wrote:
Webapp #1 sets up a service, with an endpoint on the local
transport.
   
 [java] INFO: Creating Service {urn:basistech.com:
rta}RosetteTextAnalyzer
from class com.basistech.rta.ws.RosetteTextAnalyzer
[java] Apr 9, 2008 9:10:55 PM
org.apache.cxf.endpoint.ServerImpl initDestination
[java] INFO: Setting the server's publish address to be
local://RosetteTextAnalyzer
   
Webapp #2 sets up a client proxy, trying to talk to the same
endpoint. Unhappiness results. First, some diagnostic complaints
from the RSFB while
creating the proxy (this is all JAXWS+JAXB) then we get the
complaint that
no-one and nothing is listening. Will the local transport in
fact work across webapps? For that matter, are the complaints
because all I've given
the proxy factory to work on is an interface, and it doesn't
have param
names? I've been working inside CXF for so long that I'm pretty
lost when I
just try to use it.
   
 [java] Apr 9, 2008 9:11:34 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
[java] INFO: Creating Service
{urn:basistech.com:rta}RosetteTextAnalyzerService
from class com.basistech.rta.RosetteTextAnalyzer
[java] Apr 9, 2008 9:11:35 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
[java] INFO: {urn:basistech.com:rta:v1.0}tokenResults part
type QName
null.
[java] {urn:basistech.com:rta:v1.0}languages part type QName
null. [java] {urn:basistech.com:rta:v1.0}matches part type QName
null. [java] {urn:basistech.com:rta:v1.0}glossaries part type
QName null.
[java]
[java] Apr 9, 2008 9:11:35 PM
org.apache.cxf.transport.local.LocalTransportFactory
createDestination [java] INFO: Creating destination for address
local://RosetteTextAnalyzer
[java] Apr 9, 2008 9:11:35 PM
org.apache.cxf.phase.PhaseInterceptorChain doIntercept
[java] INFO: Interceptor has thrown exception, unwinding now
[java] java.lang.IllegalStateException: Local destination
does not have
a MessageObserver on address local://RosetteTextAnalyzer



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


Re: Multiple addresses for a service

2008-04-09 Thread Daniel Kulp
On Wednesday 09 April 2008, Benson Margulies wrote:
 A bit of googling got me nowhere here.

 I want to publish a service on both a http: address and a local:
 address. Two jaxws:endpoints? Can they point to the same
 #implementation bean?

Yep.   It's the same as if you did:

MyThing thing = new MyThingImpl();
Endpoint.publish(address1, thing);
Endpoint.publish(address2, thing);




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


Re: interceptors and faults

2008-04-09 Thread Daniel Kulp
On Wednesday 09 April 2008, Florian Rosenberg wrote:
 hi glen,

 Glen Mazza wrote:
  Server faults go into separate interceptor chains (second paragraph
  of [1])--I have not done this before, but you should be able to
  reuse the interceptors you have on your normal non-error chains for
  the error situations.

 so you mean the FAULT chain? i've added my interceptor everywhere but
 AFAIR the fault chain interceptors are not invoked and all
 interceptors in the IN chain stop after the READ phase (in case of the
 server fault)

This is slightly changing in 2.0.6/2.1 as it may go a little bit furthur 
into the IN chain, but it won't go all the way.   Basically, when a 
message comes in, it starts out on the IN chain.   At some point along 
the chain (always was in the ReadHeadersInterceptor in 2.0.5, but will 
be furthur along in 2.0.6/2.1 in order to get ws-security to fully 
digest the whole body), it checks if the soap:body child is a 
soap:fault.  If so, it stops the In chain and re-dispatches on the IN 
FAULT chain.   Keep in mind, there are two fault chains.   There is an 
OUT fault chain on the server and an IN fault chain on the client.  Make 
sure you add to the right chain.

Dan




 -Florian

  [1] http://cwiki.apache.org/CXF20DOC/interceptors.html
 
  Am Mittwoch, den 09.04.2008, 11:14 +0200 schrieb Florian Rosenberg:
  hi all,
 
  I'm writing a automated system for monitoring certain quality of
  service properties (e.g., response time, etc) from a client-side
  perspective. this works quite well as long as no fault occur on the
  service provider that i'm trying to invoke. I use a couple of
  interceptors in the IN and OUT chains to achieve it.
 
  in case of a fault that occurs on the server, I need to be aware of
  this fault at the client side (e.g., I need to log the fault
  message etc into a database).
 
  the problem I'm struggling with it the following: if a fault occurs
  on the server my incoming interceptor chain at the client side is
  not processed to the latest phase where I have my interceptor that
  stores all the stuff into the database. the interceptor chain stops
  after the READ phase on my client (thats what I could see in the
  debugger).
 
  I've experimented a bit with a simple interceptor that just dumps a
  message to the console upon calling handleMessage() and
  handleFault(). I've added to every phase in the IN and FAULT chain,
  nevertheless handleFault() is never called upon receiving a fault
  message from the server.
 
  could someone please clarify how faults from the server can be
  handled in the client-side interceptor chains (i'm using cxf
  v2.05)?
 
  thanks,
  -Florian



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


Re: Problem with CXF WAS Deployment

2008-04-09 Thread Daniel Kulp
) at
 com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWra
pper.java:149) at
 com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServl
etWrapper(WebExtensionProcessor.java:99) at
 com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:74
1) at
 com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.
java:421) at
 com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebAp
p.java:274) at
 com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:271) at
 com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.j
ava:88) at
 com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.ja
va:157) at
 com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:653
) at
 com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.
java:606) at
 com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContaine
rImpl.java:333) at
 com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerI
mpl.java:549) at
 com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrIm
pl.java:1295) at
 com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjec
tStart(DeployedApplicationImpl.java:1129) at
 com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleIm
pl.java:567) at
 com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApp
licationImpl.java:814) at
 com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Appli
cationMgrImpl.java:948) at
 com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(App
licationMgrImpl.java:2114) at
 com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run
(WsComponentImpl.java:340) at
 com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498) Caused by:
 javax.wsdl.WSDLException: WSDLException (at
 /wsdl:definitions/wsdl:types/xsd:schema): faultCode=PARSER_ERROR:
 Problem parsing 'IntegrationFault.xsd'.:
 java.io.FileNotFoundException: C:\Program
 Files\IBM\WebSphere\AppServer\profiles\AppSrv01\IntegrationFault.xsd
 (The system cannot find the file specified.)



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


Re: Multiple addresses for a service

2008-04-09 Thread Daniel Kulp

Hmm... that looks like a bug of some sort in the wsdl query code.   Most 
likely due to the shared wsdl cache.   Probably need a bug logged for 
that.  Most likely, if you remove the wsdlLocation and have it generate 
one at runtime, it would be OK as the wsdl cache wouldn't be involved.

Invokations on the individual endpoint URL's should definitely be going 
to the proper implementation.   It's just a wsdl updating issue.

One wrather heavyweight workaround would be to force creation of a new 
Bus between publish points so it would get a new wsdl cache:

Endpoint.publish(address1, thing1);
BusFactory.setDefaultBus(null);
Endpoint.publish(address2, thing2);

Dan


On Wednesday 09 April 2008, Arul Dhesiaseelan wrote:
 Thanks Dan.

 But when I implement as shown below.

 MyThing implementor = new MyThingImpl();
 String address = http://localhost:8080/MyThingInstance;
 javax.xml.ws.Endpoint jaxwsEndpoint =
 Endpoint.publish(address, implementor);

 MyThing implementor2 = new MyThingImpl();
 String address2 = http://localhost:8080/MyThingInstance2;
 javax.xml.ws.Endpoint jaxwsEndpoint =
 Endpoint.publish(address2, implementor2);

 I tried to access http://localhost:8080/MyThingInstance?wsdl and
 http://localhost:8080/MyThingInstance2?wsdl. Both the WSDL has the
 same service definition.

 I do not see MyThingInstance2 anywhere in the WSDL.

 Am I missing something?

 Best regards
 Arul

 Daniel Kulp wrote:
  On Wednesday 09 April 2008, Arul Dhesiaseelan wrote:
  Daniel Kulp wrote:
  On Wednesday 09 April 2008, Benson Margulies wrote:
  A bit of googling got me nowhere here.
 
  I want to publish a service on both a http: address and a local:
  address. Two jaxws:endpoints? Can they point to the same
  #implementation bean?
 
  Yep.   It's the same as if you did:
 
  MyThing thing = new MyThingImpl();
  Endpoint.publish(address1, thing);
  Endpoint.publish(address2, thing);
 
  Dan,
 
  Does this work?
 
  MyThing thing1 = new MyThingImpl();
  MyThing thing2 = new MyThingImpl();
 
  Endpoint.publish(address1, thing1);
  Endpoint.publish(address2, thing2);
 
  When I invoke the service at address1, it should invoke thing1 and
  address2 should invoke thing2.
 
  Thanks!
  Arul
 
  Yep.   That's exactly how it's supposed to work.



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


Re: Multiple addresses for a service

2008-04-09 Thread Daniel Kulp
On Wednesday 09 April 2008, Arul Dhesiaseelan wrote:
 Daniel Kulp wrote:
  On Wednesday 09 April 2008, Benson Margulies wrote:
  A bit of googling got me nowhere here.
 
  I want to publish a service on both a http: address and a local:
  address. Two jaxws:endpoints? Can they point to the same
  #implementation bean?
 
  Yep.   It's the same as if you did:
 
  MyThing thing = new MyThingImpl();
  Endpoint.publish(address1, thing);
  Endpoint.publish(address2, thing);

 Dan,

 Does this work?

 MyThing thing1 = new MyThingImpl();
 MyThing thing2 = new MyThingImpl();

 Endpoint.publish(address1, thing1);
 Endpoint.publish(address2, thing2);

 When I invoke the service at address1, it should invoke thing1 and
 address2 should invoke thing2.

 Thanks!
 Arul


Yep.   That's exactly how it's supposed to work.


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


Re: Problems using Jettison for JSON mapped parsing

2008-04-09 Thread Daniel Kulp


Yea, this looks like a jettison bug.  Definitely log a bug with them:
http://jira.codehaus.org/browse/JETTISON

You might actually want to try an older version of jettison.   I think 
this might have been introduced in 1.0. (no promisses though)

Dan



On Monday 07 April 2008, rm-ramos wrote:
 Hi all,

 I developed a REST web service using CXF's http binding, and I have no
 problem at all with the object  marshaling or the reading of the XML
 outputs. I now need to get JSON output from the same web service, so I
 configured a new ws endpoint in spring, which will return the JSON in
 the mapped format.

 However, I started to notice odd JSON files being produced, and wrong
 XML object conversion. I'll give this example, in which I need a List
 of labels and a List of value objects (and who contain a list
 themselves) to be returned.

 http://www.nabble.com/file/p16538281/xml.xml xml.xml
 http://www.nabble.com/file/p16538281/json.json json.json

 The JSON output, as you can see, is strangely groupin values objects,
 two by two, without any particular reason. These are the objects which
 originate such a result:

 The response:
 @XmlAccessorType(XmlAccessType.FIELD)
 public class QueryByIdResponse extends GenericResponse {

   @XmlElementWrapper(name=labels)
   private ListString label;

   private ListWorkOrderGenericValues values;


 WorkOrderGenericValues:
 @XmlAccessorType(XmlAccessType.FIELD)
 public class WorkOrderGenericValues {
   @XmlElement(name=value)
   private ListString stringList;


 Is this a Jettison bug or am I missing something??
 Any tip would be greatly appreciated!!

 Thanks
 Rui Ramos



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


Re: Problem with CXF WAS Deployment

2008-04-09 Thread Daniel Kulp


Any chance you can try with CXF 2.0.5?   I know I fixed a BUNCH of issues 
with URL's with spaces in them a little while ago.  It MAY have been for 
2.0.4, but definitely 2.0.5.

Meanwhile, I'll try testing some stuff here.  I cannot even get tomcat to 
start from a dir with a space in it to test this.  :-(


Dan


On Wednesday 09 April 2008, Bharath Thippireddy wrote:
 Hi Dan,

 We could see the root cause for this issue.It happens only when the
 App Server is installed in a folder path which has a space(in any of
 the folder names).We tried it on JBoss which resulted in the same
 exception.

 1) What version of CXF?

 We are using CXF 2.0.3
 wsdl location is WEB-INF/wsdl/Auth.wsdl

 2) What are you using for the wsdlLocation? (WEB-INF/foo.wsdl, or
  just foo.wsdl, or)
 We use the cxf-servlet.xml file for the configuration.

 3)How are you configuring the wsdl location?  (@WebService annotation,
 in a xml config file, etc..)
 Can you please let me know how this can be resolved while having
 spaces in the foder names.

 thanks and regards,
 Bharath

 Daniel Kulp [EMAIL PROTECTED] wrote on 04/09/2008 04:08:34 PM:
  Couple questions:
 
  1) What version of CXF?
 
  2) What are you using for the wsdlLocation? (WEB-INF/foo.wsdl, or
  just foo.wsdl, or)
 
  3) How are you configuring the wsdl location?  (@WebService
  annotation, in a xml config file, etc..)
 
  Dan
 
  On Tuesday 08 April 2008, bharath_t19 wrote:
   We are trying to deploy our CXF application on WebSphere 6.1 and
   we see the following problem
  
   ServletWrappe E   SRVE0100E: Did not realize  init() exception
   thrown by servlet cxf:
   org.springframework.beans.factory.BeanCreationException: Error
   creating bean with name 'AuthenticationService': Invocation of
   init method failed; nested exception is
   java.lang.IncompatibleClassChangeError Caused by:
   java.lang.IncompatibleClassChangeError
  at
   org.apache.cxf.wsdl11.WSDLServiceBuilder.copyExtensionAttributes(W
  SDLS erviceBuilder.java:117) at
   org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLService
  Buil der.java:218) at
   org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLService
  Buil der.java:150) at
   org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory
  .jav a:117)
  
  
   This was fixed by following the instruction in the CXF App Server
   Guide.
  
   But now we see the following exception.Looks like its seaching the
   XSDs in the server root folder instead of searching for them
   relative to the wsdl files.All the wsdl files are under the
   web-inf folder of the webapplication and the XSDs imported in the
   WSDLs go in to the same directory.We see the same exception when
   we try both the options in the App Server Guide.
  
   1)put jar in the endorsed folder
   2)Add your own class loader
  
0018 ServletWrappe E   SRVE0100E: Did not realize  init()
   exception thrown by servlet cxf:
   org.springframework.beans.factory.BeanCreationException: Error
   creating bean with name 'AuthenticationService': Invocation of
   init method failed; nested exception is
   org.apache.cxf.service.factory.ServiceConstructionException:
   Failed to create service.
   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.service.factory.ReflectionServiceFactoryBean.buildS
  ervi ceFromWSDL(ReflectionServiceFactoryBean.java:256) at
   org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initia
  lize ServiceModel(ReflectionServiceFactoryBean.java:331) at
   org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create
  (Ref lectionServiceFactoryBean.java:151) at
   org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsS
  ervi ceFactoryBean.java:93) at
   org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEnd
  poin t(AbstractWSDLBasedEndpointFactory.java:74) at
   org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean
  .jav a:108) at
   org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFact
  oryB ean.java:147) at
   org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:288)
   at
   org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:228)
   at
   org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:179)
   at
   org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:341)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
  pl.j ava:64) at
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc
  cess orImpl.java:43) at
   java.lang.reflect.Method.invoke(Method.java:615) at
   org.springframework.beans.factory.support.AbstractAutowireCapableB
  eanF
   actory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.j
  ava:1 240

Re: Manifest puzzle

2008-04-08 Thread Daniel Kulp
On Tuesday 08 April 2008, Benson Margulies wrote:
 Building from ant, I find that using the CXF Manifest jar works fine
 for the 'java' task, but not for the 'javac' task. Am I rediscovering
 a wheel?

Possibly.   Try adding the fork=true flag to javac.   I'm not sure if the 
embedded classloader thing that ant uses when not forking will read the 
manifests.


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


Re: NoSuchMethodError: When creating SoapFault in WebLogic 9.2

2008-04-08 Thread Daniel Kulp
/soap/SOAPFault; at
 com.primavera.ws.common.ExceptionHandler.processException(ExceptionHan
dler.java:111) at
 com.primavera.ws.jaxws.provider.ProviderBase.invokeBase(ProviderBase.j
ava:149) at
 com.primavera.ws.jaxws.provider.generated.ActivityProvider.invoke(Acti
vityProvider.java:29) at
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
ava:39) at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
orImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585)
 at
 org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(Abstr
actInvoker.java:124) at
 org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.
java:82) ... 26 more



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


Re: Need help with WSDL2Java

2008-04-08 Thread Daniel Kulp
 
  /binding
 
 
 
  service name=GMS
 
   documentationSilver-Peak GMS service/documentation
 
   port name=GMS binding=tns:GMS
 
   SOAP:address location=http://silverpeak.com/
 
   /port
 
  /service
 
 
 
  /definitions
 
  .



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


Re: Thrown by JAXB : undefined element declaration 's:schema'

2008-04-08 Thread Daniel Kulp


The CXF wsdl2java does support the jaxb binding files as well (-b flag).  
However, the -b things must be actual jaxb/jaxws binding files, not 
another schema.   That's very strange syntax that I haven't seen before.  
Interesting.   

Thus, to get it working for CXF, you would need to modify the schema to 
put the proper s:import in place to import the schema schema, then 
include the binding file to deal with the duplicate classes.

Alternatively, use the workround on that blog with wsgen to generated the 
code, then use CXF at runtime.   It's just straight JAX-WS code so it 
should work.

However, both those approaches generate a full object model for the 
schema, which may not be desired.   The simplest option might be to just 
download the wsdl, modify the schema to change:
 s:sequence
s:element ref=s:schema /
s:any /
 /s:sequence

to something like:
 s:sequence
s:any minOccurs=2/
 /s:sequence
or something.  That will allow you to get it as a DOM.

Dan



On Tuesday 08 April 2008, Tim Perrett wrote:
 Thats what I have traced the problem too also - after some googling it
 seems that this is a known issue with M$ SOAP services.
 I found this link:

 http://weblogs.java.net/blog/vivekp/archive/2007/05/how_to_deal_wit_1.
html

 Thats obviously for wsimport, but I thought a similar solution might
 work for CXF? What are your thoughts? Other services written in .net
 consume no problem at all with CXF, its just this one im having
 problems with.

 I could always ditch the service methods that are causing the problem?
 I think they might be MS datasets exposed as SOAP - I've used this
 service before and it hasnt been a huge problem before as the
 wsdl2lang has usually just ignored them I think.

 Cheers

 Tim

 On 8 Apr 2008, at 17:00, Benson Margulies wrote:
  This error emerges from the bowels of JAXB's xjc tool, complete with
  the
  lack of navigational info.
 
  However,
 
  What is
 
  s:complexType
s:sequence
  s:element ref=s:schema /
  s:any /
/s:sequence
  /s:complexType
 
 
  supposed to mean?
 
  I see no element named 'schema' .



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


Re: Deploy into websphere 6.1

2008-04-08 Thread Daniel Kulp


Did you check the section at:
http://cwiki.apache.org/confluence/display/CXF20DOC/AppServerGuide#AppServerGuide-Websphere
about creating a new classloader instead of using endorsed?   I'm 
wondering if you add the saaj stuff in as well, it might work. 

That said, Websphere is an IBM jdk which doesn't have the 
com.sun.xml.org.apache stuff built in that the saaj-1.3 jar depends on.  
You MAY also need the jaxp jar from:
http://download.java.net/maven/1/com.sun.xml.parsers/jars/
added as well or the parent class of SOAPDocumentImpl won't be found 
which MAY be causing the issue you're seeing.

Dan



On Tuesday 08 April 2008, Tong wrote:
 Hi,

 Deployed my CXF war into websphere 6.1. It's mostly working except
 fault processing. I am getting
java.lang.NoSuchMethodError: javax/xml/soap/Detail.addDetailEntry
 I guess websphere has an older version of saaj. so I copied both
 saaj-api-1.3 jar and saaj-impl-1.3.jar to
 $WebSphere_HOME/java/jre/lib/endorsed. But it does not work. It's
 complaining about
 java.lang.NoClassDefFoundError:
 com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl
 which is right there in saaj-impl-1.3.jar.

 Any idea please?

 Thanks
 Tong



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


Re: CXF and http session?

2008-04-08 Thread Daniel Kulp
On Tuesday 08 April 2008, Karsten Strunk wrote:
 Hi everybody!

 I'm quite new to CXF, so my question might be a little bit stupid:

 I want to store some data on the server side over serveral webservice
 calls. So I thougt a HTTP session would be ok for that, but
 unfortunately my server doesn't return a cookie or any kind of session
 id back to my client application. So my question is: How can CXF be
 configured to support HTTP sessions?
 I know it's possible, because  I found keys like
 Message.MAINTAIN_SESSION or BindingProvider.SESSION_MAINTAIN_PROPERTY
 for that, but I don't know how to use them correctly. Maybe someone
 knows a way to configure CXF properly.

All of those require the cookie to be properly sent back from the server.   
If the server isn't sending the cookie back, something isn't configured 
on the server part correctly.What app server/deployment environment 
are you using for that?

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


Re: /soapenv:Envelope

2008-04-07 Thread Daniel Kulp
On Monday 07 April 2008, Web Man wrote:
 Not unless it's enabled by default.  I'll look into it.  Thanks.

It's probably not worth your time.  I'm almost positive that nothing in 
the cxf code even bothers to read the closing body/envelope tags.   
Tracing through the interceptors, there is nothing past the reading of 
the dataobjects that reads anything from the XmlStreamReader.   Most 
likely, the ReadHeadersInterceptor in the soap binding should registers 
a tailing interceptor that would read in the close events.  Feel free to 
log a bug.

Dan



 Benson Margulies-4 wrote:
  Did you enable validation?
 
  On Fri, Apr 4, 2008 at 4:30 PM, Web Man [EMAIL PROTECTED] wrote:
  When a SOAP request is submitted without the closing
  /soapenv:Envelope, the
  Web Service is called and no errors are thrown.
 
  soapenv:Envelope
  xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
  
  xmlns:v1=
  http://www.nortel.com/xmlprotocol/wsdl/data/protocol_interfaces/cis
 co_icm/v1_0 
soapenv:Header/
soapenv:Body
   v1:CallCleared-Event
  !--Optional:--
  callId35756/callId
  cause6/cause
   /v1:CallCleared-Event
/soapenv:Body
 
  *  There should be a /soapenv:Envelope at the end of this
  request *
  --
  View this message in context:
  http://www.nabble.com/%3C-soapenv%3AEnvelope%3E-tp16498308p16498308
 .html Sent from the cxf-user mailing list archive at Nabble.com.



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


Re: CXF Service End Points reloaded every time in WebLogic

2008-04-07 Thread Daniel Kulp

Everything I can think of really has nothing to do with CXF.

1) Timestamp on the war/ear is from a computer that has it's clock set 
wrong.  Basically, if the war is built in the future according to the 
machine running weblogic, it might think the war has changed when it 
really hasn't.  

2) Likewise, if the exploded form has files in it with timestamps newer 
than the war, that could be an issue.

3) Potentially, if something writes a file or something into the exploded 
dir, weblogic might detect that as a change and reload.   I'm think temp 
files or something.

In anycase, I don't think any of those really would be due to CXF.

Dan



On Monday 07 April 2008, Tong wrote:
 Hi Glen,

 In this case, what happens is that WebLogic unloads our web app
 altogether and reloads almost every time or every other time a new
 request comes in. When I traced into CXF source code, I see the init
 and destroy method of CXFServlet gets called all the time.

 Do you know anything that will cause WebLogic to unload our web app?

 Thanks
 Tong

 Glen Mazza-2 wrote:
  I have not worked with this type of problem before.  Possible
  guesses:
 
  1.) Anything in our WebLogic docs[1] that may be relevant for your
  problem?
 
  2.) We have two types of configuration for web services--via a
  cxf-servlet.xml file and directly through Spring configuration[2]. 
  If you try the cxf-servlet.xml method, does the problem go away?  It
  might be something Spring-related that is causing the
  reinitialization to be occurring each time.
 
  HTH,
  Glen
 
  [1]
  http://cwiki.apache.org/confluence/display/CXF20DOC/AppServerGuide#A
 ppServerGuide-WebLogic [2]
  http://cwiki.apache.org/CXF20DOC/configuration.html#Configuration-Se
 rverconfigurationfiles
 
  Am Samstag, den 05.04.2008, 11:14 -0700 schrieb stevewu:
  Hi all,
 
  I deployed my web services in WebLogic with an EAR file.Every time
  I access
  a web service it rebuild all the end points defined in
  cxf-servlet.xml. Is
  there some parameters that I can set, so that the endpoints will be
  build only once when I start the service?
 
  Entries in cxf-servlet.xml
  ?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:cxf=http://cxf.apache.org/core;
xmlns:wsa=http://cxf.apache.org/ws/addressing;
xmlns:jaxws=http://cxf.apache.org/jaxws;
xmlns:soap=http://cxf.apache.org/bindings/soap;
xsi:schemaLocation=
  http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://cxf.apache.org/bindings/soap
  http://cxf.apache.org/schemas/configuration/soap.xsd
  http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
  http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd;
 
 
 
  jaxws:endpoint
  id=LoginService
  implementor=com.myworld.ws.jaxws.provider.LoginProvider
  wsdlLocation=WEB-INF/wsdl/Login.wsdl
  address=/LoginService
  jaxws:features
   bean class=org.apache.cxf.feature.LoggingFeature/
  /jaxws:features
  /jaxws:endpoint
  ..
  /beans
 
  Below is the top part of the console output before it rebuild the
  end points.
 
 
  Apr 5, 2008 12:38:59 PM org.apache.cxf.transport.servlet.CXFServlet
  loadSpringBus
  INFO: Load the bus without application context
  log4j:WARN No appenders could be found for logger
  (org.apache.cxf.bus.spring.BusApplicationContext).
  log4j:WARN Please initialize the log4j system properly.
  Apr 5, 2008 12:39:04 PM
  org.apache.cxf.configuration.spring.ConfigurerImpl
  init
  INFO: Could not find the configuration file cxf.xml on the
  classpath. Apr 5, 2008 12:39:06 PM
  org.apache.cxf.transport.servlet.AbstractCXFServlet
  replaceDestinationFactory
  INFO: Replaced the http destionFactory with servlet transport
  factory Apr 5, 2008 12:39:06 PM
  org.apache.cxf.transport.servlet.CXFServlet loadAdditionalConfig
  INFO: Build endpoints from config-location:
  /WEB-INF/cxf-servlet.xml



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


Re: Base class members not serializing / deserializing

2008-04-07 Thread Daniel Kulp

Brad,

It's quite possible (and highly likely) that the JAXB context is not 
being created with the subclasses as part of the context.   Thus, the 
subclasses cannot be properly written/read.  By default, the runtime 
just examines the exact classes referenced from the SEI interface to 
figure out what classes need to be bound into the context.   In many 
cases, the subclasses would not be referenced there and thus would not 
be found.

There are a couple ways to deal with it:

1) If using jaxws/jaxb plus the 2.1 snapshots, (this is a jaxws 2.1 
feature) you can add @XmlSeeAlso annotations in various places to have 
it SeeAlso the additional classes.

2) If the subclasses are in the same package as the base class, stick 
a jaxb.index file in the package that just lists the sub-classes. 
(without the package names)

3) There are spring config methods of adding extra classes to the 
context.  You can see our systest config:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/resources/extrajaxbclass.xml?revision=581341view=markup

Dan


On Sunday 06 April 2008, Brad O'Hearne wrote:
 Doug,

 Thanks for the reply.  Couple things -- first, @UriParam is now
 apparently @PathParam. Additionally, I cannot get the paths to work. I
 repeatedly get Tomcat errors that there's No operation matching
 request path..., and others like itstill a black artI'd love
 to get this worked out, as I've got jax-rs loaded, I just need to be
 able to hit it now. I've tried about every URL combination
 possibleno dice.

 Prior to your post, I had reverted back to my Jax-WS frontend, and I
 discovered that inheritance IS working on serialization (outbound
 serialization on return types) but is NOT working on deserialization
 (inbound deserialization of XML to Java types on parameters). The
 problem is definitely there.

 Brad

 On Apr 5, 2008, at 7:54 PM, Doug wrote:
  On Sun, 6 Apr 2008, Brad O'Hearne wrote:
  I've moved to 2.1 SNAPSHOT -- my @UriTemplate annotations still
  won't compile. Is there another dependency needed?
 
  I think @UriTemplate was deprecated/replaced by @Path by the JSR-311
  folks,
  but their spec documents aren't uptodate (thats my understanding
  anyway)
 
 
  Something like the following works for me (from the 2.1 SNAPSHOT):
 
  import javax.ws.rs.Path;
  import javax.ws.rs.GET;
  import javax.ws.rs.POST;
  import javax.ws.rs.core.HttpContext;
  import javax.ws.rs.core.HttpHeaders;
  import javax.ws.rs.core.Response;
  import javax.ws.rs.core.UriInfo;
  import javax.ws.rs.core.MultivaluedMap;
  import javax.ws.rs.ProduceMime;
  import javax.ws.rs.ConsumeMime;
  import javax.ws.rs.UriParam;
  import javax.ws.rs.WebApplicationException;
 
  @Path(/rc)
  public class ReflectionCoverageService {
 
  @POST
  @Path(init/{clientId})
  @ProduceMime(text/plain)
  public String init(@UriParam(clientId) String id, @HttpContext
  UriInfo
  info, SomeJavaBeanClass sjbc) {
  MultivaluedMap params  = info.getQueryParameters();



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


Re: Interceptor throwing exception

2008-04-07 Thread Daniel Kulp
; charset=utf-8
 Content-Length: 227
 Server: Jetty(6.1.6)

 soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
soap:Body
   soap:Fault
  faultcodesoap:Server/faultcode
  faultstringFault occurred while processing./faultstring
   /soap:Fault
/soap:Body/soap:Envelope


 Anyone able to help me with this, or point me out to where i might
 find an answer?



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


Re: Re-4: Using CXF in OSGi

2008-04-04 Thread Daniel Kulp
On Friday 04 April 2008, [EMAIL PROTECTED] wrote:
 Hmm I'm not familiar with Apache ServiceMix so it's a bit difficult
 for me to understand how this can help me with an OSGi platform
 like Equinox.
 I understand that CXF is provided as a module for ServiceMix, right?
 Can you provide some help on getting CXF to work on a normal OSGi
 platform? I had a look at the MANIFEST files of the CXF libraries
 but I couldn't find entries for OSGi. I'm a bit confused. :-)

Basically, starting with 2.0.5, the big cxf bundle jar 
(cxf-2.0.5-incubator.jar, cxf-bundle if you are looking for the maven 
artifactId) does include an OSGI manifest. (although I noticed Guillaume 
did a fix for it last  night so I'm not sure if the 2.0.5 version 
complete works, I'll get a 2.0.6 snapshot going now.)   That said, since 
CXF doesn't really do any OSGI things ourselves, we don't worry about 
all the thirdparty jars.  ServiceMix does.  So basically, we have a 
bundle, but to really use it, you'll need to find/create a few other 
bundles for the third party deps (like jaxws-api, neethi, spring, 
wsdl4j, woodstox/stax, etc...).  ServiceMix does provide bundles for all 
of those, but you probably could easily do much of that yourself as 
well.  

The other thing SMX is providing is the cxf-osgi spring import thing that 
provides an OSGi http transport for the CXF component.   That might be a 
good thing to pull directly into CXF as that should definitely be usable 
in other OSGi environments.   

Dan




  Original Message 
 Subject: Re: Re-2: Using CXF in OSGi (04-Apr-2008 11:51)
 From:Guillaume Nodet [EMAIL PROTECTED]
 To:  cxf-user@incubator.apache.org

  The example I gave leverages Spring-DM.  Spring-DM is a small layer
  above Spring that gives you a really simple way to build OSGi
  applications based on Spring.  Of course, if you don't like spring,
  don't use Spring-DM. However, CXF is nicely integrated with Spring,
  so it makes sense.
 
  If you prefer, we also support OpenEJB / CXF in OSGi, though this is
  not finalized yet (but feedback and/or help is always welcome).  In
  this model, the EJB3 annotated beans are automatically discovered
  and exposed.  So no spring at all, and EJB3 annotations: it could
  make you happy ;-)
 
  On Fri, Apr 4, 2008 at 8:34 AM, Jacek Laskowski
  [EMAIL PROTECTED]
 
  wrote:
   On Thu, Apr 3, 2008 at 2:04 PM,  [EMAIL PROTECTED] wrote:
Will Spring-DM also be a part of this example?
  
   It really doesn't change much if it can be done with OSGi itself.
   Spring-DM is just an additional layer that lets use biuld bundles
   yet it could in turn complicate understanding of the real value of
   CXF on OSGi. I'm looking forward to seeing the example. Go
   Guillaume, go! ;-)
  
   Jacek
  
   --
   Jacek Laskowski
   http://www.JacekLaskowski.pl
 
  --
  Cheers,
  Guillaume Nodet
  
  Blog: http://gnodet.blogspot.com/



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


Re: Parameters not being resolved - broken going from 2.0.3 - 2.0.4 and still broken in 2.0.5

2008-04-04 Thread Daniel Kulp

Most likely, it's an element qualification issue.   In 2.0.4, we had to 
fix a bunch of issues with improper soap messages being 
produced/consumed due to elements that should have been qualified not 
being qualified and vice/versa.   There were cases with 2.0.3 where a 
VALID soap message (according to the schema) would not be accepted, but 
the invalid message would be.  Killed some interop scenarios pretty 
badly.   2.0.4 fixed a bunch of that to make sure the valid messages are 
produced/consumed.

The thing to look at would be the raw soap message (use wireshark or the 
logging interceptors) to see the raw elements and compare that to the 
schema in the wsdl (from ?wsdl) to make sure they are consistent.  Most 
likely, the ?wsdl will say elementFormDefault=unqualified, but the 
message is coming in qualified (or vice versa).   (by default, schema 
generated for JAX-WS wrappers are unqualified)

That said, in 2.0.4/5, if you are doing a java first case like you are, 
there are ways to control the generated schema to make it qualified.  
There are configuration options on the JaxWsServiceFactory (in spring) 
for that or you can just add a package-info.java to the package 
containing the interface with an appropriate filled in @XmlSchema thing.  
(Note: doing these would not be portable to other jaxws implementations)


Dan


On Thursday 03 April 2008, Zarar Siddiqi wrote:
 I had a very simple webservice running very nicely until I upgraded to
 2.0.4.

 I was using a Java-first service using an Aegis binding:

 @WebService(targetNamespace=http://domain.com/PersonService;)
 public interface PersonService {
. . .
 }

 @Component
 @WebService(serviceName=PersonService,
 targetNamespace=http://domain.com/PersonService;,
 endpointInterface=PersonService)

 public class PersonSoapService implements PersonService {
 public Email getEmail(Credentials credentials) throws
 WebServiceException {
  // get email stuff
 }
 }

 This was being called and working fine in 2.0.3 but since I upgraded
 to 2.0.4, the credentials parameter on the getEmail(..) method never
 gets populated, it's always null. Always!

 Any idea what the problem might be before I dive into CXF code?? Or
 maybe you can tell me what interceptor it is that converts a soap
 message to the actual parameters and I can dig deeper on my own.

 Any help is appreciated.

 Thanks,
 Zarar



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


Re: Parameters not being resolved - broken going from 2.0.3 - 2.0.4 and still broken in 2.0.5

2008-04-04 Thread Daniel Kulp

One more note: the default for the simple frontend is to use QUALIFIED 
schemas.  Thus, if you are doing java first stuff and use JAX-WS on the 
server and simple on the client, if you don't reconfigure one or the 
other, you will have problems as the client will send qualified, but the 
server will expect unqualified.

Dan


On Friday 04 April 2008, Daniel Kulp wrote:
 Most likely, it's an element qualification issue.   In 2.0.4, we had
 to fix a bunch of issues with improper soap messages being
 produced/consumed due to elements that should have been qualified not
 being qualified and vice/versa.   There were cases with 2.0.3 where a
 VALID soap message (according to the schema) would not be accepted,
 but the invalid message would be.  Killed some interop scenarios
 pretty badly.   2.0.4 fixed a bunch of that to make sure the valid
 messages are produced/consumed.

 The thing to look at would be the raw soap message (use wireshark or
 the logging interceptors) to see the raw elements and compare that to
 the schema in the wsdl (from ?wsdl) to make sure they are consistent. 
 Most likely, the ?wsdl will say elementFormDefault=unqualified, but
 the message is coming in qualified (or vice versa).   (by default,
 schema generated for JAX-WS wrappers are unqualified)

 That said, in 2.0.4/5, if you are doing a java first case like you
 are, there are ways to control the generated schema to make it
 qualified. There are configuration options on the JaxWsServiceFactory
 (in spring) for that or you can just add a package-info.java to the
 package containing the interface with an appropriate filled in
 @XmlSchema thing. (Note: doing these would not be portable to other
 jaxws implementations)


 Dan

 On Thursday 03 April 2008, Zarar Siddiqi wrote:
  I had a very simple webservice running very nicely until I upgraded
  to 2.0.4.
 
  I was using a Java-first service using an Aegis binding:
 
  @WebService(targetNamespace=http://domain.com/PersonService;)
  public interface PersonService {
 . . .
  }
 
  @Component
  @WebService(serviceName=PersonService,
  targetNamespace=http://domain.com/PersonService;,
  endpointInterface=PersonService)
 
  public class PersonSoapService implements PersonService {
  public Email getEmail(Credentials credentials) throws
  WebServiceException {
   // get email stuff
  }
  }
 
  This was being called and working fine in 2.0.3 but since I upgraded
  to 2.0.4, the credentials parameter on the getEmail(..) method
  never gets populated, it's always null. Always!
 
  Any idea what the problem might be before I dive into CXF code?? Or
  maybe you can tell me what interceptor it is that converts a soap
  message to the actual parameters and I can dig deeper on my own.
 
  Any help is appreciated.
 
  Thanks,
  Zarar



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


Re: SoapWithAttachments

2008-04-04 Thread Daniel Kulp

Ick...  If their wsdl properly declared the attachments like a good 
contract would, it would be easy as the generated code would just handle 
it.

I just spent some time trying to figure out something and I'm not 
succeeding unless you write an interceptor.  The Message object sent 
into an interceptor has the attachements collection on it.   Thus, if 
you did something like:


public static class MyInterceptor 
extends AbstractPhaseInterceptorMessage {

public MyInterceptor() {
super(Phase.USER_LOGICAL);
}

public void handleMessage(Message message) throws Fault {
message.put(ATTACHMENTS, message.getAttachments());
}
}

That will copy the attachment list to the message properties and you can 
then retrieve it in the client code like:

((BindingProvider)proxy).getRequestContext().get(ATTACHMENTS);


Dan



On Friday 04 April 2008, Vijay Allam wrote:
 In this case I do not have element that represents the attachment in
 WSDL. It comes as part of the Soap message as multi part attachment.
 So not sure how do I get the attachment. I could only find code that
 can easily get attachment using axis1.1 for the request.

 --Vijay

 On 4/3/08 7:58 PM, Freeman Fang [EMAIL PROTECTED] wrote:
  Hi Vijay,
 
  We have mtom demo in the kit, which shows how SOAP message
  with an attachment and XML-binary Optimized Packaging(mtom)  work.
 
  Regards
 
  Freeman
 
  Vijay Allam wrote:
  I have a third part webservice that returns an attachment. How do I
  get the attachment with CXF client. Any example code is apreciated.
 
  --Vijay



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


Re: SoapWithAttachments

2008-04-04 Thread Daniel Kulp
 name=parameter element=ele:esito/
  /wsdl:message
  
  wsdl:portType name=OrdineInterface
  
 wsdl:operation name=SubmitOrdine
wsdl:input message=ord:SubmitOrdineRequestMessage/
wsdl:output
   message=ord:SubmitOrdineResponseMessage/ /wsdl:operation
  
 wsdl:operation name=Notifica
   wsdl:output message=ord:NotificaMessage/
 /wsdl:operation
  
   /wsdl:portType
  
  wsdl:binding name=OrdineInterfaceBinding
 
  type=ord:OrdineInterface
 
 soap:binding style=document
   transport=http://schemas.xmlsoap.org/soap/http/
  
 wsdl:operation name=SubmitOrdine
soap:operation
   soapAction=http://www.rivenditore.org/service/ordini/#SubmitOrd
  ine/ wsdl:input
   soap:body use=literal/
/wsdl:input
wsdl:output
   soap:body use=literal/
/wsdl:output
 /wsdl:operation
  
 wsdl:operation name=Notifica
soap:operation /
wsdl:output
   soap:body use=literal/
/wsdl:output
 /wsdl:operation
  /wsdl:binding
  
  wsdl:service name=OrdineService
 wsdl:port name=OrdineInterfaceEndpoint
   binding=ord:OrdineInterfaceBinding
soap:address
   location=http://localhost:8080/ese5/ordine/ /wsdl:port
  /wsdl:service
  
  
   /wsdl:definitions
  
  
  
  
   submitOrdine.xsd:
  
  
  
   ?xml version=1.0?
   xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema;
  
   targetNamespace=http://www.rivenditore.org/submitOrdineTypes;
   xmlns:so=http://www.rivenditore.org/submitOrdineTypes;
  
xs:complexType name=ordineType
   xs:sequence maxOccurs=unbounded
   xs:element name=articolo type=so:articoloType/
   /xs:sequence
   /xs:complexType
  
   xs:complexType name=articoloType
   xs:sequence
   xs:element name=codice type=so:codiceType/
   xs:element name=quantita
   type=xs:positiveInteger/ /xs:sequence
   /xs:complexType
  
   xs:simpleType name=codiceType
   xs:restriction base=xs:string
   xs:pattern value=[A-Z][A-Z][0-9]{4}/
   /xs:restriction
   /xs:simpleType
  
   xs:complexType name=esitoType
   xs:choice minOccurs=1 maxOccurs=1
   xs:choice
   xs:element name=ok type=so:okType/
   xs:element name=fail type=xs:string/
   /xs:choice
   /xs:choice
   /xs:complexType
  
   xs:complexType name=okType
   xs:sequence
   xs:element name=idOrdine
   type=xs:positiveInteger  / xs:element name=totale
   type=so:totaleType  / /xs:sequence
   /xs:complexType
  
   xs:complexType name=totaleType
   xs:simpleContent
   xs:extension base=xs:decimal
   xs:attribute name=valuta type=xs:string
 
  default=EUR
 
   use=optional/
   /xs:extension
   /xs:simpleContent
   /xs:complexType
  
   /xs:schema
  
  
  
  
   I develope both client and server using wsdl2java.
  
   Thx for any help.



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


Re: JAXB substitutionGroups

2008-04-04 Thread Daniel Kulp

This is covered in the jaxb spec. (section 6.7.5, see example 6-14)   In 
sort, there isn't a way.   The main reason is that the subclasses of 
AbstractFeatureType may not (actually, per spec, they WON'T) have 
XmlRootElement declarations on them so the runtime would have idea what 
the qname of the elements to write out will be.  

According to spec, you should use the ObjectFactory methods to create the 
JAXBElement objects with the correct qnames+values.

From the jaxb spec example, the factory should have methods like:
// Element Instance Factories
JAXBElementAutoType createAuto(AutoType value);
JAXBElementPlaneType createPlane(PlaneType value);
JAXBElementTransportType createTrain(TransportType value);



Dan


On Thursday 03 April 2008, Shaw, Richard A wrote:
 Does anybody know why XSD substitutionGroups cause JAXB to create code
 like the following -

 ListJAXBElement? Extends AbstractFeatureType  features;

 Why isn't it simply -

 ListAbstractFeatureType features;

 Is there any way to change it ? I searched the web and couldn't find
 anything.

 Richard Shaw

 ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

 Richard Shaw
 Technical Design Authority - Information Solutions Consultancy
 Intelligent Transport Systems

 Atkins Highways and Transportation
 Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

 Tel: +44 (0) 1372 756407
 Fax: +44 (0) 1372 740055
 Mob: 07740 817586
 E-mail: [EMAIL PROTECTED]

 www.atkinsglobal.com/its



 This email and any attached files are confidential and copyright
 protected. If you are not the addressee, any dissemination of this
 communication is strictly prohibited. Unless otherwise expressly
 agreed in writing, nothing stated in this communication shall be
 legally binding.

 The ultimate parent company of the Atkins Group is WS Atkins plc. 
 Registered in England No. 1885586.  Registered Office Woodcote Grove,
 Ashley Road, Epsom, Surrey KT18 5BW. A list of wholly owned Atkins
 Group companies registered in the United Kingdom can be found at
 http://www.atkinsglobal.com/terms_and_conditions/index.aspx

 Consider the environment. Please don't print this e-mail unless you
 really need to.



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


Re: I have the TRaX, can you help?

2008-04-04 Thread Daniel Kulp
On Thursday 03 April 2008, jm1468 wrote:
 ...
 WARNING: org.apache.cxf.transport.http.WSDLQueryHandler Exception
 caught writing response: Failed to configure TRaX
 ...
org.apache.cxf.interceptor.Fault: No such operation 

Ick.. there are several things wrong that I need to dig into quite a bit 
more:

1) The WSDLQueryHandler is throwing the above exception.  However, we 
only log the basic getMessage() thing and not the full stack trace 
that would indicate any internal cause exceptions and stuff that would 
actually help to diagnose it. 

2) If an exception is thrown, wrather than returning an error to the 
client like error generating wsdl, we try to dispatch the request into 
the interceptor chains like its a service invokation.  Since it doesn't 
look like a normal request, it doesn't find an operaion.

I'm going to fix both of those.  It most likely won't fix your problem as 
it's having problems creating a transformer, but it MAY at least provide 
a better indication of WHY it's not working.

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


Re: I have the TRaX, can you help?

2008-04-04 Thread Daniel Kulp
On Friday 04 April 2008, Daniel Kulp wrote:
 On Thursday 03 April 2008, jm1468 wrote:
  ...
  WARNING: org.apache.cxf.transport.http.WSDLQueryHandler Exception
  caught writing response: Failed to configure TRaX
  ...
 org.apache.cxf.interceptor.Fault: No such operation

 Ick.. there are several things wrong that I need to dig into quite a
 bit more:

 1) The WSDLQueryHandler is throwing the above exception.  However, we
 only log the basic getMessage() thing and not the full stack trace
 that would indicate any internal cause exceptions and stuff that
 would actually help to diagnose it.

 2) If an exception is thrown, wrather than returning an error to the
 client like error generating wsdl, we try to dispatch the request
 into the interceptor chains like its a service invokation.  Since it
 doesn't look like a normal request, it doesn't find an operaion.

 I'm going to fix both of those.  It most likely won't fix your problem
 as it's having problems creating a transformer, but it MAY at least
 provide a better indication of WHY it's not working.

Actually, I'm going to go one furthur and change from using a transformer 
to write the wsdl out to using our Stax based writers.  Since Stax HAS 
to work for pretty much anything in CXF to work, that should be a bit 
more reliable.  :-)   It may be a bit quicker as well.


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


Re: Removing namespaces on serialized responses

2008-04-04 Thread Daniel Kulp


Brad,

Are you using the older http binding or the newer JAX-RS stuff?

If using the older stuff, you probably could get it to work by writing an 
interceptor that would wrap the XmlStreamWriter with one that would 
strip off any namespace stuff.  It would be a little bit of work, but 
not too bad.

I have no idea with the new jax-rs stuff.

Dan


On Thursday 03 April 2008, Brad O'Hearne wrote:
 Hello,

 I am using CXF RESTful services configured in Spring, using JAXB. I am
 having some namespace conflicts between my client and server, and I
 was wondering if (for the time being) there was a way to configure
 CXF/ JAXB not to write a namespace into the serialized object that is
 returned from a service method. Does anyone know how to do this and
 maybe can post a snippet?

 Thanks,

 Brad



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


Re: Possible to use CXF without Spring ?

2008-04-03 Thread Daniel Kulp

CXF can be used without spring for some very basic use cases.   
Basically, simple JAXWS+JAXB client/server with no configuration (or use 
API's for configuration) and none of the complex things like 
ws-security/ws-rm that requires said configuration.   

Once you need to start configuring things, though, you may need the 
spring configs or you would need to write your own things to call on the 
API's to configure stuff.

That said, I haven't tests the non-spring support lately.  :-(

Dan

On Thursday 03 April 2008, Valerio Schiavoni wrote:
 this might sound weird but: how could I use cxf without its Spring
 support ?


 Within our framework we already use another component-model (Fractal,
 see http://fractal.objectweb.org), and having both at the same time is
 a bit too much. Everything works fine, let me be clear, but I'd like
 to explore a solution without having cxf import (transitively) all its
 Spring depedencies.

 Thanks,
 Valerio



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


Re: Dynamic Client/Server Side Configuration using API for Java First Spring WS

2008-04-03 Thread Daniel Kulp
On Thursday 03 April 2008, Arul Dhesiaseelan wrote:
 Hello!

 I am developing a Java first spring based CXF services. Is there a way
 to dynamically create services and clients at runtime rather using
 service-beans.xml and client-beans.xml?
 I am embedding Jetty as my server which will host my CXF services.

 Can someone on this group suggest me the approach?

 Thanks!
 Arul

Basically, the spring things are just configuring instances of various 
factory beans.   Thus, you can easily just configure the same factory 
beans via API's calls.   For example, jaxws:server is just configuring a 
JaxWsServerFactoryBean.   jaxws:client is configuring a 
JaxWsProxyFactoryBean instance.   


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


Re: Possible to use CXF without Spring ?

2008-04-03 Thread Daniel Kulp
On Thursday 03 April 2008, Valerio Schiavoni wrote:
 Interesting.
 My needs are indeed quite simple: i export java interfaces (without
 annotations), using hte ServerFactoryBean (configured manually with
 AegisDatabinding), and the same operations on the client side. Do you
 think such operations are enough simple to be done without Spring?

They should be.   Nothing special there.  :-)


 Where can I see some example of such configuration ?

Seriously, just remove the spring jars.  In theory, it should detect that 
spring isn't there and flip over to the other way of setting things up.

Dan




 Thanks,
 Valerio

 On Thu, Apr 3, 2008 at 11:42 PM, Daniel Kulp [EMAIL PROTECTED] wrote:
  CXF can be used without spring for some very basic use cases.
  Basically, simple JAXWS+JAXB client/server with no configuration (or
  use API's for configuration) and none of the complex things like
  ws-security/ws-rm that requires said configuration.
 
  Once you need to start configuring things, though, you may need the
  spring configs or you would need to write your own things to call on
  the API's to configure stuff.
 
  That said, I haven't tests the non-spring support lately.  :-(
 
  Dan
 
  On Thursday 03 April 2008, Valerio Schiavoni wrote:
   this might sound weird but: how could I use cxf without its Spring
   support ?
  
  
   Within our framework we already use another component-model
   (Fractal, see http://fractal.objectweb.org), and having both at
   the same time is a bit too much. Everything works fine, let me be
   clear, but I'd like to explore a solution without having cxf
   import (transitively) all its Spring depedencies.
  
   Thanks,
   Valerio
 
  --
  J. Daniel Kulp
  Principal Engineer, IONA
  [EMAIL PROTECTED]
  http://www.dankulp.com/blog



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


Re: Dynamic Client/Server Side Configuration using API for Java First Spring WS

2008-04-03 Thread Daniel Kulp

The jaxws:endpoint element is just configuring the actual CXF 
implementation of the jaxws Endpoint interface:
org.apache.cxf.jaxws.EndpointImpl

Dan



On Thursday 03 April 2008, Arul Dhesiaseelan wrote:
 Thanks Dan. Client worked just fine with your suggestion.

 Here is my service bean configuration. How do I dynamically create an
 endpoint shown in service-beans.xml? I am embedding jetty to deploy
 this endpoint.

 ?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:context=http://www.springframework.org/schema/context;
 xmlns:cxf=http://cxf.apache.org/core;
 xmlns:jaxws=http://cxf.apache.org/jaxws;
 xsi:schemaLocation=http://www.springframework.org/schema/beans

 http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
 http://www.springframework.org/schema/context

 http://www.springframework.org/schema/context/spring-context-2.5.xsd
 http://cxf.apache.org/core
 http://cxf.apache.org/schemas/core.xsd
 http://cxf.apache.org/jaxws
 http://cxf.apache.org/schemas/jaxws.xsd;

   !-- Load CXF modules from cxf.jar --
   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=engine
   implementor=demo.services.CustomerServiceImpl
   address=/CustomerService /

 /beans

 **Thanks!

 Arul

 Daniel Kulp wrote:
  On Thursday 03 April 2008, Arul Dhesiaseelan wrote:
  Hello!
 
  I am developing a Java first spring based CXF services. Is there a
  way to dynamically create services and clients at runtime rather
  using service-beans.xml and client-beans.xml?
  I am embedding Jetty as my server which will host my CXF services.
 
  Can someone on this group suggest me the approach?
 
  Thanks!
  Arul
 
  Basically, the spring things are just configuring instances of
  various factory beans.   Thus, you can easily just configure the
  same factory beans via API's calls.   For example, jaxws:server is
  just configuring a JaxWsServerFactoryBean.   jaxws:client is
  configuring a
  JaxWsProxyFactoryBean instance.



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


Re: NTLM Support?

2008-04-02 Thread Daniel Kulp

You might be able to use something like:
http://jcifs.samba.org/
to do the ntlm stuff.  See:
http://jcifs.samba.org/src/docs/httpclient.html

CXF just uses the JDK HTTPUrlConnection so it should work.   

That said, you MIGHT need to configure the CXF client to turn off the 
chunking, turn on the redirect support, etc... so that it doesn't try to 
stream the data.   (the handshakes don't allow the streaming)

If this DOES work, please let me know.  :-) 


Dan



On Wednesday 02 April 2008, mrusso wrote:
 I can't seem to find anything related to configuring CXF to support
 NTLM. Has anyone tried this or found any documentation / examples that
 they could point me towards?

 I'm trying to consume a Custom Microsoft SharePoint Web Service from
 our Java Portal (Spring / Hibernate on WebSphere) over SSL with NTLM. 
 I'm told by the SharePoint admins that I can use Basic Authentication,
 but my tests have shown that it keeps asking me for NTLM credentials.

 I'm generating a client from a provided .WSDL.  My plan is to work
 from the ground up, starting with No SSL, No Authentication.  Add
 Authentication to the SharePoint instance, retest, add SSL, retest,
 etc.  Rinse, Repeat.  My initial tests tell me that OOB CXF doesn't
 talk nicely with Integrated Windows Authentication, but I'm pretty new
 to this arena, so I'm not ruling out user error.

 I've followed this process with Axis2 with some success, but the
 generated files are horrendous, and we already are using CXF to serve
 to a flex client, so I'd like to keep it in the family, so to speak.

 Thanks for your time,

 Mario



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


Re: CXF 2.1 release

2008-04-01 Thread Daniel Kulp
On Tuesday 01 April 2008, Vincenzo Vitale wrote:
 Hi,

 was the 2.1 released postponed?


Quick update about that.

There are currently two JAX-WS TCK failures with the 2.1 codebase.  
However, they are bugs in the TCK and we have started the challenge 
process, but we have not yet received an update/patch to the TCK from 
Sun.Until we have 100% pass rate on the TCK, we cannot release 
a JAX-WS compatible version of cxf.   To me, the compatibility 
statement is important.


Also, I really don't want to do another incubator release.   They are NOT 
enjoyable to do at all due to constant changing  requirements, people 
voting based on personal opinions, etc  2.0.5 was a pain.  Thus, 
unless one of the other committers wants to step up and be the release 
manager, (which I'm all for, BTW.  I'd be glad to help someone out if 
they are interested.)  I'm going to wait till the April 16th or so when 
we can do releases ourselves.  If, for some reason, the board doesn't 
get to voting on our graduation on the 16th, then I'll go ahead and deal 
with the incubator then, but at this point, I have no desire to do it 
again.

That said, I'll probably build a beta-2 build sometime later this week.   
I'd REALLY like any extra eyes on it to give it some good testing.

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


Re: Error during build !!

2008-04-01 Thread Daniel Kulp
On Tuesday 01 April 2008, harbhanu wrote:
  Did you have a full internet connection (no proxy required) while
  doing

 the build?
 Nope... but we have configured the maven with required proxy settings
 And it's able to download all the other required dependencies...

 Even then the problem will be there??

Yea.   It's not a maven thing.   It's internal to the validator unit 
tests.  (and one of the system tests as well I think).   I BELIEVE both 
are fixed in 2.0.5 which I'm waiting for it to sync to the mirrors.


Dan



  -Original Message-
 From: Daniel Kulp [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2008 7:00 PM
 To: cxf-user@incubator.apache.org
 Cc: harbhanu; [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: Error during build !!



 Did you have a full internet connection (no proxy required) while
 doing the build?  There is an issue in the validator tests that
 requires a host name to be resolved and a connection established.  
 We've fixed that on trunk and I think for 2.0.5, although Benson
 mentioned the other day that there are still failures if the internet
 isn't available.

 Dan

 On Monday 31 March 2008, harbhanu wrote:
  Hi,
  I am able to solve that problem...
  It was due to some goof up that I did with the set of WSDL files
  under testutils.
  Apologies for bugging the group for such a mistake from my side :(
 
  Now that particular testcase execution is thru but now getting
  another one...
 
  Expecting prompt reply on this too ;) .. Thanks !
 
  Regards,
  Harbhanu
 
  PS: Error information for testcase failure...
  Running org.apache.cxf.tools.wsdlto.jaxws.CodeGenBugTest
  2008-03-31 12:34:29.365::INFO:  Logging to STDERR via
  org.mortbay.log.StdErrLog
  2008-03-31 12:34:29.427::INFO:  jetty-6.1.6
  2008-03-31 12:34:29.662::INFO:  Started [EMAIL PROTECTED]:8585
  Tests run: 49, Failures: 0, Errors: 2, Skipped: 0, Time elapsed:
  217.141 sec  FAILURE!
  testCatalog2(org.apache.cxf.tools.wsdlto.jaxws.CodeGenBugTest)  Time
  elapsed: 63.046 sec   ERROR!
  org.apache.cxf.tools.common.ToolException:
  java.net.ConnectException: Connection timed out: connect
  at
  org.apache.cxf.tools.validator.internal.WSDL11Validator.getWSDLDoc(W
 SD L11Val idator.java:80)
  at
  org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL
 11 Valida tor.java:95)
  at
  org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBui
 ld er.val idate(JAXWSDefinitionBuilder.jav
 
  :198)
 
  at
  org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBui
 ld er.val idate(JAXWSDefinitionBuilder.jav
 
  :61)
 
  at
  org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCo
 nt ainer. java:128)
  at
  org.apache.cxf.tools.wsdlto.jaxws.CodeGenBugTest.testCatalog2(CodeGe
 nB ugTest .java:852)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
  Method) at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
 .j ava:39 )
  at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
 ss orImpl .java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at
  org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMe
 th odRunn er.java:99)
  at
  org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMetho
 dR unner. java:81)
  at
  org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeA
 nd AfterR unner.java:34)
  at
  org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunn
 er .java: 75)
  at
  org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.jav
 a: 45) at
  org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(T
 es tClass MethodsRunner.java:66)
  at
  org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMetho
 ds Runner .java:35)
  at
  org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClas
 sR unner. java:42)
  at
  org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeA
 nd AfterR unner.java:34)
  at
  org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:
 52 ) at
  org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet
 .j ava:62 )
  at
  org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTe
 st Set(Ab stractDirectoryTestSuite.java:13
  )
  at
  org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(A
 bs tractD irectoryTestSuite.java:125)
  at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
  Method) at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
 .j ava:39 )
  at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
 ss orImpl .java:25)
  at java.lang.reflect.Method.invoke(Method.java:585

Re: WSDL First Development Cycle - specifically wsdl:port address question

2008-04-01 Thread Daniel Kulp

If the client is grabbing the wsdl view the ?wsdl flag to the endpoint, 
it SHOULD be getting a modified wsdl that has the proper address in it.   
If that's not the case, that might be a bug, but it's probably a 
configuration issue as I know we have several tests that test this (and 
the TCK requires it to work).  Thus, I'd probably like to see a war that 
demonstrates this.

Also, the client can always be reconfigured post-creation to hit any url 
you give it.   It DOESN'T need to use the url in the wsdl.   If the 
container can provide a new URL, just set the ENDPOINT_ADDRESS_PROPERY 
thing on the client's request context and it will use that address 
instead.

Dan



On Tuesday 01 April 2008, bdm wrote:
 Glen,

 Thanks for the response but I may not have been clear on what I'm
 trying to accomplish.

 In our normal development life cycle, once code (a .war file in this
 case) leaves development for test and production we do not change
 anything in the code or the accompanying configuration files (spring
 context, etc).  All of the differences in the environments (database
 connections, etc) are handled by the container - tomcat in this case. 
 We would like to implement the same type of configuration with our web
 service deployments.

 In [1] - the last sentence of note 4 reads - Note the URL specified
 in the wsdl:port section (under wsdl:service) is ignored by the
 servlet container. It is used, however, by the web service client
 which reads in this WSDL to determine where to route the requests.

 This is exactly the problem.  Yes the web service deploys correctly
 and the servlet container ignores the address given in the provided
 WSDL.  But, the WSDL is delivered unmodified to any requesting client
 with the address given in the WSDL and not the address of the service.
  I tried this yesterday one last time before posting to the list using
 2.0.4 of CXF.

 I'm not sure if that is a bug or a feature, I'm just trying to figure
 out how to implement our standard practice given the current behavior
 of CXF.

 Brent

 Glen Mazza-2 wrote:
  Note #4 of here[1] shows how the WSDL URL is created when you deploy
  to an application server; as you can see, what you have in the wsdl
  file is pretty much ignored web-service provider side.
 
  For the client, it is just an issue of modifying the
  ENDPOINT_ADDRESS_PROPERTY as shown in Step #7 here[2].  You can use
  Spring Dependency Injection for that if helpful.
 
  Glen
 
  [1] http://www.jroller.com/gmazza/date/20071019#notes
  [2] http://www.jroller.com/gmazza/entry/using_the_ebay_shopping_api1



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


Re: Preferred JDK Version?

2008-04-01 Thread Daniel Kulp
On Tuesday 01 April 2008, davidwsica wrote:
 Can someone provide an update on using JDK6 (latest update 5) with the
 latest CXF 2.1?  Are there still issues with JAX-WS 2.1?

Not with jaxws.   We have one system test failure in the jaxrs stuff, but 
it's non-critical.   Basically, the hashmaps are ordered differently 
in J6 which is causing a problem with a test that is assuming a 
particular order.   (yes, it's a bad test.   We're looking at it.)

Other than that, the entire CXF build builds and tests fine with Java6 
and the TCK has the same failures with Java6 as it does with Java5.

Oh: there is one demo that is also failing that Sean is looking at.

Dan




 Thanks,
 David

 James Mao wrote:
  FYI, the JDK6 Update3 is the last update which contain the jaxws api
  2.0 and jaxb api 2.0,
  the later release will contain the jaxws api 2.1 and jaxb api 2.1
 
  http://weblogs.java.net/blog/ramapulavarthi/archive/2007/10/jaxws_21
 _in_jav.html
 
  And another difference this is license, we use Apache 2.0
 
  James
 
  On Wednesday 10 October 2007, David W Sica wrote:
  If JDK6 includes jaxws and jaxb jars what do I gain by using CXF
  over just JDK6?  If I do decide to use JDK6, can I get more
  details regarding your response below on copying stuff to jre/lib?
 
  Well, CXF supports a lot of things the JAX-WS implemention in JDK 6
  does not.  Things like jms transports, advanced https
  configuration, Spring configuration, WS-A, WS-RM, etc
 
  Let me clear about one thing:
  CXF 2.0.x should work perfectly fine with JDK6.   The api jars and
  such that we ship are the same version as those built into JDK6.
 
  The problem will be with CXF 2.1 which is our current development
  mainline.   For 2.1, we are targetting JAX-WS 2.1 which is newer
  than what's in JDK6.   To use the 2.1 snapshots, you'd most likely
  need to copy the jaxb-* and jaxws-api-* jars (and maybe stax-api*)
  from our lib directory to the jre/lib/endorsed dir.   I'm not 100%
  sure as I haven't tested it yet.   At this point, I'm mostly
  working on fixes and stuff still targetting 2.0.3 which should work
  fine for JDK6.  (although I don't have JDK6 installed to really
  test with yet)
 
  Dan
 
  Thanks,
  David
 
  On 10/4/07, Daniel Kulp [EMAIL PROTECTED] wrote:
  Also, should I
  pursue using JDK6 for deployment?  Do I gain anything with JDK6
  as far as CXF is concerned?
 
  I would not use jdk6 for right now.   JDK6 is definitely going to
  cause us problems on trunk.   jk6 includes older versions of the
  jaxws and jaxb jars which may conflict with the ones we require.
  Thus, to work with jdk6, some stuff may need to be copied from
  our lib dir to the jre/lib dir.   We haven't spent much time
  investigating that yet as trunk is still moving/changing pretty
  fast.2.0.2 SHOULD work OK with Java 6.   It's mostly the new
  stuff on trunk that will be a problem.
 
 
  --
  J. Daniel Kulp



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


Re: WSDL First Development Cycle - specifically wsdl:port address question

2008-04-01 Thread Daniel Kulp
Brent,

On Tuesday 01 April 2008, Brent Moore wrote:
  I've created a JIRA [1] with an attached war for an echo service that
 exhibits the behavior I'm talking about.  If I understand you
 correctly, the bogushost address should be replaced with the real
 address of the service.  But at least on my tomcat 5.5.23 it doesn't
 happen. 

I looked at the war and can duplicate the issue.   I probably won't have 
a chance to dig into the code and find out what is going on until Friday 
though.  (meetings)   Couple quite thoughts:
1) As Glenn said, try using WEB-INF/wsdl/...  for the wsdlLocation.

2) Put SOMETHING valid in the wsdls soap:address.   Just put 
in http://localhost:8080/; or something.   We MIGHT be trying to parse 
whats there or something and your blank location might be confusing it.

Anyway, I can dig into it more on Friday to figure out really what it 
going on.

  Once it does happen, is there a way to influence which of the aliases
 for the box it uses?  Some of our boxes serve multiple virtual hosts.

It will use the URL from the incoming request.   For example, if you hit 
localhost:8080, that is what will appear in the returned wsdl.  If you 
hit myhost.com, that is what will appear.   

Dan



  [1] http://jira.codehaus.org/browse/CXF-1497


  Thanks for the help.


  Brent

  Daniel Kulp wrote:
 If the client is grabbing the wsdl view the ?wsdl flag to the
 endpoint, it SHOULD be getting a modified wsdl that has the proper
 address in it. If that's not the case, that might be a bug, but it's
 probably a configuration issue as I know we have several tests that
 test this (and the TCK requires it to work).  Thus, I'd probably like
 to see a war that demonstrates this.

 Also, the client can always be reconfigured post-creation to hit any
 url you give it.   It DOESN'T need to use the url in the wsdl.   If
 the container can provide a new URL, just set the
 ENDPOINT_ADDRESS_PROPERY thing on the client's request context and it
 will use that address instead.

 Dan



 On Tuesday 01 April 2008, bdm wrote:

 Glen,

 Thanks for the response but I may not have been clear on what I'm
 trying to accomplish.

 In our normal development life cycle, once code (a .war file in this
 case) leaves development for test and production we do not change
 anything in the code or the accompanying configuration files (spring
 context, etc).  All of the differences in the environments (database
 connections, etc) are handled by the container - tomcat in this case.
 We would like to implement the same type of configuration with our web
 service deployments.

 In [1] - the last sentence of note 4 reads - Note the URL specified
 in the wsdl:port section (under wsdl:service) is ignored by the
 servlet container. It is used, however, by the web service client
 which reads in this WSDL to determine where to route the requests.

 This is exactly the problem.  Yes the web service deploys correctly
 and the servlet container ignores the address given in the provided
 WSDL.  But, the WSDL is delivered unmodified to any requesting client
 with the address given in the WSDL and not the address of the service.
  I tried this yesterday one last time before posting to the list using
 2.0.4 of CXF.

 I'm not sure if that is a bug or a feature, I'm just trying to figure
 out how to implement our standard practice given the current behavior
 of CXF.

 Brent

 Glen Mazza-2 wrote:

 Note #4 of here[1] shows how the WSDL URL is created when you deploy
 to an application server; as you can see, what you have in the wsdl
 file is pretty much ignored web-service provider side.

 For the client, it is just an issue of modifying the
 ENDPOINT_ADDRESS_PROPERTY as shown in Step #7 here[2].  You can use
 Spring Dependency Injection for that if helpful.

 Glen

 [1] http://www.jroller.com/gmazza/date/20071019#notes
 [2] http://www.jroller.com/gmazza/entry/using_the_ebay_shopping_api1



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


Re: Webservice client sending null parameters to host

2008-04-01 Thread Daniel Kulp

I'm pretty sure that if your hitting this, the soap message is invalid 
for the service.  Usually, it's one of two things:

1) A qualified vs unqualified issue.   The elements are coming in 
non-qulalified when the service is expecting qualified or vice-versa.

2) The elements are coming in the wrong order.   I think one of the perl 
soap toolkits does this sometimes. 

In anycase, a testcase would be a big help.

Dan



On Tuesday 01 April 2008, depstei2 wrote:
 I am getting the same error, and after debugging I have come to the
 same piece of code in DocLiteralInInterceptor.  Has anyone come up
 with a solution?

 Mayank Mishra-2 wrote:
  G'day all,
 
  I faced the same problem using JAXB binding, I debuged it,
 
  The code in method getPara() of DocLiteralInInterceptor class
 
  parameters.put(part, null);
  
 
  puts null parameters in the MessageContentsLists instance.
 
  replacing it with,
 
  
  parameters.put(part, dr.read(part, xmlReader));
 
 
  results in right behavior.
 
  I may be wrong, but sharing my own experience with you all.
 
  With Regards,
  Mayank
 
  Daniel Kulp wrote:
  Any chance you can send a sample project that shows the problem?  
  Kind of hard to diagnos this without more details.   What version
  of CXF? Code first/wsdl first?   Can I see the wsdl?  Can you
  capture the soap message?   JAXB/Aegis? etc
 
 
 
  Dan
 
  On Friday 08 February 2008, mrsv wrote:
  I have a cxf webservice and a client generated using wsdl2java.
  When the client tries to contact the service the parameters are
  being null. I am unable to figure out the reason.Tried including
  all the jars from cxf.
 
  Any answers are appreciated.
 
  Thanks



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


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

2008-04-01 Thread Daniel Kulp
On Tuesday 01 April 2008, Alpin, Luba wrote:
 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.

I'm not sure if it works from configuration.   You SHOULD be able to get 
it working from API's though.  

  Client client = ClientProxy.getClient(proxy);
  HTTPConduit httpConduit = (HTTPConduit) client.getConduit();
  TLSClientParameters tlsParams = new TLSClientParameters();
  tlsParams.setSecureSocketProtocol(SSL);
  .set more TLS things.
  httpConduit.setTlsClientParameters(tlsParams);



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


Re: Problems in using TLS

2008-04-01 Thread Daniel Kulp

Any chance you could create a small testcase that shows the issue.   
Maybe modify the https sample or something?   If I can get a testcase, I 
can definitely dig into it more and figure out what is going on.   You 
can send it to me privately to [EMAIL PROTECTED] to avoid the apache 
filters that tend to strip attachments.

Dan


On Tuesday 01 April 2008, Brendan Maguire (brmaguir) wrote:
 Thanks for the reply Daniel.

 I tried using the 2.0.5 libraries but am still getting the exact same
 errors.

 Am I setting it up correctly using the cxf.xml file? Any other ideas
 on what the problem could be?

 Cheers,
 Brenan

 -Original Message-
 From: Daniel Kulp [mailto:[EMAIL PROTECTED]
 Sent: 27 March 2008 18:38
 To: cxf-user@incubator.apache.org
 Cc: Brendan Maguire (brmaguir)
 Subject: Re: Problems in using TLS


 I don't suppose there would be any chance of you trying the 2.0.5
 stuff we're voting on?
 http://people.apache.org/~dkulp/stage_cxf/2.0.5-incubator/

 I made some changes to the TLS stuff in 2.0.5 to make it work better
 and with less configuration.

 Dan

 On Thursday 27 March 2008, brmaguir wrote:
  Hey,
 
  I'm trying to communicate with a web service using Apache CXF using
  TLS. When I specify TLS in the cxf.xml file using:
 
  http-conf:tlsClientParameters
  secureSocketProtocol=TLS sec:trustManagers
  sec:keyStore password=password
  url=file:\C:/path/to/keystore/ /sec:trustManagers
  sec:cipherSuitesFilter
  sec:include.*.*./sec:include
  /sec:cipherSuitesFilter
  /http-conf:tlsClientParameters
 
  it is failing with the following error:
 
  27-Mar-2008 11:06:03 org.apache.cxf.phase.PhaseInterceptorChain
  doIntercept INFO: Interceptor has thrown exception, unwinding now
  org.apache.cxf.interceptor.Fault: Connection reset
  at
  org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePa
 rt s(AbstractOutDat abindingInterceptor.java:75)
  at
  org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutI
 nt erceptor.java:68 )
  at
  org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercep
 to rChain.java:207) at
  org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at
  org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at
  org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
  at
  org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:1
 35 ) at $Proxy35.login(Unknown Source)
  at thirdPartyAPI.test.Test.loginAppuser(Test.java:135)
  at thirdPartyAPI.test.Test.main(Test.java:61)
  Caused by: com.ctc.wstx.exc.WstxIOException: Connection reset
  at

 com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)

  at
  org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePa
 rt s(AbstractOutDat abindingInterceptor.java:73)
  ... 9 more
  Caused by: java.net.SocketException: Connection reset
  at java.net.SocketInputStream.read(Unknown Source)
  at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown

 Source)

  at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown
  Source) at
  com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(U
 nk nown Source)
  at

 com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown

  Source)
  at

 com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown

  Source)
  at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown
  Source) at
  sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connec
 t( Unknown Source)
  at
  sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown
  Source)
  at
  sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Un
 kn own Source)
  at
  org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handle
 He adersTrustCachin g(HTTPConduit.java:1766)
  at
  org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirs
 tW rite(HTTPConduit .java:1734)
  at
  org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedO
 ut putStream.java:4 2)
  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
  Exception in thread main javax.xml.ws.soap.SOAPFaultException:
  Connection reset
  at
  org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:1
 75 ) at $Proxy35.login(Unknown Source)
  at thirdPartyAPI.test.Test.loginAppuser(Test.java:135)
  at thirdPartyAPI.test.Test.main(Test.java:61)
  Caused by: org.apache.cxf.interceptor.Fault: Connection reset
  at
  org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePa
 rt s(AbstractOutDat

[ANNOUNCE] Apache CXF 2.0.5-incubator is released!

2008-04-01 Thread Daniel Kulp

I hate to do this on April 1st as it's not a joke, but...


The Apache Incubator CXF team is proud to announce the availability of 
the 2.0.5 release! 

Apache CXF is an open source services framework. CXF helps you build
and develop services using frontend programming APIs, like JAX-WS. These 
services can speak a variety of protocols such as SOAP, XML/HTTP, 
RESTful HTTP, or CORBA and work over a variety of transports such as 
HTTP, JMS or JBI. 


CXF includes a broad feature set, but it is primarily focused on the 
following areas: 
 
* Web Services Standards Support: CXF supports a variety of web service 
standards including SOAP, the Basic Profile, WSDL, WS-Addressing, 
WS-Policy, WS-ReliableMessaging, and WS-Security. 
 
* Frontends: CXF supports a variety of frontend programming models. CXF
provides a JAX-WS Compliant frontend. It also includes a simple 
frontend which allows creation of clients and endpoints without
annotations. CXF supports both contract first development with WSDL and
code first development starting from Java. 
 
* Ease of use: CXF is designed to be intuitive and easy to use. There
are simple APIs to quickly build code-first services, Maven plug-ins to
make tooling integration easy, JAX-WS API support, Spring 2.0 XML 
support to make configuration a snap, and much more. 
 
This release is mostly a patch release to fix problems and issues (over 
30 JIRA items resolved) that users have encountered in the 
2.0.4-incubator release.


For more information see: 
 * Download: http://incubator.apache.org/cxf/download.html
 * Website: http://incubator.apache.org/cxf/ 
 * Release Notes: 
http://incubator.apache.org/cxf/apache-cxf-205-incubating-release-notes.html 
 * Mailing lists: http://incubator.apache.org/cxf/mailing-lists.html 


If you have feedback, questions or would like to get involved in the CXF 
project please join the mailing lists and let us know your thoughts. 
 
The Apache Incubator CXF Team 
http://incubator.apache.org/cxf/


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


Re: Error during build !!

2008-03-31 Thread Daniel Kulp
)
 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
 at java.net.Socket.connect(Socket.java:520)
 at java.net.Socket.connect(Socket.java:470)
 at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
 at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
 at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
 at sun.net.www.http.HttpClient.init(HttpClient.java:231)
 at sun.net.www.http.HttpClient.New(HttpClient.java:304)
 at sun.net.www.http.HttpClient.New(HttpClient.java:321)
 at
 sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLCo
nnecti on.java:813)
 at
 sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnec
tion.j ava:765)
 at
 sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.
java:6 90)
 at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConn
ection .java:934)
 at
 com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentE
ntity( XMLEntityManager.java:973)
 at
 com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDo
cVersi on(XMLVersionDetector.java:184)
 at
 com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XM
L11Con figuration.java:798)
 at
 com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XM
L11Con figuration.java:764)
 at
 com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.j
ava:14 8)
 at
 com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.j
ava:25 0)
 at
 com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Docu
mentBu ilderImpl.java:292)
 at
 javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:146) at
 org.apache.cxf.helpers.XMLUtils.parse(XMLUtils.java:122) at
 org.apache.cxf.tools.validator.internal.WSDL11Validator.getWSDLDoc(WSD
L11Val idator.java:75)
 ... 29 more
 -Original Message-
 From: Daniel Kulp [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 27, 2008 11:31 PM
 To: cxf-user@incubator.apache.org
 Cc: harbhanu; [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: Error during build !!



 Hmm...   that one I have NO idea and cannot reproduce.  :-(

 I even upgrade my JDK from _13 to _15, re-checked out a clean 2.0.4
 tree, etc... and cannot reproduce it.   Not sure what could be going
 on. Looking at that line in the code, it's just checking the soap
 action that was read from the wsdl.   Thus, the only thing I can think
 of is if a different /wsd/hello_world.wsdl file is being picked up,
 but that shouldn't be the case.

 Dan

 On Thursday 27 March 2008, harbhanu wrote:
  Thanks for your informatin, I was able to take this forward after
  reverting to java version 1.5.0_15
 
  \apache-cxf-2.0.4-incubator-srcmvn -version
  Maven version: 2.0.8
  Java version: 1.5.0_15
  OS name: windows xp version: 5.1 arch: x86 Family: windows
 
  \apache-cxf-2.0.4-incubator-srcjava -version
  java version 1.5.0_15
  Java(TM) 2 Runtime Environment, Standard Edition (build
  1.5.0_15-b04) Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed
  mode, sharing)
 
  \apache-cxf-2.0.4-incubator-srcjavac -version
  javac 1.5.0_15
 
  Now, the build is successful but one of the testcase is failing...
  Let me know incase it's a problem with the testcase or something
  else...
 
  Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
  0.157 sec  FAILURE!
  testFactory(org.apache.cxf.binding.soap.SoapBindingFactoryTest) 
  Time elapsed: 0.11 sec   FAILURE!
  org.junit.ComparisonFailure: expected:[] but was:[ ]
  at org.junit.Assert.assertEquals(Assert.java:96)
  at org.junit.Assert.assertEquals(Assert.java:116)
  at
  org.apache.cxf.binding.soap.SoapBindingFactoryTest.testFactory(SoapB
 in dingFa ctoryTest.java:111)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
  Method) at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
 .j ava:39 )
  at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
 ss orImpl .java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at
  org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMe
 th odRunn er.java:99)
  at
  org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMetho
 dR unner. java:81)
  at
  org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeA
 nd AfterR unner.java:34)
  at
  org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunn
 er .java: 75)
  at
  org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.jav
 a: 45) at
  org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(T
 es tClass MethodsRunner.java:66)
  at
  org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMetho
 ds Runner .java:35)
  at
  org.junit.internal.runners.TestClassRunner$1

Re: Problem with CXF inheritance exception

2008-03-31 Thread Daniel Kulp


As Glen mentioned, this is completely per spec.   

You can work around it SLIGHTLY by refactoring your exceptions to store 
all their data in JAXB specified java beans (grabbed via getFaultInfo()) 
that implement the same heiarchy.   That said, when you run wsdl2java on 
the wsdl to generate code from it, that heiarchy would not be honored in 
the exceptions themselves. 

In anycase, this is all per spec.

Dan


On Monday 31 March 2008, Eric Gueidao wrote:
 Hello,

 I'm working on project with CXF and I try to keep the inheritance
 between exceptions in my WSDL but it doesn't work.
 It works well with data objects but when I generate the WSDL of my
 service with java2wsdl (2.0.4 and 2.0.5) or java2ws (2.1) I lose the
 inheritance between exceptions.
 Do you know, please, how to do for keeping inheritance between
 exceptions? If it's impossible to do it, can I be able to do it in the
 future CXF version?

 Thank you in advance,
 GUEIDAO Eric



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


Re: cxf-2.0.5 snapshot fails with scope=session

2008-03-28 Thread Daniel Kulp
On Friday 28 March 2008, Vassilis Virvilis wrote:
 On Thursday 27 March 2008, Daniel Kulp wrote:
  Any chance you could creaet a small HelloWorld war or similar that
  demonstrates the problem?  Hearing that something worked in 2.0.4,
  but doesn't in 2.0.5 really concerns me.   I'd like to track that
  down, but a test case would be a HUGE help.
 
  Dan

 Hi Dan,

 Sure no problem,

 I am attaching the source code. It 3.3KB so I don't believe there is
 a problem. If that goes against the list policy please tell me.

 I am not including the lib/ jars since it is a 20M download.

 In order to test it you have

 Pseudo commands:
 
 cd bug-session-2.0.5
 cp -a ~/Download/apache-cxf-2.0.4-incubator/lib .
 ant clean; ant

 produces ws.war that works

Well, that's not working for me.   The war doesn't deploy on tomcat.  It 
gets the same cannot create bean test error that I get with 2.0.5.

Dan





 now
 rm -rf lib
 cp -a ~/Download/apache-cxf-2.0.5-incubator-SNAPSHOT/lib .
 ant clean; ant

 produces ws.war that does not work

 at least in Debian unstable / Tomcat 5.5.25

   .bill



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


Re: cxf-2.0.5 snapshot fails with scope=session

2008-03-28 Thread Daniel Kulp


Did you by any chance modify your 2.0.4 lib directory to include the 
spring aop stuff (and cglib)?   If so, you will need to do the same for 
2.0.5.   If I replace the 2.0.5 spring jars with the everything spring 
jar and add cglib-nodeps, then your sample works fine with 2.0.5 and 
2.0.4.  Thus, my gut feeling says your 2.0.4 lib dir has those, but 
that's not something we included by default.

Dan


On Friday 28 March 2008, Vassilis Virvilis wrote:
 On Thursday 27 March 2008, Daniel Kulp wrote:
  Any chance you could creaet a small HelloWorld war or similar that
  demonstrates the problem?  Hearing that something worked in 2.0.4,
  but doesn't in 2.0.5 really concerns me.   I'd like to track that
  down, but a test case would be a HUGE help.
 
  Dan

 Hi Dan,

 Sure no problem,

 I am attaching the source code. It 3.3KB so I don't believe there is
 a problem. If that goes against the list policy please tell me.

 I am not including the lib/ jars since it is a 20M download.

 In order to test it you have

 Pseudo commands:
 
 cd bug-session-2.0.5
 cp -a ~/Download/apache-cxf-2.0.4-incubator/lib .
 ant clean; ant

 produces ws.war that works

 now
 rm -rf lib
 cp -a ~/Download/apache-cxf-2.0.5-incubator-SNAPSHOT/lib .
 ant clean; ant

 produces ws.war that does not work

 at least in Debian unstable / Tomcat 5.5.25

   .bill



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


Re: scope=session client side configuraion

2008-03-28 Thread Daniel Kulp

Hmm...  not sure what phase you get if you don't specify one.  That might 
be why it's not working.

I would suggest doing:

public static class MyInterceptor 
extends AbstractPhaseInterceptorMessage {

public MyInterceptor() {
super(Phase.SETUP);
}

public void handleMessage(Message message) throws Fault {
logger.info(Hi there);
message.put(Message.MAINTAIN_SESSION, true);
}
}

That should make it run at the earliest part of the outgoing chain.

Dan


 thanks for the info.
 I would like to get rid of the JaxWS dependency since SimpleClient is
 good enough for me

 I did take a look at
 http://cwiki.apache.org/CXF20DOC/interceptors.html and I ended up
 with:

 -
 public static class MyInterceptor extends AbstractSoapInterceptor
 { public void handleMessage(SoapMessage message) throws Fault {
 logger.info(Hi there);
 message.put(Message.MAINTAIN_SESSION, true);
 }
 }

 ...
TestInterface ldap = (TestInterface) context.getBean(TestClient);

ClientProxy.getClient(test).getOutInterceptors().add(new
 MyInterceptor());

   | This is my proxy client

 --

 but the message Hi there is never printed.

 I am obviously missing something but what?
 Maybe the type of the Interceptor that I am extending?

   .bill



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


Re: Software caused connection abort: recv failed (https and cxf)

2008-03-28 Thread Daniel Kulp

With 2.0.4, the java_home/lib/security/cacerts file isn't actually used 
at all.  2.0.4 doesn't trust anything you don't specifically specify in 
configuration.   This has been greatly relaxed in 2.0.5 so that if you 
don't specify anything in config, it will pick up the certs in cacarts.  
In general https support is a lot easier to use in 2.0.5.

My suggestion would be to give 2.0.5 a try and see if that helps.  We're 
currently voting on it.   With any luck, it will be released on Monday.  
The candidates that we are voting on are at:
http://people.apache.org/~dkulp/stage_cxf/2.0.5-incubator/

Dan



On Friday 28 March 2008, [EMAIL PROTECTED] wrote:
 Hi guys,
 I have set up a server which listens for https connections.
 When my only client sends any message, I get this exception (client-
 side):
 java.net.SocketException: Software caused connection abort: recv
 failed

 Please does anyone know about this error?
 Here is how I generated my certs:
 [SERVER]
 keytool -genkey -dname CN=localhost, OU=NOT FOR PRODUCTION, O=Apache,
 ST=NY, C=US -keystore server.jks -storetype jks -storepass server -
 keypass server -alias hosting_servant -keyalg RSA

 keytool -selfcert -alias hosting_servant -keystore server.jks -keypass
 server -storepass server

 keytool -export -alias hosting_servant -file server.cer -keystore
 server.jks -storepass server

 keytool -import -v -trustcacerts -alias hosting_servant -file server.
 cer -keystore cacerts.jks -keypass cacert -storepass cacert
 [CLIENT]
 keytool -genkey -alias dashboard_servant -keyalg RSA -keypass client -
 storepass client -keystore client.jks -dname CN=dashboard_servant,
 OU=NOT FOR PRODUCTION, O=Apache, ST=NY, C=US

 keytool -selfcert -alias dashboard_servant -keystore client.jks -
 keypass client -storepass client

 keytool -export -alias dashboard_servant -storepass client -file
 client.cer -keystore client.jks

 keytool -import -v -trustcacerts -alias dashboard_servant -file
 client. cer -keystore cacerts.jks -keypass cacert -storepass cacert

 Then i add my two certs into java_home/lib/security/cacerts

 Any suggestions?
 Thanks



 __

 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/



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


Re: CXF client side logging setup with spring throws NPE

2008-03-28 Thread Daniel Kulp
On Friday 28 March 2008, xbranko wrote:
 To answer my own question, this is a bug see:
 http://www.nabble.com/Created:-(CXF-1435)-BusApplicationContext-should
-pass-empty-String-array-to-super-constructor-instead-of-null-td1550287
3.html issue .

Yep.  The solution is to downgrade to Spring 2.5.0 or 2.5.1.

Alternatively, you can try the CXF 2.0.5 release candidates found at:
http://people.apache.org/~dkulp/stage_cxf/2.0.5-incubator/
That bug is fixed in those.  With any luck, 2.0.5 should be released on 
Monday.

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


Re: service caching

2008-03-28 Thread Daniel Kulp

Chris,

Can you try something?   Create a single proxy and keep that proxy around 
(like in a static or something) for the duration of the test.  You don't 
need to use it, it just needs to stay around.

We do do some caching of JAXB contexts (we should probably cache the 
schemas that go with that context), but those are stored in a  
WeakHashMap type thing so if something isn't kept around to hold onto 
them, they would get collected and have to be recreated.  Likewise, the 
wsdl and and schemas from the wsdl need something holding onto them to 
keep them from being collected.


Dan



On Friday 28 March 2008, Christopher Cheng wrote:
 You could try to generate java codes using 
 org.apache.cxf.tools.wsdlto.WSDLToJava with the following wsdl and
 see the performance.

 http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_HotelAvailLLS
1.5.1RQ.wsdl

 If it's jaxb that's causing the performance problem, which databinding
 in your opinion has the best performance?


 On Fri, Mar 28, 2008 at 11:26 PM, Benson Margulies
 [EMAIL PROTECTED]

 wrote:
  Please supply some sort of test case. I've profiled extensively. I
  don't believe that service caching, as discussed, would have any
  effect. The current 2.1 code (as ported by Dan to 2.0.5) appears to
  be constrained by the performance of JAXB, and I don't think we have
  a caching opportunity there, though I would love to be wrong.
  Perhaps there's something about your
  services that use a lot more time in the service model code than the
  sample
  I've been profiling.
 
  On Fri, Mar 28, 2008 at 8:13 AM, Christopher Cheng 
 
  [EMAIL PROTECTED] wrote:
   I just tried to rerun it with the snapshot 2.0.5. It is running
   about
 
  20%
 
   faster, but it still takes 3 seconds to build services.
   I hope that the service caching will be available soon so I can
   migrate the
   current axis-1.2 application to cxf
  
   On Thu, Mar 20, 2008 at 7:33 PM, Daniel Kulp [EMAIL PROTECTED] 
wrote:
On Thursday 20 March 2008, Christopher Cheng wrote:
 Looks like 2.0.5 is going to release soon, is this service
 caching
 
  in
 
 2.0.5?
   
Yea.   The stuff that Benson has done is being ported to 2.0.x.
   
That said, it's not the full service caching.   It's basically a
bunch
  
   of
  
incremental improvements to the current algorithms, but it's
 
  definitely
 
a big improvement.
   
Dan
   
 On Wed, Mar 5, 2008 at 11:50 AM, Christopher Cheng 

 [EMAIL PROTECTED] wrote:
  Looking forward to have this in the next release 2.0.5 or
  2.1 :)
 
  On Tue, Mar 4, 2008 at 11:55 PM, Daniel Kulp
  [EMAIL PROTECTED]
   
wrote:
   Willem,
  
   The issue is that they CAN be modified after that.   One
   popular modification is to grab the EndpointInfo out of it
   and change
 
  the
 
   address.   Other things like adding interceptors to the
   BindingInfo, changing properties on the service (like to
   enable schema validation), etc... are all modifications
   that affect the servicemodel.
  
   Databinding is less of an issue, but still one.   For
   example, the databinding has an mtomThreshold and a
   namespaceMap that
 
  can
 
   be set programatically.
  
   In both of those cases, a modification should only affect
   the proxy on which the modification is made.   Thus, the
 
  servicemodel
 
   would need a full clone, which may not be easy to do.  
   It's certainly a lot more code to add.
  
   That said, I don't think it's a bad idea at all.  On the
 
  contrary,
 
   it's a
   good idea.   It's just a bit of work.
  
   Dan
  
   On Tuesday 04 March 2008, Willem Jiang wrote:
Hi Dan,
   
I think we could cache the ServiceInfo object and
DataBinding object which will take lots of time to be
created and can't be modified after that. Any thought?
   
Willem
   
Daniel Kulp wrote:
 On Tuesday 04 March 2008, Christopher Cheng wrote:
 I haven't read the codes of Axis, but I have been
 using it for 2 years and it doesn't have this
 problem. Having an overhead for 5-8 seconds is not an
 option for a production system in term of performance

 What you are saying is that all the services must
 implement Clonable interface?

 No, not the services themselves.   Just our interal
 service model stuff that holds all the metadata. 
 Basically, when creating a new service, we need to
 calculate the metadata. We should cache that if
 possible.

 Dan

 On Tue, Mar 4, 2008 at 4:48 AM, Daniel Kulp
 [EMAIL PROTECTED]
  
   wrote:
 Christopher,

 We cannot just reuse the Service model objects as
 they
 
  are
 
 completely modifiable at runtime

  1   2   3   4   5   6   7   >