Client Web Service in Eclipse/JAVA

Hi All
I am a beginner in Java.
I am working on a web service project.
Which is to be client/server. Thus being the Client in Eciplse environment and coding in JAVA. The Server is in VS.NET web service.
The client sends a request to the server and the server responds.
I have created a server based Web Service in VS.NET which is called LoanCalcService and the files that are present are LoanInfo.asmx and Service.vb.
When i run the server in VS.NET it creates a Web Service document called a WSDL.
I have parsed the WSDL document through Apache Server in Eclipse platform using the Web Service Client.
But i understand that i must write about 4 or 5 lines of JAVA code to Call an Instance of the WSDL document to be able to run this in Eclipse to create the Loan Calculator that i have created in VS.NET. I am enquiring to see if anyone can point me in the right direction.
PS. Sry about the quick entry earlier

You are a novice to Java and yet you expect to start out writing services?
Good luck with that*
*Trademark, 2006- yawmark, All Rights Reserved.                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Axis Client Web Service call problem: java.io.IOException: Stream closed

    Hi, I tried to call a webservice from Axis Client, and I encounter the following error. Do you guys have any idea what actually happens?
    Please help, I am newbie in web services.
    ==============Root Cause===============
    AxisFault
    faultCode: { h t t p : / / schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.io.IOException: Stream closed
    faultActor:
    faultNode:
    faultDetail:
         {h t t p : / / xml.apache.org/axis/}stackTrace:java.io.IOException: Stream closed
         at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:120)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:270)
         at org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:170)
         at java.io.FilterInputStream.read(FilterInputStream.java:111)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:127)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBody(HttpMethodBase.java:688)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBodyAsString(HttpMethodBase.java:796)
         at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:224)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
         {h t t p : / / xml.apache.org/axis/}hostname:compname
    java.io.IOException: Stream closed
         at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
         at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:301)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)     
    Caused by: java.io.IOException: Stream closed
         at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:120)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:270)
         at org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:170)
         at java.io.FilterInputStream.read(FilterInputStream.java:111)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:127)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBody(HttpMethodBase.java:688)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBodyAsString(HttpMethodBase.java:796)
         at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:224)
         ... 17 more  I am calling through proxy, the setting is as follows:
                System.setProperty("https.proxyHost", [proxyname here]);
                System.setProperty("https.proxyPort", [proxyport here]);
                System.setProperty("http.proxyHost", [proxyname here]);
                System.setProperty("http.proxyPort", [proxyport here]);

    Are there any problems showing up in the server's log?

  • 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 a AXIS Web Service with a Java object as input argument

    Hi
    I've been trying to execute a bpel process that invokes a web service deployed through axis.
    This web service takes a java object as input argument as opposed to data types that are directly mapped to java types through the SOAP engine.
    I deployed and tested the service outside of BPEL using a test client class. Everything works well.
    When I try to configure the "Assign" and "Invoke" activities so that service can be invoked, I cannot see the data structure through the variable picker and I see the following message:
    "The element {urn:ComplexTypeWebService}TimeSheetBean is not know to the schema container. Perhaps a schema file that uses it needs to include or import its definition.There mat also be an XML schema issue (non resolvable schema) which prevents {urn:ComplexTypeWebService}TimeSheetBean from being seen by the schema processor."
    Is there any example that demonstrates how to invoke an axis web service in such scenario? What am I doing wrong?
    Please, let me know.

    The passing of Java objects in and out of a web service is NOT supported. variables must be xml documents defined by a XML schema. In my opinion, missing Java object and WSDL is not a good idea. -Edwin

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

  • Problem in writing a client web service from WSDL document

    Hi,
    I wrote a web service using .Net and a WSDL document. I tried after that to generate a client web service using Jdeveloper. but, the methode generated by Jdeveloper (in the stub) does not represente the original methode.
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!--Generated by the Oracle9i JDeveloper Web Services WSDL Generator-->
    <!--Date Created: Fri Aug 09 13:59:52 EDT 2002-->
    <definitions
    name="CreditCard"
    targetNamespace="http://tempuri.org/jdeveloper/generated/CreditCard/CreditCard"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://tempuri.org/jdeveloper/generated/CreditCard/CreditCard"
    xmlns:ns1="http://tempuri.org/jdeveloper/generated/CreditCard/CreditCard/schema">
    <types>
    <schema
    targetNamespace="http://tempuri.org/jdeveloper/generated/CreditCard/CreditCard/schema"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"/>
    </types>
    <message name="Validate0Request">
    <part name="cardNumber" type="xsd:string"/>
    <part name="lngDate" type="xsd:long"/>
    </message>
    <message name="Validate0Response">
    <part name="return" type="xsd:boolean"/>
    </message>
    <portType name="CreditCardPortType">
    <operation name="Validate">
    <input name="Validate0Request" message="tns:Validate0Request"/>
    <output name="Validate0Response" message="tns:Validate0Response"/>
    </operation>
    </portType>
    <binding name="CreditCardBinding" type="tns:CreditCardPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="Validate">
    <soap:operation soapAction="" style="rpc"/>
    <input name="Validate0Request">
    <soap:body use="encoded" namespace="CreditCard.CreditCard" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </input>
    <output name="Validate0Response">
    <soap:body use="encoded" namespace="CreditCard.CreditCard" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </output>
    </operation>
    </binding>
    <service name="CreditCard">
    <port name="CreditCardPort" binding="tns:CreditCardBinding">
    <soap:address location="http://localhost:8888/FirstSample-CreditCard-context-root/CreditCard.CreditCard"/>
    </port>
    </service>
    </definitions>
    Here The methode Validate consume two parameters : string and long
    the generated stub look like :
    public Vector Validate(Element requestElem) throws Exception
    There is some one who have a solution ?
    ---------------------------------------

    My guess is that it is because .NET defaults to generating a document style interface whereas JDeveloper defaults to generating an RPC style interface. The end result is that JDeveloper wraps the document interface in something that looks document like - thus your client. To see how to handle this right now, check out this sample - you have to parse the XML:
    http://otn.oracle.com/tech/webservices/htdocs/series/net/content.html
    In the preview of JDeveloper 9.0.3 which is due quite soon - next few weeks roughly (crossing my fingers) - JDeveloper will wrap .NET document based Web services in a much more elegant wrapper - giving you exactly what you are looking for - a method called Validate rather than a vector of Elements.
    What I don't understand in your sample, however, is that you have WSDL generated from JDeveloper versus WSDL generated from .NET. Did you also do an implementation of the validate method in Java too?
    Mike.

  • Web Service with Eclipse

    Has anyone tried accessing a web service with eclipse? We'd like to start using them with our forms for database lookups and the web services are already written. We just haven't had much success calling them with our servlets.
    Thanks,
    Chad

    We also wrote web services with eclipse and deployed them in our jboss app.serv. We can call them in our pdf forms as data connection, or inside some events with java script code.
    What is your problem about ? Did you manage to deploy the web services ? Can you create data connections inside forms ?
    We have faced some difficulties to success writing and caling web services. I may help if you have similar problems.

  • Delphi Client Web Service does not work fine

    I wrote a Hello web service with a method and with a parameter, and import WSDL in delphi, All works very well. But when I add two parameters I receive the error below:
    java.lang.IllegalStateException: Cannot obtain java type for: {urn:CalculatorFacade/types}add
    at org.jboss.axis.description.ServiceDesc.syncOperationToClass(ServiceDesc.java:710)
    at org.jboss.axis.description.ServiceDesc.getSyncedOperationsForName(ServiceDesc.java:1187)
    at org.jboss.axis.description.ServiceDesc.loadServiceDescByIntrospectionRecursive(ServiceDesc.java:1045)
    at org.jboss.axis.description.ServiceDesc.loadServiceDescByIntrospection(ServiceDesc.java:972)
    Using the google I discovery this tutorial.
    http://www.javapassion.com/planning/handsonbyol/netbeanswebservices
    I wrote a calculator web service with Netbeans and deploy it on jboss-4.0.3.
    So I was change my project parameters to change wscompile parameters: rpcliteral, strict
    When I execute the code: x = calc.add(a, b)
    I receive another error:
    faultDetail:
    {http://xml.apache.org/axis/}stackTrace: javax.xml.rpc.JAXRPCException: No such operation 'int_1'
    at org.jboss.axis.providers.java.RPCInvocation.prepareFromRequestEnvelope(RPCInvocation.java:273)
    at org.jboss.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:103)
    at org.jboss.axis.providers.java.JavaProvider.invoke(JavaProvider.java:358)
    I test this web service in a Java client and it works very fine, but with delphi client it does not work :(
    Can someone help me?
    []s, Welington B. Souza

    Welington,
    Could you post the source of the web service that gives you the error?

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

  • Error in Calling Oracle Web Service through Eclipse-indigo

    Hi All,
    I'm getting an below error when trying to call my oracle web service through Eclipse-indigo.
    Error:-
    IWAB0135E An unexpected error has occurred.
    502
    Bad Gateway
    Steps followed to create oracle web service and invoke WS :-
    Followed link
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb_web_services.htm
    which explans how to create oracle web service.
    1. Configure HTTP Access
    2. Configure the ORAWSV Servlet
    3. created user 'test' and wrote simple procedure getdescription which will return name for request id.
    4. granted all privilages to user.
    5. The orawsv servlet automatically generates a WSDL file.
    6. trying to call WS through Eclipse-indigo, but i get error.

    Trying to test via PL/SQL first via (see the following url for more info: Re: Using utl_dbws to call web service ) for example something like the following:
    SQL> set serveroutput on
    SQL> --
    SQL> def USERNAME=DBNWS
    SQL> --
    SQL> DECLARE
      2    V_SOAP_REQUEST      XMLTYPE := XMLTYPE(
      3  '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/
    encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      4          <SOAP-ENV:Body>
      5                  <m:SNUMBER-GET_SQRTInput xmlns:m="http://xmlns.oracle.com/orawsv/&USERNAME/GET_SQRT">
      6                          <m:INPUT_VALUE-NUMBER-IN>2</m:INPUT_VALUE-NUMBER-IN>
      7                  </m:SNUMBER-GET_SQRTInput>
      8          </SOAP-ENV:Body>
      9  </SOAP-ENV:Envelope>');
    10    V_SOAP_REQUEST_TEXT CLOB := V_SOAP_REQUEST.getClobVal();
    11    V_REQUEST           UTL_HTTP.REQ;
    12    V_RESPONSE          UTL_HTTP.RESP;
    13    V_BUFFER            VARCHAR2(1024);
    14  BEGIN
    15
    16    V_REQUEST := UTL_HTTP.BEGIN_REQUEST(URL => :URL, METHOD => 'POST');
    17    UTL_HTTP.SET_HEADER(V_REQUEST, 'User-Agent', 'Mozilla/4.0');
    18    V_REQUEST.METHOD := 'POST';
    19    UTL_HTTP.SET_HEADER (R => V_REQUEST, NAME => 'Content-Length', VALUE => DBMS_LOB.GETLENGTH(V_SOAP_REQUEST_TEXT));
    20    UTL_HTTP.WRITE_TEXT (R => V_REQUEST, DATA => V_SOAP_REQUEST_TEXT);
    21
    22    V_RESPONSE := UTL_HTTP.GET_RESPONSE(V_REQUEST);
    23    LOOP
    24      UTL_HTTP.READ_LINE(V_RESPONSE, V_BUFFER, TRUE);
    25      DBMS_OUTPUT.PUT_LINE(V_BUFFER);
    26    END LOOP;
    27    UTL_HTTP.END_RESPONSE(V_RESPONSE);
    28  EXCEPTION
    29    WHEN UTL_HTTP.END_OF_BODY THEN
    30      UTL_HTTP.END_RESPONSE(V_RESPONSE);
    31  END;
    32  /
    old   5:                <m:SNUMBER-GET_SQRTInput xmlns:m="http://xmlns.oracle.com/orawsv/&USERNAME/GET_SQRT">
    new   5:                <m:SNUMBER-GET_SQRTInput xmlns:m="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT">
    <?xml version="1.0" ?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GET_SQRTOutput xmlns="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT">
    <RETURN>1.41421356237309504880168872420969807857</RETURN>
    </GET_SQRTOutput>
    </soap:Body>
    </soap:Envelope>
    PL/SQL procedure successfully completed.
    SQL> set serveroutput on
    SQL> --In the example give above the WSDL info should be seen via http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT?wsdl

  • 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

  • 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

  • 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

  • An unexpected exception occurred while attempting to locate the run-time information for this Web Service. Error: java.lang.reflect.InvocationTargetException:null

    Hi I m getting the below wxpection when i run test browser from workshop. please help me.
    An unexpected exception occurred while attempting to locate the run-time information for this Web Service. Error: java.lang.reflect.InvocationTargetException:null

    Thamarai,
    Can you provide more information on your jws ? Also can you start the server
    from the command line with verbose option. This will cause
    weblogic_debug.log to be generated in the domain folder.
    Raj Alagumalai
    Backline Workshop Support
    "Thamarai Selvan" <[email protected]> wrote in message
    news:[email protected]..
    Hi I m getting the below wxpection when i run test browser from workshop.please help me.
    >
    An unexpected exception occurred while attempting to locate the run-timeinformation for this Web Service. Error:
    java.lang.reflect.InvocationTargetException:null

  • 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

Maybe you are looking for

  • Material de Treinamento PLD

    A todos, Existe algum material de treinamento para utilização de PLD? Já busquei em toda o portal da SAP e não encontro nada. Pode ser em inglês mesmo. Abs, Antonio Melo

  • Tiger Upgrade

    I am looking to purchase a full disk set Tiger upgrade...I have a PowerMac G5 Panther 10.3.9...from what I gather...I have to purchase a disk set designed for "PowerMac"...as opposed to a set that is designed for "eMac"..."Mac Mini"...etc...is that t

  • HCM Best Practice LOAD - Error in Copy Report variants Step

    Dear Friends, We are trying to use/load the HCM Best Practice data for testing purpose. We have applied the HCM Best Practice Add -ON. It went successfully. When we try to execute the Preparation step - (in Copy Varient Phase) using Tcode /HRBPUS1/C0

  • How to generate a dynamic ALV

    give me some points on how  to generate the dynamic Alv using RTTS and why it is useful to generate this way

  • Files open as empty in Dreamweaver, but still normal on site

    I connected to my website and attempted to work on a file on my remote server (the actual site server) and when I opened it there was NO CODE AT ALL. When I logged into the actual site, the file functioned normally and when I went to the file manager