Connections.xml usage in BC4J

If i've defined a connection in my META-INF/connections.xml of the form:
<Reference name="ReposConn" credentialStoreKey="ReposConn" className="oracle.jdbc.pool.OracleDataSource">
<Factory className="oracle.jdbc.pool.OracleDataSource"/>
<RefAddresses>
<StringRefAddr addrType="sid">
<Contents>mysid</Contents>
</StringRefAddr>
<StringRefAddr addrType="subtype">
<Contents>oraJDBC</Contents>
</StringRefAddr>
<StringRefAddr addrType="user">
<Contents>user</Contents>
</StringRefAddr>
<StringRefAddr addrType="port">
<Contents>15041</Contents>
</StringRefAddr>
<StringRefAddr addrType="hostname">
<Contents>localhost</Contents>
</StringRefAddr>
<SecureRefAddr addrType="password"/>
<StringRefAddr addrType="DeployPassword">
<Contents>false</Contents>
</StringRefAddr>
<StringRefAddr addrType="oraDriverType">
<Contents>thin</Contents>
</StringRefAddr>
</RefAddresses>
and added the relevant chunk to the META-INF/credential-jazn-data.xml,
and added the following chunk to my META-INF/adf-config.xml:
<jndiC:adf-jndi-config xmlns="http://xmlns.oracle.com/adf/jndi/config"
initialContextFactoryClass="oracle.adf.share.jndi.InitialContextFactoryImpl"
backingStoreClass="oracle.adf.share.jndi.ResourceBackingStore"
backingStoreURL="/META-INF/connections.xml">
<contextEnv name="context1" value="JNDIContextValue" />
</jndiC:adf-jndi-config>
<sec:adf-config-child xmlns="http://xmlns.oracle.com/adf/security/config">
<CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jazn.JAZNCredentialStore"
credentialStoreDefaultUser="anonymous"
credentialStoreLocation="./credential-jazn-data.xml"/>
</sec:adf-config-child>
what do I have to do in my bc4j.xcfg to use this connection and is there anything about what's defined above which is incorrect?
thanks,
-Ian

Andrew:
Try the following steps:
1. Go to the IDE.
2. Select the EO (the one that will draw its data from a different
database).  Let's call this EO, MyEO.  Right-mouse click to edit the
EO.
3. Switch to the 'Java' panel.  Check the checkbox for 'Entity
collection Class'.  Apply the change.
4. You will see that MyEOCollImpl.java is generated.  This is the
custom Java class for the collection that manages instances of MyEO
rows (MyEOImpl instances).
In MyEOCollImpl.java add fields and methods to make connection to
the other database.  E.g.,
import oracle.jbo.server.EntityCache;
import java.sql.*;
public class MyEOCollImpl extends EntityCache
   Connection conn;
   public MyEOCollImpl()
      // Set up JDBC connection to the other database.
      DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
      conn = DriverManager.getConnection("jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL");
5. Then, in MyEOImpl.java (not MyEOCollImpl.java), override the following methods:
   protected void doSelect(boolean lock)
   protected void doDML(int operation, TransactionEvent e)
The first is called to populate attriutes into the entity row.
The second is called to push edits back out to database.
In doSelect, use
   protected void populateAttribute(int index, Object value)
to populate attribute values.  'index' is the attr index.
Take a look at the following HOWTO doc:
   re:Certification
It will give you further info on these two methods.
Thanks.
Sung

Similar Messages

  • Avoid connections.xml in JAR file

    I am using a "JAR Deployment Profile" in JDeveloper 9.0.3 to create a JAR file.
    How can I prevent that connections.xml becomes a part of the JAR file?
    tnx
    -Jan

    Seems to be a bit more complicated ;)
    I don't have "Connection Manager" library selected, but I do have "BC4J Tester". As this one also includes jdev-cm.jar, I still get connections.xml included in my JAR file.
    As long as the tester library is required during development - and even later, during the maintenance process ;), there should be another way to remove connections.xml from the deployment result...
    Maybe if we could specify the active configuration for all projects in the workspace at once...
    Thanks,
    Adrian

  • Problem with web service proxy and connections.xml

    JDev 11.1.14
    Hello
    I'm trying to create a web service proxy that takes advantage of the connections.xml so that the endpoints can be changed without recompiling the code (as described here http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/web_services.htm#ADFFD548 - 13.2.2 How to Create a New Web Service Connection)
    I created the web service proxy using the Jdev wizard and a test client. The access to the web service works as expected.
    The client test code is :
    package model;
    import ch.mit.trac.ws.proxy.*;
    import ch.mit.trac.ws.root.Currency;
    import javax.naming.NamingException;
    public class wsTest {
      public wsTest() {
        super();
      public void testIt() throws NamingException {
        CurrencyConvertor currencyConvertor = new CurrencyConvertor();
        CurrencyConvertorSoap currencyConvertorSoap = currencyConvertor.getCurrencyConvertorSoap();
        Double res = currencyConvertorSoap.conversionRate(Currency.CHF, Currency.USD);
        System.out.println("Hello");
        System.out.println(res);
      public static void main(String [] args) throws NamingException {
        wsTest tt = new wsTest();
        tt.testIt();
    }I then create a connection as described in the docs.
    I now have a connections.xml as follows:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <References xmlns="http://xmlns.oracle.com/adf/jndi">
       <Reference name="CurrencyConvertor" className="oracle.adf.model.connection.webservice.impl.WebServiceConnectionImpl" xmlns="">
          <Factory className="oracle.adf.model.connection.webservice.api.WebServiceConnectionFactory"/>
          <RefAddresses>
             <XmlRefAddr addrType="WebServiceConnection">
                <Contents>
                   <wsconnection description="file:/C:/JDeveloper/mywork/WebServiceTest/Model/src/ch/mit/trac/ws/proxy/CurrencyConvertor.wsdl" service="{http://www.webserviceX.NET/}CurrencyConvertor">
                      <model name="{http://www.webserviceX.NET/}CurrencyConvertor" xmlns="http://oracle.com/ws/model">
                         <service name="{http://www.webserviceX.NET/}CurrencyConvertor">
                            <port name="CurrencyConvertorHttpPost" binding="{http://www.webserviceX.NET/}CurrencyConvertorHttpPost">
                               <operation name="ConversionRate">
                                  <output name=""/>
                                  <input name=""/>
                               </operation>
                            </port>
                            <port name="CurrencyConvertorHttpGet" binding="{http://www.webserviceX.NET/}CurrencyConvertorHttpGet">
                               <operation name="ConversionRate">
                                  <output name=""/>
                                  <input name=""/>
                               </operation>
                            </port>
                            <port name="CurrencyConvertorSoap12" binding="{http://www.webserviceX.NET/}CurrencyConvertorSoap12">
                               <soap addressUrl="http://www.webservicex.com/CurrencyConvertor.asmx" xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
                               <operation name="ConversionRate">
                                  <soap soapAction="http://www.webserviceX.NET/ConversionRate" xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
                                  <output name=""/>
                                  <input name=""/>
                               </operation>
                            </port>
                            <port name="CurrencyConvertorSoap" binding="{http://www.webserviceX.NET/}CurrencyConvertorSoap">
                               <soap addressUrl="http://www.webservicex.com/CurrencyConvertor.asmx" xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
                               <operation name="ConversionRate">
                                  <soap soapAction="http://www.webserviceX.NET/ConversionRate" xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
                                  <output name=""/>
                                  <input name=""/>
                               </operation>
                            </port>
                         </service>
                      </model>
                   </wsconnection>
                </Contents>
             </XmlRefAddr>
          </RefAddresses>So far so good.
    I then created a new jspx page with a button that calls a method in a request scoped bean.
    The method is supposed to use the connections.xml to get the web service proxy in order to call the web service.
    The bean code is as follows :
    package ch.mit.test;
    import javax.faces.event.ActionEvent;
    import ch.mit.trac.ws.proxy.*;
    import ch.mit.trac.ws.root.Currency;
    import javax.naming.Context;
    import javax.naming.NamingException;
    import oracle.adf.model.connection.webservice.api.WebServiceConnection;
    import oracle.adf.share.ADFContext;
    public class test {
      public test() {
      public void testIt() throws NamingException {
        Context ctx;
        ctx = ADFContext.getCurrent().getConnectionsContext();
        WebServiceConnection wsc;
        wsc = (WebServiceConnection) ctx.lookup("CurrencyConvertor");
        CurrencyConvertor currencyConvertor = wsc.getJaxWSPort(CurrencyConvertor.class);   -- NPE here
        CurrencyConvertorSoap currencyConvertorSoap = currencyConvertor.getCurrencyConvertorSoap();
        Double res = currencyConvertorSoap.conversionRate(Currency.CHF, Currency.USD);
        System.out.println("Hello");
        System.out.println(res);
      public void testws(ActionEvent actionEvent) {
        try {
          testIt();
        } catch (NamingException e) {
    }When running the application and clicking on the button I keep getting the following error at the line marked NPE Here above:
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Le cycle de vie Faces reçoit des exceptions non traitées en phase INVOKE_APPLICATION 5
    javax.faces.el.EvaluationException: java.lang.NullPointerException
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:58)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:765)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:305)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:62)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: java.lang.NullPointerException
         at java.lang.Class.isAssignableFrom(Native Method)
         at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:97)
         at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:118)
         at oracle.j2ee.ws.common.jaxws.runtime.OperationMappingModeler.processParameters(OperationMappingModeler.java:268)
         at oracle.j2ee.ws.common.jaxws.runtime.OperationMappingModeler.processMethod(OperationMappingModeler.java:155)
         at oracle.j2ee.ws.common.jaxws.runtime.ServiceEndpointRuntimeModeler.buildRuntimeModel(ServiceEndpointRuntimeModeler.java:114)
         at oracle.j2ee.ws.client.jaxws.WsClientProxyFactory.getRuntimeMetadata(WsClientProxyFactory.java:69)
         at oracle.j2ee.ws.client.jaxws.WsClientProxyFactory.createProxy(WsClientProxyFactory.java:126)
         at oracle.j2ee.ws.client.jaxws.WsClientProxyFactory.createProxy(WsClientProxyFactory.java:106)
         at oracle.j2ee.ws.common.jaxws.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:219)
         at oracle.j2ee.ws.common.jaxws.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:249)
         at oracle.adf.model.connection.webservice.impl.WebServiceConnectionImpl.getJaxWSPort(WebServiceConnectionImpl.java:399)
         at ch.mit.test.test.testIt(test.java:27)
         at ch.mit.test.test.testws(test.java:41)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         ... 44 moreCan anybody help as to what the problem is...
    (the WSDL is at http://www.webservicex.com/CurrencyConvertor.asmx?WSDL)
    Regards
    Paul

    Hi Frank
    The page is ADF bound, I've added the page source and the adfc-config source below :
    Page
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1">
          <af:form id="f1">
            <af:commandButton text="commandButton 1" id="cb1"
                              actionListener="#{test.testws}"/>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>adfc-config
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <view id="view1">
        <page>/view1.jspx</page>
      </view>
      <managed-bean id="__4">
        <managed-bean-name id="__3">test</managed-bean-name>
        <managed-bean-class id="__2">ch.mit.test.test</managed-bean-class>
        <managed-bean-scope id="__1">request</managed-bean-scope>
      </managed-bean>
    </adfc-config>It seems to be the same sort of problem as in Re: Error in ADF Web Service Connection
    Regards
    Paul

  • Issue with Connections.xml

    Hi,
    I have an UI project, for which i have created a Deployment Profile named 'adfXXXXXUI' nothing but created a adflibrary for that UI project.
    While creating the adf jar, i have come across an Option called 'Connections' .
    Here i have selected Connection Names Only ... means i will be getting all the names of the connections i have created & those will be reflected in my local connection.xml file.
    After configuring the rest of the params, i deployed my UI project to "deploy -> adfXXXXXUI.jar".
    And we have used this jar to integrate with another UI application ... And the taskflows avilable in the jar will be used in the other UI application.
    Now here is my problem ... Actually my connections.xml file has a URL Connection. This is how it looks like....
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <References xmlns="http://xmlns.oracle.com/adf/jndi">
    ><Reference name="MapServer" className="oracle.adf.model.connection.url.HttpURLConnection" xmlns="">
    ><Factory className="oracle.adf.model.connection.url.URLConnectionFactory"/>
    ><RefAddresses>
    ><XmlRefAddr addrType="MapServer">
    ><Contents>
    ><urlconnection name="MapServer" url="http://sbsys1.intra.schneider.com:8109/mapviewer"/>
    ></Contents>
    ></XmlRefAddr>
    ></RefAddresses>
    ></Reference>
    ><Reference name="snibuilddb" className="oracle.jdeveloper.db.adapter.DatabaseProvider" credentialStoreKey="snibuilddb" xmlns="">
    ><Factory className="oracle.jdeveloper.db.adapter.DatabaseProviderFactory"/>
    ><RefAddresses>
    ><StringRefAddr addrType="subtype">
    ><Contents>oraJDBC</Contents>
    ></StringRefAddr>
    ><StringRefAddr addrType="user">
    ><Contents>sni_guest</Contents>
    ></StringRefAddr>
    ><StringRefAddr addrType="port">
    ><Contents>3720</Contents>
    ></StringRefAddr>
    ><StringRefAddr addrType="hostname">
    ><Contents>uxsys186v</Contents>
    ></StringRefAddr>
    ><SecureRefAddr addrType="password"/>
    ><StringRefAddr addrType="serviceName">
    ><Contents>snit0.world</Contents>
    ></StringRefAddr>
    ><StringRefAddr addrType="DeployPassword">
    ><Contents>true</Contents>
    ></StringRefAddr>
    ><StringRefAddr addrType="oraDriverType">
    ><Contents>thin</Contents>
    ></StringRefAddr>
    ></RefAddresses>
    ></Reference>
    </References>All the taskflows avaialble in my jar using the URL connection which mentioned above. But the adflibray jar got created with a file named 'jar-connection.xml', where i can see <Reference/> as an empty Tag. Because i have selected connections name only as an option when creating the adflibrary for my UI.
    Hence it is appearing so ... But when i added this jar to the other application, i have dragged & dropped the taskflows as a region on to the JSPX page. And i started running the page. On the page .... i can see only the data which is not making use of MapServer connection defiition. Along with that, some maps needs to rendered .. but that is not happening. Rest of the page with the filter critieria is being displayed properly.
    Now i have selected Include Connection Details as an option, by editing the adfLibrary Deployment profile of the UI & redeployed & found the same thing. Like, though i specify the Include Connection Details as an option ... i did not see those URL connection details in my jar-connection.xml file.Still it is not working.
    All the taskflows inside the jar are trying to use this URL connection from jar-connection.xml, which is avaiable inside the adfLibUI.jar.
    I tried with a scenorio some thing like ... For the application to which i have added this adfUILibrary, there itself i created a URLConnection ... but it did not worked as well.
    Requesting you to let me know how can i get avail of my URL connection in to my jar ...
    Thanks & Regards,
    Kiran Konjeti

    Hi Steve,
    Thanks for your immediate reply.
    Yes...we are exactly doing the same. This ADFUI Library will be used as ADD TO PROJECT to consume in other application.
    I tried adding this to the Consumer Application's connections.xml file .... But it did not worked too...
    <Reference name="MapServer" className="oracle.adf.model.connection.url.HttpURLConnection" xmlns="">
    <Factory className="oracle.adf.model.connection.url.URLConnectionFactory"/>
    <RefAddresses>
    <XmlRefAddr addrType="MapServer">
    <Contents>
    <urlconnection name="MapServer" url="http://sbsys1.intra.schneider.com:8109/mapviewer"/>
    </Contents>
    </XmlRefAddr>
    </RefAddresses>
    </Reference>

  • Problem setting ADF BC Conneciton.  Error Invalid connections.xml

    Hi,
    I need to do some enhancement on an existing ADF Based project so I got the project source code
    from Source Control.
    But when I am trying to define a Database Connection on my Application Resources>Connections->New Connection->Database
    I am encountering below error.
    oracle.adf.rc.exception.CatalogException: Invalid connections.xml.I wanted to change the ADFBC connections also by right clicking the project and then choosing properties.
    When I try to add a Database Connection nothing is happening. CLicking the OK button does not do anything?
    Anyone has similar experience? Thanks

    Hi,
    Could you pls check whether your connections.xml is a valid xml.
    You can get more detail form this link:
    http://radalcove.com/wordpress/wp-content/uploads/2007/06/connections.htmlI think you can try creating new connection after removing corresponding "connections.xml" in your environment, Check matching location like below:
    <JDEV_HOME>\system11.1.1.0.18.45.24\o.jdevimpl.rescat2\connections\connections.xmlHope this will be helpful.
    -Prasad

  • Connecting XML files with xMII

    Hi,
      i want to connect xml file (say one.xml having table name and price) with xMII. how can i do it? by using TAG query? what is the simulatorTag.xml?
    - senthil

    Senthil,
    Save your .xml file in your local system
    Open Business Logic Editor and under WEB you can find xmlLoader.
    Right Click and configure the path of the xml file in source URL.
    This will load your xml file and all the rowsets will be available for further manipulation...
    Tag Query is normally used to query a Tag type database like simulator..
    Hope this helps,
    Ajitha

  • NPE when working with connections.xml for Web Service client

    Our ADF Web Service clients needs to read the WSDL and End point URL from connections.xml. But this is giving an Error.
    Here are the details:
    jdevloper 11.1.1.6.0
    Weblogic 10.3.5
    OWSM 11.1.1.6
    From my ADF based Application I need to call out a web service.
    For this I have built a Web Service Proxy and coded to call it from the application.
    Since the app needs to run through the development testing deployment lifecycle and hence be deployed on different environments, we need the ability allow configuration of wsdl and end point URL for the web service call without the need to recompile the app.
    We want to leverage the connections.xml for this purpose.
    http://docs.oracle.com/cd/E23943_01/web.1111/b31974/web_services.htm#autoId6
    My connection.xml looks like:
       <Reference name="MyService" className="oracle.adf.model.connection.webservice.impl.WebServiceConnectionImpl" xmlns="">
          <Factory className="oracle.adf.model.connection.webservice.api.WebServiceConnectionFactory"/>
          <RefAddresses>
             <XmlRefAddr addrType="WebServiceConnection">
                <Contents>
                   <wsconnection description="file:/C:/JDeveloper/mywork/jdev116/DeployTstCnnxtnLov/LovProxy/src/abc/lov/proxy/MyService.wsdl" service="{http://xmlns.oracle.com/Enterprise/HCM/services/MyService.1}MyService">
                      <model name="{http://xmlns.oracle.com/Enterprise/HCM/services/MyService.1}MyService" xmlns="http://oracle.com/ws/model">
                         <service name="{http://xmlns.oracle.com/Enterprise/HCM/services/MyService.1}MyService">
                            <port name="MyService_Port" binding="{http://xmlns.oracle.com/Enterprise/HCM/services/MyService.1}MyService_Binding">
                               <soap addressUrl="http://<machine:port>/PSIGW/PeopleSoftServiceListeningConnector" xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
                               <operation name="MyServiceOperation">
                                  <soap soapAction="MyServiceOperation.v1" xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
                                  <output name="MyService_RESP.V1"/>
                                  <input name="MyService_REQ.V1"/>
                               </operation>
                            </port>
                         </service>
                      </model>
                   </wsconnection>
                </Contents>
             </XmlRefAddr>
          </RefAddresses>
       </Reference>
    My code in the Service Client Looks like:
      @WebServiceRef
      private static MyService myservice;
                Context ctx = ADFContext.getCurrent().getConnectionsContext();
                WebServiceConnection wsc =
                    (WebServiceConnection)ctx.lookup("MyService");
                String urlString = wsc.getWsdlUrlStr();
                System.out.println("WSDL URL: "+urlString);
                myservice = wsc.getJaxWSPort(MyService.class);
                MyService_PortType port = myservice.getMyService_Port();
      ServiceRequest request = new ServiceRequest();
      ServiceResponse response = port.MyServiceOeration(request);
    The WSDL URL is being read correctly.
    Error:
    This error appears to be triggered by the code:
        myservice = wsc.getJaxWSPort(MyService.class);
    java.lang.NullPointerException
            at java.lang.Class.isAssignableFrom(Native Method)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:97)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:118)
            at oracle.j2ee.ws.common.jaxws.runtime.OperationMappingModeler.processParameters(OperationMappingModeler.java:268)
            at oracle.j2ee.ws.common.jaxws.runtime.OperationMappingModeler.processMethod(OperationMappingModeler.java:155)
            at oracle.j2ee.ws.common.jaxws.runtime.ServiceEndpointRuntimeModeler.buildRuntimeModel(ServiceEndpointRuntimeModeler.java:114)
            at oracle.j2ee.ws.client.jaxws.WsClientProxyFactory.getRuntimeMetadata(WsClientProxyFactory.java:69)
            at oracle.j2ee.ws.client.jaxws.WsClientProxyFactory.createProxy(WsClientProxyFactory.java:126)
            at oracle.j2ee.ws.client.jaxws.WsClientProxyFactory.createProxy(WsClientProxyFactory.java:106)
            at oracle.j2ee.ws.common.jaxws.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:219)
            at oracle.j2ee.ws.common.jaxws.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:249)
            at oracle.adf.model.connection.webservice.impl.WebServiceConnectionImpl.getJaxWSPort(WebServiceConnectionImpl.java:385)
            at abc.lov.proxy.MyService_PortClient.fetchDesc(MyService_PortClient.java:84)
            at abc.lov.ServiceManager.fetchEmplID(ServiceManager.java:13)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    Hi Frank,
    I got the following two lines of code just to check if WebServiceConnection was able to read the connections file alright.
                String urlString = wsc.getWsdlUrlStr();
                System.out.println("WSDL URL: "+urlString);
    I am not using urlString for further processing.
    The output is
    WSDL URL: http://<host>/PSIGW/PeopleSoftServiceListeningConnector/MyService.1.wsdl
    java.lang.NullPointerException
            at java.lang.Class.isAssignableFrom(Native Method)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:97)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:118)
    The WSDL Url pointed to is the one that I configure in the connection while deploying the App.
    Ran a test and WSDL Url is accessible by the app.

  • Connection issue: missng connection.xml

    Hi I downloaded sqldeveloper 3.0.0.3.97 for window
    I unzip it in a folder and I double click the sqldeveloper.exe
    When I try to connect to the database it gives me this error: Any help?? My Toad and sqlplus works fine.
    Failed to create naming Context for db connections at url: file:/C:/Documents and Settings/laun1/Application Data/SQL Developer/system3.0.03.97/o.jdeveloper.db.connection.11.1.1.4.37.59.36

    I can create a dummy connection.xml using notepad so there is write permission of my account user.
    When I set it up to use TNS, it is able to ping up the TNS_NAME from my Oracle client environment and it is able to pass the TNS with my dbname,username & password
    However, it is not able to make the connection.

  • Connect xml with flex

    Dear Friends,
    iam doing my first project in flex. trying to connect a xml
    generated by php connected to mysql. i took an example from the
    following link:
    http://www.adobe.com/cfusion/communityengine/index.cfm?event=showDetails&postId=5561&produ ctId=2&loc=en_US
    my xml is generated. working fine. when i run my Flex, it is
    not working. it is giving the following error
    Process terminated without establishing connection to
    debugger.
    Command:
    "C:\Program Files\Adobe\Flex Builder
    3\sdks\3.2.0\bin\adl.exe"
    C:\Rahim\TestApplications\Flexapplication\xmltest\bin-debug\xmltest-app.xml
    C:\Rahim\TestApplications\Flexapplication\xmltest\bin-debug
    Output from command:
    invocation forwarded to primary instance
    my flex file is :
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    initialize="doSend()"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var datalist:ArrayCollection;
    private function resultHandler(event:ResultEvent):void{
    datalist = event.result.data.row;
    public function doSend():void {
    xmlFromDatabase.url = "
    http://localhost/flex/flexdb.php";
    xmlFromDatabase.send();
    ]]>
    </mx:Script>
    <mx:HTTPService url="
    http://localhost/flex/flexdb.php"
    id="xmlFromDatabase"
    showBusyCursor="true"
    result="resultHandler(event)"
    method="GET" />
    <mx:DataGrid x="10" y="10" dataProvider="{datalist}"
    id="dg">
    <mx:columns>
    <mx:DataGridColumn headerText="Col1" dataField="id"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Application>
    Thanks and Regards,
    Syed Abdul Rahim

    hi _funkyboy ,
    thks for ur msg. i tried using run also.. still not
    running... can u pls advice me wt to do. i got struct up.. i have
    to do this.
    tell me how to connect xml which was generated by php and
    fetch the data and display in Flex.
    thanks and regards,
    Syed Abdul Rahim

  • Deployment without connections.xml

    Hi all
    I use my own connection pool and not use any connection.xml settings at all. But I can not manage to remove connection.xml from server side catalog WEB-INF/classes. I do not want this file to be deployed on the server because it contains my test connection to the local servers. I use standalone OC4J container.
    Pleas describe how can I set the deployment profile that removes connections.xml from deployment .ear.
    Best regards,
    Vyacheslav

    Hi all
    I use my own connection pool and not use any connection.xml settings at all. But I can not manage to remove connection.xml from server side catalog WEB-INF/classes. I do not want this file to be deployed on the server because it contains my test connection to the local servers. I use standalone OC4J container.
    Pleas describe how can I set the deployment profile that removes connections.xml from deployment .ear.
    Best regards,
    Vyacheslav

  • Generate connections.xml using only sql commands

    Hello,
    I have a database, where all connection information (Hostname, User, Port, SID, etc.) are stored for several databases. Now I want to create the connections.xml which I can import to the SQL Developer. The idea is to administer the connection information in a single point. Then anyone can query and import the connections easily to the SQL Developer.
    The structure itself was easy to understand and implement using XMLELEMENT. My Problem is, how can I save the password respectively how is the password encrypted? I have found several tools that can decode the password, but I have the plaintext. I found a solution using Jython, but I want to use only SQL. There should be a suitable algorithm in the dbms_crypto package, I hope. I don´t want to use other tools or languages.
    Thanks for help,
    Frank
    Edited by: frank_nillies on 20.03.2013 04:28
    - renamed connection.xml to connections.xml

    Hello,
    I have a database, where all connection information (Hostname, User, Port, SID, etc.) are stored for several databases. Now I want to create the connections.xml which I can import to the SQL Developer. The idea is to administer the connection information in a single point. Then anyone can query and import the connections easily to the SQL Developer.
    The structure itself was easy to understand and implement using XMLELEMENT. My Problem is, how can I save the password respectively how is the password encrypted? I have found several tools that can decode the password, but I have the plaintext. I found a solution using Jython, but I want to use only SQL. There should be a suitable algorithm in the dbms_crypto package, I hope. I don´t want to use other tools or languages.
    Thanks for help,
    Frank
    Edited by: frank_nillies on 20.03.2013 04:28
    - renamed connection.xml to connections.xml

  • Use JDBC connection XML DB

    Hello everyone:
    I use JDBC OCI Driver to connection XML DB , but I got some error message and I don't know what's wrong .Following is my error message and Code.
    thanks
    java.sql.SQLException: ORA-00904: "R"."RESOLVE_PATH": ID 無效
    my code
    Class.forName("oracle.jdbc.OracleDriver");
    Connection conn=DriverManager.getConnection("jdbc:oracle:oci8:@XBRL","gomin","gomin");
    OraclePreparedStatement stmt = (OraclePreparedStatement)
    conn.prepareStatement("SELECT r.RESOLVE_PATH('/Company/NSFT') FROM XDB$RESOURCE r");
    ResultSet rset = stmt.executeQuery();
    OracleResultSet orset = (OracleResultSet)rset;
    while(orset.next())
    // get the XMLType
    XMLType poxml = XMLType.createXML(orset.getOPAQUE(1));
    // get the XMLDocument as a string...
    Document podoc = (Document)poxml.getDOM();
    System.out.println(podoc.getNamespaceURI());
    }

    Genrally the SQL Exception ORA-00904 is thrown when
    "The column name entered is either missing or invalid"
    Check out the following :
    => Enter a valid column name. A valid column name must begin with a letter, be less than or equal to 30 characters, and consist of only alphanumeric characters and the special characters $, _, and #. If it contains other characters, then it must be enclosed in double quotation marks.
    =>It may not be a reserved word.
    Hope it helps
    Shefali

  • Problem in Connection pooling after deploying BC4J App Module as EJB

    Hi,
    We have deployed the application modules on standalone OC4J as stateful EJB session beans.
    The problem is that with each user, the number of database connections seem to increase. This is making the application unscalable, which defeats the purpose of using EJB!
    Can someone please suggest how to limit the number of database conections in this scenario?
    Can this be solved by application module pooling? How can we use the PoolMgr to work with the session beans?
    We have tried to invoke disconnect on the application module after calling methods(using appmodule.disconnect(true)) and reconnect (appmodule.reconnect()) on entering the method. This keeps the number of connections low and works the first time the method is invoked. But subsequently, it gives nullpointerexception when the Row is accessed in the JSP.
    The exception we are getting is :
    java.lang.NullPointerException
         at oracle.jbo.client.remote.ViewUsageImpl.getStructDef(ViewUsageImpl.java:241)
         at oracle.jbo.client.remote.ViewUsageImpl.findAttributeDef(ViewUsageImpl.java:275)
         at oracle.jbo.client.remote.RowImpl.getAttributeIndexOf(RowImpl.java:368)
         at oracle.jbo.client.remote.RowImpl.getAttribute(RowImpl.java:144)
         at Supplier.client.ejb.beanmanaged.SupplierAM_IntPaymtVORowBeanManagedClient.getMdid(SupplierAM_IntPaymtVORowBeanManagedClient.java:63)
         at supplier.sccPayCheq._jspService(_sccPayCheq.java:102)
         [SRC:/Supplier/sccPayCheq.jsp:44]
    The Application module configuration (in bc4j.xcfg) is:
    <AppModuleConfig name="SupplierAM9iAS">
    <AppServerConnectionName>StandaloneOC4JConnection</AppServerConnectionName>
    <AppModuleJndiName>Supplier.SupplierAM</AppModuleJndiName>
    <java.naming.security.credentials>admin</java.naming.security.credentials>
    <DeployPlatform>EjbIas</DeployPlatform>
    <java.naming.security.principal>admin</java.naming.security.principal>
    <DtMiddleTierDeploymentProfile>ProjectMiddleTier.deploy</DtMiddleTierDeploymentProfile>
    <ApplicationName>Supplier.SupplierAM</ApplicationName>
    <DtDeploymentProfile>ProjectEJB.deploy</DtDeploymentProfile>
    <DtCommonDeploymentProfile>ProjectCommon.deploy</DtCommonDeploymentProfile>
    <JDBCDataSource>jdbc/ConnectionCoreDS</JDBCDataSource>
    <jbo.server.internal_connection>jdbc/ConnectionCoreDS</jbo.server.internal_connection>
    <jbo.ejb.txntype>local</jbo.ejb.txntype>
    <jbo.doconnectionpooling>true</jbo.doconnectionpooling>
    <ApplicationPath>ProjectEJB</ApplicationPath>
    </AppModuleConfig>
    The Datasource used (in $ORACLE_HOME/j2ee/home/config/data-sources.xml) is:
    <data-source
              class="oracle.jdbc.pool.OracleConnectionCacheImpl"           connection-driver="oracle.jdbc.driver.OracleDriver"
              ejb-location="jdbc/ConnectionDS"
              inactivity-timeout="30"
              location="jdbc/ConnectionCoreDS"
              name="ConnectionDS"
              password="*******"
              pooled-location="jdbc/ConnectionPooledDS"
              url="jdbc:oracle:thin:@<IPADDESS>:<SID>"
              username="USER"
              xa-location="jdbc/xa/ConnectionXADS"
              max-connections="5"
              min-connections="1"/>

    Can this be solved by application module pooling? How
    can we use the PoolMgr to work with the session
    beans?You can use a stateless checkout/checkin appmodule.
    Take a look at the following help topics which explain this in good detail.
    "About Application Module Pooling"
    "About JSP Pages and Application Module Pooling"
    The pool can help reuse the appmodule instance across requests thus reducing the number of concurrent db sessions.
    Dhiraj

  • Data-sources.xml instead of bc4j.xcfg

    Please give me some direction on how I can configure my Application Module to use JNDI lookup of my data-sources.xml file instead of using the bc4j.xcfg file. I know there is a way but I need a step by step process to get this done through configuration while developing in the IDE.

    Can you please tell how did you solve that. I have similar problem
    Kavitha

  • Using predefined JDBC database connection in runtime for BC4J

    I've created an aplication using BC4J context, however I want to have several distinct users acessing this aplication, so I create the connection to the database using stantart JDBC 2.0, and now I want my application to use this connection instead of the one defined for BC4J.
    The database user owner of the objects must be locked.
    Is this possible?
    Many thanks.
    Nuno

    In Forms I used the following code to change the user at runtime. I created 3 char fields 'u','p' and 'c' for username, password and connect string respectively.
    declare
    uname varchar2(10);
    begin
    uname := get_application_property(username);
    -- To display your current username
    message(uname);
    pause;
    logout;
    logon(:u,:p&#0124; &#0124;'@'&#0124; &#0124;:c);
    end;
    Have a nice day,
    Abhijith Unnikannan,
    Oracle Support Services

Maybe you are looking for

  • Phase out settings at a higher level such as brand or major customer

    Have any of you ever setup phase out assignments at a higher level than product and had it work correctly?  For example, we want to phase out a brand for a major customer.  In other words, a customer is dropping a brand and we don't want statistical

  • Time machine doesn't see my external hard drive.

    Why doesn't Time Machine recognize my external hard drive? The icon is on the desktop but it won't back up and fails saying the backup volume can't be found. It works on my mac mini but not on my intel core 2 duo. I have other backup files on my exte

  • ITunes 10.5 won't add to library OR play any audio files prior to update

    I recently updated to iTunes 10.5 on my MacBook Pro running OS X 10.6.8, and iTunes won't add any of my old music files to the library, regardless of what directory they are in. The permissions on all files and folders of interest are read and write.

  • Issues with iOS 8.02

    Ever since I downloaded 8.02, whenever I try logging on to a site where a user name and a password have to be used, the screen as well as all buttons of my iPad 3 totally freezes after I type two characters of the user name. I have to switch off and

  • Need Analysis

    Hi All, I want to add another extra field in FI_AP - EDW layer DSO, what will be the impact over FI_AP - Regional DSO?? Asish