You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Tawfik Lachheb (JIRA)" <ji...@apache.org> on 2007/10/26 18:55:50 UTC

[jira] Created: (CXF-1145) Not able to set the namespace for a service wsdl

Not able to set the namespace for a service wsdl
------------------------------------------------

                 Key: CXF-1145
                 URL: https://issues.apache.org/jira/browse/CXF-1145
             Project: CXF
          Issue Type: Bug
            Reporter: Tawfik Lachheb
            Priority: Critical


We are trying to upgrade our published services from xfire to cxf using the simple frontend with aegis.  When we set the namespace for classes in the service's object model the namespaces appear ok.  The problem is that the namespace of the service class is auto-generated and becasue it does not match what we set for the object model, it causes issues with some client SOAP toolkits.

In xfire, we used to be able to set the service namespace by doing something like this:

    <bean id="..." class="org.codehaus.xfire.spring.remoting.XFireExporter">
        <property name="namespace" ref="nameSpace"/>
        ...
    </bean>

This capability does not seem to be available in cxf.
We have tried setting the namespace in the service aegis file with no success.

Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-1145) Not able to set the namespace for a service wsdl

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539587 ] 

Daniel Kulp commented on CXF-1145:
----------------------------------


I started on a way to make it work last night.  It's not quite as "simple", but it hopefully will work (although I haven't had time to write a testcase for it yet).  

Basically, if you create a ReflectionServiceFactoryBean, you can set the list of serviceConfigurations on it.   The DefaultServiceConfiguration object now has a serviceNamespace property that can be set.   

> Not able to set the namespace for a service wsdl
> ------------------------------------------------
>
>                 Key: CXF-1145
>                 URL: https://issues.apache.org/jira/browse/CXF-1145
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Tawfik Lachheb
>            Priority: Critical
>
> We are trying to upgrade our published services from xfire to cxf using the simple frontend with aegis.  When we set the namespace for classes in the service's object model the namespaces appear ok.  The problem is that the namespace of the service class is auto-generated and becasue it does not match what we set for the object model, it causes issues with some client SOAP toolkits.
> In xfire, we used to be able to set the service namespace by doing something like this:
>     <bean id="..." class="org.codehaus.xfire.spring.remoting.XFireExporter">
>         <property name="namespace" ref="nameSpace"/>
>         ...
>     </bean>
> This capability does not seem to be available in cxf.
> We have tried setting the namespace in the service aegis file with no success.
> Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-1145) Not able to set the namespace for a service wsdl

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539617 ] 

Daniel Kulp commented on CXF-1145:
----------------------------------


Testcase added.    In your spring config:


  <simple:server address="/serviceWithCustomNS"
    serviceClass="org.apache.cxf.authservice.AuthService">
    <simple:dataBinding>
       <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding" />
    </simple:dataBinding>
    <simple:serviceBean>
      <bean class="org.apache.cxf.authservice.AuthServiceImpl" />
    </simple:serviceBean>
    <simple:serviceFactory>
    	<bean class="org.apache.cxf.service.factory.ReflectionServiceFactoryBean">
    		<property name="serviceConfigurations">
    			<list>
    				<bean class="org.apache.cxf.aegis.databinding.AegisServiceConfiguration">
    					<property name="serviceNamespace" value="http://foo.bar.com"/>
    				</bean>
    				<bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration"/>
    			</list>
    		</property>
    	</bean>
    </simple:serviceFactory>
  </simple:server>


I just deployed new snapshots that should have this in it.



> Not able to set the namespace for a service wsdl
> ------------------------------------------------
>
>                 Key: CXF-1145
>                 URL: https://issues.apache.org/jira/browse/CXF-1145
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Tawfik Lachheb
>            Priority: Critical
>             Fix For: 2.0.3
>
>
> We are trying to upgrade our published services from xfire to cxf using the simple frontend with aegis.  When we set the namespace for classes in the service's object model the namespaces appear ok.  The problem is that the namespace of the service class is auto-generated and becasue it does not match what we set for the object model, it causes issues with some client SOAP toolkits.
> In xfire, we used to be able to set the service namespace by doing something like this:
>     <bean id="..." class="org.codehaus.xfire.spring.remoting.XFireExporter">
>         <property name="namespace" ref="nameSpace"/>
>         ...
>     </bean>
> This capability does not seem to be available in cxf.
> We have tried setting the namespace in the service aegis file with no success.
> Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-1145) Not able to set the namespace for a service wsdl

Posted by "Tawfik Lachheb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538858 ] 

Tawfik Lachheb commented on CXF-1145:
-------------------------------------

Has anyone gotten a chance to take a look at this one?  If so, do we have an idea on the leve of effort involved?

This is a show stopper for us.  We would prefer not to have to rollback to xfire in order to get the production release going.  we have some minor issues with xfire that will probably not get fixed.

> Not able to set the namespace for a service wsdl
> ------------------------------------------------
>
>                 Key: CXF-1145
>                 URL: https://issues.apache.org/jira/browse/CXF-1145
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Tawfik Lachheb
>            Priority: Critical
>
> We are trying to upgrade our published services from xfire to cxf using the simple frontend with aegis.  When we set the namespace for classes in the service's object model the namespaces appear ok.  The problem is that the namespace of the service class is auto-generated and becasue it does not match what we set for the object model, it causes issues with some client SOAP toolkits.
> In xfire, we used to be able to set the service namespace by doing something like this:
>     <bean id="..." class="org.codehaus.xfire.spring.remoting.XFireExporter">
>         <property name="namespace" ref="nameSpace"/>
>         ...
>     </bean>
> This capability does not seem to be available in cxf.
> We have tried setting the namespace in the service aegis file with no success.
> Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CXF-1145) Not able to set the namespace for a service wsdl

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-1145.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.3
         Assignee: Daniel Kulp

> Not able to set the namespace for a service wsdl
> ------------------------------------------------
>
>                 Key: CXF-1145
>                 URL: https://issues.apache.org/jira/browse/CXF-1145
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Tawfik Lachheb
>            Assignee: Daniel Kulp
>            Priority: Critical
>             Fix For: 2.0.3
>
>
> We are trying to upgrade our published services from xfire to cxf using the simple frontend with aegis.  When we set the namespace for classes in the service's object model the namespaces appear ok.  The problem is that the namespace of the service class is auto-generated and becasue it does not match what we set for the object model, it causes issues with some client SOAP toolkits.
> In xfire, we used to be able to set the service namespace by doing something like this:
>     <bean id="..." class="org.codehaus.xfire.spring.remoting.XFireExporter">
>         <property name="namespace" ref="nameSpace"/>
>         ...
>     </bean>
> This capability does not seem to be available in cxf.
> We have tried setting the namespace in the service aegis file with no success.
> Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-1145) Not able to set the namespace for a service wsdl

Posted by "Tawfik Lachheb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539717 ] 

Tawfik Lachheb commented on CXF-1145:
-------------------------------------

I have checked that it works thanks!

One issue seems to have been intorduced though: I have created the service factory bean in a way that I can re-use it in multiple services:

  <bean name="cxf.serviceFactory" class="org.apache.cxf.service.factory.ReflectionServiceFactoryBean">
     <property name="serviceConfigurations"> 
        <list> 
           <bean class="org.apache.cxf.aegis.databinding.AegisServiceConfiguration"> 
              <property name="serviceNamespace" value="http://arcwebservices.com/v2008"/> 
           </bean> 
           <bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration"/> 
        </list> 
     </property> 
  </bean> 

In each service, refer to it in each service (say service1, service2 and service3) as:
<simple:server ...>
      <simple:serviceFactory><ref bean="cxf.serviceFactory" /></simple:serviceFactory>
      ...
</simple:server>

Doing it this way resulted in the SOAP endpoint always referring to the last service.  So the wsdl for service1 would be

  <wsdl:service name="Service1">
  <wsdl:port binding="tns:Service1SoapBinding" name="Service1Port">
  <soap:address location="http://.../Service3" /> 
  </wsdl:port>
  </wsdl:service>

and for service2, it would be 

  <wsdl:service name="Service2">
  <wsdl:port binding="tns:Service3SoapBinding" name="Service3Port">
  <soap:address location="http://.../Service3" /> 
  </wsdl:port>
  </wsdl:service>

I found that setting scope="prototype" on the cxf.serviceFactory bean fixes the problem.

Thanks again


> Not able to set the namespace for a service wsdl
> ------------------------------------------------
>
>                 Key: CXF-1145
>                 URL: https://issues.apache.org/jira/browse/CXF-1145
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Tawfik Lachheb
>            Assignee: Daniel Kulp
>            Priority: Critical
>             Fix For: 2.0.3
>
>
> We are trying to upgrade our published services from xfire to cxf using the simple frontend with aegis.  When we set the namespace for classes in the service's object model the namespaces appear ok.  The problem is that the namespace of the service class is auto-generated and becasue it does not match what we set for the object model, it causes issues with some client SOAP toolkits.
> In xfire, we used to be able to set the service namespace by doing something like this:
>     <bean id="..." class="org.codehaus.xfire.spring.remoting.XFireExporter">
>         <property name="namespace" ref="nameSpace"/>
>         ...
>     </bean>
> This capability does not seem to be available in cxf.
> We have tried setting the namespace in the service aegis file with no success.
> Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.