facebook

problem creating web services

  1. MyEclipse IDE
  2.  > 
  3. WebSphere Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #310884 Reply

    marcn
    Member

    I am a newbie in creating java web service. I have a trial myelcipse blue 8.5 on my pc and trying to play around creating Calculator webservice for WS 6.0.2.17. This is the error i kept getting when generating jax-rpc
    The following errors occurred while running WSDL2Java. Generation aborted.
    Aug 25, 2010 10:24:16 AM com.ibm.ws.webservices.wsdl.fromJava.Emitter init
    SEVERE: Error: java.lang.ClassNotFoundException: com.myeclipseide.ws.Calculator
    java.io.IOException: java.lang.ClassNotFoundException: com.myeclipseide.ws.Calculator
    at com.ibm.ws.webservices.wsdl.fromJava.Emitter.init(Emitter.java:752)
    at com.ibm.ws.webservices.wsdl.fromJava.Emitter.getWSDL(Emitter.java:617)
    at com.ibm.ws.webservices.wsdl.fromJava.Emitter.emit(Emitter.java:547)
    at com.ibm.ws.webservices.wsdl.fromJava.Emitter.preEmit(Emitter.java:440)
    at com.ibm.ws.webservices.wsdl.fromJava.Emitter.emit(Emitter.java:482)
    at com.ibm.ws.webservices.wsdl.fromJava.Emitter.emit(Emitter.java:521)
    at com.ibm.ws.webservices.tools.Java2WSDL.run(Java2WSDL.java:605)
    at com.ibm.ws.webservices.tools.Java2WSDL.main(Java2WSDL.java:638)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
    at java.lang.reflect.Method.invoke(Method.java:391)
    at com.ibm.ws.bootstrap.WSLauncher.run(WSLauncher.java:219)
    at java.lang.Thread.run(Thread.java:570)

    Please tell me what I am missing.
    Thank

    #310898 Reply

    marcn,
    I could not replicate this at my end. Can you clarify when exactly you are getting this error?
    Also, can you clarify if you have added the Implementation class when creating the webservice?

    #310911 Reply

    marcn
    Member

    hello shalini,
    Thank for quick reply. I did create a Calculator Class like example below.

    package com.myeclipseide.ws;

    public class Calculator {
    public int add(int a, int b) {
    return (a + b);
    }

    public int subtract(int a, int b) {
    return (a – b);
    }

    public int multiply(int a, int b) {
    return (a * b);
    }

    public int divide(int a, int b) {
    return (a / b);
    }
    }

    But now I am getting a different message when generating jax-rpc
    The following errors occurred while running WSDL2Java. Generation aborted.
    WSWS3185I: Info: Parsing XML file: file:/D:/Eclipse%20blue%208.5/WebServiceProject/.myeclipse/wsgeneration/wso0/Calculator.wsdl
    Retrieving document at ‘file:/D:/Eclipse%20blue%208.5/WebServiceProject/.myeclipse/wsgeneration/wso0/Calculator.wsdl’.
    ———————–
    Symbol Table |
    ———————–
    SIDX: 1
    QName: {http://websphere.ibm.com/webservices/}SOAPElement
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedType
    name: javax.xml.soap.SOAPElement
    dynamicVars: derivedTypes = [ ]
    nestedTypes = [ (<recursive> 1) ]
    disable generation = true
    isReferenced? false
    refTypeSIDX: 0
    Undefined?: false
    isBaseType true
    Node: null
    NodeStack: null
    Dims:
    isAbstract false
    OnlyWrappedLitRef false
    SimpleType? false
    SimpleContent? false
    isList? false
    Enumeration? false
    isAnonType? false
    Children null
    ======================================================================================
    SIDX: 2
    QName: {http://xml.apache.org/xml-soap}Element
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedType
    name: org.w3c.dom.Element
    dynamicVars: derivedTypes = [ ]
    nestedTypes = [ (<recursive> 2) ]
    disable generation = true
    isReferenced? false
    refTypeSIDX: 0
    Undefined?: false
    isBaseType true
    Node: null
    NodeStack: null
    Dims:
    isAbstract false
    OnlyWrappedLitRef false
    SimpleType? false
    SimpleContent? false
    isList? false
    Enumeration? false
    isAnonType? false
    Children null
    ======================================================================================
    SIDX: 3
    QName: {http://ws.myeclipseide.com}>addResponse
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedType
    name: com.myeclipseide.ws.AddResponse
    dynamicVars: derivedTypes = [ ]
    nestedTypes = [ (<recursive> 3) (5) ]
    resolvedChildNames = true
    disable generation = true
    isReferenced? true
    refTypeSIDX: 0
    Undefined?: false
    isBaseType false
    Node:
    [complexType: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    SimpleType? false
    SimpleContent? false
    isList? false
    Enumeration? false
    isAnonType? true
    Children [ (1c) ]
    ======================================================================================
    SIDX: 4
    QName: {http://ws.myeclipseide.com}addResponse
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedElement
    name: com.myeclipseide.ws.AddResponse
    dynamicVars: disable generation = true
    isReferenced? true
    refTypeSIDX: 3
    Undefined?: false
    isBaseType false
    Node:
    [element: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    ======================================================================================
    SIDX: 5
    QName: {http://www.w3.org/2001/XMLSchema}int
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedType
    name: int
    dynamicVars: derivedTypes = [ ]
    nestedTypes = [ (<recursive> 5) ]
    disable generation = true
    isReferenced? true
    refTypeSIDX: 0
    Undefined?: false
    isBaseType true
    Node: null
    NodeStack: null
    Dims:
    isAbstract false
    OnlyWrappedLitRef false
    SimpleType? true
    SimpleContent? false
    isList? false
    Enumeration? false
    isAnonType? false
    Children null
    ======================================================================================
    SIDX: 6
    QName: {http://ws.myeclipseide.com}>subtract
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedType
    name: com.myeclipseide.ws.Subtract
    dynamicVars: derivedTypes = [ ]
    nestedTypes = [ (5) (<recursive> 6) ]
    resolvedChildNames = true
    disable generation = true
    isReferenced? true
    refTypeSIDX: 0
    Undefined?: false
    isBaseType false
    Node:
    [complexType: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    SimpleType? false
    SimpleContent? false
    isList? false
    Enumeration? false
    isAnonType? true
    Children [ (2c) (3c) ]
    ======================================================================================
    SIDX: 7
    QName: {http://ws.myeclipseide.com}subtract
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedElement
    name: com.myeclipseide.ws.Subtract
    dynamicVars: disable generation = true
    isReferenced? true
    refTypeSIDX: 6
    Undefined?: false
    isBaseType false
    Node:
    [element: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    ======================================================================================
    SIDX: 8
    QName: {http://ws.myeclipseide.com}>subtractResponse
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedType
    name: com.myeclipseide.ws.SubtractResponse
    dynamicVars: derivedTypes = [ ]
    nestedTypes = [ (5) (<recursive> 8) ]
    resolvedChildNames = true
    disable generation = true
    isReferenced? true
    refTypeSIDX: 0
    Undefined?: false
    isBaseType false
    Node:
    [complexType: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    SimpleType? false
    SimpleContent? false
    isList? false
    Enumeration? false
    isAnonType? true
    Children [ (4c) ]
    ======================================================================================
    SIDX: 9
    QName: {http://ws.myeclipseide.com}subtractResponse
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedElement
    name: com.myeclipseide.ws.SubtractResponse
    dynamicVars: disable generation = true
    isReferenced? true
    refTypeSIDX: 8
    Undefined?: false
    isBaseType false
    Node:
    [element: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    ======================================================================================
    SIDX: 10
    QName: {http://ws.myeclipseide.com}>multiply
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedType
    name: com.myeclipseide.ws.Multiply
    dynamicVars: derivedTypes = [ ]
    nestedTypes = [ (5) (<recursive> 10) ]
    resolvedChildNames = true
    disable generation = true
    isReferenced? true
    refTypeSIDX: 0
    Undefined?: false
    isBaseType false
    Node:
    [complexType: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    SimpleType? false
    SimpleContent? false
    isList? false
    Enumeration? false
    isAnonType? true
    Children [ (5c) (6c) ]
    ======================================================================================
    SIDX: 11
    QName: {http://ws.myeclipseide.com}multiply
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedElement
    name: com.myeclipseide.ws.Multiply
    dynamicVars: disable generation = true
    isReferenced? true
    refTypeSIDX: 10
    Undefined?: false
    isBaseType false
    Node:
    [element: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    ======================================================================================
    SIDX: 12
    QName: {http://ws.myeclipseide.com}>multiplyResponse
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedType
    name: com.myeclipseide.ws.MultiplyResponse
    dynamicVars: derivedTypes = [ ]
    nestedTypes = [ (5) (<recursive> 12) ]
    resolvedChildNames = true
    disable generation = true
    isReferenced? true
    refTypeSIDX: 0
    Undefined?: false
    isBaseType false
    Node:
    [complexType: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    SimpleType? false
    SimpleContent? false
    isList? false
    Enumeration? false
    isAnonType? true
    Children [ (7c) ]
    ======================================================================================
    SIDX: 13
    QName: {http://ws.myeclipseide.com}multiplyResponse
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedElement
    name: com.myeclipseide.ws.MultiplyResponse
    dynamicVars: disable generation = true
    isReferenced? true
    refTypeSIDX: 12
    Undefined?: false
    isBaseType false
    Node:
    [element: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    ======================================================================================
    SIDX: 14
    QName: {http://ws.myeclipseide.com}>divide
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedType
    name: com.myeclipseide.ws.Divide
    dynamicVars: derivedTypes = [ ]
    nestedTypes = [ (5) (<recursive> 14) ]
    resolvedChildNames = true
    disable generation = true
    isReferenced? true
    refTypeSIDX: 0
    Undefined?: false
    isBaseType false
    Node:
    [complexType: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    SimpleType? false
    SimpleContent? false
    isList? false
    Enumeration? false
    isAnonType? true
    Children [ (8c) (9c) ]
    ======================================================================================
    SIDX: 15
    QName: {http://ws.myeclipseide.com}divide
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedElement
    name: com.myeclipseide.ws.Divide
    dynamicVars: disable generation = true
    isReferenced? true
    refTypeSIDX: 14
    Undefined?: false
    isBaseType false
    Node:
    [element: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    ======================================================================================
    SIDX: 16
    QName: {http://ws.myeclipseide.com}>divideResponse
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedType
    name: com.myeclipseide.ws.DivideResponse
    dynamicVars: derivedTypes = [ ]
    nestedTypes = [ (5) (<recursive> 16) ]
    resolvedChildNames = true
    disable generation = true
    isReferenced? true
    refTypeSIDX: 0
    Undefined?: false
    isBaseType false
    Node:
    [complexType: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    SimpleType? false
    SimpleContent? false
    isList? false
    Enumeration? false
    isAnonType? true
    Children [ (10c) ]
    ======================================================================================
    SIDX: 17
    QName: {http://ws.myeclipseide.com}divideResponse
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedElement
    name: com.myeclipseide.ws.DivideResponse
    dynamicVars: disable generation = true
    isReferenced? true
    refTypeSIDX: 16
    Undefined?: false
    isBaseType false
    Node:
    [element: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    ======================================================================================
    SIDX: 18
    QName: {http://ws.myeclipseide.com}>add
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedType
    name: com.myeclipseide.ws.Add
    dynamicVars: derivedTypes = [ ]
    nestedTypes = [ (5) (<recursive> 18) ]
    resolvedChildNames = true
    disable generation = true
    isReferenced? true
    refTypeSIDX: 0
    Undefined?: false
    isBaseType false
    Node:
    [complexType: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    SimpleType? false
    SimpleContent? false
    isList? false
    Enumeration? false
    isAnonType? true
    Children [ (11c) (12c) ]
    ======================================================================================
    SIDX: 19
    QName: {http://ws.myeclipseide.com}add
    Class: com.ibm.ws.webservices.wsdl.symbolTable.DefinedElement
    name: com.myeclipseide.ws.Add
    dynamicVars: disable generation = true
    isReferenced? true
    refTypeSIDX: 18
    Undefined?: false
    isBaseType false
    Node:
    [element: null]
    NodeStack: []
    Dims:
    isAbstract false
    OnlyWrappedLitRef true
    ======================================================================================
    SIDX: 20
    QName: {http://ws.myeclipseide.com}multiplyResponse
    Class: com.ibm.ws.webservices.wsdl.symbolTable.MessageEntry
    name: null
    isReferenced? true
    isFault? false
    ======================================================================================
    SIDX: 21
    QName: {http://ws.myeclipseide.com}subtractResponse
    Class: com.ibm.ws.webservices.wsdl.symbolTable.MessageEntry
    name: null
    isReferenced? true
    isFault? false
    ======================================================================================
    SIDX: 22
    QName: {http://ws.myeclipseide.com}subtractRequest
    Class: com.ibm.ws.webservices.wsdl.symbolTable.MessageEntry
    name: null
    isReferenced? true
    isFault? false
    ======================================================================================
    SIDX: 23
    QName: {http://ws.myeclipseide.com}multiplyRequest
    Class: com.ibm.ws.webservices.wsdl.symbolTable.MessageEntry
    name: null
    isReferenced? true
    isFault? false
    ======================================================================================
    SIDX: 24
    QName: {http://ws.myeclipseide.com}addRequest
    Class: com.ibm.ws.webservices.wsdl.symbolTable.MessageEntry
    name: null
    isReferenced? true
    isFault? false
    ======================================================================================
    SIDX: 25
    QName: {http://ws.myeclipseide.com}divideRequest
    Class: com.ibm.ws.webservices.wsdl.symbolTable.MessageEntry
    name: null
    isReferenced? true
    isFault? false
    ======================================================================================
    SIDX: 26
    QName: {http://ws.myeclipseide.com}divideResponse
    Class: com.ibm.ws.webservices.wsdl.symbolTable.MessageEntry
    name: null
    isReferenced? true
    isFault? false
    ======================================================================================
    SIDX: 27
    QName: {http://ws.myeclipseide.com}addResponse
    Class: com.ibm.ws.webservices.wsdl.symbolTable.MessageEntry
    name: null
    isReferenced? true
    isFault? false
    ======================================================================================
    SIDX: 28
    QName: {http://ws.myeclipseide.com}Calculator_SEI
    Class: com.ibm.ws.webservices.wsdl.symbolTable.PortTypeEntry
    name:
    dynamicVars: implName = com.myeclipseide.ws.CalculatorSoapBindingImpl
    isReferenced? true
    ======================================================================================
    SIDX: 29
    QName: {http://ws.myeclipseide.com}CalculatorSoapBinding
    Class: com.ibm.ws.webservices.wsdl.symbolTable.BindingEntry
    name: com.myeclipseide.ws.CalculatorSoapBinding
    dynamicVars: BindingNamespace = http://schemas.xmlsoap.org/wsdl/soap/
    SOAPTransportURI = http://schemas.xmlsoap.org/soap/http
    interface name = com.myeclipseide.ws.Calculator_SEI
    isReferenced? true
    ======================================================================================
    SIDX: 30
    QName: {http://ws.myeclipseide.com}CalculatorService
    Class: com.ibm.ws.webservices.wsdl.symbolTable.ServiceEntry
    name: com.myeclipseide.ws.CalculatorService
    isReferenced? true
    service: {http://ws.myeclipseide.com}CalculatorService
    ports: [QName: {http://ws.myeclipseide.com}Calculator
    Class: com.ibm.ws.webservices.wsdl.symbolTable.PortEntry
    name: Calculator
    ]
    ======================================================================================
    1c —
    QName: addReturn
    Class: com.ibm.ws.webservices.wsdl.symbolTable.ChildElement
    name: addReturn
    dynamicVars: javaType = int
    2c —
    QName: arg_0_1
    Class: com.ibm.ws.webservices.wsdl.symbolTable.ChildElement
    name: arg_0_1
    dynamicVars: javaType = int
    3c —
    QName: arg_1_1
    Class: com.ibm.ws.webservices.wsdl.symbolTable.ChildElement
    name: arg_1_1
    dynamicVars: javaType = int
    4c —
    QName: subtractReturn
    Class: com.ibm.ws.webservices.wsdl.symbolTable.ChildElement
    name: subtractReturn
    dynamicVars: javaType = int
    5c —
    QName: arg_0_2
    Class: com.ibm.ws.webservices.wsdl.symbolTable.ChildElement
    name: arg_0_2
    dynamicVars: javaType = int
    6c —
    QName: arg_1_2
    Class: com.ibm.ws.webservices.wsdl.symbolTable.ChildElement
    name: arg_1_2
    dynamicVars: javaType = int
    7c —
    QName: multiplyReturn
    Class: com.ibm.ws.webservices.wsdl.symbolTable.ChildElement
    name: multiplyReturn
    dynamicVars: javaType = int
    8c —
    QName: arg_0_3
    Class: com.ibm.ws.webservices.wsdl.symbolTable.ChildElement
    name: arg_0_3
    dynamicVars: javaType = int
    9c —
    QName: arg_1_3
    Class: com.ibm.ws.webservices.wsdl.symbolTable.ChildElement
    name: arg_1_3
    dynamicVars: javaType = int
    10c —
    QName: divideReturn
    Class: com.ibm.ws.webservices.wsdl.symbolTable.ChildElement
    name: divideReturn
    dynamicVars: javaType = int
    11c —
    QName: arg_0_0
    Class: com.ibm.ws.webservices.wsdl.symbolTable.ChildElement
    name: arg_0_0
    dynamicVars: javaType = int
    12c —
    QName: arg_1_0
    Class: com.ibm.ws.webservices.wsdl.symbolTable.ChildElement
    name: arg_1_0
    dynamicVars: javaType = int
    ======================================================================================
    ———————–
    WSWS3282I: Info: Generating D:\Eclipse blue 8.5\WebServiceProject\.myeclipse\wsgeneration\wso0\com\myeclipseide\ws\Calculator_SEI.java.
    WSWS3282I: Info: Generating D:\Eclipse blue 8.5\WebServiceProject\.myeclipse\wsgeneration\wso0\com\myeclipseide\ws\CalculatorSoapBindingImpl.java.
    WSWS3282I: Info: Generating D:\Eclipse blue 8.5\WebServiceProject\.myeclipse\wsgeneration\wso0\WEB-INF\webservices.xml.
    WSWS3282I: Info: Generating D:\Eclipse blue 8.5\WebServiceProject\.myeclipse\wsgeneration\wso0\WEB-INF\ibm-webservices-bnd.xmi.
    WSWS3282I: Info: Generating D:\Eclipse blue 8.5\WebServiceProject\.myeclipse\wsgeneration\wso0\WEB-INF\ibm-webservices-ext.xmi.
    WSWS3282I: Info: Generating D:\Eclipse blue 8.5\WebServiceProject\.myeclipse\wsgeneration\wso0\WEB-INF\Calculator_mapping.xml.

    #310926 Reply

    marcn,

    The following errors occurred while running WSDL2Java. Generation aborted.

    After creating the java class, you need to select “Create web service from java bean(Bottom-up scenario)”.
    Can you clarify if you are using the WSDL that was generated after the above process?

    #310945 Reply

    marcn
    Member

    @support-shalini wrote:

    marcn,

    The following errors occurred while running WSDL2Java. Generation aborted.

    After creating the java class, you need to select “Create web service from java bean(Bottom-up scenario)”.
    Can you clarify if you are using the WSDL that was generated after the above process?

    Yes I did that create web service – bottom-up Senario with implementation class. After keying my service impl class the rest was fill in by eclipse. The i CLick finish and it will perform till 26% and gave me the Error message. No WSDL was created yet due to error.
    Thank

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: problem creating web services

You must be logged in to post in the forum log in