Exposing Java method as Web service

Hello,
I would like to know how can I make a Java Method expose as a webservice using BPEL.
I have created a java class To do some processing. I want to make this as a service. Is there any sample code to do this? Please provide any links..

If you used the Web Service Wizard the easiest thing to do is:
1. Delete the WS class - when prompted also delete all artifacts - you should now see your original class files. *
2. Add extra methods.
3. Regenerate web service using same parameters as previously (make sure you use the same namespaces).
(4. Apply any customisations you made)
*Occasionally this will not work and will not remove the references to the WS artifacts from the project file, in this case you will need to manually remove them from the project xml file.
You can also edit the project to make the classes visible (can't remember the exact steps for this, it's been a while), change the classes and regenerate services, however this will overwrite any customisations you have made, so is little different to removing the artifacts and regenerating.
Finally you can make the classes visible as above, updatethem and then manually edit the other web service artefacts (<name>-java-wsdl-mapping.xml,webservices.xml, oracle-webservices .xml, Interface, etc). This is a lot more tedious than using autogeneration.

Similar Messages

  • Expose AM methods as web services

    Hi All,
    As searched results from the forum, most of posts talking about how to consume WS by generating java file from wsdl. My question is, can we expose an AM method as web services? If answer is yes, may I have some high level steps for following up?
    If we expose AM method as an web service, does that mean we have to pack all FND/OA classes in war file then deploy it into OC4J container?
    We are using an old AS and even don't have standalone OC4J server installed. Even I can install a standalone OC4J but I still don't know how to resolve above question.
    Thanks & Regards,
    KJ

    I have used Glue (http://www.themindelectric.com/products/glue/glue.html) to expose some of our stuff as Web Services. I recently found this on serverside. It's pretty good.
    http://www.theserverside.com/resources/article.jsp?l=Systinet-web-services-part-1
    I believe that the middleware they use can be plugged into IPlanet. There is also an article in the knowledge base on the IPlanet site.
    Jon

  • Exposing java class as web service

    Hi All,
    I have a requirement where I have to Expose a java class as web service u2013 In NWDS 7.0, we have a web service perspective where we can do this. But in 7.2, I could not find this perspective.
    And second requirement is to Consume web service in java class.
    Please help me ASAP.
    Thanks.

    Hi All,
    Waiting for some suggestions.
    Regards,
    Nishant

  • Unable to expose a method in web service

    Hi,
    My scenario is to expose a method in service. This method will take date as input & should return all the rows.
    To Implement this, I took employeeVO of HR DB(Employees Table) & created a ViewCriteria "GetEmpbyHireDate" with Hiredate as input param.
    & in AMImpl the code is
    public BaseEmployeeVOImpl getEmployeesByHireDate(Date hiredate){
    BaseEmployeeVOImpl baseEmployeeVO = (BaseEmployeeVOImpl) findViewObject("BaseEmployee1");
    baseEmployeeVO.setApplyViewCriteriaName("GetEmpbyHireDate");
    baseEmployeeVO.setNamedWhereClauseParam("pHireDate", hiredate);
    baseEmployeeVO.executeQuery();
    return baseEmployeeVO;
    The issue is I'm not able to see this method in "Available" list of Web Service Wizard.
    Help me in understanding what is missing ?
    Thanks in advance.
    P.S. from Jdev Help I understood that "Only methods with simple attributes as parameters and return types that are either void or view rows will appear in the list." & my method is returning rows of a EmployeeVO.

    Hi,
    2 comments:
    1) View Criteria can be directly exposed as find methods. Its on the last wizard page (just click the View Criteria tab). So no need for an Impl method
    2) If you wanted to expose a method, then the documentation I think is crystal clear: "oracle.jbo.server.ViewRowImpl or any subtype" Your method returns BaseEmployeeVOImpl (see the difference ?)
    Frank

  • Follow up to web services question:  How do I expose java components as web services on iPlanet 6.0 app server?

    My task - my company has several legacy PowerBuilder applications that access a variety of Sybase and MS SQL databases. Rather than re-inventing the wheel by re-writing these applications in Java, we would like to enable these applications to call java components (EJBs) that will provide new functionality. I would need a piece of software called CSXtend (from www.cynergysystems.com) to allow PowerBuilder to call a web service. However, I am not sure how to expose my business functions (EJBs) as web services on the iPlanet 6.0 App server. Thanks for all previous responses! Any additional info would be greatly appreciated! Mike

    I have used Glue (http://www.themindelectric.com/products/glue/glue.html) to expose some of our stuff as Web Services. I recently found this on serverside. It's pretty good.
    http://www.theserverside.com/resources/article.jsp?l=Systinet-web-services-part-1
    I believe that the middleware they use can be plugged into IPlanet. There is also an article in the knowledge base on the IPlanet site.
    Jon

  • Exception while exposing Application Module Methods as Web Service

    Hello Everyone,
    I am working on Jdeveloper 11.1.1.3.0 version and tried to expose one method of application module as web service. To do this, i used "Service Interface" tab of Application module within Jdeveloper and Jdeveloper had generated all interfaces, stubs, code for the Session bean required for web service. I am now trying to "Test Web Service" from the implementation class generated then i am getting this error in Weblogic deployment. Any help/pointers would be highly appreciated.
    I used another installation of Jdeveloper same version at my collegues desktop but getting the same error. Not sure, if this version of Jdeveloper is having issue in exposing application module as web service. I think that database related exception can be ignored as no database call is being made by the application.
    [Running application SalaryControlService on Server Instance IntegratedWebLogicServer...]
    [10:41:26 AM] ---- Deployment started. ----
    [10:41:26 AM] Target platform is (Weblogic 10.3).
    [10:41:27 AM] Retrieving existing application information
    [10:41:27 AM] Running dependency analysis...
    [10:41:27 AM] Deploying 2 profiles...
    [10:41:27 AM] Wrote EJB Module to C:\Documents and Settings\sacggupt\Application Data\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\SalaryControlService\ModelEJB.jar
    [10:41:28 AM] Wrote Enterprise Application Module to C:\Documents and Settings\sacggupt\Application Data\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\SalaryControlService
    [10:41:29 AM] java.lang.NullPointerException
    [10:41:29 AM]      at oracle.j2ee.ws.tools.wsa.jaxws.AssemblerProcessor.getClassNamesFromEjb(AssemblerProcessor.java:180)
    [10:41:29 AM]      at oracle.j2ee.ws.tools.wsa.jaxws.AssemblerProcessor.processEjb(AssemblerProcessor.java:149)
    [10:41:29 AM]      at oracle.j2ee.ws.tools.wsa.jaxws.JaxwsEjbAssembler.processEjb(JaxwsEjbAssembler.java:182)
    [10:41:29 AM]      at oracle.j2ee.ws.tools.wsa.jaxws.JaxwsEjbAssembler.ejbAssemble(JaxwsEjbAssembler.java:152)
    [10:41:29 AM]      at oracle.j2ee.ws.tools.wsa.cli.Processor.jaxwsEjbAssemble(Processor.java:630)
    [10:41:29 AM]      at oracle.j2ee.ws.tools.wsa.cli.Processor.execute(Processor.java:327)
    [10:41:29 AM]      at oracle.j2ee.ws.tools.wsa.cli.Processor.execute(Processor.java:230)
    [10:41:29 AM]      at oracle.j2ee.ws.tools.wsa.Main.mainNoSystemExit(Main.java:84)
    [10:41:29 AM]      at oracle.j2ee.ws.tools.wsa.Main.main(Main.java:49)
    [10:41:29 AM] WARNING: Error while processing ejb-jar.xml for ejb module at "C:\Documents and Settings\sacggupt\Application Data\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\SalaryControlService\ModelEJB.jar".
    [10:41:29 AM] INFO: Unable to load annotation weblogic.javaee.CallByReference for parsing. The annotation is ignored.
    [10:41:29 AM] INFO: Unable to load annotation weblogic.javaee.CallByReference for parsing. The annotation is ignored.
    [10:41:29 AM] INFO: GenericWSWarAnnotationListener.parseAnnotatedClass Adding Servlet Mapping with URL pattern /HrModuleService for annotated WebService class lt.andrejusb.model.server.serviceinterface.HrModuleServiceImpl
    [10:41:30 AM] WSA process exited with code 0
    [10:41:30 AM] Deploying Application...
    <Jan 3, 2011 10:41:31 AM IST> <Warning> <J2EE> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application SalaryControlService is not versioned.>
    <ServerMessages><warningMBeanRegisterError> Failed to register the web service Config MBeans for application: SalaryControlService endpoint: SalaryControlService the error is: oracle.as.jmx.framework.util.MissingConfigurationFileException: The configuration at URI "WEB-INF\oracle-webservices.xml" cannot be loaded.
    [10:41:36 AM] Application Deployed Successfully.
    [10:41:36 AM] The following URL context root(s) were defined and can be used as a starting point to test your application:
    [10:41:36 AM] http://10.176.162.16:7101/SalaryControlService
    [10:41:36 AM] Elapsed time for deployment: 9 seconds
    [10:41:36 AM] ---- Deployment finished. ----
    Run startup time: 9391 ms.
    [Application SalaryControlService deployed to Server Instance IntegratedWebLogicServer]
    Target URL -- http://localhost:7101/SalaryControlService/HrModuleService
    Edited by: LearningToFly on Jan 2, 2011 9:13 PM

    Hello,
    Is this resolved yet? The reason I am asking is that I'm getting the same error as yours. I am trying to run the StoreFront tutorial in JDeveloper 11.1.1.3 and here's what I got:
    [04:21:31 PM] ---- Deployment started. ----
    [04:21:31 PM] Target platform is (Weblogic 10.3).
    [04:21:32 PM] Retrieving existing application information
    [04:21:32 PM] Running dependency analysis...
    [04:21:32 PM] Deploying 4 profiles...
    [04:21:32 PM] Wrote MAR file to C:\Documents and Settings\ylin\Application Data\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\StoreFrontModule\metadata1.mar
    [04:21:33 PM] Wrote Web Application Module to C:\Documents and Settings\ylin\Application Data\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\StoreFrontModule\StoreFrontUIWebApp.war
    [04:21:38 PM] Wrote EJB Module to C:\Documents and Settings\ylin\Application Data\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\StoreFrontModule\StoreFrontServiceEJB.jar
    [04:21:40 PM] Wrote Enterprise Application Module to C:\Documents and Settings\ylin\Application Data\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\StoreFrontModule
    [04:21:41 PM] java.lang.NullPointerException
    [04:21:41 PM]      at oracle.j2ee.ws.tools.wsa.jaxws.AssemblerProcessor.getClassNamesFromEjb(AssemblerProcessor.java:180)
    [04:21:41 PM]      at oracle.j2ee.ws.tools.wsa.jaxws.AssemblerProcessor.processEjb(AssemblerProcessor.java:149)
    [04:21:41 PM]      at oracle.j2ee.ws.tools.wsa.jaxws.JaxwsEjbAssembler.processEjb(JaxwsEjbAssembler.java:182)
    [04:21:41 PM]      at oracle.j2ee.ws.tools.wsa.jaxws.JaxwsEjbAssembler.ejbAssemble(JaxwsEjbAssembler.java:152)
    [04:21:41 PM]      at oracle.j2ee.ws.tools.wsa.cli.Processor.jaxwsEjbAssemble(Processor.java:630)
    [04:21:41 PM]      at oracle.j2ee.ws.tools.wsa.cli.Processor.execute(Processor.java:327)
    [04:21:41 PM]      at oracle.j2ee.ws.tools.wsa.cli.Processor.execute(Processor.java:230)
    [04:21:41 PM]      at oracle.j2ee.ws.tools.wsa.Main.mainNoSystemExit(Main.java:84)
    [04:21:41 PM]      at oracle.j2ee.ws.tools.wsa.Main.main(Main.java:49)
    [04:21:41 PM] WARNING: Error while processing ejb-jar.xml for ejb module at "C:\Documents and Settings\ylin\Application Data\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\StoreFrontModule\StoreFrontServiceEJB.jar".
    [04:21:41 PM] INFO: Unable to load annotation weblogic.javaee.CallByReference for parsing. The annotation is ignored.
    [04:21:41 PM] INFO: Unable to load annotation javax.interceptor.Interceptors for parsing. The annotation is ignored.
    [04:21:41 PM] INFO: Unable to load annotation weblogic.javaee.CallByReference for parsing. The annotation is ignored.
    [04:21:41 PM] INFO: Unable to load annotation javax.interceptor.Interceptors for parsing. The annotation is ignored.
    [04:21:41 PM] INFO: GenericWSWarAnnotationListener.parseAnnotatedClass Adding Servlet Mapping with URL pattern /StoreFron
    Can someone help with this? Thank you in advance!
    Edited by: 834077 on Mar 5, 2011 6:28 AM

  • Expose a class method as web service

    hi ABAPers,
    is it possibile to expose a class method as web service? I would like to write a base class with common code, while derived classes implement specific application logic.
    I have both R/3 6.40 and Netweaver 7.0 kernels, so I'm interested in both.
    thank you.

    No, it is not yet possible.
    You can only create a web service for an RFC Function Module, Function Group or Business Object.
    You may create a RFC FM as a wrapper to your Class methods and create a web service on the RFC FM.
    Regards,
    Naimesh Patel

  • What the mechanism of the Java Proxy for Web Services in WLS 8.1

    Hi, all;
    I try to find out how the java proxy of web service in weblogic server 8.1
    works. Suppose I use the java Proxy of a WebSerice in a client application whatever
    whithin or outside the application of the web service, does the proxy actually:
    1. translate my java arguments objects in XML to create SOAP msg,
    2. then send the msg across the network, and web service also response SOAP msg,
    3. then proxy translate it into return value of the method call ?
    If that is true , the Java Proxy seems very inefficient, right?
    Can any body tell me how the proxy works ?
    regards,
    shannon

    Hi Shannon,
    The type of proxy I'm familiar with is at the http connection level and
    associated with the networking properties in the JDK, See:
    http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html
    Your question may be related to JWS proxies, See:
    http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/howdoi/howUseTheJavaProxyForAWebService.html
    You may want to ask this question in the workshop newsgroup.
    Hope this helps,
    Bruce
    shannon lee wrote:
    >
    Hi, all;
    I try to find out how the java proxy of web service in weblogic server 8.1
    works. Suppose I use the java Proxy of a WebSerice in a client application whatever
    whithin or outside the application of the web service, does the proxy actually:
    1. translate my java arguments objects in XML to create SOAP msg,
    2. then send the msg across the network, and web service also response SOAP msg,
    3. then proxy translate it into return value of the method call ?
    If that is true , the Java Proxy seems very inefficient, right?
    Can any body tell me how the proxy works ?
    regards,
    shannon

  • Benefits of exposing function module as web services

    Hi All,
    We are developing a case study about exposing function modules as web services.
    Those web services would be later used for integration to SAP box with a Java application.
    Kindly help me with the pros and cons of exposing function modules as web services when compared to SAP PI. Also please do quote some examples, wherever possible.
    Thanks,
    Varun

    Hi Varun,
    Pros--->
    1)Exposing FM as Web Services is indeed a good choice when you want service consumer to be platform and language independent.
    i.e it can be consumed by .Net, java or any other language.
    2) You are moving towards SOA
    3) Composing Business Process by concatenating different functional modules is easy.
    4) Complexity is less while consuming services Java, CAF etc.
    Cons----> Performance for Web Services is comparatively less than JCo .
    If you are bringing PI in between landscape, you are increasing one more layer of middleware which would also hit performance.
    The benefit which PI can give is monitoring your company wide integrations at one central point when you have huge systems.
    Hope this helps.
    Piyush

  • Exposing a process as web service on Oracle BPM 11g

    Hi!
    Does somebody know how can I expose a process as a web service on Oracle BPM 11g? How does it works?
    In the version 10.3, when we exposed a process as web service it always had 3 default methods: startSession, getInstanceStatus and discardSession, is it the same in the 11g version?
    Where can I found some info about it? Any tutorial?
    Thanks a lot!
    Ana

    Typically you would use a Message Start event to start the process in conjunction with a Message End event. This will allow your process to be called as an asynchronous web service.
    In the "Implementation" section for the start event, you specify the input parameters. You can specify "Define Interface" to directly define the interface, or use an existing interface from the BPM Catalog (the From Catalog option).
    For further details on the different event types and their use cases, refer to the modeling and implementation guide:
    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15176/toc.htm
    You can test the web service and examine the WSDL and endpoints by using FMW control (Enterprise Manager). In the menu on the left hand side: expand SOA -> SOA-Infra -> <Partition Name> -> Composite Name, then click the "Test" button at the top.

  • Exposing RFC as a Web Service

    Hello All,
    I am working on a SOAP to SOAP (Backend as ECC where I am exposing an RFC as Web Service). Once the Web service is generated for RFC and the WSDL is imported in PI, I can see that all the fields in different nodes become mandatory.
    Is it how normally Web Service for BAPI works or can this behaviour (mandatory / optional) be controlled ?
    Also when I execute the end to end scenario via SOAP UI, I don't get any error back but also neither get the Return table nor the Sales Order NO. I am using the BAPI BAPI_SALESORDER_CREATEFROMDAT2.
    Can it be because of no COMMIT (The BAPI uses external commit although this reason seems less likely as executing a RFC wo any commit atleast gives me a Sales Order no) ?
    How can this call be analysed in backend ECC system ? (As I assume that messages will not be visible in SXMB_MONI as explained by the Harald's thread below. I am currently in process of getting authorization of SOAMANAGER logs but wondering how it'll help?
    Thanking you in advance.
    SOAP to SOAP scenario: XML messages not visible in SXMB_MONI
    Cheers
    KanesI

    Hi,
    Please see the SOAP ststud..
    http://<host>:5<sys#>00/mdt/amtServlet
    also you might check any error logs.
    The error is because of invalid xml document. So check the validity of the xml message ie. after first mapping i.e Req mapping.
    For this you can refer this -
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    See the below links
    Also this blog may help you-/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
    Could not post a SOAP request  to the interface
    Message Servlet is in Status ERROR
    Error while posting messages to SOAP sender adapter SP 13
    http://localhost:50000/XISOAPAdapter/HelperServlet?action=FindChannel&channel=PartyA:SOAPService:soapchannel
    SOAP Adapter in PCK
    Regards
    Chilla..

  • Error in calling a method from Web services

    Hai Experts,
                    When i try calling a method in web services from webdyn pro its not being called, i get a error SAOPFAULTCODE: 1 . wat might be the problem? The thing i am working with is tat when a employee try to create a FTR(HCM : Travel), a check has to be done in web services and then allow certain employees to proceed and rest should get a error msg but, i could find all the employees r getting the same error msg . Please resolve this issue.
    Regards and thanks in advance,
    Srija.

    Hello,
    Add the line :
    SET_REPORT_OBJECT_PROPERTY(RAP,REPORT_DESNAME,'test.rdf');
    before
    VRAP:=RUN_REPORT_OBJECT(RAP);
    (Of course, 'test.rdf" is an example, replace it by the name of the reports who want to execute)
    Regards

  • Exposing Inbound Interfaces as Web Service

    Hi,
    when it comes to expose XI interfaces as web services, the XI documentation quotes:
    "Sie können sowohl von Outbound- als auch von Inbound-Message-Interfaces WSDL-Beschreibungen erzeugen."
    -> i.e. Inbound interfaces can be exposed as web services.
    But the web service definition wizard expects the quotation of an outbound interface. So am I right when I say that I always need an outbound interface? If yes, why is it possible to expose inbound interfaces???
    Cheers,
    Heiko

    Hi,
    no, inbound interfaces can only call web services
    that are exposed on some other web servers
    only outobund XI interfaces can be exposed as web services
    (in this case XI acts as a web server)
    and other applicaitons can call this outbound interface
    Regards,
    michal

  • Binding RESTful web service / being exposed to a RESTful web service

    Hi , I have two quick questions
    1. can ORACLE BPEL bind a RESTful web service?
    2. can a BPEL process be exposed to a RESTful web service?
    Thanks

    Bumping back to the top of the list.
    Has anyone got any experience with RESTful web services saving to an item vs. a collection? Any pointers are greatly appreciated.
    Earl

  • Exposing backend data as Web Service

    I have an RFC which takes in employee name as input and supervisor name as output.
    I want to expose this functionality as Web Service using NWDS. What should I do? Any good tutorial?

    Hi,
    Check this weblog, which mentions how to convert RFCs as Webservices
    Using RFC as WebService in WebDynpro
    Regards,
    Ganesh N

Maybe you are looking for

  • Image Processor Pro and Picture Processor load eps files without rasterizing them

    Hi. My name is Lucas. Im from Argentina, now living in Brazil. I have the problem that is in the title. Im new doing this stuff but reading a lot i discovered that both scripts open eps files and because they dont get reasterized, then saved files lo

  • Mapping Issue - Urgent

    Source <source> <Record> <Date>5/15/2008</Date> <DocType>ZL</DocType> <CompCode>1010</CompCode> <GL_Account>21300119</GL_Account> <Amount>14,357.83</Amount> </Record> <Date>5/5/2008</Date> <DocType>ZL</DocType> <CompCode>1020</CompCode> <GL_Account>2

  • How to create search help for Maintanence View

    Hi, I want to create a Search Help for a Maintanence View and bring Conditions in this Search Help. Condition can be as e.q. Show me only the Records with Status 2. How can I achieve this? Thanks. Best Regards Beserithan Malabakan

  • Connecting an external disk after ejection

    Is it possible to reconnect an external disk after being ejected?

  • HTML development in Oracle PLSQL

    Hello Gurus, I am new to HTML development in PLSQL. So, questions: 1) What is the difference between htp package and utl_http. 2) I have an external .html file. I want to launch that html page from Oracle middle tier (apache http server) How can I do