Java Web Service Issue

I got this error in my console, while using the web service - please any one give me a solution for me
java.lang.NoClassDefFoundError: org/apache/soap/SOAPException
     at java.lang.Class.getDeclaredConstructors0(Native Method)
     at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
     at java.lang.Class.getConstructor0(Unknown Source)
     at java.lang.Class.newInstance0(Unknown Source)
     at java.lang.Class.newInstance(Unknown Source)
     at sun.applet.AppletPanel.createApplet(Unknown Source)
     at sun.plugin.AppletViewer.createApplet(Unknown Source)
     at sun.applet.AppletPanel.runLoader(Unknown Source)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
import java.io.*;
import java.util.*;
import java.net.*;
import org.w3c.dom.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.SOAPException;
import org.apache.soap.encoding.*;
import org.apache.soap.encoding.soapenc.*;
import org.apache.soap.rpc.*;
import org.apache.soap.transport.http.SOAPHTTPConnection;
import javax.swing.*;
import java.awt.event.*;
public class AppletClient extends JApplet implements ActionListener
  JLabel m_lblURL;
  JTextField m_txtURL;
  JButton m_btnSend;
  JTextArea m_txtareaMsg;
  JPanel m_panelURL;
  JFrame m_frameWnd;
  String m_szMsg;
  public AppletClient()
      try {
             m_lblURL = new JLabel("URL :");
             m_txtURL = new JTextField(20);
          m_txtURL.setText("http://localhost/XMLService/myservice.asmx");
          m_btnSend = new JButton("Send");
          m_txtareaMsg = new JTextArea("");
          m_panelURL = new JPanel();
          m_panelURL.add(m_lblURL);
          m_panelURL.add(m_txtURL);
          m_panelURL.add(m_btnSend);
          m_panelURL.setBounds(0, 0, 400, 50);
          m_txtareaMsg.setBounds(10, 51, 380, 250);
          m_txtareaMsg.setEditable(false);
          m_frameWnd = new JFrame ("Java - XML");
          m_frameWnd.getContentPane().setLayout(null);
          m_frameWnd.getContentPane().add(m_panelURL);
          m_frameWnd.getContentPane().add(m_txtareaMsg);
          m_btnSend.addActionListener (this);
          m_frameWnd.setBounds (200, 100, 405, 315);
          m_frameWnd.setVisible (true);
          m_szMsg = "";
      catch(Exception e)
      {   e.printStackTrace();  }
  public void actionPerformed (ActionEvent ae)
        m_txtareaMsg.setText("See Console for Output ...");
        urlRequest (m_txtURL.getText());
  public void urlRequest (String szURL)
     try
          URL url = new URL (szURL);
          SOAPMappingRegistry smr = new SOAPMappingRegistry ();
          StringDeserializer sd = new StringDeserializer ();
          smr.mapTypes (Constants.NS_URI_SOAP_ENC,    new QName ("", "Result"), null, null, sd);
          // create the transport and set parameters
          SOAPHTTPConnection st = new SOAPHTTPConnection();
          // build the call.
          Call call = new Call ();
          call.setSOAPTransport(st);
          call.setSOAPMappingRegistry (smr);
          call.setTargetObjectURI ("http://tempuri.org/");
          call.setMethodName("addNumbers");
          call.setEncodingStyleURI ("http://schemas.xmlsoap.org/soap/encoding/");
          Vector params = new Vector();
          int     num1 = 5, num2 = 10;
          params.addElement(new Parameter("num1", Double.class, num1, null));
          params.addElement(new Parameter("num2", Double.class, num2, null));
          call.setParams(params);
          Response resp = null;
          try {
            resp = call.invoke (url, "http://tempuri.org/addNumbers");
          catch (SOAPException e) {
               System.err.println("Caught SOAPException (" + e.getFaultCode () + "): " + e.getMessage ());
               return;
          // check response
          if (resp != null && !resp.generatedFault()) {
             Parameter ret = resp.getReturnValue();
            Object value = ret.getValue();
            System.out.println ("Answer--> " + value);
          else {
               Fault fault = resp.getFault ();
               System.err.println ("Generated fault: ");
               System.out.println (" Fault Code = " + fault.getFaultCode());
               System.out.println (" Fault String = " + fault.getFaultString());
     catch (Exception e)
          System.out.println("Caught Exception : " + e.getMessage ());
}

Hi
Has anyone solved this problem. I been working on this problem since days. I set the soap.jar files and jwsdk etc in the systems environment variables as well. I am using java sdk 1.4.But I dont know what is wrong my browser wont display the applet ifI use soap in it,if I leave the soap part the browser displays it.

Similar Messages

  • Issue in java web service execution after SSL configuration on SOA Suite

    Hi All,
    We have a java web service deployed on Oracle Applcation server which is installed in DMZ box. Also Oracle Application Server is SSL enabled.
    Java web service is accepting one input string as input and internally invoking an ESB routing service which is present on SOA suite which is located(installed) in company network/LAN.
    Issue is when a user is making a HTTPS call to this DMZ web service, instead of making only one call to ESB routing service its making random number of calls to this service. Sometimes ESB routing service is getting invoked for thrice, sometimes five times and so on.
    Not sure why more than one number of calls are getting placed from DMZ web service.
    If HTTP call is made to DMZ web service it works fine where it calls ESB routing service only once.
    Any help on this would really be appreciated.
    Thanks,
    Uday

    have you done soa configuration?
    you may get some idea from this doc How to Use SOA Configuration to Call RFCs and Web Services from within SAP NetWeaver BPM.pdf
    for detail configuration
    http://help.sap.com/saphelp_nwce72/helpdata/en/4a/856a4d112439f1e10000000a42189c/frameset.htm

  • Serialization error while invoking a Java web service

    Hi,
    I've a requirement where I need to create a Java web service, which returns a collection (a set of records).
    The way I've created a web service is by having a Java Class, which internally calls a Pl/sql package returning Ref cursors and a bean Class, which wraps the method of the Java Class, to return the collection. I could create the web service successfully and could invoke the end point. The end point looks like this: http://localhost:8988/MyJavaWebService-New_JWS-context-root/MyWebService_finalSoapHttpPort
    The method exposed for the web service in my Java class is of type ArrayList, to fetch the collection element.
    After giving the input at the end point, while I say invoke, for the web service, I get the following error:
    <env:Envelope
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ns0="http://mypkg/types/"
    xmlns:ns1="http://www.oracle.com/webservices/internal/literal">
    <env:Body>
    <env:Fault>
    <faultcode>env:Server</faultcode>
    <faultstring>Internal Server Error (serialization error: no serializer is registered for (class mypkg.EmpBean, null))</faultstring>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    I've tried making my exposed method of type Vector as well and re-generated the web service. But still I face the same issue at invocation.
    Can anybody help me out and hint me on how I should proceed? I'm not sure if my approach is correct and so please correct me if I'm wrong.
    Thanks in Advance,
    Gayathri

    Hi,
    do you use 10.1.2 or 10.1.3?
    Take a look at:
    Re: How to create a web service with ArrayList or Collection

  • How to test a Java Web Service locally?

    I developed simple java web services.
    Now I want to test them locally.
    I want to expose my web service through my Web Server(Tomcat).
    How can I expose that webservice?
    After that I want to access my web service through a Internet Browser.
    Is it possible to test that web service locally (localhost)?
    My computer is not connected to a network or internet.
    My OS is Windows XP Professional.

    I just set up TCPMON. Considering it is free and the fact that it has more than just a basic UI, I am quite impressed. I also use SOAPscope, which is another great tool, but I am looking for a free option.
    My issue: I set up TCPMON to sniff messages sent over HTTPS through port 8080. But I am getting encrypted messages upon sending the SOAP request as follows:
    �b�b�b�bvC�Ym�)f��OvC�Ym�)f��W�O�k�v�W&#65533;�dQ�$�{� �4�����F&#65533;������vO���XEC
    )��~9gl^�OvC�Ym�)f��W�O�k�v�W&#65533;�dQ�$�{� �4�����F&#65533;������vO���XEC
    )��~9gl^�OvC�Ym�)f��W�O�k�v�W&#65533;�dQ�$�{� �4�����F&#65533;������vO���XEC
    )��~9gl^�
    Any clue why?
    Your help is greatly appreciated.
    Aish

  • Handling Java Web Service Exception in ABAP

    Hi
    I have created a web service in Java using NWDS.
    Which has a businessMethod which throws a Exception based on certain business logic.
    I have consumed this  Web Service Method using .NET Client.
    i am able to catch the Exception and get the Exceltion Message.
    But when i try to consume the same web service Method in ABAP,
    i am not getting the Exception Message .
    The Method call works fine.
    What am i missing here ?
    regards
    Rajendra

    Hi,
    Upon further investigation and comparison of the custom exception object (generated during consumer proxy creation for a CUSTOM web service) with a standard exception object(generated during consumer proxy creation for a STANDARD web service) I found that the sub-elements of the exception structure errorPart are not available in the custom exception object (and one of these sub-elements is the message text).
    Call Stack,ExceptionName and MessageText Elements are missing in the errorPart node of Exception
    Node. as seen in the ABAP Exception structure generated.
    Queries:
    1.       Are there any standards which need to be followed when coding exceptions in the Java web service for consumption in ABAP such that all sub-elements of the exception object are also created in ABAP during the proxy creation?
    2.       Can we get the Java code for a standard web service available in SAP Netweaver? Asking the same as the exception object created for the standard web service RoomABAPWS contains the sub-elements. Getting the Java code of the same will be very helpful in resolving the issue.
    Regards
    Rajendra

  • "java Web Service from WSDL" just hands me a SOAPElement, no java mappings

    Another beginner question. I've used jdev and built a WSDL starting from a somewhat complex xsd. I've used the wizard "Java Web Service From WSDL" taking defaults. It seems to correctly generate class files for all my xsd types. It produces a fancy looking java-wsdl-mapping.xml But the generated stub service implementation just gets handed a SOAPElement object. Why generate all that mapping stuff and then make me parse the incoming data myself with SOAPElement methods? How am I supposed to make use of the mapping work that the wizard seems to have done for me?
    Thanks,
    Steve

    Dear Tugdual,
    Thanks for your intrest in my issue. I narrowed it down to the following type in my xsd
    <complexType name="PersonInfoType">
    <sequence >
    <element name="FamilyName" type="string"/>
    <element name="IndividualName" type="string"/>
    <element name="SpouseName" type="string"/>
    <element name="BirthDate" type="dateTime"/>
    </sequence>
    </complexType>
    This works fine - the "WebSerice From WSDL" wizard "knows" how to generate a class for PersonInfoType (with geters and seters) as well as useful stub implementation:
    public class PersonInfoImpl {
    public PersonInfoType processPersonInfo(String entityCode) {
    return null;
    However, if I make my type multiple occuring (to represnt e.g. rows from a db)
    <complexType name="PersonInfoType">
    <sequence maxOccurs="unbounded" >
    <element name="FamilyName" type="string"/>
    <element name="IndividualName" type="string"/>
    <element name="SpouseName" type="string"/>
    <element name="BirthDate" type="dateTime"/>
    </sequence>
    </complexType>
    Now the Web Service generator runs, but just doesn't generate any PersonInfoType class at all. For a stub implementation it genertes the following:
    public class PersonInfoImpl {
    public SOAPElement processPersonInfo(String entityCode) {
    return null;
    Now I'm stuck with the container just expecting from me a Soap Object and I have to build all the pieces myself with no java mappings to my xsd at all. Not very useful.
    Is there another xml structure I can use to represent data rows that is better supported by the wizard?
    Thanks,
    Steve

  • Java Web Service/Eclipse/Tomcat v5.5/Axis v1.4

    I am developing a Java web service in Eclipse for deployment on Tomcat v5.5 and Axis v1.4 .
    When I run a web service client I've developed to test the web service I get the following error:
    Jan 23, 2009 10:27:55 AM org.apache.axis.InternalException <init>
    SEVERE: Exception:
    java.lang.Exception: The OperationDesc for IPublishEvent was not synchronized to a method of edu.monmouth.rri.ahett.pubwebservice.PublisherWebService.
    I have looked on the Apache Axis web site and while there are posts related to this problem they appear to be 1) old and 2) unanswered (or at least I can't find the answer).
    I can provide any of the following, if needed, to help diagnose this problem: 1) the Java source code for my class, 2) the WSDL file created when generating the web service in Eclipse, and 3) the deploy.wsdd XML generated.
    Thanks

    Hello,
    I have the same issue on my side --> Tthe OperationDesc for releaseCard was not synchronized to a method"
    did you solve this issue?
    Thanks in advance.

  • Could not run the bookstore1 example from the Java Web Services Tutorial

    The bookstore1 servlets example from the Java Web Services Tutorial (issue Aug 1, 2002) was built and deployed successfully by using the deploytool (following the steps described on pages 498ff of the tutorial).
    After deploying the application the Tomcat Web Application Manager shows the entry:
    /bookstore1:stopped:0:D:\Programme\Java\tomcat\jakarta-tomcat-4.1.8\work\Standalone\localhost\manager\bookstore1.war
    when entering the command: http://localhost:8080/manager/list.
    After entering the command: http://localhost:8080/manager/start?path=/bookstore1, the (uncomplete) message appears:
    FAIL - Application at context path /bookstore1 could not
    It should be noted that I was able to build and deploy the application GSApp (chapter 3 of the tutorial) successfully.

    Did you set up the database as described in
    http://java.sun.com/webservices/docs/1.0/tutorial/doc/WebApp13.html#69868

  • Problem in fetching values from Java Web Service returning ArrayList

    Hi all,
    I am calling an External Java web Service from BPEL. That Java Web Service is returning an Arraylist.
    I am not able to assign the values returned by the Java web service to local String Variables of BPEL.
    Kindly help me...

    Hi,
    My problem has been resolved..
    I have used
    bpws:getVariableData('Invoke_1_useSSH_OutputVariable','parameters',concat('/ns7:useSSHResponseElement/ns7:result/ns8:item\[',bpws:getVariableData('count'),']'))
    where count is the local int variable which contains the index value of the arraylist i.e. which index element we want to retrieve from arraylist.
    Thanks....
    Edited by: user643533 on Sep 12, 2008 12:10 AM

  • Java Web Service Deployed on App server does not run

    hi,
    I created a java web service and deployed it on my Application server. When i open the enterprise manager i find my webservice there. I click on test web service and it gives me two options one with a 4443 port and other with a 7777 port. It picks up a 0.0.0.0 hostname though i deplyoed it on to a different machine.
    I choose to use the 7777 port and test the web service whrn i click invoke it give me the error
    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
    and when using the 4443 port it gives me the error as
    "SSL Error: unable to find valid certification path to requested target"
    please suggest how i can test a simple java webservice.
    Thanks
    Sravanti

    I think the problem is to add the custom dll files while deploying the application. Could any one please suggest how i can add custom dll file for deployment?
    Thanks
    Sravanti

  • Can I Include an xml-stylesheet Link in a Java Web-Service?

    The ability to easily create a SOAP-based web-service from a Java class using JDev's built in "Java Web Service" wizard is great.
    From an "Ajax enablement" perspective, I see tremendous value in having the ability to specify an XSL url in the call to that web-service, so that the server will insert an <?xml-stylesheet .../> link to the specified URL prior to the SOAP message that it returns. That way, different callers to the web-service could render the same SOAP response differently (via an XSL transformation performed on the client-side via the XSL they've specified).
    Is there already an undocumented way to do this with an Oracle "Java Web Service" that I am not aware of? If not, adding that capability would be trivial for Oracle, and it would add tremendous value to developers using Oracle's "Java Web Service" capability.

    Hi Chris,
    I take it you are using the RESTful API method to GET the data. In that case you shoul be able to perform a http POST from your js code in order to update the controls.
    This could be done as form components are updated, or after a submit button is pressed (I'm sure you are familiar with this part).
    Please see here for more information: http://zone.ni.com/reference/en-XX/help/371361J-01​/lvhowto/build_web_service/
    I hope this helps.

  • Receiving the internal 500 error while testing java web service

    HI,
    Problem Summary:
    Receiving the internal 500 error while testing java web service in integrated weblogic server.
    my scenario is like,
    retrieve the Payload from Dehydration tables.
    We are connected to SOA_INFRA schema and we are retrieving the payload from the dehyadration tables based on InstanceId and ECID using Java Classes.After that i make it as a web service and i deployed in to intergrated weblogic Server.It is generating the Target End Point URI.When am i hitting this it is showing structure of the service.I am testing this service from soapUi it is returning the Server internal error with 500.Here i am passing inputs as InstanceId and ECID.
    I had verified in my Jdeveloper,Proxy settings are available.
    Error Payload:
    I am receiving the Internal 500 error because of JDeveloper HTTP Analyzer encountered an error retrieving: CONNECT https://192.168.0.41:9102 HTTP/1.0.
    An exception occurred while retrieving the response for https://192.168.0.41:9102.
    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1293)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:65)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:50)
         at oracle.jdevimpl.webservices.tcpmonitor.model.HttpMessageBase.readLine(HttpMessageBase.java:658)
         at oracle.jdevimpl.webservices.tcpmonitor.model.HttpRequest.read(HttpRequest.java:327)
         at oracle.jdevimpl.webservices.tcpmonitor.ConnectionHandler.getResponse(ConnectionHandler.java:405)
         at oracle.jdevimpl.webservices.tcpmonitor.ConnectionHandler.run(ConnectionHandler.java:331)
    Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
         at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:523)
         at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:798)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1165)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getSession(SSLSocketImpl.java:1916)
         at oracle.jdevimpl.webservices.tcpmonitor.ConnectionHandler.negotiateSSL(ConnectionHandler.java:707)
         at oracle.jdevimpl.webservices.tcpmonitor.ConnectionHandler.negotiateForwardedSSLConnection(ConnectionHandler.java:672)
         at oracle.jdevimpl.webservices.tcpmonitor.ConnectionHandler.run(ConnectionHandler.java:311

    An exception occurred while retrieving the response for https://192.168.0.41:9102.
    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?This error says that port 9102 is a plain HTTP port so either use the correct port (which is listening for HTTPS connections) or use HTTP instead of HTTPS in the URL.
    Regards,
    Anuj

  • Java web service -- how to re-generate Java sources when WSDL changes?

    I created a new web service using the "Java Web Service from WSDL" wizard.
    Some time later I changed the WSDL and now I need to rebuild the Java sources. What is the best way to do this? I can't re-run the wizard, it returns an error: "The name of this web service is already used by another web service in this project."
    Using Jdeveloper 11.1.1.3.0 on Linux.
    Thanks.

    These links may helpful for you.
    http://download.oracle.com/docs/cd/E14004_01/books/SSDev/SSDev_CustomizingModel22.html
    http://download.oracle.com/docs/cd/B31017_01/core.1013/b28764/web_services003.htm

  • Generation Error - when trying to publish a Java web service

    Hi All,
    I keep getting the following Generation Error -- java.util.NoSuchElementException_ when I'm trying to create a Java Web Service using the jdeveloper wizard.
    I have 2 entities and 2 stateless session beans acting as their facades. One entity has a One-One(FK) relationship with the other entity. I test out the entities and session beans using the test client and the OC4J embedded container and everything seems to work. When I try to generate a Java WebService from one of the entities I keep getting the "Generation Error". Could someone please provide me with some insight into why I'm facing this problem, because it seemed fine when I published J2EE web services previously and now this happens and I cant seem to publish web services anymore. Everytime I keep getting the same GenerationError. Thanks in advance.

    Without going into any technical discussion about the code, my first question is what JDK version was used to create this which was imported into the form? Understand that Forms 10 runs on JDK 1.4.2, so if you used any newer JDK version, likely there will be problems.

  • Calling normal java web service from bpel

    hi,
    i want to call a normal java web service (which has been deployed in an application server) and not a bpel process from my .bpel file.
    i see that while creating a partner link , i have to specify the wsdl file location.
    there are two options.
    from local bpel server and
    from local file system.
    since the web service is not a bpel prcess, it can not be deployed in the bpel process manager and i have to choose the wsdl file location from local file system.
    now there are some major differences in the two type of wsdl file, i.e., that of a java web service and a bpel process.
    let me give u all a concrete example.
    let i have a hello world web service which takes a name as input , concatenates the name with "hello" and outputs.
    i created a partner link to this web service.
    after creating the partner link, a local copy of the wsdl file is added into my bpel project which only contains definition import and partnerlink statements.
    but i can not progress any further.
    can any one help me out of this problem.
    also i will be helpful if any one can suggest a tutorial where bpel is used to orchestarate between normal java web services deployed in some other application server and not mere bpel processes.
    thanks & regards.
    sudipto

    Hi Sudipto,
    Just to add to the options. There are three options.
    1 and 2 as mentioned by you.
    3 you can give the hosted wsdl location directly in the text box. (i.e. somthing like http://ws.strikeiron.com/CensusData?WSDL)
    This in turn will create a local wsdl which has partnerLink info and an import of the original wsdl.
    once you have this select the appropreate Partner Link Type and Partner Role.
    HTH
    Dhaval

Maybe you are looking for

  • Time Machine says it is backing up my Drobo, but changes are not being backed up.

    I have a Time Capsule hooked to a mac mini and a 4 TB Drobo RAID connected as an external hard Drive connected to the Mac Mini as well. My Drobo went insane and I had to re-setup the Drobo with it's partitions etc... I Renamed the partitions exactly

  • Planning 11.1.2.4 Metadata load errors RemoteException occurred in server thread

    Hi, I am trying to load metadata using ODI 11.1.1.7 into Hyperion Planning 11.1.2.4. It errored out saying Cannot load dimension member, error message is: RemoteException occurred in server thread; nested exception is:     java.rmi.UnmarshalException

  • Converting PC docs to Mac

    How do I convert MS Works (pc) files to my new imac??

  • Missing Redownload Menu iTunes

    I recently had to recover my iTunes library from my archive. Unfortunately a couple of songs that I purchased from the iTunes store were corrupt within my archive. I have watched several tutorials and read several online support threads about how to

  • Issues creating a Photo Book

    Hi, I have iPhoto 11 (v9.1.5) running on a Lion i3 iMac with 8GB for Ram. I'm trying to create an XL Photobook and all of the pics look fantastic however Apple emailed me to say some of the images are distored and asking my to 'Preview' the book. Whe