Service Method trouble

I'm having trouble calling upon a service Class method (Convert.java)i've created which:
1. Receives an Uppercase String
2. Converts the Uppercase String to a lowercase String.
3. Converts the now lowercase string into a single char.
4. Returns the char back to Main.java
Convert.java
    public class Convert {
    public static char con(String txt) {
    txt = txt.toLowerCase();
    char done = txt.charAt(0);
    return done;
}how would I send data to this service class method from a different module?

Are you asking how you'd invoke this method from a different class? You're using words with big connotations for what looks like a simple problem. It's not clear what you mean by "service method" other than just a static method, either.
If you want to invoke the method, just put the class name in front of it:
char c = Convert.con("Here is a string");Both the class and the method are public so you should have no trouble, unless you're using packages inconsistently.

Similar Messages

  • How to add a new filter in an existing web service method (BIWS - WEBI document)

    Hello Experts, we have 7 web service query's connected to a dashboard. Basically it is one WSDL URL and 7 Get Methods...Web service queries are BIWS (via WEBI document instance). There are filters setup for each of these web service methods.
    Recently there was a request to add 2 new fields to the webi document and also the 2 fields need to be included as filters in the 7 methods. I know there is an option to edit the method, but when i edit the method, i cannot find the 2 new fields in list to set as filters.Can anybody help me understand how to add filters to an existiing web service method? I do not want to delete the method and republish the block as web service.
    Any help will be great and points rewarded.
    Thank you
    Ann

    Hi Ann,
    The reason you are not able to see any of the new columns as a option to select in your web service block is because when you have published that block, they were not present. Add these two new objects in your block and publish it again. You will be prompted for duplication content. Select the highlighted block for duplicate and now you can see the new added objects in the filter option. Update and this will overwrite your published block. Please note, web services do appear to behave weirdly when used with dashboards so I request you to please try it in a separate test report first.
    Hope that helps.
    Regards,
    Tanisha

  • Error while executing the service - The service method not defined error

    Hi,
    I am using Oracle UCM Content server 11g. I have created a custom service using component wizard. I have provided class name and method correct in the service declarations. The method should return manipulated Revision Label value. I am executing the service as a direct service and not subservice from a resource file using the following command.
    <$executeService("servicename")$>
    The serice is getting called but I am getting the following error log
    Event generated by user 'weblogic' at host 'localhost:16200'. Unable to execute service Edit_Revision_Label and function generateRevLabelInfo.
    The service method 'generateRevLabelInfo' is not defined. [ Details ]
    An error has occurred. The stack trace below shows more information.
    !csUserEventMessage,weblogic,localhost:16200!$!csServiceDataException,Edit_Revision_Label,generateRevLabelInfo!$!csMethodNotDefined,generateRevLabelInfo
    intradoc.common.ServiceException: !csServiceDataException,Edit_Revision_Label,generateRevLabelInfo!$
    *ScriptStack Edit_Revision_Label
    Edit_Revision_Label,dDocName=3:generateRevLabelInfo,dDocName=
    at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2115)
    at intradoc.server.Service.buildServiceException(Service.java:2260)
    at intradoc.server.Service.createServiceExceptionEx(Service.java:2254)
    at intradoc.server.Service.createServiceException(Service.java:2249)
    at intradoc.server.ServiceRequestImplementor.handleActionException(ServiceRequestImplementor.java:1766)
    at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1716)
    at intradoc.server.Service.doAction(Service.java:477)
    at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1458)
    at intradoc.server.Service.doActions(Service.java:472)
    at intradoc.server.ServiceRequestImplementor.executeSubServiceCode(ServiceRequestImplementor.java:1322)
    at intradoc.server.Service.executeSubServiceCode(Service.java:3866)
    at intradoc.server.ServiceRequestImplementor.executeServiceEx(ServiceRequestImplementor.java:1200)
    at intradoc.server.Service.executeServiceEx(Service.java:3861)
    at intradoc.server.ServiceRequestImplementor.executeSafeServiceInNewContext(ServiceRequestImplementor.java:1231)
    at intradoc.server.Service.executeSafeServiceInNewContext(Service.java:3856)
    at intradoc.server.script.ServiceScriptExtensions.evaluateFunction(ServiceScriptExtensions.java:269)
    at intradoc.common.DynamicHtmlMerger.computeFunction(DynamicHtmlMerger.java:1430)
    at intradoc.common.DynamicHtmlMerger.evaluateGrammarElement(DynamicHtmlMerger.java:908)
    at intradoc.common.DynamicHtmlMerger.substituteVariable(DynamicHtmlMerger.java:623)
    at intradoc.common.DynamicHtml.substituteVariable(DynamicHtml.java:1394)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1110)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtml(DynamicHtml.java:991)
    at intradoc.common.DynamicHtmlMerger.outputDynamicHtmlPage(DynamicHtmlMerger.java:2007)
    at intradoc.server.Service.buildResponsePage(Service.java:1267)
    at intradoc.server.Service.doResponse(Service.java:2076)
    at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:802)
    at intradoc.server.Service.doRequest(Service.java:1890)
    at intradoc.server.ServiceManager.processCommand(ServiceManager.java:435)
    at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
    at intradoc.idcwls.IdcServletRequestUtils.doRequest(IdcServletRequestUtils.java:1343)
    at intradoc.idcwls.IdcServletRequestUtils.processFilterEvent(IdcServletRequestUtils.java:1715)
    at intradoc.idcwls.IdcIntegrateWrapper.processFilterEvent(IdcIntegrateWrapper.java:222)
    at sun.reflect.GeneratedMethodAccessor1173.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at idcservlet.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:87)
    at idcservlet.common.ClassHelperUtils.executeMethodEx(ClassHelperUtils.java:305)
    at idcservlet.common.ClassHelperUtils.executeMethodWithArgs(ClassHelperUtils.java:278)
    at idcservlet.ServletUtils.executeContentServerIntegrateMethodOnConfig(ServletUtils.java:1600)
    at idcservlet.IdcFilter.doFilter(IdcFilter.java:352)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    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 oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    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 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:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: intradoc.data.DataException: !csMethodNotDefined,generateRevLabelInfo
    at intradoc.server.Service.doCodeEx(Service.java:561)
    at intradoc.server.Service.doCode(Service.java:505)
    at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1643)
    at intradoc.server.Service.doAction(Service.java:477)
    at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1458)
    at intradoc.server.Service.doActions(Service.java:473)
    at intradoc.server.ServiceRequestImplementor.executeSubServiceCode(ServiceRequestImplementor.java:1323)
    at intradoc.server.Service.executeSubServiceCode(Service.java:3867)
    at intradoc.server.ServiceRequestImplementor.executeServiceEx(ServiceRequestImplementor.java:1200)
    at intradoc.server.Service.executeServiceEx(Service.java:3862)
    at intradoc.server.ServiceRequestImplementor.executeSafeServiceInNewContext(ServiceRequestImplementor.java:1231)
    at intradoc.server.Service.executeSafeServiceInNewContext(Service.java:3857)
    at intradoc.server.script.ServiceScriptExtensions.evaluateFunction(ServiceScriptExtensions.java:269)
    at intradoc.common.DynamicHtmlMerger.computeFunction(DynamicHtmlMerger.java:1430)
    at intradoc.common.DynamicHtmlMerger.evaluateGrammarElement(DynamicHtmlMerger.java:908)
    at intradoc.common.DynamicHtmlMerger.substituteVariable(DynamicHtmlMerger.java:623)
    at intradoc.common.DynamicHtml.substituteVariable(DynamicHtml.java:1394)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1110)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1227)
    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)
    at intradoc.common.DynamicHtml.outputHtml(DynamicHtml.java:991)
    at intradoc.common.DynamicHtmlMerger.outputDynamicHtmlPage(DynamicHtmlMerger.java:2007)
    at intradoc.server.Service.buildResponsePage(Service.java:1267)
    at intradoc.server.Service.doResponse(Service.java:2076)
    at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:802)
    at intradoc.server.Service.doRequest(Service.java:1890)
    at intradoc.server.ServiceManager.processCommand(ServiceManager.java:435)
    at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
    at intradoc.idcwls.IdcServletRequestUtils.doRequest(IdcServletRequestUtils.java:1346)
    at intradoc.idcwls.IdcServletRequestUtils.processFilterEvent(IdcServletRequestUtils.java:1715)
    at intradoc.idcwls.IdcIntegrateWrapper.processFilterEvent(IdcIntegrateWrapper.java:222)
    at sun.reflect.GeneratedMethodAccessor1173.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at idcservlet.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:88)
    at idcservlet.common.ClassHelperUtils.executeMethodEx(ClassHelperUtils.java:305)
    at idcservlet.common.ClassHelperUtils.executeMethodWithArgs(ClassHelperUtils.java:278)
    at idcservlet.ServletUtils.executeContentServerIntegrateMethodOnConfig(ServletUtils.java:1600)
    at idcservlet.IdcFilter.doFilter(IdcFilter.java:352)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    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:57)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    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:57)
    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:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Please let me know the suggestions and the resolution on the above issue
    Thanks in advance,
    Sarang

    Hirva wrote:
    Trying to get access to the sun convergence we get this error
    "Error while executing the service request : : Login to Mail Service failed " after a look around we found out that the problem was that some one had deleted the msg-admin-server user from the ldap.What else was "accidentally" deleted? Do you have audit logging enabled for Directory Server?
    but still doesnt work? where else should we look?Messaging Server also creates a msg-admin group ("cn=Messaging End User Administrators Group") which is used for Directory Server ACI purposes. You can see the entries that Messaging Server added during initial configuration by reviewing the *.ldif files under the following directory (MS7.0 32bit):
    /var/opt/sun/comms/messaging/install/Regards,
    Shane.

  • Handling deletions from vo via service method - how?

    If you create a hyperlink to delete a row (from a grid), i.e.
        &lt;a href="MyPage.do?event=RemoveNew&Arg0=&lt;c:out value='${Row.rowKeyStr}' /&gt;"&gt;Remove&lt;/a&gt;
    What do you do with this Row Key String? I'm reluctant to use a value (such as a PK ID#) as I like the transparency of the key string, and wouldn't really want the user issuing a URL and just changing the pk value and removing something else.
    So, do I:
    a) pass this rowKeyString to the service method, which I can't see how I can even look up anything in an appmodule based on a rowkeystring, I really need a oracle.jbo.Key, but creating a Key from a string is deprecated
    public void onRemoveNew( DataActionContext ctx )
           log.info(userName(ctx) + "onRemoveNew **** - START");
           try
              // grab rowKeyStr from from end hyperlink (Arg0)       
              String strRowKey = ctx.getHttpServletRequest().getParameter("Arg0");      
              AppModule am = getAppModule(ctx);
              am.removeRowbyRowKeyStr( strRowKey );
           catch ( JboException jex )
             au.logException( jex, log );
             throw jex;
           log.info(userName(ctx) + "onRemoveNew **** - END");
        } // onRemoveNewthe backend service method "stub" for now:
    public void removeRowbyRowKeyStr( String rowKeyStr )
        log.info(userName(ctx) + "removeRowbyRowKeyStr**** - START");
        // Since no navigation took place on front end, first let's find this row
        // what do I do with this rowKeyString
        // deprecated:    Key k = new Key( rowKeyStr );
        ViewObject vo = findMyViewObject();
        try
             Key k = new Key ( rowKeyStr, vo.getKeyAttributeDefs() );
             // proceed from here...
        catch ( Exception ex )
              au.logException( ex, log );
        log.info(userName(ctx) + "removeRowbyRowKeyStr**** - END");
    } // removeRowbyRowKeyStrb) issue the setcurrentrow in the front-end to get to the correct grid row, grab the pk column# of this row, then call the service method
    c) something altogether different than these ideas that escapes me right now, but is the preferred/best practice
    Thanks!

    You can use JboUtil.getRowFromKey(RowSetIterator rsi, String skey) to do the job.
    You can pass any ViewObject, RowSet, or RowSetIterator to the first argument, and your string key to the second argument.
    Out of curiosity, it's source code looks like this:
       static public Row getRowFromKey(RowSetIterator rsi, String sKey)
          Key key;
          try
             key = new Key(sKey, rsi.getRowSet().getViewObject().getKeyAttributeDefs());
          catch (Exception ex)
             ex.printStackTrace();
             return null;
          Row rows[] = rsi.findByKey(key,1);
          if (rows.length <= 0)
             return null;
          return rows[0];
       }

  • Calling Web Service Methods in  Web Dynpro

    1. Created a Bean with get & set methods..Created a portal Service around it
    2. Created a Web Service and checked the same using EP Web Checker
    3. Created a Web Dynpro app having two screens (First one for setting String value and second  for getting string value)
    4. Configured the Web Service in the model...I can see the Request and Response in the Context...Mapped the request to first view and Response to Second View
    How do I call the Web Service method to Set the Paramter and how do I extract the value from the response?
    Rgds

    Hello Gulshan,
    Did you check this:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on accessing an email web service - 6_0_.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on accessing the car rental web service - 7.htm
    Best regards, Maksim Rashchynski.

  • How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection

    How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection.
    I have a multiple rows on PDF form. All rows have 4 textfields. I want to submit the multiple rows data to a method defiened in webservice.
    Unable to retrieve the data in multiple rows within webservice method.

    Hi Paul,
    I'm now able to save the retrieved xml in a hidden text field and create dynamic table, and I'm able to fill this table from the XML, but the problem is that I could not find the correct way to loop on the xml, what I'm trying to say, the table will have number of rows with the data of the first row only, so can you tell me the right way to loop on the xml!
    this is my code
    TextField1.rawValue=xmlData.document.rawValue;
    xfa.datasets.data.loadXML(TextField1.rawValue, true, false);
    for(var i=0; i<count; i++)
    xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Num").rawValue = xfa.datasets.data.record.num.value;
    xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Name").rawValue = xfa.datasets.data.record.name.value;
    Table1.Row1.instanceManager.addInstance(true);
    Thanks
    Hussam

  • Web Service Method that returns an ArrayList

    Hi guys,
    I have to create a web service method that returns an ArrayList, but it's not working. My problem is:
    With the "@XmlSeeAlso" annotation, my client prints the result, but the ArryaList is not from java.util, it's from org.me.calculator so I can't use it.
    If I remove this annotation, I get no result, with this error message on Tomcat 6:
    [javax.xml.bind.JAXBException: class java.util.ArrayList nor any of its super class is known to this context.]
    I'm a newbie, and trying to understand web services (I read some posts here, but didn't get the point, from its answers), but this problem I just can't figure out how to solve....
    WEb Service
    package org.me.calculator;
    import java.io.Serializable;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    import java.util.*;
    import java.util.ArrayList;
    import javax.xml.bind.annotation.XmlSeeAlso;
    * @author eduardo.domanski
    @WebService()
    @XmlSeeAlso({java.util.ArrayList.class}) // With this, I can see the result on client, but, the ArrayList is an org.me.calculator.ArrayList class.... Strange...
    public class CalculatorWS {
        @WebMethod(operationName = "valores")
        public ArrayList valores(@WebParam(name = "a") int a,
                           @WebParam(name = "b") int b) {
            ArrayList teste = new ArrayList();
            ArrayList a1 = new ArrayList();
            a1.add(a);
            a1.add(b);
            ArrayList a2 = new ArrayList();
            a2.add(a+b);
            a2.add(a-b);
            teste.add(a1);
            teste.add(a2);
            return  teste; 
    }CLient
    package org.me.calculator.client;
    import java.io.*;
    import java.net.*;
    import java.util.ArrayList;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ClientServlet extends HttpServlet {
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Servlet ClientServlet</title>");
            out.println("</head>");
            out.println("<body>");
            out.println("<h1>Servlet ClientServlet at " + request.getContextPath() + "</h1>");
            try { // Call Web Service Operation
                org.me.calculator.CalculatorWSService service = new org.me.calculator.CalculatorWSService();
                org.me.calculator.CalculatorWS port = service.getCalculatorWSPort();
                // TODO initialize WS operation arguments here
                int i = 8;
                int j = -6;
                // TODO process result here
                ArrayList result = (ArrayList) port.valores(i, j);
                out.println("Result = " + result);
            } catch (Exception ex) {
                System.out.println(ex);
            // TODO handle custom exceptions here
            out.println("</body>");
            out.println("</html>");
            out.close();
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            processRequest(request, response);
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            processRequest(request, response);
    }THank you all,
    Eduardo
    Edited by: EduardoDomanski on Apr 23, 2008 4:40 AM

    I forgot to say that, when I try to return an ArrayList of an object, for example, ClassA, which is on the package org.me.classes, on my Server App, the ArrayList is returned, but the objects are from type org.me.calculator.ClassA. It should be from org.me.classes.ClassA, right?
    This package also exists on my client App, to use the object, but as the returned type is from another package, I can't even cast it. I tried some annotations @Xml... but it failed.
    Packages
    ServerApp
    org.me.calculator
    CalcWS.java
    org.me.classes
    ClassA.java
    Client App
    org.me.classes
    ClassA.java
    The return from my method should be an ArrayList of org.me.classes.ClassA, but when I print it, on client, it's from org.me.calculator.ClassA.
    Does anybody knows, or had the same problem?
    Thanks,
    Eduardo

  • Capturing the response received from the WCF web service method?

    Hi,
    I am trying to call a WCF web service method with input parameters in an xml file and then receive the returned output data by the web service as response into an xml file.
    So far I am able to call the webservice method successfully and not sure how to capture the response data. I am able to see the response data in the tracked message event using the query expression search at the BizTalk group root.
    I may be missing something simple in my orchestration(image at http://social.msdn.microsoft.com/Forums/getfile/535971)  ?
    Steps in my orchestration are,
    1) Receive the xml file with input parameters
    2) Send to webservice using WCF-BasicHttp transport type
    3) Receive response from web service
    4) Send to xml file
    Not sure how I can have 2 receive shapes in series there. I have seen few related posts in the forum but could not resolve.
    Could someone please correct me?

    Hi Rachit,
    Thanks for your quick response. My orchestration is similar to the one in that post. In your post at step 7, how you are able to set 'Activate property' of the receive shape to true? as its the 2nd receive shape in series.
    I am unable to post any images or links at the moment. My orchestration is posted at this link  http://social.msdn.microsoft.com/Forums/getfile/535971
    I am able to access  the above link using chrome.
    Yes,  I did use the Request/Response port to communicate with the web service.  I
    am looking to achieve similar to the one in your post.
    Thanks.

  • ORACLE ADF 11g /JSF TO  serviet (Service method) not invoking

    Hi,
    ORACLE ADF 11g /JSF TO serviet (Service method) not invoking
    My project name is : ComplProject
    inside the project im having 1 jsp say x.jsp
    work environment : (oracleADF 11g) jdev11 and weblogic server 10.3
    in x.jsp im displaying 1 go link -> when ever we click on GO link it should go to ComplServlet.java
    i tried like,
    FacesContext.getCurrentInstance().getExternalContext().redirect("/servlet/ComplServlet");
    the "ComplServlet" is an URL pattern in web.xml which points to servlet.
    but not working
    i pointed to faces-config.xml also , not working
    i tried to forward like
    FacesContext context = FacesContext.getCurrentInstance();
    ServletContext sContext = (ServletContext)context.getExternalContext().getContext();
    ServletRequest request = (ServletRequest)context.getExternalContext().getRequest();
    System.out.println("third line...............");
    HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();
    response.sendRedirect("/servlet/ViewDocument");
    sContext.getRequestDispatcher("/servlet/ViewDocument").include(request, response);
    brief
    (from jsf page) after clicking on GO LINK i need to redirect or control should go to servlet ->service method
    thanks in advance
    regards,
    sandeep

    Hi,
    i tried like,
    FacesContext.getCurrentInstance().getExternalContext().redirect("/servlet/ComplServlet");
    the "ComplServlet" is an URL pattern in web.xml which points to servlet.
    but not workingUse like following.
        public HttpServletRequest getServletRequest() {
            return (HttpServletRequest)facesContext.getExternalContext().getRequest();
        public redirect(String url){
           getServletRequest().sendRedirect(getServletRequest().getContextPath() + "/servlet/ComplServlet");
        }If you are using golink as frank suggested then use it like this.
    <af:goLink text="ComplServlet" destination="/servlet/ComplServlet"/>no need of using context when using goLink,
    Regards,
    Santosh.

  • Service method  of servlet  is called repetitively as response time is more

    Problem: when we try to retrieve data for a particular input, then the retrieve
    query takes longer time which is as expected i.e more than five minutes as our data ware house is large and the where clause is very complex. After 5 mins what happens is that the service
    method in the servlet call is made again and so the retrieve process as if it was
    triggered again,where as no one has triggered it. This happens every 5 mins and the overall
    process hangs forever.pl help if any answer
    thanks in adv.
    M.S.Chandrasekhar

    Hi ,
    Hello ,
    Try this code ,
    Class classObject = Class.forName("SecondServlet");
    SecondServlet servlet = (SecondServlet)classObject.newInstance();
    servlet.init(getServletConfig());
    System.out.println("Before calling the service() from TestServlet");
    servlet.service(req,res);
    servlet.destroy();
    Regards ,
    Venkat

  • Service method of servlet is called repeatedly by 9ias

    Problem: when we try to retrieve data for a particular input, then the retrieve
    query takes longer time which is as expected i.e more than five minutes as our data ware house is large and the where clause is very complex. After 5 mins what happens is that the service
    method in the servlet call is made again and so the retrieve process as if it was
    triggered again,where as no one has triggered it. This happens every 5 mins and the overall
    process hangs forever.pl help if any answer
    thanks in adv.
    M.S.Chandrasekhar

    Hi MS,
    My guess (and it can only be a guess, I'm afraid, based on the [lack
    of] information you have supplied) is that you are hitting some sort
    of timeout value, which is determined by a setting in one of your
    configuration files.
    So as Prasad has already mentioned, more information would help us
    to help you.
    Good Luck,
    Avi.

  • DoGet() and service() method differences in servlets

    can you give the differences between doGet() and service() methods in servlets. where to use doGet() and where to use service()
    thanks

    service() is called whenever the Servlet gets a HTTP request. Per default it calls the correct do<METHOD>() method.
    So doGet() is only called when you get a GET request via HTTP. For POST (for example) doPost() will be called instead.

  • How to test swaref web service method

    My simple web service method:
         @WebMethod
         @XmlAttachmentRef
         public DataHandler getFile() {
              FileDataSource file = new FileDataSource("c:\\1.gif");
              DataHandler handler = new DataHandler(file);
              return handler;
    the generated wsdl codes:
    *<xs:complexType name="getFileResponse">*
    *<xs:sequence>*
    *<xs:element minOccurs="0" name="file" type="swaRef:swaRef" />*
    *</xs:sequence>*
    *</xs:complexType>*
    I always use Eclipse web service explorer to test web service, but it doesn't support swaref web service method.
    Then I use axis WSDL2JAVA to generate web service client, but the generated "getFile" return type is not "DataHandler", but "org.apache.axis.types.URI".
    How to test swaref web service method?
    Thanks
    Edited by: tomsonxu on Jan 8, 2008 7:40 AM
    Edited by: tomsonxu on Jan 8, 2008 7:41 AM

    Hello..
    How did u develop the webservice?
    I mean did u develop the Webservice using Enter prise Java Bean....
    Wrap EJB in ear and deploy to the Server and now u can test the EJB method
    whether it is working fine or not
    Try these -
    http://help.sap.com/saphelp_nw04s/helpdata/de/f7/af60f2e04d0848888675a800623a81/frameset.htm
    Inorder to use the webservice in the Webdynpro, normally we will use the WSDL of webservice
    and Import  the model using any one of them
    After importing as model we can use the EJB methods!
    Try it !!
    Thanks
    Shravan

  • Web service Method not supported

    Hy, i have this serious problem.
    I have any web service method  that in , Visual Composer 7.1, have the suffix "Not supported".
    I don't understand this situation because i can test it on web service navigator with success.
    This is the SOAP request/response from Web service navigator test:
    SOAP request:
    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SOAP-ENV:Body>
        <pns:getMaterialDetail xmlns:pns="urn:WsMaterialGetDetailVi">
          <pns:matnr/>
          <pns:werks/>
        </pns:getMaterialDetail>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    SOAP response:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SOAP-ENV:Body>
        <rpl:getMaterialDetailResponse xmlns:rpl="urn:WsMaterialGetDetailVi">
          <rpl:Response xmlns:pns="urn:it.futura.lib.ws">
            <pns:returnCode>3</pns:returnCode>
            <pns:returnCodeDescription>Codice Materiale non fornito</pns:returnCodeDescription>
            <pns:returnCodes xmlns:tns="java:sap/standard" xsi:type="tns:Vector">
              <tns:Vector xsi:type="xs:string">0</tns:Vector>
              <tns:Vector xsi:type="xs:string">0</tns:Vector>
              <tns:Vector xsi:type="xs:string">3</tns:Vector>
            </pns:returnCodes>
            <pns:returnCodesDescription xmlns:tns="java:sap/standard" xsi:type="tns:Vector">
              <tns:Vector xsi:type="xs:string">Environment name found: NVP</tns:Vector>
              <tns:Vector xsi:type="xs:string">Dettagli ambiente trovato: NVP</tns:Vector>
              <tns:Vector xsi:type="xs:string">Codice Materiale non fornito</tns:Vector>
            </pns:returnCodesDescription>
          </rpl:Response>
        </rpl:getMaterialDetailResponse>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Sincerely yours
    Thank's
    Andrea Maraviglia

    Thank's Shay. I'm thinking that the problem is about NWDS for this reason: at the moment i am testing a standard web service present on WAS( http://serverWAS:53000/IciUserService/IciUserConf?wsdl)that with a method ( getAttributes) that return an array of classes on VC and this test is ok.
    So i'm creating an similar web service that return array of classes with my NWDS (vers. 7.0.7..) and wizard but on VC it's don't supported.
    The SOAP Response of standard web service and my web service, have different structure. I'm thinking that the problem is NWDS because the SOAP response is function of the WSDL generated by Wizard on NWDS.
    Thank's in advance.
    Andrea Maraviglia
    Edited by: Andrea Maraviglia on Nov 28, 2008 5:46 PM

  • Calling a service method from a DataAction

    Hello!
    I'm trying to call a service method from a DataAction, cobbling ideas from the Oracle JDeveloper 10g Handbook and the Oracle ADF Data Binding Primer.
    I have created a service method and exposed it using the client interface node of the application module editor. It is called "process()" and it now appears in the data control palette under MyAppDataControl->Operations (just above the built-in action bindings Commit and Rollback). As part of this procedure, I modified MyAppImpl.java and put the process() method there.
    I don't want to call process() by dragging and dropping it onto a Data Action because depending on the outcome, I want to branch to different pages. process() returns an int that will tell me where to branch. Thus, I am trying to call it from an overridden invokeCustomMethod() method of the lifecycle of a DataAction, where I can get the int, create a new ActionForward, and set it in the DataActionContext. (If I'm barking up the wrong tree, let me know!)
    So, I need to call MyAppImpl.process() from within the invokeCustomMethod() method of my DataAction. Looking at the class declaration, I noticed that it extends ApplicationModuleImpl. I figure that, if I can get the ApplicationModule, I can cast it to MyAppImpl and call the process() method. Unfortunately, that doesn't work. When I got the application module, I checked the class and it's oracle.jbo.common.ws.WSApplicationModuleImpl. I tried casting it and got a class cast exception.
    Here's the code I'm using:
    protected void invokeCustomMethod(DataActionContext actionContext) {
    BindingContext ctx = actionContext.getBindingContext();
    DCDataControl dc = ctx.findDataControl("MyAppDataControl");
    log.debug("invokeCustomMethod(): dc.getClass().getName()=" + dc.getClass().getName()); // result is: oracle.jbo.uicli.binding.JUApplication
    ApplicationModule am = null;
    MyAppImpl myAppImpl = null;
    int processResult = 0;
    if (dc instanceof DCJboDataControl) { // this is true
    am = dc.getApplicationModule();
    log.debug("invokeCustomMethod(): am.getClass().getName()=" + am.getClass().getName()); // result is: oracle.jbo.common.ws.WSApplicaitonModuleImpl
    if (am instanceof ApplicationModuleImpl) { // this is false
    log.debug("invokeCustomMethod(): am is an instanceof ApplicationModuleImpl.");
    if (am instanceof MyAppImpl) { // this is false
    log.debug("invokeCustomMethod(): am is an instanceof MyAppImpl.");
    processResult = ((MyAppImpl)am).process();
    log.debug("invokeCustomMethod(): processResult=" + processResult);
    super.invokeCustomMethod(actionContext);
    What am I doing wrong? Can anyone explain the different class hierarchies and why my application module isn't the class I'm expecting?
    Thanks,
    -Anthony Carlos

    Georg,
    it was in the javadoc of oracle.adf.model.binding.DCBindingContainer
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/vtTopicFile.bc4jjavadoc36%7Crt%7Coracle%7Cadf%7Cmodel%7Cbinding%7CDCBindingContainer%7Ehtml/navId.4/navSetId._/
    However, I see it's not the case in other sub-classes of JboAbstractMap like DCControlBinding and DCDataControl.
    Weird... I'm keeping you informed if I find more information.
    Regards,
    Didier.

Maybe you are looking for

  • Error 7 occurred at open/create/replace file

    Hello, I have searched the forum and could not find any useful information regarding my problem, so hope you may shed some light. MyVI can create a new csv (text) file by using the time to name the file, so every time the new file will be created wit

  • Bad bind variable error in oracle forms 10g

    i have a created a table in oracle database 10g create table myimage(image_id number, image_name BLOB); i want insert an image and retrieve an image through programing(don't want block level) in oracle forms 10g without using java beans(and finely wo

  • T22 Faint/Dim Screen

    I have a T22 that works fine except the screen is VERY dim and can hardly be seen. It shows a very faint picture. Any ideas as to what may be the problem? I found some post mentioning a bad "inverter". I have an external LCD monitor connected and wor

  • Errors with the global conversion rule for the field 0SOURSYSTEM.

    Hello Gurus,     We are implementing CRM Activities. I enhanced the data source and when I add new info objects to 0SAL_DS01 DSO and trying to activate I'm getting there errors. Can some one please help me out in this problem? Error in global convers

  • Iv edited a contact number but still seemed to be saved in my phone as other when iv deleated contact

    I have edited a contact in my phone book and when I got to send a txt that edited number still appears in a list under the contacts name but at the side it says Other.. How can u delete these numbers???