[jbossws-issues] [JBoss JIRA] (JBWS-3628) Add property expansion capability to .wsdl files

R Searls (JIRA) issues at jboss.org
Wed Apr 23 11:05:34 EDT 2014


    [ https://issues.jboss.org/browse/JBWS-3628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12963321#comment-12963321 ] 

R Searls commented on JBWS-3628:
--------------------------------

There is currently away for the client to access and change the contexts of 
soapjms:jndiURL before the endpoint is called.  (The contents of the source WSDL is not altered).  The value of soapjms:jndiURL is set in 

  Properties props = conduit.getJmsConfig().getJndiTemplate().getEnvironment();
where conduit is retrieved by
  JMSConduit conduit = (JMSConduit)ClientProxy.getClient(proxy).getConduit(); 

The following test can be used to see the default contents of props.
https://svn.jboss.org/repos/jbossws/stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCaseForked.java
 
At line 99 the returned value of "props" is 
  props[0]   key="java.naming.provider.url"  value="$MY_URL"
  props[1]   key="java.naming.factory.initial"  value="org.jboss.naming.remote.client.InitialContextFactory"

As a test I changed 
   <soapjms:jndiURL>remote://@jboss.bind.address@:4447</soapjms:jndiURL>
to 
   <soapjms:jndiURL>$MY_URL</soapjms:jndiURL>
in file
    https://svn.jboss.org/repos/jbossws/stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF-as7/wsdl/HelloWorldService.wsdl

and in JMSHTTPEndpointDeploymentTestCaseForked.java added the following code after line 101

       String value = (String)props.get("java.naming.provider.url");
       if (value.equals("$MY_URL")){
           props.put("java.naming.provider.url", "remote://localhost:4447");
       }

The test ran properly.
                
> Add property expansion capability to .wsdl files
> ------------------------------------------------
>
>                 Key: JBWS-3628
>                 URL: https://issues.jboss.org/browse/JBWS-3628
>             Project: JBoss Web Services
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: jbossws-cxf
>            Reporter: david.boeren
>            Assignee: Alessio Soldano
>            Priority: Minor
>             Fix For: jbossws-cxf-5.0
>
>
> The customer is doing JMS-based webservices using the following declarations in their wsdl file (referred to using the wsdllocation annotation):
>     <soapjms:jndiConnectionFactoryName>myqueue</soapjms:jndiConnectionFactoryName> <soapjms:jndiInitialContextFactory>com.vendor.InitialContextFactory</soapjms:jndiInitialContextFactory>
> <soapjms:jndiURL>$MY_URL</soapjms:jndiURL>
> The $MY_URL is the url of the messaging server. Since property replacement does not work for wsdl files they need to manually modify this before deploying and package separate versions of their app for each environment.  If property expansion worked in the .wsdl this would no longer be necessary.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbossws-issues mailing list