Invoking a web service from a java code

Hello
I created a simple Web service using JDevlper. It contains two methods
1) getInf int () {
return inf;}
2) void setInf (int a) {
inf = a;}
I have deployed it on Oracle Application server. By inserting the address in a browser, I tried both methods and it works correctly.
Here I am looking how to invoke this web service using a java client and use the method setInf (5 ) / * for example * /.
I search but I have not found an answer that works :(. I hope you could help me to solve this problem.
Thank you in advance

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.

Similar Messages

  • 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.

  • Invoking Asynchronous Web Service from BPEL Process

    Hi,
    I have been working on the BPEL Process Manager for some time and now facing problem in invoking asynchronous web service from a BPEL Process. I have implemented a web service in Java using Axis but wasn't able to invoke it.
    I have gone through all the meterial available on this site but couldn't get any great help.
    Can some one help me in resolving this issue. A pointer to any example or sample material/tutorial will be appreciated.
    thanks
    Farooq

    I do the same thing.
    Take wsdl from axis and save it somewhere.
    Then you can create a standard project in Oracle BPEL PM. Create partnerlink, give a name and click on first icon to take your wsdl. It will add some needed code, you answer always yes. Then you can create receive, assign, invoke, assign and callback or similar and deploy it.
    Try it through BPEL Console...
    Ema

  • How to invoke a proxy service from a java client

    Hi all,
    how could I invoke a proxy service from a java client ?
    The proxy service type is 'any xml service' with http protocol.
    For a proxy with web service type I can export the related WSDL and generate the java client source.
    With 'any xml service' there is no associated wsdl and I'm wondering how to do that.
    Thanks
    ferp

    Hi Ferp,
    I used ClientGEN to generate client files from WSDL deployed in ALSB. You can also use Axis for client file generation.
    You need to know the WSDL URL. Generate Client files from WSDL URL.
    Sample ANT Script
    <project name="simple-web" default="mytask" basedir=".">
    <taskdef name="clientgen" classname="weblogic.wsee.tools.anttasks.ClientGenTask" classpath="C:\bea92\weblogic92\server\lib\weblogic.jar"/>
    <target name="mytask" description="Generate web service client">
              <clientgen wsdl="http://<hostname>:<port>/URL?WSDL"
         destDir="src"
         packageName="com.client.mytask"
         classpath="${java.class.path}" />
         </target>
    </project>
    Use the following JAVA Code,
    try {
         ActivationService service = new ActivationService_Impl("http://<hostname>:<port>/url?WSDL");
    client = service.getActivationServicePort();
    } catch (Exception ex) {
    // Handle Exception
    client.activateNumber();
    Let me know if you need any more information.
    Thanks,
    Suman.

  • 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.
    -

  • Problem invoking a web service from soa11g BPEL.

    Hi ,
    I am trying to invoke a web service from soa bpel 11g composite.
    We have the wsdl, wsdl URL of the web service along with the user name , password credentials.
    Initially w/o any WS policy attached and testing the composite, it fails with the below message
    *<fault>*
    *<bpelFault>*
    *<faultType>0</faultType>*
    *<remoteFault>*
    *<part name="summary">*
    *<summary>An Authentication object was not found in the SecurityContext</summary>*
    *</part>*
    *<part name="detail">*
    *<detail>javax.xml.ws.soap.SOAPFaultException: An Authentication object was not found in the SecurityContext</detail>*
    *</part>*
    *<part name="code">*
    *<code>soap:Server</code>*
    *</part>*
    *</remoteFault>*
    *</bpelFault>*
    *</fault>*
    *<faultType>*
    *<message>0</message>*
    *</faultType>*
    *</messages>*
    So I have gone back to the composite and added the WS policy (oracle/wss_username_token_client_policy) by Right clicking on web service -> Configure WS Policy -> Security -> oracle/wss_username_token_client_policy -> OK.
    After this I have added the following binding properties 'oracle.webservices.auth.username' , 'oracle.webservices.auth.password' with the respective values and deployed it again.
    Even then I face the same issue. I have looked into the EM console and found the HTTP username and password properties were blank for this Web service even though the WS policy was attached.
    Later I have tried editing the username pwd from the EM console, only to find out that the composite was now failing in the previous step (an ordinary db adapter with a select statement) even before it reaches the web service invocation.
    If I redeploy the composite, the http username and pwd properties in the EM console are erased and when i test it, it errors out at the web service invocation with the same issue again.
    Any pointers on how to solve this issue ??
    How can I figure out what is the security policy the web service is using ??
    Regards,
    Shiva Kiran

    Hi,
    Can anyone help me with this ??
    I guess I am not able to send the authorization credentials via the request to the web service invocation.
    Plz help ! This is a bit urgent..
    Regards,
    Shiva Kiran

  • 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

  • Invoking a web service from jcd

    hi all,
    Is there any built-in class in CAPS5.1 for invoking a web servervice from jcd directly. Or is there any some other automation/mechanism to achieve the same, plz provide me any sample code avilable for the same.its very urgent for me.
    Thanks

    Hello rss,
    If you want to invoke a web service from a JCD you will have to build the SOAP message using JAX-RPC or AXIS and then programmatically creat an HTTP connection.
    Or you can leverage the HTTP(S) eWay and then you only have to build the SOAP message.
    Or use eInsight. You can import a WSDL into eInsight and eInsight will offer you a business process Activity to invoke the web service operations defined in the WSDL.

  • Invoking a Web Service from a mobile application

    Hi all,
    I have installed Sun Wireless Toolkit 2.5.2 for CDLC and MTJ.
    I want to invoke a web service from an MTJ Application and I have not a clue of how to start.
    First let me say I am working with RSA (which is over Eclipse)
    My first attempt was creating the web service client and then try to convert it into a mobile application (through the use of MTJ --> Convert to Midlet Project)
    I found 4 errors when doing so:
    First was solved changing the jre to 1.6.
    I am still dealing with the following three:
    * Error preverifying class mipaquete.MiServicioService
    java/lang/NoClassDefFoundError: javax/xml/ws/Service
    * Error preverifying class mipaquete.ObjectFactory
    VERIFIER ERROR mipaquete/ObjectFactory.createMiOperacion(Lmipaquete/MiOperacion;)Ljavax/xml/bind/JAXBElement;:
    Illegal type in constant pool
    * Type mipaquete.MiServicioPortProxy$Descriptor Error preverifying class mipaquete.MiServicioPortProxy$Descriptor
    VERIFIER ERROR mipaquete/MiServicioPortProxy$Descriptor.getDispatch()Ljavax/xml/ws/Dispatch;:
    Illegal type in constant pool
    I only started to solve the first one. I assumed that I have to add the right .jar to manifest file (please let me know if I am wrong). I tried to do by adding the textual classpath rt.jar, however I am not able to give it the right path:
    C:\Archivos de programa\IBM\SDP\runtimes\base_v7_stub\java\jre\lib\rt.jar (even though I split the too long sentence into two and I include an space at the beginning of the second, I still get an error when saving)
    I would appreciate any help
    A) to solve the existing problems
    or
    B) To create a web service client in an EclipseME application through any other method.
    Thank-you very much in advance,
    Guadalupe
    PS Any clue is welcomed!!

    Hello rss,
    If you want to invoke a web service from a JCD you will have to build the SOAP message using JAX-RPC or AXIS and then programmatically creat an HTTP connection.
    Or you can leverage the HTTP(S) eWay and then you only have to build the SOAP message.
    Or use eInsight. You can import a WSDL into eInsight and eInsight will offer you a business process Activity to invoke the web service operations defined in the WSDL.

  • How to call web-service using only java code

    Hello, how to call web-service using only java code. I can call it from BPM process or Web Dynpro Java Application, but if I need to call it from ejb component?

    I'm found answer:
    Java and SAP Portal blog: How to call web service from java code example

  • Invoking a web service from dynamic client in weblogic 7

    Is it possible to invoke a webservice from dynamic client in weblogic 7. Because i tried and it doesn't work. But it works with WL 8.1
    I don't see any samples on the net for weblogic 7.

    Hello rss,
    If you want to invoke a web service from a JCD you will have to build the SOAP message using JAX-RPC or AXIS and then programmatically creat an HTTP connection.
    Or you can leverage the HTTP(S) eWay and then you only have to build the SOAP message.
    Or use eInsight. You can import a WSDL into eInsight and eInsight will offer you a business process Activity to invoke the web service operations defined in the WSDL.

  • Invoking one web service from another web service

    Hi there,
    I want to invoke a web service lets say X. But befor sending parameters to this web service, what i want to do is first pass the parameters to a web service called Y and Y will decide wether to call X or not. In other words i want to invoke a web service from another web service.
    Its kind of urget so do the needful asap.
    Thanks

    Calling another webservice from within a webservice does not require anything special. The service (say svc1) that calls another service (svc2) will be a web svc client. So you will have to do the same steps for svc1 as you would do for any other web service client

  • How to invoke a Web Service from PL/SQL with Complex Type as  input.

    Hello,
    I am trying to invoke a web service from PL/SQL using the UTL_DBWS package.
    The web service expects a complex type as input (defined below):
    <xs:complexType name="MsgType">
    <xs:sequence>
    <xs:element name="sender" type="xs:string"/>
    <xs:element name="messageId" type="xs:string"/>
    <xs:element name="messageType" type="xs:string"/>
    <xs:element name="dateSent" type="xs:date"/>
    </xs:sequence>
    </xs:complexType>
    How to construct input to this in PL/SQL Procedure?
    Has any body tried this before?
    An exmaple will be helpful.
    Thanks

    Dear,
    I have read your article, it is useful for me. But I cannot Apply to my case. Please kindly help me. Thank you.
    When running, the error occurs:
    1:39:31 Execution failed: ORA-20000: soapenv:Server.userException - org.xml.sax.SAXParseException: Attribute name &quot;password&quot; associated with an element type &quot;user&quot; must be followed by the &apos; = &apos; character.
    My webservice Url: http://abc.com.vn:81/axis/ABC_WS_TEST.jws?wsdl
    I make PL/SQL (similiar as your example)
    FUNCTION INVOKESENDMT
    RETURN VARCHAR2
    AS
    l_request soap_api.t_request;
    l_response soap_api.t_response;
    l_return VARCHAR2(32767);
    l_url VARCHAR2(32767);
    l_namespace VARCHAR2(32767);
    l_method VARCHAR2(32767);
    l_soap_action VARCHAR2(32767);
    l_result_name VARCHAR2(32767);
    p_zipcode VARCHAR2(160);
    BEGIN
    --p_zipcode:='''TEST'' ; ''TEST'';''84912187098'';''84912187098'';''0'';''8118'';''1'';''000001'';''ThuNghiem'';''''';
    p_zipcode:='TEST';
    -- Set proxy details if no direct net connection.
    --UTL_HTTP.set_proxy('myproxy:4480', NULL);
    --UTL_HTTP.set_persistent_conn_support(TRUE);
    -- Set proxy authentication if necessary.
    --soap_api.set_proxy_authentication(p_username => 'TEST',
    -- p_password => 'TEST');
    l_url := 'http://abc.com.vn:81/axis/ABC_WS_TEST.jws';
    l_namespace := 'xmlns="' || l_url || '"';
    l_method := 'sendMT';
    l_soap_action := l_url || '#sendMT';
    l_result_name := 'sendMTResponse';
    l_request := soap_api.new_request(p_method => l_method,
    p_namespace => l_namespace);
    soap_api.add_parameter(p_request => l_request,
    p_name => 'user password sender receiver chargedflag servicenumber messagetype messageid textcontent binarycontent',
    p_type => 'xsd:string',
    p_value => p_zipcode);
    l_response := soap_api.invoke(p_request => l_request,
    p_url => l_url,
    p_action => l_soap_action);
    l_return := soap_api.get_return_value(p_response => l_response,
    p_name => l_result_name,
    p_namespace => l_namespace);
    RETURN l_return;
    END;

  • 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

  • [Best practice] How to call a service from custom Java code

    Hi all,
    I'm wondering what the best method is to call a standard service from custom Java code?
    In a specific situation iDoc script is extended with custom functions with a custom component. There's Java code mapping to these functions that is executing these functions. The iDoc script functions are called from a workflow entry script.
    In the Java code that runs when the custom iDoc functions are called, I want to call a standard Content Server service. I don't think that the m_service variable is available, so filling the binder and using m_service.executeService() probably isn't possible.
    Also, if it were possible (that is, if I want to call a standard service from my own custom service Java code), what would then be the best method to do so?
    Regards, Stijn

    Hi Sapan,
    Let me explain a bit further.
    I'm an UCM consultant trying to solve a problem that occured at a client when they installed the CS10gR35CoreUpdateBundle.
    Content items are entered into a Workflow when they are checked in. Part of one of the entry scripts of the a workflow step is that related content to the content item in the workflow is (re)submitted for conversion.
    To achive this, a custom component provides an iDoc script extension. This iDoc function (resubmitForConversion) is implemented in Java (the class extends ScriptExtensionsAdaptor).
    In this Java method, first the related content items are fetched. Then the service RESUBMIT_FOR_CONVERSION should be called for all dID's in of the related content.
    Thus, at a certain point in the custom Java code, a native Content Server service must be called. Of course the class of this Java code does not extend the Service class, so the m_service object isn't available.
    The thing is: before installed the 10gR35CoreUpdateBundle everything worked OK. This code was used to execute the service:
            Workspace workspace = CommonUtils.getSystemWorkspace();
            String cmd = binder.getLocal("IdcService");
            if (cmd == null) throw new DataException("!csIdcServiceMissing");
            ServiceData serviceData = ServiceManager.getFullService(cmd);
            if (serviceData == null) throw new DataException(LocaleUtils.encodeMessage("!csNoServiceDefined", null, cmd));
            Service service = ServiceManager.createService(serviceData.m_classID, workspace, null, binder, serviceData);
            UserData fullUserData = CommonUtils.getFullUserData(userName, service);
            service.setUserData(fullUserData);
            binder.m_environment.put("REMOTE_USER", userName);
            ServiceException error = null;
            try {
                service.setSendFlags(true, true);
                service.initDelegatedObjects();
                service.globalSecurityCheck();
                service.preActions();
                service.doActions();
                service.postActions();
                service.updateSubjectInformation(true);
                service.updateTopicInformation(binder);
            } catch (ServiceException e) {
                error = e;
            } finally {
                service.cleanUp(true);
                if (!CommonUtils.isWorkspaceConnectionInTransaction(workspace)) {
                     workspace.releaseConnection();
            }the first problem was that the CS began to complain that a transaction was started within another transaction. So I suspect that the 10gR35 update wrapped a transaction around a workflow script entry.
    With some decompiling I figured out how a service is called from iDoc with the <$executeService()$> command. So I replaced the code above with:
                  String cmd = binder.getLocal("IdcService");
                ServiceData serviceData = ServiceManager.getFullService(cmd);
                if (serviceData == null) throw new DataException(LocaleUtils.encodeMessage("!csNoServiceDefined", null, cmd));
                Workspace workspace = CommonUtils.getSystemWorkspace();
                Service service = ServiceManager.createService(serviceData.m_classID, workspace, null, binder, serviceData);
                UserData fullUserData = CommonUtils.getFullUserData(userName, service);
                service.setUserData(fullUserData);
                binder.m_environment.put("REMOTE_USER", userName);
                service.initDelegatedObjects();
                service.executeSafeServiceInNewContext(cmd, true);This solved the transaction problem but introduces another problem: !csUnableToResubmitItem,(null)!csIllegalScriptAccess,RESUBMIT_FOR_CONVERSION
    The Service Reference Guide says that the access level for RESUBMIT_FOR_CONVERION is 33 (Read, Scriptable). However, in shared/config/resources/std_services.htm the access level is specified as 2 (write).
    Thus, my question still is:
    What is the best method to call a standard Content Server service from any Java code (so without extending the Service class, or having the m_service object available)?

Maybe you are looking for

  • Contact Photos in iPad and iPhone but not on Outlook 2011

    Hi, If I create a contact on my my iPhone or iPad the contact photos are seen in either device but cannot be seen in Outlook 2011 or in the Contacts app (v9) of my mac. The opposite is also true: if I create the contact in my computer (Outlook 2011 o

  • Need to stop duplicate entry

    HI all i have a tabular form and i need composite key on that at form level how to do that Example table desc id name color if these three are eneterd once they can't be duplicate in the form please guide Thanks and Regards Vikas Singhal

  • Document.getElementById Manual Tabular Form

    Hi, I'm working with APEX 4.1 and a manual tabular form. I have a page level validation process that fires and ensures that the value in column 1 does not match the value in column 6. When it does it pops up an error message along the lines of: The p

  • Stuck key on my Blackberry

    the #5 key is stuck ~ what can I do?j

  • Training Decision Tree: Get RSDME362

    Hi, I want to train my decision tree modell and get an error: RSDME362, Vorhers. Modellf. hat nur einen Wert.Daten können nicht trainiert werden. If I look at the statistics of the attribute which will be predicted it has two distinct values: 1.000 a