Any difference in creating a web service from a java class or session bean?

Hi,
The JDeveloper tutorial at http://www.oracle.com/technology/obe/obe1013jdev/10131/devdepandmanagingws/devdepandmanagingws.htm demonstrates creating a web service from a plain java class. I'm wondering:
- Is it possible to create a web service from a stateless session bean instead of a java class? If so, what's the proper way to do this in JDeveloper? When I tried doing so in JDeveloper 10.1.3.0.4 (SU5) using the J2EE Web Service wizard, the wizard did not list the session bean in the Component To Publish dropdown (it does list any java classes available in the project). I can proceed by manually typing in the name of the session bean. After the wizard completes though, the @Stateless annotation that had been in my session bean class code is removed and replaced by a @WebService annotation. The end result is that it looks like it made no difference whether I had tried to create the web service from a session bean or plain java class as the annotations in the resulting web service code are the same (although if I had started from a session bean, the class for the web service still implements the Local/Remote EJB interface that the session bean originally implemented).
- Assuming it's possible to create a web service from a stateless session bean, is there any advantage/disadvantage creating a web service from a java class vs a stateless session bean? I'm creating the web service from scratch so I also need to either build the java class or stateless session bean the web service would be based on from scratch too.
Thanks for any ideas about this.

Hi,
EJB Session beans (EJB 3.0) are deployed as WebServices by annotating the class with @WebService and the methds with @WebMethod (both tags require you to add the JSR-181 library to your project (available in the JDeveloper list of libraries)). Unlike the J2E WebService, the EJB session bean service is turned into a WebService upon deployment. This means you obtain teh WSDL file after deployment
- Assuming it's possible to create a web service from a stateless session bean, is there any advantage/disadvantage creating a web service from a java class vs a stateless session bean?
The difference is that EJB Session bean based web services are integrated with the J2EE container, which means that they can leverage container services like transaction handling, data sources, security, JMS etc.
Frank

Similar Messages

  • Create a web service from java bean and map exceptions to SOAP faults

    Hi,
    We have to expose our Session stateless EJB3 as web services. I've tried to use annotations and jdev wizard "java bean to web service" and it works fine.
    Our problem now is that our methods can throw a business exception that contains a list of error message strings to be presented on the client.
    I did not find any way to use annotations to make it build a wsdl with soap fault mapped to our exception class. Neither I could to make the wizard to create wsdl with faults.
    As we are exposing already designed and implemented classes as web services, I think the bottom-top (java->wsdl) approach is better that top->botton (wsdl->java). Therefore, I'm looking for a possibility to generate the web services from the java beans and have the exception be mapped to a soap fault message.
    We are using jdev 10.1.3.1 and OAS 10.1.3.1., is there a way to map exceptions to soap faults using bottom->top approach?
    thank you

    A couple of links that may be of help:
    http://www.netbeans.org/servlets/ReadMsg?listName=nbj2ee&msgNo=1218
    My last question concerning web services:
    I have already written a session bean and I'd like to add some methods
    as a web service to it, how do I do that?
    Or I can only create another bean for a webservice and cannot modify the
    original one?You might create web service with existing sources and select you bean. New web services with appropriate lookup method will be generated.
    All web service method, that will be exposed in web service, you
    should add itself (Pop-up menu Web Service -> Add operation)
    http://usersguide.netbeans.org/files/documents/40/73/Chapter9-WebServices.pdf

  • Parse errors while creating a Web service from Java class!

    Can anybody tell me please, is it possible to create a Web Service from java class where the input from user is required ?
    I have the following program, which is successfully compiled, but when I'm trying to make a web service in JDeveloper, the following error occurs:
    "Validation failed.
    The implementation class primePackage.isPrime ofport type MyWebService contains parse errors."
    import java.io.*;
    import java.util.*;
    class isPrime
    public static void main (String args[])
    Scanner reader = new Scanner(System.in);
    int n;
    System.out.println ("Enter a number you want to know is it prime or not");
    n=reader.nextInt();
    if (isPrime(n))
    System.out.println ("True");
    else
    System.out.println ("False");
    static boolean isPrime (int n)
    int i=2;
    while (i<=n-1)
    if (n%i==0)
    return false;
    i++;
    return true;
    }

    Hi,
    Can anybody tell me please, is it possible to create
    a Web Service from java class where the input from
    user is required ?Yes, the parameters of your method will be mapped in WSDL.
    But i've some considerations about your code.
    I suggest you change the name of isPrime do Prime, its a good code convention to put the name of class starting with Upper case. and isn't good the name of class equals to name of method.
    I suggest you to change the "static boolean isPrime (int n)" to "public boolean isPrime(int n)" to publish a method as a WebService method it's must be public and not static. After this change try to generate your Web Service.
    Regards.

  • Error when trying to create a web service from a wsdl file using jdeveloper

    Hello,
    I'm using the latest jdeveloper and jdk 6 update 20 on solaris sparc 10.
    When I'm trying to create a web service from a wsdl on the java EE 1.5 platform i get the following error:
    Validation failed:
    java.lang.NoSuchMethodException: com.sun.tools.xjc.generator.annotation.spec.XmlElementRefWriter.required(boolean)
    I've tried the endorsed mechanism with the latest jaxws-api.jar and jaxb-api.jar packages with no help.
    It works fine when i use the java EE 1.4 platform....
    The full Error description:
    oracle.jdeveloper.webservices.model.WebServiceException: Error creating model from wsdl "file:/vobs/NMS/NorthBoundIF/MTOSI/MTOSI_Documentation/DDPs/ResourceTroubleManagement/IIS/wsdl/AlarmRetrieval/AlarmRetrievalHttp.wsdl": java.lang.NoSuchMethodException: com.sun.tools.xjc.generator.annotation.spec.XmlElementRefWriter.required(boolean)
    +     at oracle.jdeveloper.webservices.model.java.JavaWebService.createPortTypes(JavaWebService.java:1635)+
    +     at oracle.jdeveloper.webservices.model.WebService.createServiceFromWSDL(WebService.java:2846)+
    +     at oracle.jdeveloper.webservices.model.WebService.createServiceFromWSDL(WebService.java:2611)+
    +     at oracle.jdeveloper.webservices.model.java.JavaWebService.setDescription(JavaWebService.java:745)+
    +     at oracle.jdevimpl.webservices.wizard.jaxrpc.topdown.TDJaxWsSpecifyWsdlPanel.setDescription(TDJaxWsSpecifyWsdlPanel.java:364)+
    +     at oracle.jdevimpl.webservices.wizard.jaxrpc.common.SpecifyWsdlPanel.buildModel(SpecifyWsdlPanel.java:1109)+
    +     at oracle.jdevimpl.webservices.wizard.jaxrpc.common.SpecifyWsdlPanel$5.run(SpecifyWsdlPanel.java:661)+
    +     at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:655)+
    +     at java.lang.Thread.run(Thread.java:619)+
    Caused by: oracle.jdeveloper.webservices.tools.WsdlValidationException: Error creating model from wsdl "file:/vobs/NMS/NorthBoundIF/MTOSI/MTOSI_Documentation/DDPs/ResourceTroubleManagement/IIS/wsdl/AlarmRetrieval/AlarmRetrievalHttp.wsdl": java.lang.NoSuchMethodException: com.sun.tools.xjc.generator.annotation.spec.XmlElementRefWriter.required(boolean)
    +     at oracle.jdevimpl.webservices.tools.wsa.WsaAdaptor.newWsdlValidationException(WsaAdaptor.java:825)+
    +     at oracle.jdevimpl.webservices.tools.wsa.WsaAdaptor.getSeiInfo(WsaAdaptor.java:515)+
    +     at oracle.jdeveloper.webservices.tools.WebServiceTools.getSeiInfo(WebServiceTools.java:523)+
    +     at oracle.jdeveloper.webservices.model.java.JavaWebService.getSeiInfo(JavaWebService.java:1741)+
    +     at oracle.jdeveloper.webservices.model.java.JavaWebService.createPortTypes(JavaWebService.java:1496)+
    +     ... 8 more+
    Caused by: oracle.j2ee.ws.common.tools.api.ValidationException: Error creating model from wsdl "file:/vobs/NMS/NorthBoundIF/MTOSI/MTOSI_Documentation/DDPs/ResourceTroubleManagement/IIS/wsdl/AlarmRetrieval/AlarmRetrievalHttp.wsdl": java.lang.NoSuchMethodException: com.sun.tools.xjc.generator.annotation.spec.XmlElementRefWriter.required(boolean)
    +     at oracle.j2ee.ws.tools.wsa.jaxws.JaxwsWsdlToJavaTool.getJAXWSModel(JaxwsWsdlToJavaTool.java:664)+
    +     at oracle.j2ee.ws.tools.wsa.WsdlToJavaTool.createJAXWSModel(WsdlToJavaTool.java:475)+
    +     at oracle.j2ee.ws.tools.wsa.Util.getJaxWsSeiInfo(Util.java:1357)+
    +     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)+
    +     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)+
    +     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)+
    +     at java.lang.reflect.Method.invoke(Method.java:597)+
    +     at oracle.jdevimpl.webservices.tools.wsa.Assembler$2$1.invoke(Assembler.java:218)+
    +     at $Proxy34.getJaxWsSeiInfo(Unknown Source)+
    +     at oracle.jdevimpl.webservices.tools.wsa.WsaAdaptor.getSeiInfo(WsaAdaptor.java:505)+
    +     ... 11 more+
    Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: com.sun.tools.xjc.generator.annotation.spec.XmlElementRefWriter.required(boolean)
    +     at com.sun.tools.xjc.generator.bean.field.AbstractField.getMRequired(AbstractField.java:186)+
    +     at com.sun.tools.xjc.generator.bean.field.AbstractField.annotateReference(AbstractField.java:209)+
    +     at com.sun.tools.xjc.generator.bean.field.AbstractField.annotate(AbstractField.java:164)+
    +     at com.sun.tools.xjc.generator.bean.field.AbstractFieldWithVar.createField(AbstractFieldWithVar.java:75)+
    +     at com.sun.tools.xjc.generator.bean.field.SingleField.<init>(SingleField.java:89)+
    +     at com.sun.tools.xjc.generator.bean.field.SingleField.<init>(SingleField.java:76)+
    +     at sun.reflect.GeneratedConstructorAccessor53.newInstance(Unknown Source)+
    +     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)+
    +     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)+
    +     at com.sun.tools.xjc.generator.bean.field.GenericFieldRenderer.generate(GenericFieldRenderer.java:64)+
    +     at com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(DefaultFieldRenderer.java:75)+
    +     at com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(BeanGenerator.java:751)+
    +     at com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(BeanGenerator.java:539)+
    +     at com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:241)+
    +     at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:181)+
    +     at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)+
    +     at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:251)+
    +     at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)+
    +     at oracle.j2ee.ws.common.tools.databinding.jaxb20.JAXB20TypeGenerator.generateJavaTypes(JAXB20TypeGenerator.java:117)+
    +     at oracle.j2ee.ws.tools.wsa.SchemaTool.genValueTypes(SchemaTool.java:186)+
    +     at oracle.j2ee.ws.tools.wsa.jaxws.JaxwsWsdlToJavaTool.getJAXWSModel(JaxwsWsdlToJavaTool.java:647)+
    +     ... 20 more+
    Caused by: java.lang.NoSuchMethodException: com.sun.tools.xjc.generator.annotation.spec.XmlElementRefWriter.required(boolean)
    +     at java.lang.Class.getMethod(Class.java:1605)+
    +     at com.sun.tools.xjc.generator.bean.field.AbstractField.getMRequired(AbstractField.java:184)+
    +     ... 40 more+
    Thanks,
    Roy.

    Guys,
    You are asking about an issue that was a pain in the nick for me few months ago. The problem is that you won't find mych help here as I figured out that Apex geeks here either did not do much webservices or ended up hating it as i do :) . This is an error that can be due many different reason, let me ask you this:
    1- Does your the other system you are trying to call through webservices using HTTPS ?
    2- If yes, did you create a valid oracle wallet for that https connection ?
    3- Make sure you are using the correct URL ( am sure you do, just double check )
    4- If using a proxy, then you have to define that in the web service reference creation page
    provide more info and I hope I can help you with this,
    Sam
    Please reward good answers by marking them correct or helpful!

  • SAP Cloud Application Studio Create Custom Web Service From Custom Business Object and Consume in External System

    Hi Experts,
    I have requirement to create custom business object and create Web Service for that and use in external system (SAP ECC / SAP CRM / Third Party).
    1) Is it possible to create custom object web service and used in external system ?
    2) When we create the Web service from custom business object what the necessary steps(action : Create , Read , Update) require?
    3) Sample Scenario :
    My Custom Business Object
    businessobject Custom_Integration {
      element EP_VAL1 : LANGUAGEINDEPENDENT_MEDIUM_Text;
      element EP_VAL2 : LANGUAGEINDEPENDENT_MEDIUM_Text;
      element IP_RES : LANGUAGEINDEPENDENT_MEDIUM_Text;
    I have created the Web Service using this custom business object.
    3) How i can use this web service in external system? what are the prerequisite steps in external system to consume this service in it?
    Please anyone have idea about this how to do this and how to achieve this using SDK and custom business object.
    Many Thanks
    Mithun

    Hello Mithun,
    Does this section in the documentation help you:
    SAP Cloud Applications Studio Help -> Developers Desktop -> Web Services
    The entry "Task -> Create a Web Service" describes how to create a Web Service on your own BO
    The entry "Task -> Test a Web Service" helps you how you can use it in a foreign tool / application.
    HTH,
       Horst

  • Issues in invoking a web service from a JAVA/BPEL client...

    We are trying to invoke a web service from a JAVA/BPEL client using org.apache.soap classes. But everytime we are running into issues of IllegalAccessError or InvalidClassError or IncompatibleClassError based on different jars we are trying to include in our project. Attached is a simple BPEL project which tries to invoke a web service through JAVA embedding (no supporting jars need to be included explicitly). It erros with following trace:
    Class org/apache/soap/Envelope violates loader constraints
         Invalid class: org.apache.soap.Envelope
         Loader: soap:10.1.3
         Code-Source: /slot/ems1508/oracle/product/10.1.3.1/OracleAS_1/webservices/lib/soap.jar
         Configuration: <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in /slot/ems1508/oracle/product/10.1.3.1/OracleAS_1/j2ee/home/oc4j.jar
         Dependent class: org.apache.soap.rpc.RPCMessage
         Loader: soap:10.1.3
         Code-Source: /slot/ems1508/oracle/product/10.1.3.1/OracleAS_1/webservices/lib/soap.jar
         Configuration: <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in /slot/ems1508/oracle/product/10.1.3.1/OracleAS_1/j2ee/home/oc4j.jar
    Could you please help us out or provide any pointers. Any help would be highly appreciated

    Because you weren't told what to get, perhaps you already have it eh?
    What you want to read up about is JAX-WS, which is the webservice API bundled by default with your JDK (Java 6 and up). You'll find the wsimport tool in the bin directory of your JDK. I recommend you explore that directory and read up about all the executables you can find there, to be more prepared in the future. Know the tools you work with and all that. Most tools have a manual on this website:
    http://www.oracle.com/technetwork/java/javase/tech/index.html
    (under tools and utilities). Not wsimport, that is part of the jax-ws documentation. Better you look for jax-ws tutorials using Google, it will be quicker.

  • Calling a soap web service from a java desktop application

    Hi,
    Does anyone know how to call a soap web service from a java desktop application? I've seen examples using Apache Axis, but it sounds like Axis needs to run on a web server and we are trying to avoid that. My initial thought was that, "of course we need a web server", but I'm wondering if there is a way to do this without a web server.
    Any help is greatly appreciated.
    thank you,
    Julie

    If you are the consumer you don't need any web server. The web server is only needed in the provider end.
    In java 6 there is a built in framework to call web services without the need of third parties (such as apache axis)
    take a look at:
    https://jax-ws.dev.java.net/guide/Developing_client_application_with_locally_packaged_WSDL.html
    http://java.sun.com/webservices/technologies/index.jsp
    For the provider end there is also a built in http server to expose web service via HTTP without the need to
    use any external web server.
    take a look at:
    http://java.sun.com/javase/6/docs/api/javax/xml/ws/Endpoint.html

  • Problems calling external Web Service from a Java Stored Procedure

    I'm using a sample code that I found here about calling external web services from a Java Store Procedure ( Credit Agency Web Service http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html ) but when I run it ,send this error. I dont know what can I do or what is missing. Please help me. Thanks.
    Error: Premature EOF encountered [java.io.EOFException] [SOAPException: faultCode=SOAP-ENV:IOException; msg=Premature EOF encountered; targetException=java.io.EOFException: Premature EOF encountered] at org.apache.soap.SOAPException.(SOAPException.java:77) at oracle.soap.transport.http.OracleSOAPHTTPConnection.send(OracleSOAPHTTPConnection.java:765) at org.apache.soap.rpc.Call.invoke(Call.java:261) at oracle.otnsamples.wsclient.CreditAgencyServiceStub.authorizeCustomer(CreditAgencyServiceStub.java:84) at Products.jspService(Products.jsp:120) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:139) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:795) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:794) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)

    I'm also facing problem in running the example on the page http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html
    I've Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 and Oracle Application Server 10g (10.1.3). When I executed the following command,
    loadjava -thin -user sys/password@localhost:1521:oradb -resolve -synonym -verbose -grant public %OC4J_HOME%/webservices/lib/soap.jar %OC4J_HOME%/lib/dms.jar %OC4J_HOME%/jlib/javax-ssl-1_1.jar %ORACLE_HOME%/lib/servlet.jar %OC4J_HOME%/j2ee/home/lib/mail.jar
    ... mentioned in step 3 under the "Configuring the Application" section on the above link, the process terminates with the following error
    The following operations failed
    class oracle/net/www/protocol/https/Handler: resolution
    class oracle/net/www/protocol/https/HttpsURLConnection: resolution
    class oracle/soap/client/ProviderManagerClient: resolution
    class oracle/soap/client/ServiceManagerClient: resolution
    class oracle/soap/providers/JavaProvider: resolution
    class oracle/soap/providers/ejbprov/EntityEJBProvider: resolution
    class oracle/soap/providers/ejbprov/StatefulEJBProvider: resolution
    class oracle/soap/providers/ejbprov/StatelessEJBProvider: resolution
    class oracle/soap/providers/sp/SpProvider: resolution
    class oracle/soap/server/http/SOAPServlet: resolution
    class oracle/soap/transport/http/OracleSOAPHTTPConnection$1: resolution
    class oracle/soap/transport/http/OracleSOAPHTTPConnection: resolution
    class org/apache/soap/messaging/Message: resolution
    class org/apache/soap/rpc/Call: resolution
    class org/apache/soap/rpc/RPCMessage: resolution
    class org/apache/soap/rpc/Response: resolution
    class javax/net/DefaultServerSocketFactory: creation (createFailed)
    class javax/net/DefaultSocketFactory: creation (createFailed)
    class javax/net/ServerSocketFactory: creation (createFailed)
    class javax/net/SocketFactory: creation (createFailed)
    class javax/net/ssl/DefaultSSLServerSocketFactory: creation (createFailed)
    class javax/net/ssl/DefaultSSLSocketFactory: creation (createFailed)
    class javax/net/ssl/HandshakeCompletedEvent: creation (createFailed)
    class javax/net/ssl/HandshakeCompletedListener: creation (createFailed)
    class javax/net/ssl/SSLException: creation (createFailed)
    class javax/net/ssl/SSLHandshakeException: creation (createFailed)
    class javax/net/ssl/SSLKeyException: creation (createFailed)
    class javax/net/ssl/SSLPeerUnverifiedException: creation (createFailed)
    class javax/net/ssl/SSLProtocolException: creation (createFailed)
    class javax/net/ssl/SSLServerSocket: creation (createFailed)
    class javax/net/ssl/SSLServerSocketFactory: creation (createFailed)
    class javax/net/ssl/SSLSession: creation (createFailed)
    class javax/net/ssl/SSLSessionBindingEvent: creation (createFailed)
    class javax/net/ssl/SSLSessionBindingListener: creation (createFailed)
    class javax/net/ssl/SSLSessionContext: creation (createFailed)
    class javax/net/ssl/SSLSocket: creation (createFailed)
    class javax/net/ssl/SSLSocketFactory: creation (createFailed)
    class javax/security/cert/Certificate: creation (createFailed)
    class javax/security/cert/CertificateEncodingException: creation (createFailed)
    class javax/security/cert/CertificateException: creation (createFailed)
    class javax/security/cert/CertificateExpiredException: creation (createFailed)
    class javax/security/cert/CertificateNotYetValidException: creation (createFailed)
    class javax/security/cert/CertificateParsingException: creation (createFailed)
    class javax/security/cert/X509Certificate: creation (createFailed)
    exiting : Failures occurred during processing
    I've checked the path to all the jar files.
    I tried to run the command again with system/password instead sys/password but then I got the following stacktrace:
    The following operations failed
    class oracle/net/www/protocol/https/Handler: resolution
    class oracle/net/www/protocol/https/HttpsURLConnection: resolution
    class oracle/soap/client/ProviderManagerClient: resolution
    class oracle/soap/client/ServiceManagerClient: resolution
    class oracle/soap/providers/JavaProvider: resolution
    class oracle/soap/providers/ejbprov/EntityEJBProvider: resolution
    class oracle/soap/providers/ejbprov/StatefulEJBProvider: resolution
    class oracle/soap/providers/ejbprov/StatelessEJBProvider: resolution
    class oracle/soap/providers/sp/SpProvider: resolution
    class oracle/soap/server/http/SOAPServlet: resolution
    class oracle/soap/transport/http/OracleSOAPHTTPConnection$1: resolution
    class oracle/soap/transport/http/OracleSOAPHTTPConnection: resolution
    class org/apache/soap/messaging/Message: resolution
    class org/apache/soap/rpc/Call: resolution
    class org/apache/soap/rpc/RPCMessage: resolution
    class org/apache/soap/rpc/Response: resolution
    exiting : Failures occurred during processing
    Thanks in advance for any useful help.
    -

  • HELP!!! Problem of Calling external Web Service from a Java Stored Procedur

    1.I read the topic on http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html about Calling external Web Service from a Java Stored Procedur.
    2.After I import .jar to Oracle what is required by the topic,som error occued.
    Like: ORA-29521: javax/activation/ActivationDataFlavor class not found,
    ORA-29545: badly formed class.
    3.These is not enough .jar required on the topic? What can I do for ORA-29545: badly formed class?
    Thany you!

    Try this
    Re: HELP! Loading Java Classes into Oracle ERROR

  • Can we create a Web Service from a Business Object??

    Hello All,
    Has anyone created a Web Service using a Business Object?
    When I am trying to create a Web Service in TM box, I can see that couple of options like Business Objects, Process Agents are disabled and rest like Consumer Group, Service Provider are enabled. Any idea why this is happening. Is this related to some configuration setting.
    Regards,
    Abhishek

    please elaborate in which environment or case you are creating Web Service from Business Object.As per my understanding we generally create web service through Wizard.
    Thanks
    Snehasish

  • Creating a Web Service from EJB 3.0 - J2SE 5.0 Collection mapping problem

    Hi,
    Apologies if this is the wrong forum, I'm not quite sure where it fits in.
    I have some Toplink JPA entity beans that I access through a session bean. I am then trying to create a web service based on the session bean by deploying it to a 10.1.3 application server. This is based on the documentation at http://download.oracle.com/docs/cd/B31017_01/core.1013/b28764/web_services002.htm#CHDJEDDH
    The two entity beans are like:
    public class Event {
    private java.util.List<EventDetail> eventDetailList;
    public Event() {
    public void setEventDetails(java.util.List<EventDetail> eventDetailList) {
    this.eventDetailList = eventDetailList;
    public java.util.List<EventDetail> getEventDetails() {
    return eventDetailList;
    public void addEventDetail(EventDetail eventDetail) {
    this.eventDetailList.add(eventDetail);
    public class EventDetail {
    public EventDetail() {
    The session bean has a method like:
    List<Event> listParents();
    When this is deployed to the application server I expected a complex type like ListOfEventDetail to be generated in the WSDL, as shown in http://download.oracle.com/docs/cd/B32110_01/web.1013/b28975/apptypemapping.htm#sthref966, and the Event complex type would have an element of ListOfEventDetail. Instead the Event complex type looks like this:
    <complexType name="Event">
    <sequence>
    <element name="eventDetails" type="ns1:list" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="EventDetail">
    <sequence/>
    </complexType>
    and ns1:list appears in a different schema:
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.oracle.com/webservices/internal/literal" targetNamespace="http://www.oracle.com/webservices/internal/literal" elementFormDefault="qualified">
    <import namespace="http://wsdl/"/>
    <complexType name="list">
    <complexContent>
    <extension base="tns:collection">
    <sequence/>
    </extension>
    </complexContent>
    </complexType>
    <complexType name="collection">
    <sequence>
    <element name="item" type="anyType" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    </schema>
    However, if I change the getters and setters for eventDetailList in Event to setDetails and getDetails like this:
    public void setDetails(java.util.List<EventDetail> eventDetailList) {
    this.eventDetailList = eventDetailList;
    public java.util.List<EventDetail> getDetails() {
    return eventDetailList;
    the WSDL is generated as I expected:
    <complexType name="EventDetail">
    <sequence/>
    </complexType>
    <complexType name="Event">
    <sequence>
    <element name="details" type="tns:ListOfEventDetail" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="ListOfEventDetail">
    <sequence>
    <element name="item" type="tns:EventDetail" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    After messing around with various combinations of things, it seems that if the getters and setters have more than just the initial capital letter the (eg getTheThings instead of getThings) the WSDL gets messed up. Does anyone have any ideas what is going on here?

    Using <autotype> and <source2wsdd> to generate what I need. Now WL seems happy.

  • Creating A Web Service from a Function Module in ERP2004

    I have searched for documentation on this without success.
    I would be grateful if anyone could point me in the direction of any documentation on this subject, how to do it and what infrastructure needs to be in place for it to work.
    Many Thanks
    David

    WAS640 makes the creation and consumption of web services very easy. Here is a help document to give you a step-by-step of how to create a web service in ABAP.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/37/01a7408f031414e10000000a1550b0/frameset.htm
    Hope this helps.
    Sudha

  • Creating a Web Service From an existing Java Project

    Hi folks,
    I'm new to web services and SAP Netweaver so I need to know if I can use my exisiting Java codes (not EJB's though) for creating web services and the WSDL. I've already gotten the codes working and all and just need to make them into web services and deploy them (plus give my WSDL).
    I've noticed in some samples that they used EJB's for creating new web services and I've been trying to find samples/steps on just creating webservices from exisitng java codes. I've been using AXIS but I've been told that creating web services using the Netweaver Developer Studio is rather easy.
    Thanks in advance!

    Hi Amol!
    Thanks for the link
    I was trying it out, but could you see if this was correct:
    I just made one simple java project (with one class file) and using the link you sent me and did just the step for using the web service Creation Wizard. I made it say Test service and got into the Web Services Explorer but it says it couldn't open my wsdl:
    IWAB0379E Unable to open http://localhost:50000/HelloBeanService/HelloBean?wsdl.
    IWAB0135E An unexpected error has occurred.
    WSDLException
    WSDLException: faultCode=OTHER_ERROR: http://localhost:50000/HelloBeanService/HelloBean?wsdl
    Did I miss a step?
    Thanks again!

  • How can I create a web Service from my Web Dynpro Application ?

    Hi,
    Kindly let me know How I could create a "Web Service" with my Web Dynpro DC project.
    Awaiting your responses.
    Regards,
    Mahesh

    Hi Mahesh,
          You can use the web services by creating the Model in web Dynpro
    And if you want to publish your own web service then you have to create a EJB module and publish as a web service.
    Thanks
    Ninad

  • How to create web service for a Java class in SAP NetWeaver Studio

    hi all,
    i am using SAP Netweaver Developer Studio.have created a normal java project and i want to create web service for one of the classes in this project. i used the  Web Service Creation Wizard to create a web service for this class. but it says there's no methods available for VI. all my methods in this class are public, what should i do?

    Hi,
    I guess there are other ways. But this is an easy way, if you find the right wizards.
    Besides this it is good practise to define interface methods so that session bean implement these interface methods, and thus seperate the interface from the implementation.
    In this approach you will need 3 projects:
    An enterprise application project (will contain EJB Module)
    An EJB Module project (will contain session bean)
    A Java project (contains code that implements the session bean methods)
    In my previous post I suggested to use a J2EE web mudule project. This was a mistake, it should be EJB module.
    But it should be possible to do it in another way. It is up to you.
    Good luck, Roelof

Maybe you are looking for