You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Manjunatha Nakshathri <Ma...@mindtree.com> on 2009/02/24 15:43:16 UTC

Migrating from XFire to CXF...

Dear all,

We are facing some issue while implementing the webservices using the XFire(version 1.2.1) (JBoss as server).

When i am trying to access the WSDL through the url ( http://localhost:8080/acs/services/ReleaseManager?wsdl ), server is throwing the following exception :

javax.servlet.ServletException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:143)
org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

root cause

org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
org.jdom.Namespace.getNamespace(Namespace.java:164)
org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.java:58)
org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.java:403)
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:355)
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.java:509)

cont.......

Please find attached service.xml.

If we comment the <serviceFactory>#castorServiceFactory</serviceFactory> in the service.xml; then we are able to access the wsdl. But when we call the service using the client (Using the ObjectServiceFactory().create() and not the JaxbServiceFactory().create() ), then in the client side it gives following error:

org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: No write method for property {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen

org.codehaus.xfire.fault.XFireFault: No write method for property {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen (Complete error log attached ErrorLog.rtf)

This error is because ReleaseOpen.java file does not have any setter method for the choiceValue. This ReleaseOpen class is generated by release-impact-worksheet-3.2.0.xsd using castor. Similar to this class there are lots of class files which are generated using the castor and which don't have some setter methods inside them. So editing the files is not a good idea (And these are generated every time using the XSD file).

We searched through the XFire site also ( http://jira.codehaus.org/browse/XFIRE-509 ). We tried using the XFire-all-1.2.3.jar. But we are not able to crack the issue.

We are using the castor to generate the java classes and we should be able to pass these objects (rather than converting them to String and passing it on server) over the server.

I have following question.

1.       What should I do to make this work? Is there any thing with the way I am invoking the service?

2.       Does migrating from XFire to CXF will solve this issue? If yes, then which version of CXF should I use?

3.       Is there any guide for Implementation of CXF with castor?

Thanks for your effort and also for your valuable time.



Thanks and Regards,

Manjunath

________________________________
http://www.mindtree.com/email/disclaimer.html

RE: Migrating from XFire to CXF...

Posted by Manjunatha Nakshathri <Ma...@mindtree.com>.
If you see the services.xml file it has the following entries:

<!--Start>

<bean id="castorTypeRegistry" class="org.codehaus.xfire.castor.CastorTypeMappingRegistry"/>
  <bean id="bindingProvider" class="org.codehaus.xfire.aegis.AegisBindingProvider">
    <constructor-arg ref="castorTypeRegistry"/>
  </bean>
  <bean id="castorServiceFactory" class="org.codehaus.xfire.service.binding.ObjectServiceFactory">
    <constructor-arg index="0" ref="xfire.transportManager"/>
    <constructor-arg index="1" ref="bindingProvider"/>
  </bean>

  <service>
    <name>ReleaseManager</name>
    <namespace>ReleaseManager</namespace>
    <serviceClass>com.pinkroccade.jfoundation.calculation.releases.ReleaseManager</serviceClass>
    <implementationClass>com.pinkroccade.jfoundation.calculation.releases.ReleaseManagerImpl</implementationClass>
    <schemas>
          <schema>META-INF/schema/release-impact-worksheet-3.2.0.xsd</schema>
    </schemas>


        <style>document</style>
    <serviceFactory>#castorServiceFactory</serviceFactory>

  </service>

<--End-->

Here I have mentioned  "bindingProvider" as the "AegisBindingProvider". The point you mentioned might be because of this. I don't know how to give the castor specific binding provider here... I could not find the castor specific binding provider there in the XFire...





Thanks And Regards,

Manjunath.

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org]
Sent: Tuesday, February 24, 2009 9:30 PM
To: dev@cxf.apache.org
Cc: Manjunatha Nakshathri; users@cxf.apache.org
Subject: Re: Migrating from XFire to CXF...


What's really strange about your stack trace:

> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.jdom.Namespace.getNamespace(Namespace.java:164)
> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.jav
>a:58)
> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)

Is that Aegis is in there, not Castor.   Not sure how that applies to
anything, but definitely strange.

In anycase, like Benson said, if someone wanted to contribute a Castor
databinding, we'd love to have it and would gladly help guide people through
the process.

Dan


On Tue February 24 2009 9:43:16 am Manjunatha Nakshathri wrote:
> Dear all,
>
> We are facing some issue while implementing the webservices using the
> XFire(version 1.2.1) (JBoss as server).
>
> When i am trying to access the WSDL through the url (
> http://localhost:8080/acs/services/ReleaseManager?wsdl ), server is
> throwing the following exception :
>
> javax.servlet.ServletException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.codehaus.xfire.transport.http.XFireServletController.doService(XFireSer
>vletController.java:143)
> org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.j
>ava:96)
>
> root cause
>
> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.jdom.Namespace.getNamespace(Namespace.java:164)
> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.jav
>a:58)
> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.
>java:403)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:3
>55)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.j
>ava:509)
>
> cont.......
>
> Please find attached service.xml.
>
> If we comment the <serviceFactory>#castorServiceFactory</serviceFactory> in
> the service.xml; then we are able to access the wsdl. But when we call the
> service using the client (Using the ObjectServiceFactory().create() and not
> the JaxbServiceFactory().create() ), then in the client side it gives
> following error:
>
> org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested
> exception is org.codehaus.xfire.fault.XFireFault: No write method for
> property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
>
> org.codehaus.xfire.fault.XFireFault: No write method for property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
> (Complete error log attached ErrorLog.rtf)
>
> This error is because ReleaseOpen.java file does not have any setter method
> for the choiceValue. This ReleaseOpen class is generated by
> release-impact-worksheet-3.2.0.xsd using castor. Similar to this class
> there are lots of class files which are generated using the castor and
> which don't have some setter methods inside them. So editing the files is
> not a good idea (And these are generated every time using the XSD file).
>
> We searched through the XFire site also (
> http://jira.codehaus.org/browse/XFIRE-509 ). We tried using the
> XFire-all-1.2.3.jar. But we are not able to crack the issue.
>
> We are using the castor to generate the java classes and we should be able
> to pass these objects (rather than converting them to String and passing it
> on server) over the server.
>
> I have following question.
>
> 1.       What should I do to make this work? Is there any thing with the
> way I am invoking the service?
>
> 2.       Does migrating from XFire to CXF will solve this issue? If yes,
> then which version of CXF should I use?
>
> 3.       Is there any guide for Implementation of CXF with castor?
>
> Thanks for your effort and also for your valuable time.
>
>
>
> Thanks and Regards,
>
> Manjunath
>
> ________________________________
> http://www.mindtree.com/email/disclaimer.html

--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

http://www.mindtree.com/email/disclaimer.html

RE: Migrating from XFire to CXF...

Posted by Manjunatha Nakshathri <Ma...@mindtree.com>.
I found this kind of mapping under Top-down Approach (starting with XML schema): in the below link:

http://xfire.codehaus.org/Castor




Thanks And Regards,

Manjunath.

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org]
Sent: Tuesday, February 24, 2009 9:30 PM
To: dev@cxf.apache.org
Cc: Manjunatha Nakshathri; users@cxf.apache.org
Subject: Re: Migrating from XFire to CXF...


What's really strange about your stack trace:

> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.jdom.Namespace.getNamespace(Namespace.java:164)
> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.jav
>a:58)
> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)

Is that Aegis is in there, not Castor.   Not sure how that applies to
anything, but definitely strange.

In anycase, like Benson said, if someone wanted to contribute a Castor
databinding, we'd love to have it and would gladly help guide people through
the process.

Dan


On Tue February 24 2009 9:43:16 am Manjunatha Nakshathri wrote:
> Dear all,
>
> We are facing some issue while implementing the webservices using the
> XFire(version 1.2.1) (JBoss as server).
>
> When i am trying to access the WSDL through the url (
> http://localhost:8080/acs/services/ReleaseManager?wsdl ), server is
> throwing the following exception :
>
> javax.servlet.ServletException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.codehaus.xfire.transport.http.XFireServletController.doService(XFireSer
>vletController.java:143)
> org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.j
>ava:96)
>
> root cause
>
> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.jdom.Namespace.getNamespace(Namespace.java:164)
> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.jav
>a:58)
> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.
>java:403)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:3
>55)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.j
>ava:509)
>
> cont.......
>
> Please find attached service.xml.
>
> If we comment the <serviceFactory>#castorServiceFactory</serviceFactory> in
> the service.xml; then we are able to access the wsdl. But when we call the
> service using the client (Using the ObjectServiceFactory().create() and not
> the JaxbServiceFactory().create() ), then in the client side it gives
> following error:
>
> org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested
> exception is org.codehaus.xfire.fault.XFireFault: No write method for
> property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
>
> org.codehaus.xfire.fault.XFireFault: No write method for property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
> (Complete error log attached ErrorLog.rtf)
>
> This error is because ReleaseOpen.java file does not have any setter method
> for the choiceValue. This ReleaseOpen class is generated by
> release-impact-worksheet-3.2.0.xsd using castor. Similar to this class
> there are lots of class files which are generated using the castor and
> which don't have some setter methods inside them. So editing the files is
> not a good idea (And these are generated every time using the XSD file).
>
> We searched through the XFire site also (
> http://jira.codehaus.org/browse/XFIRE-509 ). We tried using the
> XFire-all-1.2.3.jar. But we are not able to crack the issue.
>
> We are using the castor to generate the java classes and we should be able
> to pass these objects (rather than converting them to String and passing it
> on server) over the server.
>
> I have following question.
>
> 1.       What should I do to make this work? Is there any thing with the
> way I am invoking the service?
>
> 2.       Does migrating from XFire to CXF will solve this issue? If yes,
> then which version of CXF should I use?
>
> 3.       Is there any guide for Implementation of CXF with castor?
>
> Thanks for your effort and also for your valuable time.
>
>
>
> Thanks and Regards,
>
> Manjunath
>
> ________________________________
> http://www.mindtree.com/email/disclaimer.html

--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

http://www.mindtree.com/email/disclaimer.html

RE: Migrating from XFire to CXF...

Posted by Manjunatha Nakshathri <Ma...@mindtree.com>.
If you see the services.xml file it has the following entries:

<!--Start>

<bean id="castorTypeRegistry" class="org.codehaus.xfire.castor.CastorTypeMappingRegistry"/>
  <bean id="bindingProvider" class="org.codehaus.xfire.aegis.AegisBindingProvider">
    <constructor-arg ref="castorTypeRegistry"/>
  </bean>
  <bean id="castorServiceFactory" class="org.codehaus.xfire.service.binding.ObjectServiceFactory">
    <constructor-arg index="0" ref="xfire.transportManager"/>
    <constructor-arg index="1" ref="bindingProvider"/>
  </bean>

  <service>
    <name>ReleaseManager</name>
    <namespace>ReleaseManager</namespace>
    <serviceClass>com.pinkroccade.jfoundation.calculation.releases.ReleaseManager</serviceClass>
    <implementationClass>com.pinkroccade.jfoundation.calculation.releases.ReleaseManagerImpl</implementationClass>
    <schemas>
          <schema>META-INF/schema/release-impact-worksheet-3.2.0.xsd</schema>
    </schemas>


        <style>document</style>
    <serviceFactory>#castorServiceFactory</serviceFactory>

  </service>

<--End-->

Here I have mentioned  "bindingProvider" as the "AegisBindingProvider". The point you mentioned might be because of this. I don't know how to give the castor specific binding provider here... I could not find the castor specific binding provider there in the XFire...





Thanks And Regards,

Manjunath.

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org]
Sent: Tuesday, February 24, 2009 9:30 PM
To: dev@cxf.apache.org
Cc: Manjunatha Nakshathri; users@cxf.apache.org
Subject: Re: Migrating from XFire to CXF...


What's really strange about your stack trace:

> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.jdom.Namespace.getNamespace(Namespace.java:164)
> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.jav
>a:58)
> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)

Is that Aegis is in there, not Castor.   Not sure how that applies to
anything, but definitely strange.

In anycase, like Benson said, if someone wanted to contribute a Castor
databinding, we'd love to have it and would gladly help guide people through
the process.

Dan


On Tue February 24 2009 9:43:16 am Manjunatha Nakshathri wrote:
> Dear all,
>
> We are facing some issue while implementing the webservices using the
> XFire(version 1.2.1) (JBoss as server).
>
> When i am trying to access the WSDL through the url (
> http://localhost:8080/acs/services/ReleaseManager?wsdl ), server is
> throwing the following exception :
>
> javax.servlet.ServletException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.codehaus.xfire.transport.http.XFireServletController.doService(XFireSer
>vletController.java:143)
> org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.j
>ava:96)
>
> root cause
>
> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.jdom.Namespace.getNamespace(Namespace.java:164)
> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.jav
>a:58)
> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.
>java:403)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:3
>55)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.j
>ava:509)
>
> cont.......
>
> Please find attached service.xml.
>
> If we comment the <serviceFactory>#castorServiceFactory</serviceFactory> in
> the service.xml; then we are able to access the wsdl. But when we call the
> service using the client (Using the ObjectServiceFactory().create() and not
> the JaxbServiceFactory().create() ), then in the client side it gives
> following error:
>
> org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested
> exception is org.codehaus.xfire.fault.XFireFault: No write method for
> property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
>
> org.codehaus.xfire.fault.XFireFault: No write method for property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
> (Complete error log attached ErrorLog.rtf)
>
> This error is because ReleaseOpen.java file does not have any setter method
> for the choiceValue. This ReleaseOpen class is generated by
> release-impact-worksheet-3.2.0.xsd using castor. Similar to this class
> there are lots of class files which are generated using the castor and
> which don't have some setter methods inside them. So editing the files is
> not a good idea (And these are generated every time using the XSD file).
>
> We searched through the XFire site also (
> http://jira.codehaus.org/browse/XFIRE-509 ). We tried using the
> XFire-all-1.2.3.jar. But we are not able to crack the issue.
>
> We are using the castor to generate the java classes and we should be able
> to pass these objects (rather than converting them to String and passing it
> on server) over the server.
>
> I have following question.
>
> 1.       What should I do to make this work? Is there any thing with the
> way I am invoking the service?
>
> 2.       Does migrating from XFire to CXF will solve this issue? If yes,
> then which version of CXF should I use?
>
> 3.       Is there any guide for Implementation of CXF with castor?
>
> Thanks for your effort and also for your valuable time.
>
>
>
> Thanks and Regards,
>
> Manjunath
>
> ________________________________
> http://www.mindtree.com/email/disclaimer.html

--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

http://www.mindtree.com/email/disclaimer.html

RE: Migrating from XFire to CXF...

Posted by Manjunatha Nakshathri <Ma...@mindtree.com>.
I found this kind of mapping under Top-down Approach (starting with XML schema): in the below link:

http://xfire.codehaus.org/Castor




Thanks And Regards,

Manjunath.

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org]
Sent: Tuesday, February 24, 2009 9:30 PM
To: dev@cxf.apache.org
Cc: Manjunatha Nakshathri; users@cxf.apache.org
Subject: Re: Migrating from XFire to CXF...


What's really strange about your stack trace:

> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.jdom.Namespace.getNamespace(Namespace.java:164)
> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.jav
>a:58)
> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)

Is that Aegis is in there, not Castor.   Not sure how that applies to
anything, but definitely strange.

In anycase, like Benson said, if someone wanted to contribute a Castor
databinding, we'd love to have it and would gladly help guide people through
the process.

Dan


On Tue February 24 2009 9:43:16 am Manjunatha Nakshathri wrote:
> Dear all,
>
> We are facing some issue while implementing the webservices using the
> XFire(version 1.2.1) (JBoss as server).
>
> When i am trying to access the WSDL through the url (
> http://localhost:8080/acs/services/ReleaseManager?wsdl ), server is
> throwing the following exception :
>
> javax.servlet.ServletException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.codehaus.xfire.transport.http.XFireServletController.doService(XFireSer
>vletController.java:143)
> org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.j
>ava:96)
>
> root cause
>
> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.jdom.Namespace.getNamespace(Namespace.java:164)
> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.jav
>a:58)
> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.
>java:403)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:3
>55)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.j
>ava:509)
>
> cont.......
>
> Please find attached service.xml.
>
> If we comment the <serviceFactory>#castorServiceFactory</serviceFactory> in
> the service.xml; then we are able to access the wsdl. But when we call the
> service using the client (Using the ObjectServiceFactory().create() and not
> the JaxbServiceFactory().create() ), then in the client side it gives
> following error:
>
> org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested
> exception is org.codehaus.xfire.fault.XFireFault: No write method for
> property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
>
> org.codehaus.xfire.fault.XFireFault: No write method for property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
> (Complete error log attached ErrorLog.rtf)
>
> This error is because ReleaseOpen.java file does not have any setter method
> for the choiceValue. This ReleaseOpen class is generated by
> release-impact-worksheet-3.2.0.xsd using castor. Similar to this class
> there are lots of class files which are generated using the castor and
> which don't have some setter methods inside them. So editing the files is
> not a good idea (And these are generated every time using the XSD file).
>
> We searched through the XFire site also (
> http://jira.codehaus.org/browse/XFIRE-509 ). We tried using the
> XFire-all-1.2.3.jar. But we are not able to crack the issue.
>
> We are using the castor to generate the java classes and we should be able
> to pass these objects (rather than converting them to String and passing it
> on server) over the server.
>
> I have following question.
>
> 1.       What should I do to make this work? Is there any thing with the
> way I am invoking the service?
>
> 2.       Does migrating from XFire to CXF will solve this issue? If yes,
> then which version of CXF should I use?
>
> 3.       Is there any guide for Implementation of CXF with castor?
>
> Thanks for your effort and also for your valuable time.
>
>
>
> Thanks and Regards,
>
> Manjunath
>
> ________________________________
> http://www.mindtree.com/email/disclaimer.html

--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

http://www.mindtree.com/email/disclaimer.html

Re: Migrating from XFire to CXF...

Posted by Daniel Kulp <dk...@apache.org>.
What's really strange about your stack trace:

> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.jdom.Namespace.getNamespace(Namespace.java:164)
> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.jav
>a:58)
> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)

Is that Aegis is in there, not Castor.   Not sure how that applies to 
anything, but definitely strange.

In anycase, like Benson said, if someone wanted to contribute a Castor 
databinding, we'd love to have it and would gladly help guide people through 
the process.

Dan


On Tue February 24 2009 9:43:16 am Manjunatha Nakshathri wrote:
> Dear all,
>
> We are facing some issue while implementing the webservices using the
> XFire(version 1.2.1) (JBoss as server).
>
> When i am trying to access the WSDL through the url (
> http://localhost:8080/acs/services/ReleaseManager?wsdl ), server is
> throwing the following exception :
>
> javax.servlet.ServletException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.codehaus.xfire.transport.http.XFireServletController.doService(XFireSer
>vletController.java:143)
> org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.j
>ava:96)
>
> root cause
>
> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.jdom.Namespace.getNamespace(Namespace.java:164)
> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.jav
>a:58)
> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.
>java:403)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:3
>55)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.j
>ava:509)
>
> cont.......
>
> Please find attached service.xml.
>
> If we comment the <serviceFactory>#castorServiceFactory</serviceFactory> in
> the service.xml; then we are able to access the wsdl. But when we call the
> service using the client (Using the ObjectServiceFactory().create() and not
> the JaxbServiceFactory().create() ), then in the client side it gives
> following error:
>
> org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested
> exception is org.codehaus.xfire.fault.XFireFault: No write method for
> property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
>
> org.codehaus.xfire.fault.XFireFault: No write method for property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
> (Complete error log attached ErrorLog.rtf)
>
> This error is because ReleaseOpen.java file does not have any setter method
> for the choiceValue. This ReleaseOpen class is generated by
> release-impact-worksheet-3.2.0.xsd using castor. Similar to this class
> there are lots of class files which are generated using the castor and
> which don't have some setter methods inside them. So editing the files is
> not a good idea (And these are generated every time using the XSD file).
>
> We searched through the XFire site also (
> http://jira.codehaus.org/browse/XFIRE-509 ). We tried using the
> XFire-all-1.2.3.jar. But we are not able to crack the issue.
>
> We are using the castor to generate the java classes and we should be able
> to pass these objects (rather than converting them to String and passing it
> on server) over the server.
>
> I have following question.
>
> 1.       What should I do to make this work? Is there any thing with the
> way I am invoking the service?
>
> 2.       Does migrating from XFire to CXF will solve this issue? If yes,
> then which version of CXF should I use?
>
> 3.       Is there any guide for Implementation of CXF with castor?
>
> Thanks for your effort and also for your valuable time.
>
>
>
> Thanks and Regards,
>
> Manjunath
>
> ________________________________
> http://www.mindtree.com/email/disclaimer.html

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Can not invoke the service.

Posted by Manjunatha Nakshathri <Ma...@mindtree.com>.
Dear all,

I am not able to invoke the service (Using XFire); It's giving the following error:

org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Parameter {http://releases.calculation.jfoundation.pinkroccade.com}deleteModel does not exist!
org.codehaus.xfire.fault.XFireFault: Parameter {http://releases.calculation.jfoundation.pinkroccade.com}deleteModel does not exist!
        at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
        at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)


But the WSDL (PFA file) has this operation;

Does any body know, how to fix this issue.




Thanks And Regards,

Manjunath.

http://www.mindtree.com/email/disclaimer.html

Can not invoke the service.

Posted by Manjunatha Nakshathri <Ma...@mindtree.com>.
Dear all,

I am not able to invoke the service (Using XFire); It's giving the following error:

org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Parameter {http://releases.calculation.jfoundation.pinkroccade.com}deleteModel does not exist!
org.codehaus.xfire.fault.XFireFault: Parameter {http://releases.calculation.jfoundation.pinkroccade.com}deleteModel does not exist!
        at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
        at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)


But the WSDL (PFA file) has this operation;

Does any body know, how to fix this issue.




Thanks And Regards,

Manjunath.

http://www.mindtree.com/email/disclaimer.html

Re: Migrating from XFire to CXF...

Posted by Benson Margulies <bi...@gmail.com>.
Dan's the only live XFire person I've ever 'met', and he's really
really busy with other things.

It might be my fault that we posted some intention to do Castor and
then never did it.


On Tue, Feb 24, 2009 at 10:41 AM, Manjunatha Nakshathri
<Ma...@mindtree.com> wrote:
> Hi Benson,
>
> Thanks for your inputs.
>
> When I contacted Dan Diephouse, he suggested the option of migrating to CXF. And even in the CXF site some where I saw in the Release 2.1, they will implement Castor binding as well. But unfortunately I could not see any thing related to castor in Release 2.X releases.
>
> I will try to fix this issue with XFire+Castor. In case if I fail, I would need your help for implementing castor binding with CXF. Will get back to you.
>
> Mean while, any idea where I can get hold of these XFire Experts ?? :) :)
>
>
> Thanks And Regards,
>
> Manjunath.
>
> -----Original Message-----
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: Tuesday, February 24, 2009 8:50 PM
> To: users@cxf.apache.org
> Subject: Re: Migrating from XFire to CXF...
>
> No one has built a Castor data binding for CXF. I exchanged some email
> with the Castor people which led me to think that they might be
> interested in doing so, but they never did it.
>
> If you wanted to use Castor with CXF, you would need to build a data
> binding. There is material on the CXF Confluence
> (http://cwiki.apache.org/CXF20DOC/data-binding-architecture.html) that
> might help you with this. If you were inclined to build this, I'd be
> happy to help coach you so that the resulted ended up inside CXF.
>
> I'm afraid that the XFire experts have, by and large, wandered away
> from CXF, so that there's not a lot of expertise here to analyze your
> problem and offer advice.
>
> So, the basic answer to your question is 'no, you can't just migrate
> from XFire+Castor to CXF+Castor' as a potential solution with little
> effort.
>
>
> On Tue, Feb 24, 2009 at 10:15 AM, Manjunatha Nakshathri
> <Ma...@mindtree.com> wrote:
>> First of all, Sorry for the previous long mail.
>>
>> We are currently using the XFire and Castor. Here we are facing the issues (which I explained in my previous mail).
>>
>> I want to know, to overcome that issue, should I migrate from XFire to CXF?
>> If so, how can use castor binding with CXF?
>>
>> Hope I am clear this time. :)
>>
>>
>>
>> Thanks And Regards,
>>
>> Manjunath.
>>
>> -----Original Message-----
>> From: Benson Margulies [mailto:bimargulies@gmail.com]
>> Sent: Tuesday, February 24, 2009 8:30 PM
>> To: users@cxf.apache.org
>> Subject: Re: Migrating from XFire to CXF...
>>
>> I'm not quite following what you are doing. Are you trying to match a
>> CXF client with an XFire server, or vica versa, or something else?
>> Where does Castor come into it?
>>
>>
>>
>> 2009/2/24 Manjunatha Nakshathri <Ma...@mindtree.com>:
>>> Dear all,
>>>
>>>
>>>
>>> We are facing some issue while implementing the webservices using the
>>> XFire(version 1.2.1) (JBoss as server).
>>>
>>>
>>>
>>> When i am trying to access the WSDL through the url (
>>> http://localhost:8080/acs/services/ReleaseManager?wsdl ), server is throwing
>>> the following exception :
>>>
>>> javax.servlet.ServletException: The name "" is not legal for JDOM/XML
>>> namespaces: Namespace URIs must be non-null and non-empty Strings.
>>> org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:143)
>>> org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>>> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>>>
>>> root cause
>>>
>>> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
>>> namespaces: Namespace URIs must be non-null and non-empty Strings.
>>> org.jdom.Namespace.getNamespace(Namespace.java:164)
>>> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.java:58)
>>> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
>>> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
>>> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
>>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.java:403)
>>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:355)
>>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.java:509)
>>>
>>> cont.......
>>>
>>> Please find attached service.xml.
>>>
>>> If we comment the <serviceFactory>#castorServiceFactory</serviceFactory> in
>>> the service.xml; then we are able to access the wsdl. But when we call the
>>> service using the client (Using the ObjectServiceFactory().create() and not
>>> the JaxbServiceFactory().create() ), then in the client side it gives
>>> following error:
>>>
>>> org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested
>>> exception is org.codehaus.xfire.fault.XFireFault: No write method for
>>> property
>>> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
>>> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
>>>
>>> org.codehaus.xfire.fault.XFireFault: No write method for property
>>> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
>>> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
>>> (Complete error log attached ErrorLog.rtf)
>>>
>>> This error is because ReleaseOpen.java file does not have any setter method
>>> for the choiceValue. This ReleaseOpen class is generated by
>>> release-impact-worksheet-3.2.0.xsd using castor. Similar to this class there
>>> are lots of class files which are generated using the castor and which don't
>>> have some setter methods inside them. So editing the files is not a good
>>> idea (And these are generated every time using the XSD file).
>>>
>>> We searched through the XFire site also (
>>> http://jira.codehaus.org/browse/XFIRE-509 ). We tried using the
>>> XFire-all-1.2.3.jar. But we are not able to crack the issue.
>>>
>>> We are using the castor to generate the java classes and we should be able
>>> to pass these objects (rather than converting them to String and passing it
>>> on server) over the server.
>>>
>>> I have following question.
>>>
>>> 1.       What should I do to make this work? Is there any thing with the way
>>> I am invoking the service?
>>>
>>> 2.       Does migrating from XFire to CXF will solve this issue? If yes,
>>> then which version of CXF should I use?
>>>
>>> 3.       Is there any guide for Implementation of CXF with castor?
>>>
>>> Thanks for your effort and also for your valuable time.
>>>
>>>
>>>
>>> Thanks and Regards,
>>>
>>> Manjunath
>>>
>>> ________________________________
>>> http://www.mindtree.com/email/disclaimer.html
>>>
>>
>> http://www.mindtree.com/email/disclaimer.html
>>
>
> http://www.mindtree.com/email/disclaimer.html
>

RE: Migrating from XFire to CXF...

Posted by Manjunatha Nakshathri <Ma...@mindtree.com>.
Hi Benson,

Thanks for your inputs.

When I contacted Dan Diephouse, he suggested the option of migrating to CXF. And even in the CXF site some where I saw in the Release 2.1, they will implement Castor binding as well. But unfortunately I could not see any thing related to castor in Release 2.X releases.

I will try to fix this issue with XFire+Castor. In case if I fail, I would need your help for implementing castor binding with CXF. Will get back to you.

Mean while, any idea where I can get hold of these XFire Experts ?? :) :)


Thanks And Regards,

Manjunath.

-----Original Message-----
From: Benson Margulies [mailto:bimargulies@gmail.com]
Sent: Tuesday, February 24, 2009 8:50 PM
To: users@cxf.apache.org
Subject: Re: Migrating from XFire to CXF...

No one has built a Castor data binding for CXF. I exchanged some email
with the Castor people which led me to think that they might be
interested in doing so, but they never did it.

If you wanted to use Castor with CXF, you would need to build a data
binding. There is material on the CXF Confluence
(http://cwiki.apache.org/CXF20DOC/data-binding-architecture.html) that
might help you with this. If you were inclined to build this, I'd be
happy to help coach you so that the resulted ended up inside CXF.

I'm afraid that the XFire experts have, by and large, wandered away
from CXF, so that there's not a lot of expertise here to analyze your
problem and offer advice.

So, the basic answer to your question is 'no, you can't just migrate
from XFire+Castor to CXF+Castor' as a potential solution with little
effort.


On Tue, Feb 24, 2009 at 10:15 AM, Manjunatha Nakshathri
<Ma...@mindtree.com> wrote:
> First of all, Sorry for the previous long mail.
>
> We are currently using the XFire and Castor. Here we are facing the issues (which I explained in my previous mail).
>
> I want to know, to overcome that issue, should I migrate from XFire to CXF?
> If so, how can use castor binding with CXF?
>
> Hope I am clear this time. :)
>
>
>
> Thanks And Regards,
>
> Manjunath.
>
> -----Original Message-----
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: Tuesday, February 24, 2009 8:30 PM
> To: users@cxf.apache.org
> Subject: Re: Migrating from XFire to CXF...
>
> I'm not quite following what you are doing. Are you trying to match a
> CXF client with an XFire server, or vica versa, or something else?
> Where does Castor come into it?
>
>
>
> 2009/2/24 Manjunatha Nakshathri <Ma...@mindtree.com>:
>> Dear all,
>>
>>
>>
>> We are facing some issue while implementing the webservices using the
>> XFire(version 1.2.1) (JBoss as server).
>>
>>
>>
>> When i am trying to access the WSDL through the url (
>> http://localhost:8080/acs/services/ReleaseManager?wsdl ), server is throwing
>> the following exception :
>>
>> javax.servlet.ServletException: The name "" is not legal for JDOM/XML
>> namespaces: Namespace URIs must be non-null and non-empty Strings.
>> org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:143)
>> org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>>
>> root cause
>>
>> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
>> namespaces: Namespace URIs must be non-null and non-empty Strings.
>> org.jdom.Namespace.getNamespace(Namespace.java:164)
>> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.java:58)
>> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
>> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
>> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.java:403)
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:355)
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.java:509)
>>
>> cont.......
>>
>> Please find attached service.xml.
>>
>> If we comment the <serviceFactory>#castorServiceFactory</serviceFactory> in
>> the service.xml; then we are able to access the wsdl. But when we call the
>> service using the client (Using the ObjectServiceFactory().create() and not
>> the JaxbServiceFactory().create() ), then in the client side it gives
>> following error:
>>
>> org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested
>> exception is org.codehaus.xfire.fault.XFireFault: No write method for
>> property
>> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
>> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
>>
>> org.codehaus.xfire.fault.XFireFault: No write method for property
>> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
>> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
>> (Complete error log attached ErrorLog.rtf)
>>
>> This error is because ReleaseOpen.java file does not have any setter method
>> for the choiceValue. This ReleaseOpen class is generated by
>> release-impact-worksheet-3.2.0.xsd using castor. Similar to this class there
>> are lots of class files which are generated using the castor and which don't
>> have some setter methods inside them. So editing the files is not a good
>> idea (And these are generated every time using the XSD file).
>>
>> We searched through the XFire site also (
>> http://jira.codehaus.org/browse/XFIRE-509 ). We tried using the
>> XFire-all-1.2.3.jar. But we are not able to crack the issue.
>>
>> We are using the castor to generate the java classes and we should be able
>> to pass these objects (rather than converting them to String and passing it
>> on server) over the server.
>>
>> I have following question.
>>
>> 1.       What should I do to make this work? Is there any thing with the way
>> I am invoking the service?
>>
>> 2.       Does migrating from XFire to CXF will solve this issue? If yes,
>> then which version of CXF should I use?
>>
>> 3.       Is there any guide for Implementation of CXF with castor?
>>
>> Thanks for your effort and also for your valuable time.
>>
>>
>>
>> Thanks and Regards,
>>
>> Manjunath
>>
>> ________________________________
>> http://www.mindtree.com/email/disclaimer.html
>>
>
> http://www.mindtree.com/email/disclaimer.html
>

http://www.mindtree.com/email/disclaimer.html

Re: Migrating from XFire to CXF...

Posted by Benson Margulies <bi...@gmail.com>.
No one has built a Castor data binding for CXF. I exchanged some email
with the Castor people which led me to think that they might be
interested in doing so, but they never did it.

If you wanted to use Castor with CXF, you would need to build a data
binding. There is material on the CXF Confluence
(http://cwiki.apache.org/CXF20DOC/data-binding-architecture.html) that
might help you with this. If you were inclined to build this, I'd be
happy to help coach you so that the resulted ended up inside CXF.

I'm afraid that the XFire experts have, by and large, wandered away
from CXF, so that there's not a lot of expertise here to analyze your
problem and offer advice.

So, the basic answer to your question is 'no, you can't just migrate
from XFire+Castor to CXF+Castor' as a potential solution with little
effort.


On Tue, Feb 24, 2009 at 10:15 AM, Manjunatha Nakshathri
<Ma...@mindtree.com> wrote:
> First of all, Sorry for the previous long mail.
>
> We are currently using the XFire and Castor. Here we are facing the issues (which I explained in my previous mail).
>
> I want to know, to overcome that issue, should I migrate from XFire to CXF?
> If so, how can use castor binding with CXF?
>
> Hope I am clear this time. :)
>
>
>
> Thanks And Regards,
>
> Manjunath.
>
> -----Original Message-----
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: Tuesday, February 24, 2009 8:30 PM
> To: users@cxf.apache.org
> Subject: Re: Migrating from XFire to CXF...
>
> I'm not quite following what you are doing. Are you trying to match a
> CXF client with an XFire server, or vica versa, or something else?
> Where does Castor come into it?
>
>
>
> 2009/2/24 Manjunatha Nakshathri <Ma...@mindtree.com>:
>> Dear all,
>>
>>
>>
>> We are facing some issue while implementing the webservices using the
>> XFire(version 1.2.1) (JBoss as server).
>>
>>
>>
>> When i am trying to access the WSDL through the url (
>> http://localhost:8080/acs/services/ReleaseManager?wsdl ), server is throwing
>> the following exception :
>>
>> javax.servlet.ServletException: The name "" is not legal for JDOM/XML
>> namespaces: Namespace URIs must be non-null and non-empty Strings.
>> org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:143)
>> org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>>
>> root cause
>>
>> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
>> namespaces: Namespace URIs must be non-null and non-empty Strings.
>> org.jdom.Namespace.getNamespace(Namespace.java:164)
>> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.java:58)
>> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
>> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
>> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.java:403)
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:355)
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.java:509)
>>
>> cont.......
>>
>> Please find attached service.xml.
>>
>> If we comment the <serviceFactory>#castorServiceFactory</serviceFactory> in
>> the service.xml; then we are able to access the wsdl. But when we call the
>> service using the client (Using the ObjectServiceFactory().create() and not
>> the JaxbServiceFactory().create() ), then in the client side it gives
>> following error:
>>
>> org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested
>> exception is org.codehaus.xfire.fault.XFireFault: No write method for
>> property
>> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
>> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
>>
>> org.codehaus.xfire.fault.XFireFault: No write method for property
>> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
>> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
>> (Complete error log attached ErrorLog.rtf)
>>
>> This error is because ReleaseOpen.java file does not have any setter method
>> for the choiceValue. This ReleaseOpen class is generated by
>> release-impact-worksheet-3.2.0.xsd using castor. Similar to this class there
>> are lots of class files which are generated using the castor and which don't
>> have some setter methods inside them. So editing the files is not a good
>> idea (And these are generated every time using the XSD file).
>>
>> We searched through the XFire site also (
>> http://jira.codehaus.org/browse/XFIRE-509 ). We tried using the
>> XFire-all-1.2.3.jar. But we are not able to crack the issue.
>>
>> We are using the castor to generate the java classes and we should be able
>> to pass these objects (rather than converting them to String and passing it
>> on server) over the server.
>>
>> I have following question.
>>
>> 1.       What should I do to make this work? Is there any thing with the way
>> I am invoking the service?
>>
>> 2.       Does migrating from XFire to CXF will solve this issue? If yes,
>> then which version of CXF should I use?
>>
>> 3.       Is there any guide for Implementation of CXF with castor?
>>
>> Thanks for your effort and also for your valuable time.
>>
>>
>>
>> Thanks and Regards,
>>
>> Manjunath
>>
>> ________________________________
>> http://www.mindtree.com/email/disclaimer.html
>>
>
> http://www.mindtree.com/email/disclaimer.html
>

RE: Migrating from XFire to CXF...

Posted by Manjunatha Nakshathri <Ma...@mindtree.com>.
First of all, Sorry for the previous long mail.

We are currently using the XFire and Castor. Here we are facing the issues (which I explained in my previous mail).

I want to know, to overcome that issue, should I migrate from XFire to CXF?
If so, how can use castor binding with CXF?

Hope I am clear this time. :)



Thanks And Regards,

Manjunath.

-----Original Message-----
From: Benson Margulies [mailto:bimargulies@gmail.com]
Sent: Tuesday, February 24, 2009 8:30 PM
To: users@cxf.apache.org
Subject: Re: Migrating from XFire to CXF...

I'm not quite following what you are doing. Are you trying to match a
CXF client with an XFire server, or vica versa, or something else?
Where does Castor come into it?



2009/2/24 Manjunatha Nakshathri <Ma...@mindtree.com>:
> Dear all,
>
>
>
> We are facing some issue while implementing the webservices using the
> XFire(version 1.2.1) (JBoss as server).
>
>
>
> When i am trying to access the WSDL through the url (
> http://localhost:8080/acs/services/ReleaseManager?wsdl ), server is throwing
> the following exception :
>
> javax.servlet.ServletException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:143)
> org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>
> root cause
>
> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.jdom.Namespace.getNamespace(Namespace.java:164)
> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.java:58)
> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.java:403)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:355)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.java:509)
>
> cont.......
>
> Please find attached service.xml.
>
> If we comment the <serviceFactory>#castorServiceFactory</serviceFactory> in
> the service.xml; then we are able to access the wsdl. But when we call the
> service using the client (Using the ObjectServiceFactory().create() and not
> the JaxbServiceFactory().create() ), then in the client side it gives
> following error:
>
> org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested
> exception is org.codehaus.xfire.fault.XFireFault: No write method for
> property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
>
> org.codehaus.xfire.fault.XFireFault: No write method for property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
> (Complete error log attached ErrorLog.rtf)
>
> This error is because ReleaseOpen.java file does not have any setter method
> for the choiceValue. This ReleaseOpen class is generated by
> release-impact-worksheet-3.2.0.xsd using castor. Similar to this class there
> are lots of class files which are generated using the castor and which don't
> have some setter methods inside them. So editing the files is not a good
> idea (And these are generated every time using the XSD file).
>
> We searched through the XFire site also (
> http://jira.codehaus.org/browse/XFIRE-509 ). We tried using the
> XFire-all-1.2.3.jar. But we are not able to crack the issue.
>
> We are using the castor to generate the java classes and we should be able
> to pass these objects (rather than converting them to String and passing it
> on server) over the server.
>
> I have following question.
>
> 1.       What should I do to make this work? Is there any thing with the way
> I am invoking the service?
>
> 2.       Does migrating from XFire to CXF will solve this issue? If yes,
> then which version of CXF should I use?
>
> 3.       Is there any guide for Implementation of CXF with castor?
>
> Thanks for your effort and also for your valuable time.
>
>
>
> Thanks and Regards,
>
> Manjunath
>
> ________________________________
> http://www.mindtree.com/email/disclaimer.html
>

http://www.mindtree.com/email/disclaimer.html

Re: Migrating from XFire to CXF...

Posted by Benson Margulies <bi...@gmail.com>.
I'm not quite following what you are doing. Are you trying to match a
CXF client with an XFire server, or vica versa, or something else?
Where does Castor come into it?



2009/2/24 Manjunatha Nakshathri <Ma...@mindtree.com>:
> Dear all,
>
>
>
> We are facing some issue while implementing the webservices using the
> XFire(version 1.2.1) (JBoss as server).
>
>
>
> When i am trying to access the WSDL through the url (
> http://localhost:8080/acs/services/ReleaseManager?wsdl ), server is throwing
> the following exception :
>
> javax.servlet.ServletException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:143)
> org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>
> root cause
>
> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.jdom.Namespace.getNamespace(Namespace.java:164)
> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.java:58)
> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.java:403)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:355)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.java:509)
>
> cont.......
>
> Please find attached service.xml.
>
> If we comment the <serviceFactory>#castorServiceFactory</serviceFactory> in
> the service.xml; then we are able to access the wsdl. But when we call the
> service using the client (Using the ObjectServiceFactory().create() and not
> the JaxbServiceFactory().create() ), then in the client side it gives
> following error:
>
> org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested
> exception is org.codehaus.xfire.fault.XFireFault: No write method for
> property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
>
> org.codehaus.xfire.fault.XFireFault: No write method for property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
> (Complete error log attached ErrorLog.rtf)
>
> This error is because ReleaseOpen.java file does not have any setter method
> for the choiceValue. This ReleaseOpen class is generated by
> release-impact-worksheet-3.2.0.xsd using castor. Similar to this class there
> are lots of class files which are generated using the castor and which don’t
> have some setter methods inside them. So editing the files is not a good
> idea (And these are generated every time using the XSD file).
>
> We searched through the XFire site also (
> http://jira.codehaus.org/browse/XFIRE-509 ). We tried using the
> XFire-all-1.2.3.jar. But we are not able to crack the issue.
>
> We are using the castor to generate the java classes and we should be able
> to pass these objects (rather than converting them to String and passing it
> on server) over the server.
>
> I have following question.
>
> 1.       What should I do to make this work? Is there any thing with the way
> I am invoking the service?
>
> 2.       Does migrating from XFire to CXF will solve this issue? If yes,
> then which version of CXF should I use?
>
> 3.       Is there any guide for Implementation of CXF with castor?
>
> Thanks for your effort and also for your valuable time.
>
>
>
> Thanks and Regards,
>
> Manjunath
>
> ________________________________
> http://www.mindtree.com/email/disclaimer.html
>

Re: Migrating from XFire to CXF...

Posted by Daniel Kulp <dk...@apache.org>.
What's really strange about your stack trace:

> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.jdom.Namespace.getNamespace(Namespace.java:164)
> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.jav
>a:58)
> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)

Is that Aegis is in there, not Castor.   Not sure how that applies to 
anything, but definitely strange.

In anycase, like Benson said, if someone wanted to contribute a Castor 
databinding, we'd love to have it and would gladly help guide people through 
the process.

Dan


On Tue February 24 2009 9:43:16 am Manjunatha Nakshathri wrote:
> Dear all,
>
> We are facing some issue while implementing the webservices using the
> XFire(version 1.2.1) (JBoss as server).
>
> When i am trying to access the WSDL through the url (
> http://localhost:8080/acs/services/ReleaseManager?wsdl ), server is
> throwing the following exception :
>
> javax.servlet.ServletException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.codehaus.xfire.transport.http.XFireServletController.doService(XFireSer
>vletController.java:143)
> org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.j
>ava:96)
>
> root cause
>
> org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
> namespaces: Namespace URIs must be non-null and non-empty Strings.
> org.jdom.Namespace.getNamespace(Namespace.java:164)
> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.jav
>a:58)
> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
> org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.
>java:403)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:3
>55)
> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.j
>ava:509)
>
> cont.......
>
> Please find attached service.xml.
>
> If we comment the <serviceFactory>#castorServiceFactory</serviceFactory> in
> the service.xml; then we are able to access the wsdl. But when we call the
> service using the client (Using the ObjectServiceFactory().create() and not
> the JaxbServiceFactory().create() ), then in the client side it gives
> following error:
>
> org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested
> exception is org.codehaus.xfire.fault.XFireFault: No write method for
> property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
>
> org.codehaus.xfire.fault.XFireFault: No write method for property
> {http://xml.model.calculation.jfoundation.pinkroccade.com}choiceValue in
> class com.pinkroccade.jfoundation.calculation.model.xml.ReleaseOpen
> (Complete error log attached ErrorLog.rtf)
>
> This error is because ReleaseOpen.java file does not have any setter method
> for the choiceValue. This ReleaseOpen class is generated by
> release-impact-worksheet-3.2.0.xsd using castor. Similar to this class
> there are lots of class files which are generated using the castor and
> which don't have some setter methods inside them. So editing the files is
> not a good idea (And these are generated every time using the XSD file).
>
> We searched through the XFire site also (
> http://jira.codehaus.org/browse/XFIRE-509 ). We tried using the
> XFire-all-1.2.3.jar. But we are not able to crack the issue.
>
> We are using the castor to generate the java classes and we should be able
> to pass these objects (rather than converting them to String and passing it
> on server) over the server.
>
> I have following question.
>
> 1.       What should I do to make this work? Is there any thing with the
> way I am invoking the service?
>
> 2.       Does migrating from XFire to CXF will solve this issue? If yes,
> then which version of CXF should I use?
>
> 3.       Is there any guide for Implementation of CXF with castor?
>
> Thanks for your effort and also for your valuable time.
>
>
>
> Thanks and Regards,
>
> Manjunath
>
> ________________________________
> http://www.mindtree.com/email/disclaimer.html

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog