(SJAS9) Reading a context param in a web service

Platform - SJAS9, NB5.5
I am trying to add a web service to a small web project and I need database access for it.
My web.xml defines 2 different resource-refs for my databases, jdbc/development and jdbc/production. There is also a global context-param named database with values of development or production that defines which database the web app should be using.
I have two database pools set up under SJAS9 for these resource names, and the servlets can access these just fine using :
    protected Connection getConnection() {
        Connection conn = null;
        try {
            String datasourceName = "jdbc/" + getServletContext().getInitParameter("database");
            Context initCtx = new InitialContext();
            Context envCtx = (Context)initCtx.lookup("java:comp/env");
            DataSource ds = (DataSource)envCtx.lookup(datasourceName);
            log.debug("retrieving database connection for " + datasourceName);
            conn = ds.getConnection();
            log.debug("done");
            conn.setAutoCommit(false);
            return conn;
        catch (SQLException ex) {
            log.error("error getting a connection", ex);
            return null;
        catch (NamingException ex) {
            log.error("error finding the datasource", ex);
            return null;
    }I have just added a web service to the project, and I can't find a way to get the context param. When I created the web service, Netbeans added some annotation around it, and it is not extended any class or implementing any interface (that I can see).
For the web service, there is no appropriate method equivalent for the call
            String datasourceName = "jdbc/" + getServletContext().getInitParameter("database");so how do I retrieve the context param database so I can know which resource pool to obtain the connection from inside the web service?
Thanks
Chris

Here's how to invoke getServletContext() from a web service:
First you'll need to add "ServiceLifecycle" to the list of implmentations of your class:
public class MyService implements WebServices.MyServiceSoap, Remote, ServiceLifecycle {}Next you'll need to add the following:
private ServletContext servletContext;
public void destroy(){}  
public void init(Object context) throws javax.xml.rpc.ServiceException {
   ServletEndpointContext soapContext = (ServletEndpointContext) context;
   servletContext = soapContext.getServletContext();
Hope this helps!
Peter

Similar Messages

  • Reading an xml file in the web services java file

    I want to read some data in the webservices file.so i am writing my own xml file through which i want to read data.but i am not able to read xml file from web services file.also , i am not able to put xml file in the .ear file,as there is no such tag in servicegen script through which i can add xml file in the .ear file.
    i know in case of servlets,i will specify context-param attributes in web.xml,and i can access those in my servlet.can i do anything like this for webservices,and i am not using any servlets for web services.
    kindly tell any solution.

    One possible option to parse an xml-file to a flex XML object:
    public function parseConXML(source:String):void
                    xmlLoader = new URLLoader();
                    xmlLoader.load(new URLRequest(source));
                      // Eventlistener: if URL loaded --> onLoadComplete function
                      xmlLoader.addEventListener(Event.COMPLETE, xmlLoadComplete);
                public function xmlLoadComplete(evt:Event):void{               
                    var xml:XML = new XML();
                     // ignore comments in XML-File
                    XML.ignoreComments = true;  
                       //ignore whitespaces in XML-File
                     XML.ignoreWhitespace = true;
                    // XML-Objekt erstellen
                    xml = new XML(evt.target.data);
                   //AFTERWARDS use your xml as your wish

  • How to generate param-prefix in web-services.xml

    Hello I am using source2wsdd to generate my WSDL and my web-services.xml. For sake
    of interoperability I would like to have the type param-prefix in the web-services.xml
    file. From my Bean class what kind of javadoc comments would help me generate
    the type param-prefix ?
    I also would like the location="header" in the param list.
    Thanks,
    Aswin.
    <param xmlns:param-prefix="http://tempuri.org/"
    type="param-prefix:SOAPCredentials"
    location="header"
    class-name="com.xyz.webservices.SOAPCredentials"
    name="SOAPCredentials"
    style="in">
    </param>
    <return-param xmlns:param-prefix="http://tempuri.org/"
    type="param-prefix:GetFileProfileInformationResponse"
    class-name="com.xyz.webservices.GetFileProfileInformationResponse"
    name="parameters">
    </return-param>
    </params>

    Please try this:
    * @wlws:part p_SOAPAuthToken location="header"
    * type="typeNS:p_SOAPAuthToken"
    * class-name="com.xyz.webservices.SOAPAuthToken"
    * style="inout"
    * xmlns:typeNS=http://namespace/of/the/type
    * @wlws:part p_SOAPCredentials location="header"
    * type="typeNS:p_SOAPCredentials"
    * class-name="com.xyz.webservices.SOAPCredentials"
    * style="in"
    * xmlns:typeNS=http://namespace/of/the/type
    * @ejbgen:remote-method
    public void login(SOAPAuthToken p_SOAPAuthToken,
    SOAPCredentials p_SOAPCredentials)
    I did not try this one out. So i can only hope that it works.
    Regards,
    -manoj
    http://manojc.com
    "Aswin Dinakar" <[email protected]> wrote in message
    news:40aeeb5d$1@mktnews1...
    >
    I tried this
    * @wlws:part p_SOAPAuthToken location="header"
    * @wlws:part p_SOAPAuthToken type="param-prefix:p_SOAPAuthToken"
    * @wlws:part p_SOAPAuthTokenclass-name="com.xyz.webservices.SOAPAuthToken"
    * @wlws:part p_SOAPAuthToken style="inout"
    * @wlws:part p_SOAPCredentials location="header"
    * @wlws:part p_SOAPCredentials type="param-prefix:p_SOAPCredentials"
    * @wlws:part p_SOAPCredentialsclass-name="com.xyz.webservices.SOAPCredentials"
    * @wlws:part p_SOAPCredentials style="in"
    * @ejbgen:remote-method
    public void login(SOAPAuthToken p_SOAPAuthToken,
    SOAPCredentials p_SOAPCredentials)
    and I got the following error -
    [source2wsdd] source2wsdd: In doclet classweblogic.webservice.tools.ddgen.Servi
    ceGen, method start has thrown an exceptionjava.lang.reflect.InvocationTargetE
    xception
    [source2wsdd] weblogic.xml.stream.XMLStreamException: Attribute QNamevalue "par
    am-prefix:p_SOAPAuthToken" does not map to a prefix that is in scope
    [source2wsdd] atweblogic.webservice.dd.NSAttribute.getValueAsXMLName(NSAttrib
    ute.java:45)
    [source2wsdd] atweblogic.webservice.dd.DDLoader.processParamElement(DDLoader.
    java:1252)
    "manoj cheenath" <[email protected]> wrote:
    Check out this example:
    http://manojc.com/?sample3
    You can find more details regarding the tags here:
    http://manojc.com/tutorial/sample3/source2wsdd.html
    Regards,
    -manoj
    http://manojc.com
    "Aswin D" <[email protected]> wrote in message
    news:[email protected]...
    Hello I am using source2wsdd to generate my WSDL and my
    web-services.xml.
    For sake
    of interoperability I would like to have the type param-prefix inthe
    web-services.xml
    file. From my Bean class what kind of javadoc comments would help megenerate
    the type param-prefix ?
    I also would like the location="header" in the param list.
    Thanks,
    Aswin.
    <param xmlns:param-prefix="http://tempuri.org/"
    type="param-prefix:SOAPCredentials"
    location="header"
    class-name="com.xyz.webservices.SOAPCredentials"
    name="SOAPCredentials"
    style="in">
    </param>
    <return-param xmlns:param-prefix="http://tempuri.org/"
    type="param-prefix:GetFileProfileInformationResponse"
    class-name="com.xyz.webservices.GetFileProfileInformationResponse"
    name="parameters">
    </return-param>
    </params>

  • Is it possible to read/write data from Salesforce using web service hub in Informatica?

    Anyone from Informatica can asnwer this question please

    Is it possible to read/write data from Salesforce using web service hub in Informatica? Not asking about PowerExchange for Salesforce or Informatica Cloud. Just using web service can we load data into Salesforce? Thanks ahead.

  • Sending controller context value attributes to web service model

    Hi,
    I have put some parameters (value Attributes) in controller context and mapped to different views. Is there any way by which i can send the values to the web service model , each time the web service is called? like through header or some thing like that??

    Hi Sujesh,
    Read those value attributes in your controller using following code:
    wdcontext.currentContextElement().get<attribute>();
    and then set these value in your web service model.
    <model name> model = new <model name>();
    model.set<attribute>(<value>);
    wdcontext.node<nodename of your web service model>().bind(model);
    wdcontext.current<nodename of your web service model>element().modelobject().execute();
    Regards,
    Bhavik

  • Reading a file and caching in web service before a web method is called

    Hi All,
    I developed a webservice with some web methods. I need to validate the licencing for those web methods. And my licensing details will be available in a file. Instead of reading the licencing file for every web method invocation I want the licensing file should be read only once and those details should be cached. So that for every method invocation I will use the cached licensing details. I am using Axis 1.0. How can I achieve this functionality. Please help me in solving this problem.
    Thanks in Advance,
    Naresh

    The program needs to read a text file.
    I made sure that the text does not have space between the lines.
    I wanted to have a String object with all the data (lines).
    So I used a StringBuffer (append) to collect all the data lines.
    I wanted to read each line of the file and assign them to my StringBuffer, using the built-in nextLine() method of the Scanner class and using the for loop.
    I already tried printing out each line as I read it (using the code below). Even though the program showed each line like it should, it still said "java.util.NoSuchElementException: No line found" at the end.
    //read a line of characters of the file
    line = file.nextLine();
    while (line != null) { //file is terminated by a null
         System.out.println(line);
         sb.append(line);
         line = file.nextLine();
    }

  • May i use context-param in jax-ws?

    I have a web service with jax-ws & jaxb. after deploied it to glassfish. i found it exposed to a servlet.
    so, may i read the context-param elements from web.xml to jax-ws classes? if i can , how wil i do?
    Edited by: Kepeng on Jan 14, 2008 7:44 AM

    Yes, you can configure database acceess information in property file and read using [java.util.Properties|http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html] Or [Apache commons configuration|http://commons.apache.org/configuration/]

  • How to read Standard JSR Portlet Web.xml's context-param

    Hi
    I am completely new to Java.
    I want to keep some configuration in Web.xml in Context param. My Web.xml looks like
    <context-param>
    <param-name>ConfigUrl</param-name>
    <param-value>http://localhost:8083/</param-value>
    </context-param>
    How can I read these values? Can I read these values directly in my JSP file or will I have to read it in my Portlet Class in some function.
    Thanks

    As soon as I use portletConfig, it gives me NullPointerException. I am definitely using <portlet:defineObjects/>
    My Jsp looks as :
    <%@ page contentType = "text/html; charset=windows-1252"
    pageEncoding = "windows-1252"
    import = "javax.portlet.*, java.util.*, port.Port, port.resource.PortBundle,javax.portlet.PortletContext"%>
    <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
    <portlet:defineObjects/>
    <%
    PortletContext ctx = portletConfig.getPortletContext();
    String configpath = "Hello";
    %>
    <label>Welcome</label>
    <label><%=configpath%></label>

  • Generated JSP reports and context-param in web.xml

    I have what I believe to be a problem when using .jsp files generated from reports builder (actually, it looks as if the problem is in the reports tag library. When adding a context-param to web.xml, I get an error when compiling the following line:
    <%@ taglib uri="/WEB-INF/lib/reports_tld.jar" prefix="rw" %>
    Error(1): oracle.xml.parser.v2.XMLParseException: Invalid element 'context-param' in content of 'web-app', expected elements '[taglib, resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref]'.
    Note that I can read the context param and no other JSP pages seem to care, just those with the Reports Tag library.
    Regards,
    Jeff

    Ben -
    There can be init params for the servlet or for the servlet context. For the servlet, this looks like:
    <servlet>
    <servlet-name>InitServlet</servlet-name>
    <servlet-class>package1.InitServlet</servlet-class>
    <init-param>
    <param-name>message</param-name>
    <param-value>Hello From Initialization Parameter</param-value>
    </init-param>
    </servlet>
    in the web.xml file, and is accessed using:
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    message = config.getInitParameter("message");
    For a servlet context init param, you define it as you did using the web.xml settings editor:
    <context-param>
    <param-name>hello</param-name>
    <param-value>hi</param-value>
    </context-param>
    This is accessed using:
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    message1 = config.getServletContext().getInitParameter("hello");
    Hope this helps,
    Lynn
    Java Tools Team

  • Reading context-param in JAX-WS

    I have created a JAX-WS using netbeans. How can I read the context-param values added in web.xml, in the web service (it could be any thing like database conneciton string)

    Yes, you can configure database acceess information in property file and read using [java.util.Properties|http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html] Or [Apache commons configuration|http://commons.apache.org/configuration/]

  • How can I get the context-parm from a web.xml file using struts?

    Hello:
    I need get the context-param from the web.xml file of my web project using struts. I want configurate the jdbc datasource connection pooling here. For example:
    <context-param>
    <param-name>datasource</param-name>
    <param-value>jdbc/formacion</param-value>
    <description>Jdbc datasource</description>
    </context-param>
    and then from any Action class get this parameter.
    Similar using a simple server can be:
    /** Initiates new XServlet */
    public void init(ServletConfig config) throws ServletException {
              for (Enumeration e = config.getInitParameterNames(); e.hasMoreElements();) {
                   System.out.println(e.nextElement());
              super.init(config);
              String str = config.getInitParameter("datasource");
              System.out.println(str);
         public void doPost(HttpServletRequest req, HttpServletResponse res)
              throws ServletException, IOException {
              // res.setContentType( );
              System.out.println("Got post request in XServlet");
              PrintWriter out = res.getWriter();
              out.println("nada");
              out.flush();
              out.close();
    but only this works for init-params, if I use
    <servlet>
         <servlet-name>MyServlet</servlet-name>
         <display-name>MyServlet</display-name>
         <servlet-class>myExamples.servlet.MyServlet</servlet-class>
         <init-param>
         <param-name>datasource</param-name>
         <param-value>jdbc/formacion</param-value>
    </init-param>
    </servlet>
    inside my web.xml. I need something similar, but using struts inside the action class for that I can get the context-params and call my database.
    Thank you

    To get context parameters from your web.xml file you can simply get the ActionServlet object from an implementing action object class. In the perform (or execute) method make the following call.
    ServletContext context = getServlet().getServletContext();
    String tempContextVar =
    context.getInitParameter("<your context param >");

  • Use combination context param, EL of databinding in a EL.

    Hi. I have a image tag(ADF Faces.General Controls). I add into source attribute at common of property palette a EL #{resource['images:bakery.jpg']} with bakery.jpg is a image locate directy in images directory. Now, I want to change images directory by a context param that i added and bakery.jpg by a EL of databinding, as #{bindings.Name.inputValue}. Purpose is to change dynamically image displayed. How to do that? Thanks.

    Hi,
    using Google to search for : EL JSF context parameter brings up
    http://stackoverflow.com/questions/6523193/jsf-2-how-can-i-get-a-context-param-value-from-web-xml-using-jsf-el
    For the image name, if it is in an ADF attribute you use
    #{bindings.attributeName.inputValue}
    So concatenating it
    #{initparam El as in link above}/#{bindings.attributeName.inputValue}
    or, to read it from HTTP and not through the faces servlet
    /#{initparam El as in link above}/#{bindings.attributeName.inputValue}
    Frank

  • Fault elt in web-services.xml NOT WORKING

    We are trying to capture an invalid message coming into our service before our
    service actually processes it. Per WLS7 documentation, it provides the ability
    to add a <fault> elt under the <params> elt in web-services.xml to perform that.
    Here's how the operations portion of our web-services.xml looks like:
    <operations>
    <operation method="echo(java.lang.String)" component="jcComp0" name="echo"
    handler-chain="diagnosticChain">
    <params>
    <param location="body" class-name="java.lang.String" style="in" name="echoString"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string">
    </param>
    <return-param location="body" class-name="java.lang.String" name="Result"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string">
    </return-param>
         <fault name="InvalidMessageException" class-name="com.gmacfs.routeone.diagnostic.InvalidMessageException"/>
    </params>
    </operation>
    </operations>
    However, when we tried doing that, we got a BIG set of exception while trying
    to build our client. It looks as follows:
    client:
    [clientgen] Generating client jar for diagnostic.ear ...
    [clientgen] Could not read Web Service deployment descriptor
    [clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.java:112)
    [clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenTask.java:270)
    [clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
    [clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
    [clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:182)
    [clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
    [clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
    [clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
    [clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
    [clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
    [clientgen] --- Nested Exception ---
    [clientgen] Could not read Web Service deployment descriptor
    [clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EARClientGen.java:332)
    [clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.java:110)
    [clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenTask.java:270)
    [clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
    [clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
    [clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:182)
    [clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
    [clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
    [clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
    [clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
    [clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
    [clientgen] --- Nested Exception ---
    [clientgen] weblogic.webservice.dd.DDProcessingException: Could not find required
    attribute "type" for element <fault> (Line 28, Column 8)
    [clientgen] at weblogic.webservice.dd.ParsingHelper.getRequiredAttribute(ParsingHelper.java:287)
    [clientgen] at weblogic.webservice.dd.DDLoader.processFaultElement(DDLoader.java:1195)
    [clientgen] at weblogic.webservice.dd.DDLoader.processFaultElements(DDLoader.java:1166)
    [clientgen] at weblogic.webservice.dd.DDLoader.processParamsElement(DDLoader.java:1004)
    [clientgen] at weblogic.webservice.dd.DDLoader.processOperationElement(DDLoader.java:977)
    [clientgen] at weblogic.webservice.dd.DDLoader.processOperationElements(DDLoader.java:853)
    [clientgen] at weblogic.webservice.dd.DDLoader.processOperationsElement(DDLoader.java:841)
    [clientgen] at weblogic.webservice.dd.DDLoader.processWebServiceElement(DDLoader.java:378)
    [clientgen] at weblogic.webservice.dd.DDLoader.processWebServiceElements(DDLoader.java:283)
    [clientgen] at weblogic.webservice.dd.DDLoader.processWebServicesElement(DDLoader.java:271)
    [clientgen] at weblogic.webservice.dd.DDLoader.load(DDLoader.java:249)
    [clientgen] at weblogic.webservice.util.WebServiceWarFile.getWSDD(WebServiceWarFile.java:79)
    [clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EARClientGen.java:330)
    [clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.java:110)
    [clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenTask.java:270)
    [clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
    [clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
    [clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:182)
    [clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
    [clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
    [clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
    [clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
    [clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
    [clientgen] --------------- nested within: ------------------
    [clientgen] weblogic.webservice.util.WebServiceJarException: Could not load deployment
    descriptor - with nested exception:
    [clientgen] [weblogic.webservice.dd.DDProcessingException: Could not find required
    attribute "type" for element <fault> (Line 28, Column 8)]
    [clientgen] at weblogic.webservice.util.WebServiceWarFile.getWSDD(WebServiceWarFile.java:81)
    [clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EARClientGen.java:330)
    [clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.java:110)
    [clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenTask.java:270)
    [clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
    [clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
    [clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:182)
    [clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
    [clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
    [clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
    [clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
    [clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
    BUILD FAILED
    Anybody has any ideas?
    Thanks much,
    sami

    Manoj,
    Thanks a lot, THAT DID IT... two very helpful hints from you in a row.
    By the way, one thing worth mentioning is that the Weblogic documentation that
    we explored did not have enough information about that issue.
    Thanks again.
    sami
    "manoj cheenath" <[email protected]> wrote:
    Buried deep in the stack trace, is this little
    detail:
    Could not find required
    attribute "type" for element <fault> (Line 28, Column 8)
    So the correct DD should look something like:
    <fault type="typeNS:string"
    xmlns:typeNS="http://www.w3.org/2001/XMLSchema"
    class-name="tutorial.sample9.HelloWorldException"
    name="HelloWorldException">
    </fault>
    Also, check out this example:
    http://manojc.com/?sample9
    There is a know problem: WLS can not handle
    exceptions that contain complex data types.
    This will be fixed in SP1.
    Regards,
    -manoj
    http://manojc.com
    "sami titi" <[email protected]> wrote in message
    news:[email protected]...
    We are trying to capture an invalid message coming into our servicebefore
    our
    service actually processes it. Per WLS7 documentation, it providesthe
    ability
    to add a <fault> elt under the <params> elt in web-services.xml toperform
    that.
    Here's how the operations portion of our web-services.xml looks like:
    <operations>
    <operation method="echo(java.lang.String)" component="jcComp0"name="echo"
    handler-chain="diagnosticChain">
    <params>
    <param location="body" class-name="java.lang.String" style="in"name="echoString"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string">
    </param>
    <return-param location="body" class-name="java.lang.String"name="Result"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string">
    </return-param>
    <fault name="InvalidMessageException"class-name="com.gmacfs.routeone.diagnostic.InvalidMessageException"/>
    </params>
    </operation>
    </operations>
    However, when we tried doing that, we got a BIG set of exception whiletrying
    to build our client. It looks as follows:
    client:
    [clientgen] Generating client jar for diagnostic.ear ...
    [clientgen] Could not read Web Service deployment descriptor
    [clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.ja
    va:112)
    [clientgen] atweblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenT
    ask.java:270)
    [clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
    [clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
    [clientgen] atorg.apache.tools.ant.Target.performTasks(Target.java:182)
    [clientgen] atorg.apache.tools.ant.Project.executeTarget(Project.java:601)
    [clientgen] atorg.apache.tools.ant.Project.executeTargets(Project.java:560)
    [clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
    [clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
    [clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
    [clientgen] --- Nested Exception ---
    [clientgen] Could not read Web Service deployment descriptor
    [clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EAR
    ClientGen.java:332)
    [clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.ja
    va:110)
    [clientgen] atweblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenT
    ask.java:270)
    [clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
    [clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
    [clientgen] atorg.apache.tools.ant.Target.performTasks(Target.java:182)
    [clientgen] atorg.apache.tools.ant.Project.executeTarget(Project.java:601)
    [clientgen] atorg.apache.tools.ant.Project.executeTargets(Project.java:560)
    [clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
    [clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
    [clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
    [clientgen] --- Nested Exception ---
    [clientgen] weblogic.webservice.dd.DDProcessingException: Could notfind
    required
    attribute "type" for element <fault> (Line 28, Column 8)
    [clientgen] atweblogic.webservice.dd.ParsingHelper.getRequiredAttribute(ParsingHelper.java
    :287)
    [clientgen] atweblogic.webservice.dd.DDLoader.processFaultElement(DDLoader.java:1195)
    [clientgen] atweblogic.webservice.dd.DDLoader.processFaultElements(DDLoader.java:1166)
    [clientgen] atweblogic.webservice.dd.DDLoader.processParamsElement(DDLoader.java:1004)
    [clientgen] atweblogic.webservice.dd.DDLoader.processOperationElement(DDLoader.java:977)
    [clientgen] atweblogic.webservice.dd.DDLoader.processOperationElements(DDLoader.java:853)
    [clientgen] atweblogic.webservice.dd.DDLoader.processOperationsElement(DDLoader.java:841)
    [clientgen] atweblogic.webservice.dd.DDLoader.processWebServiceElement(DDLoader.java:378)
    [clientgen] atweblogic.webservice.dd.DDLoader.processWebServiceElements(DDLoader.java:283)
    [clientgen] atweblogic.webservice.dd.DDLoader.processWebServicesElement(DDLoader.java:271)
    [clientgen] at weblogic.webservice.dd.DDLoader.load(DDLoader.java:249)
    [clientgen] atweblogic.webservice.util.WebServiceWarFile.getWSDD(WebServiceWarFile.java:79
    [clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EAR
    ClientGen.java:330)
    [clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.ja
    va:110)
    [clientgen] atweblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenT
    ask.java:270)
    [clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
    [clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
    [clientgen] atorg.apache.tools.ant.Target.performTasks(Target.java:182)
    [clientgen] atorg.apache.tools.ant.Project.executeTarget(Project.java:601)
    [clientgen] atorg.apache.tools.ant.Project.executeTargets(Project.java:560)
    [clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
    [clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
    [clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
    [clientgen] --------------- nested within: ------------------
    [clientgen] weblogic.webservice.util.WebServiceJarException: Couldnot
    load deployment
    descriptor - with nested exception:
    [clientgen] [weblogic.webservice.dd.DDProcessingException: Could not
    find>required>> attribute "type" for element <fault> (Line 28, Column 8)
    [clientgen] atweblogic.webservice.util.WebServiceWarFile.getWSDD(WebServiceWarFile.java:81
    [clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EAR
    ClientGen.java:330)
    [clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.ja
    va:110)
    [clientgen] atweblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenT
    ask.java:270)
    [clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
    [clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
    [clientgen] atorg.apache.tools.ant.Target.performTasks(Target.java:182)
    [clientgen] atorg.apache.tools.ant.Project.executeTarget(Project.java:601)
    [clientgen] atorg.apache.tools.ant.Project.executeTargets(Project.java:560)
    [clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
    [clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
    [clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
    BUILD FAILED
    Anybody has any ideas?
    Thanks much,
    sami

  • Problem using web service

    Hi
    I am trying this example http://www.netbeans.org/download/flash/platform_55/platform_ws/
    but i get the next error. I am using netbeans 5.5 with glassfish.
    wsgen successful
    DPL5306:Servlet Web Service Endpoint [PropiedadesWebService] listening at address [http://dani:8080/WebAAE/PropiedadesWebServiceService]
    deployed with moduleid = WebAAE
    naming.bind
    [TopLink Warning]: 2006.08.28 08:50:42.703--ServerSession(33416332)--property toplink.server.platform.class.name is obsolete, property toplink.target-server should be used instead.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.718--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Particularpropvalues] is being defaulted to: Particularpropvalues.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.718--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Mapareasgroups] is being defaulted to: Mapareasgroups.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.718--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Areas] is being defaulted to: Areas.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.718--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Wufallosbajada] is being defaulted to: Wufallosbajada.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.718--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Versions] is being defaulted to: Versions.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.718--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Compradores] is being defaulted to: Compradores.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.734--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Usuarios] is being defaulted to: Usuarios.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.734--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.IdiomasTextos] is being defaulted to: IdiomasTextos.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.734--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Myareas] is being defaulted to: Myareas.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.734--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Myareasgrupos] is being defaulted to: Myareasgrupos.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.750--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Excluidos] is being defaulted to: Excluidos.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.750--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Mydescripciones] is being defaulted to: Mydescripciones.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.750--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Configuracion] is being defaulted to: Configuracion.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.750--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Lendes] is being defaulted to: Lendes.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.750--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Clavesint] is being defaulted to: Clavesint.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.750--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Empleados] is being defaulted to: Empleados.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.765--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Mensajes] is being defaulted to: Mensajes.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.765--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Wuhistorylog] is being defaulted to: Wuhistorylog.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.765--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Wuhistorylogdetail] is being defaulted to: Wuhistorylogdetail.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.765--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Wuclientesmovimientos] is being defaulted to: Wuclientesmovimientos.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.765--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Claves] is being defaulted to: Claves.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.765--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.IdiomasEtiquetas] is being defaulted to: IdiomasEtiquetas.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.765--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Fotos] is being defaulted to: Fotos.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.781--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Historico] is being defaulted to: Historico.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.781--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Propiedades] is being defaulted to: Propiedades.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.796--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Busqueda] is being defaulted to: Busqueda.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.796--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Clientes] is being defaulted to: Clientes.
    |#]
    [TopLink Config]: 2006.08.28 08:50:42.796--ServerSession(33416332)--The alias name for the entity class [class org.aae.jose.Contadores] is being defaulted to: Contadores.
    |#]
    Em: no es null
    DPL5306:Servlet Web Service Endpoint [PropiedadesWebService] listening at address [http://dani:8080/WebAAE/PropiedadesWebServiceService]
    Invoking wsimport with http://localhost:8080/WebAAE/PropiedadesWebServiceService?WSDL
    wsimport successful
    DPL5306:Servlet Web Service Endpoint [PropiedadesWebService] listening at address [http://dani:8080/WebAAE/PropiedadesWebServiceService]
    Wrong WSHandlerResolver: null
    DPL5306:Servlet Web Service Endpoint [PropiedadesWebService] listening at address [http://dani:8080/WebAAE/PropiedadesWebServiceService]
    Invoking wsimport with http://localhost:8080/WebAAE/PropiedadesWebServiceService?WSDL
    wsimport successful
    DPL5306:Servlet Web Service Endpoint [PropiedadesWebService] listening at address [http://dani:8080/WebAAE/PropiedadesWebServiceService]
    Wrong WSHandlerResolver: null
    [TopLink Warning]: 2006.08.28 08:51:00.203--ServerSession(33416332)--property toplink.server.platform.class.name is obsolete, property toplink.target-server should be used instead.
    |#]
    topLink_version
    application_server_name_and_version
            platform=>MySQL4Platform
            user name=> ""
            connector=>JNDIConnector datasource name=>null
    );|connecting|#]
            ;|connected_user_database_driver|#]
            platform=>MySQL4Platform
            user name=> ""
            connector=>JNDIConnector datasource name=>null
    );|connecting|#]
            ;|connected_user_database_driver|#]
    login_successful
    StandardWrapperValve[PropiedadesWebService]: PWC1406: Servlet.service() for servlet PropiedadesWebService threw exception
    javax.servlet.ServletException
            at com.sun.enterprise.webservice.NewJAXWSServlet.doPost(NewJAXWSServlet.java:130)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:246)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
            at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:619)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.processNonBlocked(DefaultProcessorTask.java:550)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:780)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:251)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:205)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
            at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:103)
    Caused by: javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
    - with linked exception:
    [javax.xml.bind.JAXBException: java.util.Vector nor any of its super class is known to this context]
            at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:248)
            at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:124)
            at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:91)
            at com.sun.xml.ws.encoding.CodecFacade.encode(CodecFacade.java:170)
            at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:182)
            at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:223)
            at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:97)
            at com.sun.enterprise.webservice.NewJAXWSServlet.doPost(NewJAXWSServlet.java:125)
            ... 32 more
    Caused by: javax.xml.bind.MarshalException
    - with linked exception:
    [javax.xml.bind.JAXBException: java.util.Vector nor any of its super class is known to this context]
            at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:246)
            at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:64)
            at com.sun.xml.bind.api.Bridge.marshal(Bridge.java:96)
            at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:239)
            ... 39 more
    Caused by: javax.xml.bind.JAXBException: java.util.Vector nor any of its super class is known to this context
            at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:223)
            at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:238)
            at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:587)
            at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:29)
            at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:132)
            at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:101)
            at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:286)
            at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:619)
            at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:241)
            ... 42 more
    Caused by: javax.xml.bind.JAXBException: java.util.Vector nor any of its super class is known to this context
            at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:477)
            at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:582)
            ... 48 more
    |#]I try to connect a mysql database.
    I write the code source.
    propiedades.java
    package org.aae.jose;
    import java.io.Serializable;
    import java.math.BigDecimal;
    import java.util.Date;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    import javax.persistence.Temporal;
    import javax.persistence.TemporalType;
    * @author daniel
    @Entity
    @Table(name = "propiedades")
    public class Propiedades implements Serializable {
        @Id
        @Column(name = "Referencia", nullable = false)
        private String referencia;
        @Column(name = "referenciacliente", nullable = false)
        private String referenciacliente;
        /** Creates a new instance of Propiedades */
        public Propiedades() {
        public Propiedades(String referencia) {
            this.referencia = referencia;
        public String getReferencia() {
            return this.referencia;
        public void setReferencia(String referencia) {
            this.referencia = referencia;
        public String getReferenciacliente() {
            return this.referenciacliente;
        public void setReferenciacliente(String referenciacliente) {
            this.referenciacliente = referenciacliente;
        public int hashCode() {
            int hash = 0;
            hash += (this.referencia != null ? this.referencia.hashCode() : 0);
            return hash;
        public boolean equals(Object object) {
            if (object == null || !this.getClass().equals(object.getClass())) {
                return false;
            Propiedades other = (Propiedades)object;
            if (this.referencia != other.referencia && (this.referencia == null || !this.referencia.equals(other.referencia))) return false;
            return true;
        public String toString() {
            //TODO change toString() implementation to return a better display name
            return "" + this.referencia;
    }Service Web
    package org.aae.jose;
    import java.util.List;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.jws.WebService;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.Name;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.Persistence;
    import javax.persistence.PersistenceContext;
    import javax.transaction.UserTransaction;
    * @author daniel
    @WebService()
    @PersistenceContext(name="persistence/LogicalName", unitName="WebAAE")
    public class PropiedadesWebService {
        /* Sample Web Service Operation */
        @WebMethod(operationName="sample_operation")
        public String operation(@WebParam(name="param_name") String param) {
            // implement the web service operation here
            return param;
        EntityManager em;
        public PropiedadesWebService() {
            try {
                Context ctx = (Context) new InitialContext().lookup("java:comp/env");
                em =  (EntityManager) ctx.lookup("persistence/LogicalName");
                if (em == null) {
                    System.out.println("Em: es null");
                else {
                    System.out.println("Em: no es null");               
                // TODO:
                // em.persist(object);    utx.commit();
            } catch (Exception ex) {
    /*            Logger.getLogger(getClass().getName()).log(Level.SEVERE,"exception caught", e);
                throw new RuntimeException(e);*/
                ex.printStackTrace();
        @WebMethod()
        public List<Object> getPropiedades() {
            return em.createNativeQuery("Select propiedades.referenciaCliente FROM propiedades").getResultList();
        @WebMethod()
        public List<Object> getPropiedad(String ref) {
            return em.createNativeQuery("Propiedades.findByReferenciacliente", "referenciacliente").getResultList();
    }persistence.xml
    <?xml version="1.0" encoding="UTF-8"?>
        <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
          <persistence-unit name="WebAAE" transaction-type="JTA">
            <provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
            <jta-data-source>jdbc/aae</jta-data-source>
            <properties>
                <property name="toplink.plataform.class.name" value="oracle.toplink.essentials.platform.MySQL4Platform"></property>
            </properties>   
          </persistence-unit>
        </persistence>I am trying to connect me to a Mysql database.
    When i run the service getPropiedades() I get the error that I have shown before.
    Any idea?
    thank you very much

    Hello Alka,
    My bet is that somewhere another servlet is being configured with the name "InitializeServlet". I would suggest re-naming the servlet-name (and change it wherever else you are referring to it in web.xml) and give it a try.
    With WebLogic Portal, library modules are used which each come with their own web.xml file that gets "merged" into the one in your webapp, so it isn't always easy to see what servlets are being deployed.
    Kevin

  • Web service using an external api (WSDL)

    Hi,
    Need to use a web service from google. I have the wsdl file with me.
    1. Since I am not clear on web services - need a step - by - step procedure on how to use this wsdl file in a WDA app.
    WDSL link: http://api.google.com/GoogleSearch.wsdl
    2. I also need a really simple tutorial on how to use external web services so that i can implement more of them into my application.
    Thanks.

    hi ,
    check this link ,
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/244e7923-0a01-0010-5887-fe0b0c6dbb8d
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/30f1b585-0a01-0010-3d96-ad0ea291c4f9
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/db785a70-0701-0010-858c-eee0ec4fe1b3
    In Web Dynpro ABAP there is nothing special about calling a web service. Unlike WD Java, there are not dedicated model object types in WD ABAP. WD ABAP simply has the ability to interact with other ABAP development object types. You can call function modules, ABAP classes, even modules in old dynpro apps.
    So calling the webservice from ABAP therefore is just the process of generating the ABAP Proxy Class. This is the same process regardless of if you want to use this proxy class from WDA or any other type of ABAP development object. You can then call the proxy class from WDA just like any other type of ABAP class. There is a service wizard option in later support package levels that includes an option for ABAP Proxy classes - although it doesn't generate the proxy class it just generates the code and context for the call to an already existing proxy class. The service wizards in WD ABAP are not required however. They are just shortcut code generators and often can't even generate a complete context for a complex web service proxy - so expect to do some manual adjustment after running the wizard.
    Regards ,
    venkat .

Maybe you are looking for

  • Windows 8.1 Pro Non-Unicode Issue: CS6 Standard

    I use WIndows 8.1 Pro English, I installed the CS6 Standard in Spanish, I changed the language for the non-unicode programs to spanish but still cannot use the Illustrator, I am having issue only with the Illustrator, noting that in the installation

  • XFCE network monitor applet

    XFCE has this nice network monitor applet, in which you can set the colors of the incoming and outgoing bar. The only problem is that they don't seem to have any effect. Mine stay blue. I'm guessing the global color scheme is interfering somehow... A

  • How to set Date in RFC call.

    Hi, I am trying to set date in structure when calling RFC. ICall = function.getImportParameterList(); ICall.getStructure("IORDER").setValue(eDate,"EDATE"); EDATE is date field in Structure in RFC with data type "D" and it is taking date in "dd.mm.yyy

  • Disappointment with SAP B1Reports

    Hi, we are using SAPB1 for the last 1 year and i am really disappointed with the reporting quality SAP should not leave this critical portion to partners only , they should provide crystal reports of at least all legal reports , I have 3 different ve

  • Flash player sizes in game

    when i am playing yahoo games or some flashplayer games in facebook the game screen is very small, and when i control +/- the actual game screen size doesnt change but the box that the game is in will get bigger along with all the other texts and pic