Web Service From Java class, serialization problem

Hi,
I want to create Web Service from Java class, I made java project, generated web service from it, create web service archive project and deployed it to WAS 6.40.
My class have 2 methods,
public int add(int a, int b);
public MyResponse doSomthing(MyRequest req);
I can succesfully call add method from Web Service Navigator, it works fine but when I call doSomthing methods I get the following error:
<b>
Deserializing fails. Nested message: XML Deserialization Error. Result class [com.mycomp.sap_tech.ws.MyRequest] does not have property [Amount] of type [java.lang.String]. It is required to load XML..
</b>
Any ideas how to resolve it?
P.S. MyRequest class is exposed throw VI, has default constractor and public getters and setters for all properties. It implements Serializable as well. Any guesses?
Thanks in advance,
Victor.

Hi Bhavik, thanks for response.
as I already mentioned it implements Serializable, so it is not the problem.
Thanks Avi but it didn't helps iether
Victor

Similar Messages

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

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

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

  • Error while deploying web service from Java class

    Hi,
    I have a simple java class which I want to deploy as web service with some methods in the Java class as web service operations.
    How to do this in Jdev 11g?
    Is there any good detailed tutorial on this?
    I just created an web service from the class and went for deployment in Weblogic.
    This resulted in Illegal Annotation Exception as shown below.
    Please help!!
    Regards,
    Sam
    [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application WorklistWebService-CustomWorklist-context-root on SOA_Cluster.: [HTTP:101216]Servlet: "CustomWorkListUtilSoap12HttpPort" failed to preload on startup in Web application: "WorklistWebService-CustomWorklist-context-root.war".
    javax.xml.ws.WebServiceException: Unable to create JAXBContext
    at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:164)
    at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:94)
    at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:281)
    at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:363)
    at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:202)
    at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:496)
    at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:539)
    at weblogic.wsee.jaxws.JAXWSDeployedServlet.getEndpoint(JAXWSDeployedServlet.java:183)
    at weblogic.wsee.jaxws.JAXWSServlet.registerEndpoint(JAXWSServlet.java:135)
    at weblogic.wsee.jaxws.JAXWSServlet.init(JAXWSServlet.java:64)
    at weblogic.wsee.jaxws.JAXWSDeployedServlet.init(JAXWSDeployedServlet.java:55)
    at javax.servlet.GenericServlet.init(GenericServlet.java:242)
    at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
    at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
    at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985)
    at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:485)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:201)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
    at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
    at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
    java.lang.StackTraceElement does not have a no-arg default constructor.
    this problem is related to the following location:
    at java.lang.StackTraceElement
    at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
    at java.lang.Throwable
    at public java.lang.Throwable com.gehc.util.jaxws.WorkflowExceptionBean.rootCause
    at com.gehc.util.jaxws.WorkflowExceptionBean
    at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:151)
    at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:95)
    ... 51 more
    Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
    java.lang.StackTraceElement does not have a no-arg default constructor.
    this problem is related to the following location:
    at java.lang.StackTraceElement
    at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
    at java.lang.Throwable
    at public java.lang.Throwable com.gehc.util.jaxws.WorkflowExceptionBean.rootCause
    at com.gehc.util.jaxws.WorkflowExceptionBean
    at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:478)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:308)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1149)
    at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:169)
    at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:160)
    at com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:74)
    at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:159)
    at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:151)
    ... 53 more
    :com.sun.xml.bind.v2.runtime.IllegalAnnotationsException:1 counts of IllegalAnnotationExceptions.
    [08:44:23 PM] Weblogic Server Exception: weblogic.application.ModuleException: [HTTP:101216]Servlet: "CustomWorkListUtilSoap12HttpPort" failed to preload on startup in Web application: "WorklistWebService-CustomWorklist-context-root.war".
    javax.xml.ws.WebServiceException: Unable to create JAXBContext
    at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:164)
    at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:94)
    at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:281)
    at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:363)
    at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:202)
    at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:496)
    at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:539)
    at weblogic.wsee.jaxws.JAXWSDeployedServlet.getEndpoint(JAXWSDeployedServlet.java:183)
    at weblogic.wsee.jaxws.JAXWSServlet.registerEndpoint(JAXWSServlet.java:135)
    at weblogic.wsee.jaxws.JAXWSServlet.init(JAXWSServlet.java:64)
    at weblogic.wsee.jaxws.JAXWSDeployedServlet.init(JAXWSDeployedServlet.java:55)
    at javax.servlet.GenericServlet.init(GenericServlet.java:242)
    at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
    at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
    at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985)
    at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:485)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:201)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
    at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
    at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
    java.lang.StackTraceElement does not have a no-arg default constructor.
    this problem is related to the following location:
    at java.lang.StackTraceElement
    at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
    at java.lang.Throwable
    at public java.lang.Throwable com.gehc.util.jaxws.WorkflowExceptionBean.rootCause
    at com.gehc.util.jaxws.WorkflowExceptionBean
    at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:151)
    at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:95)
    ... 51 more
    Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
    java.lang.StackTraceElement does not have a no-arg default constructor.
    this problem is related to the following location:
    at java.lang.StackTraceElement
    at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
    at java.lang.Throwable
    at public java.lang.Throwable com.gehc.util.jaxws.WorkflowExceptionBean.rootCause
    at com.gehc.util.jaxws.WorkflowExceptionBean
    at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:478)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:308)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1149)
    at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:169)
    at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:160)
    at com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:74)
    at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:159)
    at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:151)
    ... 53 more
    :com.sun.xml.bind.v2.runtime.IllegalAnnotationsException:1 counts of IllegalAnnotationExceptions
    [08:44:23 PM] Caused by: java.lang.Throwable: Substituted for the exception java.security.PrivilegedActionException which lacks a String contructor, original message - com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
    java.lang.StackTraceElement does not have a no-arg default constructor.
    this problem is related to the following location:
    [08:44:23 PM] See server logs or server console for more details.
    [08:44:23 PM] weblogic.application.ModuleException: [HTTP:101216]Servlet: "CustomWorkListUtilSoap12HttpPort" failed to preload on startup in Web application: "WorklistWebService-CustomWorklist-context-root.war".
    javax.xml.ws.WebServiceException: Unable to create JAXBContext
    at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:164)
    at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:94)
    at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:281)
    at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:363)
    at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:202)
    at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:496)
    at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:539)
    at weblogic.wsee.jaxws.JAXWSDeployedServlet.getEndpoint(JAXWSDeployedServlet.java:183)
    at weblogic.wsee.jaxws.JAXWSServlet.registerEndpoint(JAXWSServlet.java:135)
    at weblogic.wsee.jaxws.JAXWSServlet.init(JAXWSServlet.java:64)
    at weblogic.wsee.jaxws.JAXWSDeployedServlet.init(JAXWSDeployedServlet.java:55)
    at javax.servlet.GenericServlet.init(GenericServlet.java:242)
    at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
    at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
    at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985)
    at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:485)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:201)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
    at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
    at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
    java.lang.StackTraceElement does not have a no-arg default constructor.
    this problem is related to the following location:
    at java.lang.StackTraceElement
    at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
    at java.lang.Throwable
    at public java.lang.Throwable com.gehc.util.jaxws.WorkflowExceptionBean.rootCause
    at com.gehc.util.jaxws.WorkflowExceptionBean
    at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:151)
    at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:95)
    ... 51 more
    Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
    java.lang.StackTraceElement does not have a no-arg default constructor.
    this problem is related to the following location:
    at java.lang.StackTraceElement
    at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
    at java.lang.Throwable
    at public java.lang.Throwable com.gehc.util.jaxws.WorkflowExceptionBean.rootCause
    at com.gehc.util.jaxws.WorkflowExceptionBean
    at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:478)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:308)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1149)
    at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:169)
    at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:160)
    at com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:74)
    at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:159)
    at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:151)
    ... 53 more
    :com.sun.xml.bind.v2.runtime.IllegalAnnotationsException:1 counts of IllegalAnnotationExceptions
    [08:44:23 PM] #### Deployment incomplete. ####
    [08:44:23 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)

    javax.xml.ws.WebServiceException: Unable to create JAXBContext
    Webservice:  Unable to create JAXBContext
    javax.xml.ws.WebServiceException: Unable to create JAXBContext
    http://naive-amseth.blogspot.ca/2010/06/error-unable-to-create-jaxbcontext.html

  • WEB SERVICE FROM JAVA CLASS

    Hi,
    I'm new to BPEL and I've a problem: i need to create a WEBSERVICE from Java class.
    This Java class contain functions to call other functions in other packages.
    These last function contain sql query: it's an java "interface" application between BPEL and an EXTERNAL Oracle database 10g.
    I want to create one WEB SERVICE from this application and i followed the steps (right click, menù, create j2ee webservice, etc) i obtain error:
    VALIDATION FAILED --- Files at the following URLs cannot be modified:
    File:/C:/OraBPELPM1/integration/jdev/jdev/mywork/RichiesteWebService/ARRICH/app/src/controller/MyWebService1.webservice
    File:/C:/OraBPELPM1/integration/jdev/jdev/mywork/RichiesteWebService/ARRICH/app/src/controller/IMyWebService.wsdl
    File:/C:/OraBPELPM1/integration/jdev/jdev/mywork/RichiesteWebService/ARRICH/app/src/controller/MyWebService1.dd
    Show the java class "interface":
    package controller;
    import java.util.*;
    import java.sql.*;
    import domain.*;
    import dao.*;
    import utility.*;
    public class Request_Incoming_Controller {
    public Request_Incoming_Controller() {}
    /* Update StatoTurismo */
    public static String aggiornaStTurismo(int numIncoming, String tur) {
    GregorianCalendar dp = FormatoData.dataDaDate1("00/00/0000");
    Request_Incoming ric = new Request_Incoming(numIncoming,"","",dp,dp,"","","",0,"",tur,"");
    // try {
    if(ric.aggiornaTurismo()<0)return "NO";
    return "OK";
    // } catch (SQLException ex) {
    // System.err.println("Eccezione durante l'aggiornamento "
    // + ex.getMessage()); }
    /* Update StatoCassa */
    public static String aggiornaStCassa(int numIncoming,String cash) {
    GregorianCalendar dp = FormatoData.dataDaDate1("00/00/0000");
    Request_Incoming ric = new Request_Incoming(numIncoming,"","",dp,dp,"","","",0,"","",cash);
    // try {
    if(ric.aggiornaCassa()<0) return "NO";
    return "OK";
    // } catch (SQLException ex) {
    // System.err.println("Eccezione durante l'aggiornamento "
    // + ex.getMessage()); }
    /* Lettura del NumIncoming assegnato dal sistema dopo il caricamento della
    * richiesta in base alla matricola del Dipendente
    public static int caricaNumDaDip(String dipendente){
    Request_Incoming ric = new Request_Incoming(0,dipendente);
    // try {
    ric.trovaNumIncoming();
    return ric.getNumIncoming();
    // } catch (SQLException ex) {
    // System.err.println("Eccezione durante l'aggiornamento "
    // + ex.getMessage()); }
    Can Anyone help?
    Is urgently.........thanks
    Daniele

    You should try to post it there:
    http://forums.oracle.com/forums/forum.jspa?forumID=97
    But if I look at the error, it looks like some files are Read-Only. Maybe you should check if they are or if you have the appropriate rights on the folder.
    Good luck

  • Creating Web Service from Java Class-How to eliminate nillable="true"

    Does anyone know how to eliminate the attribute, nillable="true", from the element tags which describe the parameters in the WSDL created when creating a web service from a Java Class? It does this only for the string types. Is there something I need to set when creating the web service or before creating the web service? Or the only way is to modify this WSDL then recreate the web service from the WSDL.
    example part of wsdl:
    this is in the <types> tag:
    <complexType name="getData">
    <sequence>
    <element name="schema" type="string" nillable="true"/>
    <element name="table_or_view_name" type="string" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="getDataResponse">
    <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>

    I did do this and I got the following error when deploying to the Stand-alone OC4j:
    Operation failed with error:
    Error compiling
    :D:\h\cots\Oracle\JDeveloper10g10.1.3\j2ee\home\applications\DBOperationsWSApp-DBData-WS\WebServices: Error instantiating compiler: webservice artifact generation failed :oracle.j2ee.ws.common.tools.api.ValidationException : Exception declaration mismatch between Implementation: dbdatapackage.DBDataOperations and Interface: dbdatapackage.DBDataWS. Impl class Method: getData declares exceptions not declared by the interface (java.lang.Exception)
    I am quite sure what it is saying. It generated the code for the Interface: dbdatapackage.DVDataWS. Impl class. Why would it not do it right? What expection is it complaining about? java.lang.Exception?

  • Create web service from java class in Jdeveloper 11g

    I have very simple java class which I want to expose as a web service. I am using the Jdeveloper's in-built wizard to "Creat Web Service" from a java class. While doing so when I am selecting a method to be exposed as a web service, I get a error pop-up which says "Failed to load system class."
    I am not able to understand the reson for this error. I tried to do this with a very simple java code too but still no luck!!
    Here is the code:
    public class DownloadFileFromECMWrapper {
    public DownloadFileFromECMWrapper() {}
    public static void main(String args[]){
    DownloadFileFromECMWrapper obj = new DownloadFileFromECMWrapper();
    obj.callDownloadFileFromECM("C:\\shivam\\MyFile.txt");
    public String callDownloadFileFromECM(String filePath){
    System.out.println(filePath);
    return filePath;
    Can someone please help me on this.
    Edited by: 962154 on Sep 28, 2012 2:37 PM

    I have very simple java class which I want to expose as a web service. I am using the Jdeveloper's in-built wizard to "Creat Web Service" from a java class. While doing so when I am selecting a method to be exposed as a web service, I get a error pop-up which says "Failed to load system class."
    I am not able to understand the reson for this error. I tried to do this with a very simple java code too but still no luck!!
    Here is the code:
    public class DownloadFileFromECMWrapper {
    public DownloadFileFromECMWrapper() {}
    public static void main(String args[]){
    DownloadFileFromECMWrapper obj = new DownloadFileFromECMWrapper();
    obj.callDownloadFileFromECM("C:\\shivam\\MyFile.txt");
    public String callDownloadFileFromECM(String filePath){
    System.out.println(filePath);
    return filePath;
    Can someone please help me on this.
    Edited by: 962154 on Sep 28, 2012 2:37 PM

  • Calling a Web Service from Java

    Our java guru (who is out sick....AHHHH) created all the calls that are needed to access the web service that he has running. For example the call getLongList(String user, String password) will return a list of all outstanding transactions. He made a jar file that has service has class files for PortType, Service, Service Locator and Soap Binding stub.
    How do I call this web service from java? Do I have to import it into my classpath? or just call these parameters from within my java code?

    never mind...i got it

  • Create web service using java class

    Hi,
    I created the web service using java class then i deployed this web service in to the weblogic admin server.when i tested this process it is working fine.
    when I tested The generated WSDL to this process in browser(IE). it is not working.
    I need to to invoke this webservice from another BPEL but this WSDL is not working.

    Hi,
    when i created the webservice in jdeveloper by default it is connected to integrated weblogic server and generates this wsdl.
    http://localhost:7101/helloApplication-javaexcel-context-root/MyWebService1Soap12HttpPort?WSDL
    then I deployed this webservice in to the Adminserver.it gives the following URL.
    http://192.168.56.1:7001/extracExcelToCSV-extractExcelToCSV-context-root/ExtractExcelToCSVSoap12HttpPort?wsdl
    This URL is not working but when i tested this process it is working fine.
    It is giving below error when i try to invoke from jdeveloper
    Error while reading wsdl file
    caused by:java.net.connectExcepption :Connection timed out:connect

  • Calling a Web Service from Java Webdynpro

    Hi,
    Can any one give me step by setp details on how to call a Web Service from Java Webdynpro ?
    I tried creating a model using Import Web Service Model but when I completed creating the model, I got some errors as shown below.
    Error               The method setRouteGeometryLineArray(double[][]) in the type Trip is not applicable for the arguments (double[])     ComplexType_Trip.java     WS_INVOKE/gen_wdp/packages/com/cintas/test/model/p1     line 249
    thanks
    SBK

    Hi SBK,
    I assume you may already have read the [help guide|http://help.sap.com/saphelp_nw70/helpdata/EN/81/12703e5da3e946e10000000a114084/content.htm] This gives a pretty good idea of how to do it (step by step).
    Is there a typo in the error you pasted?
    Error The method setRouteGeometryLineArray(double][) in the type Trip is not applicable for the arguments (double[]) ComplexType_Trip.java WS_INVOKE/gen_wdp/packages/com/cintas/test/model/p1 line 249
    The square brackets [] after double in the method call appear to be reversed. Is that also in the code? or just a mistake here?
    Hope this points you in the right direction.
    BRgds,
    Simon

  • Create web service from java code in Jdeveloper 11.1.1.5

    I am try to create web service from java code by default it is connected to Integrated web logic server and generate a
    WSDL like this.
    http://localhost:7101/javaexcel-project1-context-root/MyWebService1Soap12HttpPort.
    please tell me how we can change this local host to our needed Host and how to deploy this web service to web logic server.

    Hi,
    Just right click on your project and deploy it to your application server (Weblogic Server (Not the Integrated server)). {Before that, you have create your Application server connection in the Jdeveloper).
    After deployment open the Admin console of the weblogic server and find your ear of the project.Click on that (Go to the "Testing tab") and you will get the "WSDL" (Concreate wsdl)  and "Test Client" of the Project.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • RMI exception calling web service from proxy class

    I am getting the following error attempting to call a web service from a proxy. It appears to relate to the type of objects I am trying to send vs the type that is expected. Following the exception I am adding a copy of the control where calling the web service is sucessful, a copy of the proxy class that I am using to make this unsucessful call, and the controller.jpf that has the formBean where I am creating my objects
    Caught Exception Calling the Web Service from the Proxy. The Exception is the f
    ollowing: java.rmi.RemoteException: web service invoke failed: javax.xml.soap.SO
    APException: failed to serialize class org.openuri.www.CreateAccountCheckingReq
    uestweblogic.xml.schema.binding.SerializationException: type mapping lookup fail
    ure on class=class controls.CheckingService$anyType TypeMapping=TYPEMAPPING SIZE
    =5
    ENTRY 1:
    class: org.openuri.www.CreateAccountCheckingResponse
    xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingResponse
    ser: org.openuri.www.CreateAccountCheckingResponseCodec@c0f4da
    deser: org.openuri.www.CreateAccountCheckingResponseCodec@b1dd4
    ENTRY 2:
    class: org.openuri.www.FundingInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:FundingInfoAnonType
    ser: org.openuri.www.FundingInfoAnonTypeCodec@1d36711
    deser: org.openuri.www.FundingInfoAnonTypeCodec@13a59e
    ENTRY 3:
    class: org.openuri.www.AccountInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:AccountInfoAnonType
    ser: org.openuri.www.AccountInfoAnonTypeCodec@1de5959
    deser: org.openuri.www.AccountInfoAnonTypeCodec@bbf788
    ENTRY 4:
    class: org.openuri.www.CustomerInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:CustomerInfoAnonType
    ser: org.openuri.www.CustomerInfoAnonTypeCodec@7824f9
    deser: org.openuri.www.CustomerInfoAnonTypeCodec@1c35fe1
    ENTRY 5:
    class: org.openuri.www.CreateAccountCheckingRequest
    xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingRequest
    ser: org.openuri.www.CreateAccountCheckingRequestCodec@1cbcd7b
    deser: org.openuri.www.CreateAccountCheckingRequestCodec@11f60ce
    ; nested exception is:
    javax.xml.soap.SOAPException: failed to serialize class org.openuri.www
    .CreateAccountCheckingRequestweblogic.xml.schema.binding.SerializationException:
    type mapping lookup failure on class=class controls.CheckingService$anyType Typ
    eMapping=TYPEMAPPING SIZE=5
    ENTRY 1:
    class: org.openuri.www.CreateAccountCheckingResponse
    xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingResponse
    ser: org.openuri.www.CreateAccountCheckingResponseCodec@c0f4da
    deser: org.openuri.www.CreateAccountCheckingResponseCodec@b1dd4
    ENTRY 2:
    class: org.openuri.www.FundingInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:FundingInfoAnonType
    ser: org.openuri.www.FundingInfoAnonTypeCodec@1d36711
    deser: org.openuri.www.FundingInfoAnonTypeCodec@13a59e
    ENTRY 3:
    class: org.openuri.www.AccountInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:AccountInfoAnonType
    ser: org.openuri.www.AccountInfoAnonTypeCodec@1de5959
    deser: org.openuri.www.AccountInfoAnonTypeCodec@bbf788
    ENTRY 4:
    class: org.openuri.www.CustomerInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:CustomerInfoAnonType
    ser: org.openuri.www.CustomerInfoAnonTypeCodec@7824f9
    deser: org.openuri.www.CustomerInfoAnonTypeCodec@1c35fe1
    ENTRY 5:
    class: org.openuri.www.CreateAccountCheckingRequest
    xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingRequest
    ser: org.openuri.www.CreateAccountCheckingRequestCodec@1cbcd7b
    deser: org.openuri.www.CreateAccountCheckingRequestCodec@11f60ce
    Java Control for the web service:
    package controls;
    import weblogic.webservice.context.WebServiceContext;
    * @jc:location http-url="http://localhost:7001/Checking.jws"
    * @jc:wsdl file="#CheckingWsdl"
    * @jc:handler callback="MessageHandler" operation="MessageHandler"
    public interface CheckingService extends com.bea.control.ControlExtension, com.bea.control.ServiceControl
    public static class CustomerInfo
    implements java.io.Serializable
    public java.lang.String FirstName;
    public java.lang.String LastName;
    public java.lang.String MiddleName;
    public int SSN;
    public int CustomerNumber;
    public java.util.Calendar CreationDate;
    public java.util.Calendar LastModifiedDate;
    public static class FundingInfo
    implements java.io.Serializable
    public float Amount;
    public java.util.Calendar CurrentDate;
    public int AccountNumber;
    public static class anyType
    implements java.io.Serializable
    public com.bea.xml.XmlObject[] t;
    public static class AccountInfo
    implements java.io.Serializable
    public int AccountNumber;
    public float Balance;
    public int CustomerNumber;
    public java.util.Calendar LastModifiedDate;
    public WebServiceContext context = CheckingService.context;
    * @jc:protocol form-post="false" form-get="false"
    public AccountInfo CreateAccountChecking (CustomerInfo CustomerInfo, FundingInfo FundingInfo, anyType CommonHeader);
    static final long serialVersionUID = 1L;
    /** @common:define name="CheckingWsdl" value::
    <?xml version="1.0" encoding="utf-8"?>
    <!-- @editor-info:link autogen="false" source="" -->
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.openuri.org/">
    <types>
    <s:schema targetNamespace="http://www.openuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema">
    <s:element name="CreateAccountCheckingRequest">
    <s:complexType>
    <s:sequence>
    <s:element name="CustomerInfo">
    <s:complexType>
    <s:sequence>
    <s:element name="FirstName" type="s:string" nillable="false"/>
    <s:element name="LastName" type="s:string" nillable="false"/>
    <s:element name="MiddleName" type="s:string" nillable="true"/>
    <s:element name="SSN" type="s:int"/>
    <s:element name="CustomerNumber" type="s:int"/>
    <s:element name="CreationDate" type="s:dateTime"/>
    <s:element name="LastModifiedDate" type="s:dateTime"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="FundingInfo">
    <s:complexType>
    <s:sequence>
    <s:element name="Amount" type="s:float"/>
    <s:element name="CurrentDate" type="s:dateTime"/>
    <s:element name="AccountNumber" type="s:int"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="CommonHeader" type="s:anyType"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="CreateAccountCheckingResponse">
    <s:complexType>
    <s:sequence>
    <s:element name="AccountInfo">
    <s:complexType>
    <s:sequence>
    <s:element name="AccountNumber" type="s:int"/>
         <s:element name="Balance" type="s:float"/>
         <s:element name="CustomerNumber" type="s:int"/>
         <s:element name="LastModifiedDate" type="s:dateTime"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="string" nillable="true" type="s:string"/>
    </s:schema>
    </types>
    <message name="CreateAccountCheckingSoapIn">
    <part name="parameters" element="s0:CreateAccountCheckingRequest"/>
    </message>
    <message name="CreateAccountCheckingSoapOut">
    <part name="parameters" element="s0:CreateAccountCheckingResponse"/>
    </message>
    <portType name="CheckingSoap">
    <operation name="CreateAccountChecking">
    <input message="s0:CreateAccountCheckingSoapIn"/>
    <output message="s0:CreateAccountCheckingSoapOut"/>
    </operation>
    </portType>
    <binding name="CheckingSoap" type="s0:CheckingSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="CreateAccountChecking">
    <soap:operation soapAction="http://www.openuri.org/CreateAccountChecking" style="document"/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    </binding>
    <service name="Checking">
    <port name="CheckingSoap" binding="s0:CheckingSoap">
    <soap:address location="http://localhost:7001/Checking.jws"/>
    </port>
    </service>
    </definitions>
    FOLLOWING IS THE PROXY CLASS THAT IS UNSUCCESSFUL
    import controls.CheckingService.anyType;
    import java.util.ArrayList;
    import java.util.List;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.HandlerInfo;
    import javax.xml.rpc.handler.HandlerRegistry;
    import org.openuri.CreateAccountCheckingResponseDocument.CreateAccountCheckingResponse;
    import org.openuri.www.CustomerInfoAnonType;
    import org.openuri.www.FundingInfoAnonType;
    import weblogic.jws.proxies.*;
    import weblogic.webservice.context.WebServiceContext;
    import weblogic.webservice.context.WebServiceSession;
    import weblogic.webservice.core.handler.WSSEClientHandler;
    import weblogic.webservice.tools.pagegen.result;
    import weblogic.xml.security.UserInfo;
    import weblogic.xml.security.wsse.Security;
    import weblogic.xml.security.wsse.SecurityElementFactory;
    //import weblogic.jws.proxies.WebServiceB;
    //import weblogic.jws.proxies.WebServiceB_Impl;
    //import weblogic.jws.proxies.WebServiceBSoap;
    public class CheckingWSProxy
    public static void CallWS(Controller.CreateAccountCheckingForm form)
    String user;
    String pass;
    try{
    * Instantiate the main proxy class. The proxy class has the same name as the
    * web service, with "_Impl" appended.
    Checking myservice = new Checking_Impl("http://localhost:7001/ConsumerAccountApp/schemas/CheckingService.wsdl");
    WebServiceContext context = myservice.context();
    WebServiceSession session = context.getSession();
    * Registers a handler for the SOAP message traffic.
    HandlerRegistry registry = myservice.getHandlerRegistry();
    List list = new ArrayList();
    list.add(new HandlerInfo(WSSEClientHandler.class, null, null));
    registry.setHandlerChain(new QName("Checking"), list);
    * Set the username and password token for SOAP message sent from the client, through
    * the proxy, to the web service.
    user = form.getUsername();
    pass = form.getPassword();
    UserInfo ui = new UserInfo(user, pass);
    session.setAttribute(WSSEClientHandler.REQUEST_USERINFO, ui);
    * Adds the username / password token to the SOAP header.
    SecurityElementFactory factory = SecurityElementFactory.getDefaultFactory();
    Security security = factory.createSecurity(null);
    security.addToken(ui);
    session.setAttribute(WSSEClientHandler.REQUEST_SECURITY, security);
    * Get the protocol-specific proxy class.
    CheckingSoap msg=myservice.getCheckingSoap();
    * Invoke the web service method
    msg.createAccountChecking((CustomerInfoAnonType)form.getProxyCustomerInfo(), (FundingInfoAnonType)form.getProxyFundingInfo(), (Object)form.get_CommonHeader());
    catch (Exception ex)
    System.out.println("Caught Exception Calling the Web Service from the Proxy. The Exception is the following: " + ex.toString());
    FOLLOWING IS THE FORMBEAN IN THE CONTROLLER.JPF FILE
    * FormData get and set methods may be overwritten by the Form Bean editor.
    public static class CreateAccountCheckingForm extends FormData
    private anyType _CommonHeader;
    private controls.CheckingService.FundingInfo _FundingInfo;
    private controls.CheckingService.CustomerInfo _CustomerInfo;
    private java.util.Date dOut;
    private java.util.Calendar cOut;
    private CustomerInfo proxyCustomerInfo;
    private FundingInfo proxyFundingInfo;
    private String stringDate;
    private String currentDate;
    private String lastModifiedDate;
    private String creationDate;
    private String systemMessage;
    private String username;
    private String password;
    private String accountType;
    private String trashTransferAccount;
    private String trashAccountNumber;
    private boolean secureFlag;
    public void set_CustomerInfo(controls.CheckingService.CustomerInfo _CustomerInfo)
    _CustomerInfo.CreationDate = parseDate(getCreationDate());
    _CustomerInfo.LastModifiedDate = parseDate(getLastModifiedDate());
    this._CustomerInfo = _CustomerInfo;
    public controls.CheckingService.CustomerInfo get_CustomerInfo()
    if(this._CustomerInfo == null)
    this._CustomerInfo = new controls.CheckingService.CustomerInfo();
    _CustomerInfo.CreationDate = dateNow();
    _CustomerInfo.LastModifiedDate = dateNow();              
    return this._CustomerInfo;
    public CustomerInfo getProxyCustomerInfo()
    this.proxyCustomerInfo = (CustomerInfo)this._CustomerInfo;
    return this.proxyCustomerInfo;
    public void set_FundingInfo(controls.CheckingService.FundingInfo _FundingInfo)
    _FundingInfo.CurrentDate = parseDate(getCurrentDate());
    this._FundingInfo = _FundingInfo;
    public controls.CheckingService.FundingInfo get_FundingInfo()
    if(this._FundingInfo == null)
    this._FundingInfo = new controls.CheckingService.FundingInfo();
    _FundingInfo.CurrentDate = dateNow();
    return this._FundingInfo;
    public FundingInfo getProxyFundingInfo()
    this.proxyFundingInfo = (FundingInfo)this._FundingInfo;
    return this.proxyFundingInfo;
    public void set_CommonHeader(anyType _CommonHeader)
    this._CommonHeader = _CommonHeader;
    public anyType get_CommonHeader()
    if(this._CommonHeader == null)
    this._CommonHeader = new anyType();
    return this._CommonHeader;
    public java.util.Calendar dateNow()
    this.dOut = new Date();
    Calendar cOut = this.cOut.getInstance();
    cOut.setTime(this.dOut);
    this.cOut = cOut;
    return this.cOut;
    public java.util.Calendar parseDate( String strDate )
    SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
    Calendar cOut = this.cOut;
    df4.setLenient( false );
    try
    this.dOut = df4.parse( strDate );
    } catch ( ParseException e )
    cOut.getInstance();
    cOut.setTime(dOut);
    this.cOut = cOut;
    return this.cOut;
    public void setStringDate( String stringDate )
    this.stringDate = stringDate;
    public String getStringDate()
    return this.stringDate;
    public void setCurrentDate( String currentDate )
    this.currentDate = currentDate;
    public String getCurrentDate()
    SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
    this.currentDate = df4.format(_FundingInfo.CurrentDate.getTime());
    return this.currentDate;
    public void setLastModifiedDate( String lastModifiedDate )
    this.lastModifiedDate = lastModifiedDate;
    public String getLastModifiedDate()
    SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
    this.lastModifiedDate = df4.format(_CustomerInfo.LastModifiedDate.getTime());
    return this.lastModifiedDate;
    public void setCreationDate( String creationDate )
    this.creationDate = creationDate;
    public String getCreationDate()
    SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
    this.creationDate = df4.format(_CustomerInfo.CreationDate.getTime());
    return this.creationDate;
    public void setUsername( String username )
    this.username = username;
    public String getUsername()
    return this.username;
    public void setPassword( String password )
    this.password = password;
    public String getPassword()
    return this.password;
    public void setAccountType( String accountType )
    this.accountType = accountType;
    public String getAccountType()
    return this.accountType;
    public void setTrashTransferAccount( String trashTransferAccount )
    this.trashTransferAccount = trashTransferAccount;
    public String getTrashTransferAccount()
    return this.trashTransferAccount;
    public void setTrashAccountNumber( String trashAccountNumber )
    this.trashAccountNumber = trashAccountNumber;
    public String getTrashAccountNumber()
    return this.trashAccountNumber;
    public void setSystemMessage( String systemMessage )
    this.systemMessage = systemMessage;
    public String getSystemMessage()
    return this.systemMessage;
    public void setSecureFlag( boolean secureFlag )
    this.secureFlag = secureFlag;
    public boolean getSecureFlag()
    return this.secureFlag;
    }

    This exception means that xml namespaces are different.
    Etc. soap has xml element which doesn't belong to namespace of parent xml element and namespace is set without prefix.
    I had such problem.
    Try to set namespace prefix for this element.
    Example:
    <el1>
    <el2 xmlns="http://..."/>
    </el1>
    Should be
    <el1>
    <q:el2 xmlns:q="http://..."/>
    </el1>

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

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

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

  • Sample code to access BAPI Web services from JAVA required

    Hi All,
    I am a java developer. I am new to SAP. I just want to know how to use the web services from ABAP
    I got the WSDL, and able to convert the WSDL into java classes using java2wsdl command.
    Now i want to know how to use these classes, in my java class.  i want to know two things
    1) How to get authentication or session  or token to use the service
    2) How to consume BAPI services by using above session or token.
    Any help, really appreciated. Plz help me if any one knows.
    Thanks alot,
    Mohan

    Triplehhh wrote:
    Hi,
    I have a web application developed with java,jsp and javascript and server used is weblogic.
    Now this application is running fine on my PC. I assume from this that there is no client side Java. Is this right?
    So what steps are required so that I can access the application from other PCs also.If there is no client side Java then you have to do nothing other than make sure your PC can be reached from the other PCs. i.e. no firewalls blocking the access and routing available between the client PC and the server PC.
    I don't see what this has to do with JNLP. Am I missing something?

  • How to pass username/password to BPEL web service from java proxy?

    Hi all,
    Environment : SOA Suite 11g
    I am using basic http authentication in my SOA services using "oracle/wss_http_token_client_policy" policy. Now i need to invoke these SOA web services from a java proxy.
    Please let me know how this can be done.
    Thanks in advance

    Have you tried the below posts ?
    BPEL to invoke Webservice secured with HTTP Basic authentication
    Invoke a BPEL process using HTTP Basic Authentication
    http://docs.oracle.com/cd/E21764_01/web.1111/e13713/owsm_appendix.htm#CHDBAHBI
    Thanks,
    Vijay

  • How to Trigger CAF web services from java Job schedulers?

    Hi Experts,
    I am in need of calling CAF based web services from custom Job scheduler.
    Could you please provide your idea and input if anyway we can call such web service by java api in custom jobs development?
    Thing is that we have CAF BO which hold around 1 million record (master data) and based on approval scenario (developed in WDJ apps) we will have to move this record to another business object for further manipulation?
    Hence due to huge number of record in BO, I would like to automate this activity by calling Jobs from WDJ apps and then Job will trigger the CAF web service which would create record into the BO object.
    Please share your idea and let me if it can be achievable by java apis to trigger Jobs by WDJ apps & webservice by jobs?
    Thanks & Regards,
    Pankaj

    Hi Experts,
    I am in need of calling CAF based web services from custom Job scheduler.
    Could you please provide your idea and input if anyway we can call such web service by java api in custom jobs development?
    Thing is that we have CAF BO which hold around 1 million record (master data) and based on approval scenario (developed in WDJ apps) we will have to move this record to another business object for further manipulation?
    Hence due to huge number of record in BO, I would like to automate this activity by calling Jobs from WDJ apps and then Job will trigger the CAF web service which would create record into the BO object.
    Please share your idea and let me if it can be achievable by java apis to trigger Jobs by WDJ apps & webservice by jobs?
    Thanks & Regards,
    Pankaj

Maybe you are looking for

  • Error while configuring Enterprise manager

    Hello, I want to configure enterprise manager, while creating a new database using database configuration assistant in oracle 11g i am getting following error message *"Configuring database with database control requires a listener to be configured i

  • Ipod 3g it's not recognized by itunes 11.1.5

    When I plug it, my mac book pro doesn`t recognize it. It doesn`t show up on the desk or itunes, since I update it please help!

  • Open form in query mode

    I want to be able to open a form in query mode - is there any way to set this? I am using Designer and Headstart. Thanks

  • Still Frames causing audio blips

    A still clip via Edit - Create Still Frame, when it is played in Timeline, always causes an audio blip as Playhead advances into any next clip in project. I cannot mute this other than by unticking audio box at end of Timeline. I am using iMovieHD 5.

  • Corrupt image filenames

    I'm not sure if this is a TimeMachine/TimeCapsule problem or an iPhoto problem. About 4 weeks ago, I installed a TimeCapsule and started backing up my machine via TM/TC. About 2 weeks ago I've noticed that a large number of my photos within iPhoto ar