JWSC error: ClassCastException SoapArrayType to ByNameBean

Hi,
The jwsc throws weblogic.wsee.tools.WsBuildException: java.lang.ClassCastException: com.bea.staxb.buildtime.internal.bts.SoapArrayType cannot be cast to com.bea.staxb.buildtime.internal.bts.ByNameBean
The full trace is pasted at bottom.
================================================================
Here is the method defintion in the class WSConfiguration. The returned parameter type is ConfigurationGetListRet, it contains Configuration[] array.
* Outer getList method that takes a filter parameter.
@WebMethod(operationName="Configuration_getList")
@WebResult(name="Configuration_getList_Ret",
targetNamespace="http://ws.cm.ml.com")
public ConfigurationGetListRet getList(
@WebParam(name="Configuration_getList_int", targetNamespace="http://ws.cm.ml.com")
int sessionKey,
@WebParam(name="Configuration_getList_filter", targetNamespace="http://ws.cm.ml.com")
ConfigurationFilter filter){
ConfigurationGetListRet ret = null;
try{
InitialContext ic = new InitialContext();
ConfigurationHome configurationHome =
(ConfigurationHome) ic.lookup("java:comp/env/ejb/ConfigurationReference");
ConfigurationObject configurationService = configurationHome.create();
ret = configurationService.getList(sessionKey, filter);
}catch(CMException cmex){
ret = new CMReturnType(new CMReturnStatus(cmex), null);
} catch (Exception e) {
ret = new CMReturnType( new CMReturnStatus(new CMException(-1, "Exception in calling EJB: Configuration.getList", e)), null );
return ret;
========================================================================
/build/cashMgr/dev/sye/jcash/src/jcashws/ws.xml:26: weblogic.wsee.tools.jws.build.CompileException: Error compiling web service: /build/cashMgr/dev/sye/jcash/src/jcash/src/com/ml/cm/ws/WSConfiguration.java
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:234)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: weblogic.wsee.tools.jws.build.CompileException: Error compiling web service: /build/cashMgr/dev/sye/jcash/src/jcash/src/com/ml/cm/ws/WSConfiguration.java
at weblogic.wsee.tools.jws.build.JwsCompiler.buildWebServices(JwsCompiler.java:526)
at weblogic.wsee.tools.jws.build.JwsCompiler.compile(JwsCompiler.java:483)
at weblogic.wsee.tools.anttasks.JwsModule.generate(JwsModule.java:376)
at weblogic.wsee.tools.anttasks.JwsModule.build(JwsModule.java:255)
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:227)
... 12 more
Caused by: weblogic.wsee.tools.WsBuildException: java.lang.ClassCastException: com.bea.staxb.buildtime.internal.bts.SoapArrayType cannot be cast to com.bea.staxb.buildtime.internal.bts.ByNameBean
at weblogic.wsee.tools.jws.jaxrpc.JAXRPCWebServiceInfo.createBindings(JAXRPCWebServiceInfo.java:227)
at weblogic.wsee.tools.jws.wsdl.WsdlBuilder.processImpl(WsdlBuilder.java:43)
at weblogic.wsee.tools.jws.jaxrpc.JAXRPCProcessor.process(JAXRPCProcessor.java:27)
at weblogic.wsee.tools.jws.process.CompositeProcessor.process(CompositeProcessor.java:47)
at weblogic.wsee.tools.jws.build.JwsCompiler.buildWebServices(JwsCompiler.java:522)
... 16 more
Caused by: java.lang.ClassCastException: com.bea.staxb.buildtime.internal.bts.SoapArrayType cannot be cast to com.bea.staxb.buildtime.internal.bts.ByNameBean
at com.bea.staxb.buildtime.Java2Schema.createBindingTypeFor(Java2Schema.java:897)
at com.bea.staxb.buildtime.Java2Schema.findOrCreateBindingTypeFor(Java2Schema.java:735)
at com.bea.staxb.buildtime.Java2Schema$1.findOrCreateBindingTypeFor(Java2Schema.java:173)
at com.bea.staxb.buildtime.internal.facade.BtsPropgenFacade.getQnameFor(BtsPropgenFacade.java:292)
at com.bea.staxb.buildtime.internal.facade.BtsPropgenFacade.setType(BtsPropgenFacade.java:199)
at com.bea.staxb.buildtime.Java2Schema.createPropgenFacade(Java2Schema.java:2005)
at com.bea.staxb.buildtime.Java2Schema.processProperty(Java2Schema.java:1840)
at com.bea.staxb.buildtime.Java2Schema.bindProperties(Java2Schema.java:1441)
at com.bea.staxb.buildtime.Java2Schema.createBindingTypeFor(Java2Schema.java:920)
at com.bea.staxb.buildtime.Java2Schema.findOrCreateBindingTypeFor(Java2Schema.java:735)
at com.bea.staxb.buildtime.Java2Schema.internalBind(Java2Schema.java:485)
at com.bea.staxb.buildtime.BindingCompiler.bind(BindingCompiler.java:125)
at com.bea.staxb.buildtime.BindingCompiler.bindAsExplodedTylar(BindingCompiler.java:161)
at weblogic.wsee.bind.buildtime.internal.SoapAwareJava2Schema.bindAsExplodedTylar(SoapAwareJava2Schema.java:1412)
at weblogic.wsee.bind.buildtime.internal.TylarJ2SBindingsBuilderImpl.createBuildtimeBindings(TylarJ2SBindingsBuilderImpl.java:216)
at weblogic.wsee.tools.jws.jaxrpc.JAXRPCWebServiceInfo.createBindings(JAXRPCWebServiceInfo.java:223)
... 20 more
--- Nested Exception ---
weblogic.wsee.tools.jws.build.CompileException: Error compiling web service: /build/cashMgr/dev/sye/jcash/src/jcash/src/com/ml/cm/ws/WSConfiguration.java
at weblogic.wsee.tools.jws.build.JwsCompiler.buildWebServices(JwsCompiler.java:526)
at weblogic.wsee.tools.jws.build.JwsCompiler.compile(JwsCompiler.java:483)
at weblogic.wsee.tools.anttasks.JwsModule.generate(JwsModule.java:376)
at weblogic.wsee.tools.anttasks.JwsModule.build(JwsModule.java:255)
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:227)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: weblogic.wsee.tools.WsBuildException: java.lang.ClassCastException: com.bea.staxb.buildtime.internal.bts.SoapArrayType cannot be cast to com.bea.staxb.buildtime.internal.bts.ByNameBean
at weblogic.wsee.tools.jws.jaxrpc.JAXRPCWebServiceInfo.createBindings(JAXRPCWebServiceInfo.java:227)
at weblogic.wsee.tools.jws.wsdl.WsdlBuilder.processImpl(WsdlBuilder.java:43)
at weblogic.wsee.tools.jws.jaxrpc.JAXRPCProcessor.process(JAXRPCProcessor.java:27)
at weblogic.wsee.tools.jws.process.CompositeProcessor.process(CompositeProcessor.java:47)
at weblogic.wsee.tools.jws.build.JwsCompiler.buildWebServices(JwsCompiler.java:522)
... 16 more
Caused by: java.lang.ClassCastException: com.bea.staxb.buildtime.internal.bts.SoapArrayType cannot be cast to com.bea.staxb.buildtime.internal.bts.ByNameBean
at com.bea.staxb.buildtime.Java2Schema.createBindingTypeFor(Java2Schema.java:897)
at com.bea.staxb.buildtime.Java2Schema.findOrCreateBindingTypeFor(Java2Schema.java:735)
at com.bea.staxb.buildtime.Java2Schema$1.findOrCreateBindingTypeFor(Java2Schema.java:173)
at com.bea.staxb.buildtime.internal.facade.BtsPropgenFacade.getQnameFor(BtsPropgenFacade.java:292)
at com.bea.staxb.buildtime.internal.facade.BtsPropgenFacade.setType(BtsPropgenFacade.java:199)
at com.bea.staxb.buildtime.Java2Schema.createPropgenFacade(Java2Schema.java:2005)
at com.bea.staxb.buildtime.Java2Schema.processProperty(Java2Schema.java:1840)
at com.bea.staxb.buildtime.Java2Schema.bindProperties(Java2Schema.java:1441)
at com.bea.staxb.buildtime.Java2Schema.createBindingTypeFor(Java2Schema.java:920)
at com.bea.staxb.buildtime.Java2Schema.findOrCreateBindingTypeFor(Java2Schema.java:735)
at com.bea.staxb.buildtime.Java2Schema.internalBind(Java2Schema.java:485)
at com.bea.staxb.buildtime.BindingCompiler.bind(BindingCompiler.java:125)
at com.bea.staxb.buildtime.BindingCompiler.bindAsExplodedTylar(BindingCompiler.java:161)
at weblogic.wsee.bind.buildtime.internal.SoapAwareJava2Schema.bindAsExplodedTylar(SoapAwareJava2Schema.java:1412)
at weblogic.wsee.bind.buildtime.internal.TylarJ2SBindingsBuilderImpl.createBuildtimeBindings(TylarJ2SBindingsBuilderImpl.java:216)
at weblogic.wsee.tools.jws.jaxrpc.JAXRPCWebServiceInfo.createBindings(JAXRPCWebServiceInfo.java:223)
... 20 more

Hi,
The jwsc throws weblogic.wsee.tools.WsBuildException: java.lang.ClassCastException: com.bea.staxb.buildtime.internal.bts.SoapArrayType cannot be cast to com.bea.staxb.buildtime.internal.bts.ByNameBean
The full trace is pasted at bottom.
================================================================
Here is the method defintion in the class WSConfiguration. The returned parameter type is ConfigurationGetListRet, it contains Configuration[] array.
* Outer getList method that takes a filter parameter.
@WebMethod(operationName="Configuration_getList")
@WebResult(name="Configuration_getList_Ret",
targetNamespace="http://ws.cm.ml.com")
public ConfigurationGetListRet getList(
@WebParam(name="Configuration_getList_int", targetNamespace="http://ws.cm.ml.com")
int sessionKey,
@WebParam(name="Configuration_getList_filter", targetNamespace="http://ws.cm.ml.com")
ConfigurationFilter filter){
ConfigurationGetListRet ret = null;
try{
InitialContext ic = new InitialContext();
ConfigurationHome configurationHome =
(ConfigurationHome) ic.lookup("java:comp/env/ejb/ConfigurationReference");
ConfigurationObject configurationService = configurationHome.create();
ret = configurationService.getList(sessionKey, filter);
}catch(CMException cmex){
ret = new CMReturnType(new CMReturnStatus(cmex), null);
} catch (Exception e) {
ret = new CMReturnType( new CMReturnStatus(new CMException(-1, "Exception in calling EJB: Configuration.getList", e)), null );
return ret;
========================================================================
/build/cashMgr/dev/sye/jcash/src/jcashws/ws.xml:26: weblogic.wsee.tools.jws.build.CompileException: Error compiling web service: /build/cashMgr/dev/sye/jcash/src/jcash/src/com/ml/cm/ws/WSConfiguration.java
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:234)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: weblogic.wsee.tools.jws.build.CompileException: Error compiling web service: /build/cashMgr/dev/sye/jcash/src/jcash/src/com/ml/cm/ws/WSConfiguration.java
at weblogic.wsee.tools.jws.build.JwsCompiler.buildWebServices(JwsCompiler.java:526)
at weblogic.wsee.tools.jws.build.JwsCompiler.compile(JwsCompiler.java:483)
at weblogic.wsee.tools.anttasks.JwsModule.generate(JwsModule.java:376)
at weblogic.wsee.tools.anttasks.JwsModule.build(JwsModule.java:255)
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:227)
... 12 more
Caused by: weblogic.wsee.tools.WsBuildException: java.lang.ClassCastException: com.bea.staxb.buildtime.internal.bts.SoapArrayType cannot be cast to com.bea.staxb.buildtime.internal.bts.ByNameBean
at weblogic.wsee.tools.jws.jaxrpc.JAXRPCWebServiceInfo.createBindings(JAXRPCWebServiceInfo.java:227)
at weblogic.wsee.tools.jws.wsdl.WsdlBuilder.processImpl(WsdlBuilder.java:43)
at weblogic.wsee.tools.jws.jaxrpc.JAXRPCProcessor.process(JAXRPCProcessor.java:27)
at weblogic.wsee.tools.jws.process.CompositeProcessor.process(CompositeProcessor.java:47)
at weblogic.wsee.tools.jws.build.JwsCompiler.buildWebServices(JwsCompiler.java:522)
... 16 more
Caused by: java.lang.ClassCastException: com.bea.staxb.buildtime.internal.bts.SoapArrayType cannot be cast to com.bea.staxb.buildtime.internal.bts.ByNameBean
at com.bea.staxb.buildtime.Java2Schema.createBindingTypeFor(Java2Schema.java:897)
at com.bea.staxb.buildtime.Java2Schema.findOrCreateBindingTypeFor(Java2Schema.java:735)
at com.bea.staxb.buildtime.Java2Schema$1.findOrCreateBindingTypeFor(Java2Schema.java:173)
at com.bea.staxb.buildtime.internal.facade.BtsPropgenFacade.getQnameFor(BtsPropgenFacade.java:292)
at com.bea.staxb.buildtime.internal.facade.BtsPropgenFacade.setType(BtsPropgenFacade.java:199)
at com.bea.staxb.buildtime.Java2Schema.createPropgenFacade(Java2Schema.java:2005)
at com.bea.staxb.buildtime.Java2Schema.processProperty(Java2Schema.java:1840)
at com.bea.staxb.buildtime.Java2Schema.bindProperties(Java2Schema.java:1441)
at com.bea.staxb.buildtime.Java2Schema.createBindingTypeFor(Java2Schema.java:920)
at com.bea.staxb.buildtime.Java2Schema.findOrCreateBindingTypeFor(Java2Schema.java:735)
at com.bea.staxb.buildtime.Java2Schema.internalBind(Java2Schema.java:485)
at com.bea.staxb.buildtime.BindingCompiler.bind(BindingCompiler.java:125)
at com.bea.staxb.buildtime.BindingCompiler.bindAsExplodedTylar(BindingCompiler.java:161)
at weblogic.wsee.bind.buildtime.internal.SoapAwareJava2Schema.bindAsExplodedTylar(SoapAwareJava2Schema.java:1412)
at weblogic.wsee.bind.buildtime.internal.TylarJ2SBindingsBuilderImpl.createBuildtimeBindings(TylarJ2SBindingsBuilderImpl.java:216)
at weblogic.wsee.tools.jws.jaxrpc.JAXRPCWebServiceInfo.createBindings(JAXRPCWebServiceInfo.java:223)
... 20 more
--- Nested Exception ---
weblogic.wsee.tools.jws.build.CompileException: Error compiling web service: /build/cashMgr/dev/sye/jcash/src/jcash/src/com/ml/cm/ws/WSConfiguration.java
at weblogic.wsee.tools.jws.build.JwsCompiler.buildWebServices(JwsCompiler.java:526)
at weblogic.wsee.tools.jws.build.JwsCompiler.compile(JwsCompiler.java:483)
at weblogic.wsee.tools.anttasks.JwsModule.generate(JwsModule.java:376)
at weblogic.wsee.tools.anttasks.JwsModule.build(JwsModule.java:255)
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:227)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: weblogic.wsee.tools.WsBuildException: java.lang.ClassCastException: com.bea.staxb.buildtime.internal.bts.SoapArrayType cannot be cast to com.bea.staxb.buildtime.internal.bts.ByNameBean
at weblogic.wsee.tools.jws.jaxrpc.JAXRPCWebServiceInfo.createBindings(JAXRPCWebServiceInfo.java:227)
at weblogic.wsee.tools.jws.wsdl.WsdlBuilder.processImpl(WsdlBuilder.java:43)
at weblogic.wsee.tools.jws.jaxrpc.JAXRPCProcessor.process(JAXRPCProcessor.java:27)
at weblogic.wsee.tools.jws.process.CompositeProcessor.process(CompositeProcessor.java:47)
at weblogic.wsee.tools.jws.build.JwsCompiler.buildWebServices(JwsCompiler.java:522)
... 16 more
Caused by: java.lang.ClassCastException: com.bea.staxb.buildtime.internal.bts.SoapArrayType cannot be cast to com.bea.staxb.buildtime.internal.bts.ByNameBean
at com.bea.staxb.buildtime.Java2Schema.createBindingTypeFor(Java2Schema.java:897)
at com.bea.staxb.buildtime.Java2Schema.findOrCreateBindingTypeFor(Java2Schema.java:735)
at com.bea.staxb.buildtime.Java2Schema$1.findOrCreateBindingTypeFor(Java2Schema.java:173)
at com.bea.staxb.buildtime.internal.facade.BtsPropgenFacade.getQnameFor(BtsPropgenFacade.java:292)
at com.bea.staxb.buildtime.internal.facade.BtsPropgenFacade.setType(BtsPropgenFacade.java:199)
at com.bea.staxb.buildtime.Java2Schema.createPropgenFacade(Java2Schema.java:2005)
at com.bea.staxb.buildtime.Java2Schema.processProperty(Java2Schema.java:1840)
at com.bea.staxb.buildtime.Java2Schema.bindProperties(Java2Schema.java:1441)
at com.bea.staxb.buildtime.Java2Schema.createBindingTypeFor(Java2Schema.java:920)
at com.bea.staxb.buildtime.Java2Schema.findOrCreateBindingTypeFor(Java2Schema.java:735)
at com.bea.staxb.buildtime.Java2Schema.internalBind(Java2Schema.java:485)
at com.bea.staxb.buildtime.BindingCompiler.bind(BindingCompiler.java:125)
at com.bea.staxb.buildtime.BindingCompiler.bindAsExplodedTylar(BindingCompiler.java:161)
at weblogic.wsee.bind.buildtime.internal.SoapAwareJava2Schema.bindAsExplodedTylar(SoapAwareJava2Schema.java:1412)
at weblogic.wsee.bind.buildtime.internal.TylarJ2SBindingsBuilderImpl.createBuildtimeBindings(TylarJ2SBindingsBuilderImpl.java:216)
at weblogic.wsee.tools.jws.jaxrpc.JAXRPCWebServiceInfo.createBindings(JAXRPCWebServiceInfo.java:223)
... 20 more

Similar Messages

  • [jwsc] error: Response wrapper bean names must be unique ?

    I am trying to use wsdlc and jwsc on my existing WSDL file, with "type=JAXWS", I am getting this error
    "[jwsc] error: Response wrapper bean names must be unique and must not clash with other generated classes"
    What does it mean? And how can I resolve this?
    Here is the full stack trace:
    build-service:
    [jwsc] JWS: processing module /com/covergence/ws/callouts/CallOutsServiceImpl
    [jwsc] Parsing source files
    [jwsc] Parsing source files
    [jwsc] 1 JWS files being processed for module /com/covergence/ws/callouts/CallOutsServiceImpl
    [jwsc] JWS: C:\source_tree\b3.3\ss\java\ws\sdk\build\weblogic\src\com\covergence\ws\callouts\CallOutsServiceImpl.java Validated.
    [jwsc] Processing 1 JAX-WS web services...
    [jwsc] error: Response wrapper bean names must be unique and must not clash with other generated classes. Class: com.covergence.ws.callouts.CallOutsPortType method getConfig(javax.xml.ws.Holder<java.util.List<com.covergence.ws.callouts.ConfigClassesType>>)
    [jwsc] Problem encountered during annotation processing;
    [jwsc] see stacktrace below for more information.
    [jwsc] [failed to localize] modeler.nestedGeneratorError(java.lang.IllegalArgumentException: trying to create the same field twice: config)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.generateWrappers(WebServiceWrapperGenerator.java:302)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.processMethod(WebServiceWrapperGenerator.java:154)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitMethodDeclaration(WebServiceVisitor.java:449)
    [jwsc] at com.sun.tools.apt.mirror.declaration.MethodDeclarationImpl.accept(MethodDeclarationImpl.java:41)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.processMethods(WebServiceVisitor.java:374)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.postProcessWebService(WebServiceVisitor.java:338)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.postProcessWebService(WebServiceWrapperGenerator.java:125)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitInterfaceDeclaration(WebServiceVisitor.java:120)
    [jwsc] at com.sun.tools.apt.mirror.declaration.InterfaceDeclarationImpl.accept(InterfaceDeclarationImpl.java:32)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.inspectEndpointInterface(WebServiceVisitor.java:420)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:141)
    [jwsc] at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:300)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:224)
    [jwsc] at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
    [jwsc] at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
    [jwsc] at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:448)
    [jwsc] at com.sun.tools.apt.main.Main.compile(Main.java:1075)
    [jwsc] at com.sun.tools.apt.main.Main.compile(Main.java:938)
    [jwsc] at com.sun.tools.apt.Main.processing(Main.java:95)
    [jwsc] at com.sun.tools.apt.Main.process(Main.java:43)
    [jwsc] at com.sun.tools.apt.Main.main(Main.java:34)
    [jwsc] Caused by: java.lang.IllegalArgumentException: trying to create thesame field twice: config
    [jwsc] at com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:392)
    [jwsc] at com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:363)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.writeMembers(WebServiceWrapperGenerator.java:419)
    [jwsc] at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.generateWrappers(WebServiceWrapperGenerator.java:299)

    I am starting from WSDL and below are the corresponding elements from WSDL
        <message name="getConfig">
            <part name="parameters" element="tns:getConfig"/>
        </message>
        <message name="getConfigResponse">
            <part name="result" element="tns:getConfigResponse"/>
        </message>
        <portType name="CallOutsPortType">
            <operation name="getConfig">
                <input message="tns:getConfig">
                </input>
                <output message="tns:getConfigResponse">
                </output>
                <fault name="callOutFault" message="tns:callOutFault"/>
            </operation>
        <binding name="CallOutsBinding" type="tns:CallOutsPortType">
            <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
            <operation name="getConfig">
                <soap:operation soapAction="getConfig"/>
                <input>
                    <soap:body use="literal"/>
                </input>
                <output>
                    <soap:body use="literal"/>
                </output>
                <fault name="callOutFault">
                    <soap:fault name="callOutFault" use="literal"/>
                </fault>
            </operation>

  • Jwsc Error - Only HTTP ports are supported for JAX-WS

    Hi
    I am trying to create a Webservice from wsdl. I have been able to generate java files and jar file with wsdlc ant task.
    However when i try jwsc I get follwoing error
    [jwsc] [ERROR] - Only HTTP ports are supported for JAX-WS.
    <----- follwowing task for generating java files --->
    <taskdef name="wsdlc" classname="weblogic.wsee.tools.anttasks.WsdlcTask"/>     
    <target name="generate-from-wsdl">
              <wsdlc
                   srcWsdl="wsdl_files/UserPrefWebService.wsdl"
                   destJwsDir="web/web-inf/lib"
                   destImplDir="src"
                   packageName="com.ws.userpref"
                   type="JAXWS"/>
         </target>
    <----- follwowing task for generating class files ----THIS IS FAILING --->
         <taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask" />      
         <target name="build-service">
              <jwsc srcdir="src" destdir="ear">
                   <jws file="com/ws/userpref/UserPrefWebServiceImpl.java"
                        compiledWsdl="web/web-inf/lib/UserPrefWebService_wsdl.jar"
                        type="JAXWS"/>
              </jwsc>
         </target>
    <----- This is the Error --->
    C:\Development\CFCDemoWorkspace\UserPreferencesServer>ant build-service
    Buildfile: build.xml
    build-service:
    [jwsc] JWS: processing module /com/ws/userpref/UserPrefWebServiceImpl
    [jwsc] Parsing source files
    [jwsc] Parsing source files
    [jwsc] 1 JWS files being processed for module /com/ws/userpref/UserPrefWebS
    erviceImpl
    [jwsc] C:\Development\CFCDemoWorkspace\UserPreferencesServer\src\com\ws\use
    rpref\UserPrefWebServiceImpl.java 18:8
    [jwsc] [ERROR] - Only HTTP ports are supported for JAX-WS.
    [AntUtil.deleteDir] Deleting directory C:\DOCUME~1\138904\LOCALS~1\Temp\_3os716
    BUILD FAILED
    C:\Development\CFCDemoWorkspace\UserPreferencesServer\build.xml:24: weblogic.wse
    e.tools.WsBuildException: JWS Validation failed.
    Total time: 10 seconds
    Does any one has any input on this error?
    Thanks
    Srikant

    Thanks David,
    Below is the wsdl
    <s0:message name="ws_getUserPreference">
    <s0:part element="s1:ws_getUserPreference" name="parameters"/>
    </s0:message>
    <s0:message name="ws_getUserPreferenceResponse">
    <s0:part element="s1:ws_getUserPreferenceResponse" name="parameters"/>
    </s0:message>
    <s0:portType name="UserPrefWebServicePort">
    <s0:operation name="ws_getUserPreference" parameterOrder="parameters">
    <s0:input message="s1:ws_getUserPreference"/>
    <s0:output message="s1:ws_getUserPreferenceResponse"/>
    </s0:operation>
    </s0:portType>
    <s0:binding name="UserPrefWebServiceSoapBinding" type="s1:UserPrefWebServicePort">
    <s2:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <s0:operation name="ws_getUserPreference">
    <s2:operation soapAction="" style="document"/>
    <s0:input>
    <s2:body parts="parameters" use="literal"/>
    </s0:input>
    <s0:output>
    <s2:body parts="parameters" use="literal"/>
    </s0:output>
    </s0:operation>
    </s0:binding>
    <s0:service name="UserPrefWebService">
    <s0:port binding="s1:UserPrefWebServiceSoapBinding" name="UserPrefWebServicePortSoapPort">
    <s2:address location="https://localhost:7001/UserPrefService/UserPref"/>
    </s0:port>
    </s0:service>
    </s0:definitions>
    do i need to add <wlhttptransport/> in jws during the buid?

  • Insert Blob column in the client errors ClassCastException: oracle.sql.BLOB

    Hi,
    When I try to insert and commit a Blob column(picture) I am getting the following exception.
    Is there any jar I need to add or any other setup I need to do to accept the BLOB column in the olite client database.
    500 Internal Server Error
    javax.faces.FacesException: #{backing_XXPBWorkOrderResultsCreatePGBean.saveButton_action}: javax.faces.el.EvaluationException: java.lang.ClassCastException: oracle.sql.BLOB
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
         at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
    Caused by: java.lang.ClassCastException: oracle.sql.BLOB
         at oracle.lite.poljdbc.LiteEmbPreparedStmt.setVal(Unknown Source)
         at oracle.lite.poljdbc.POLJDBCPreparedStatement.setObject(Unknown Source)
         at oracle.lite.poljdbc.POLJDBCPreparedStatement.setObject(Unknown Source)
         at oracle.lite.poljdbc.POLJDBCPreparedStatement.setObject(Unknown Source)
         at oracle.lite.web.JupPreparedStatement.setObject(Unknown Source)
         at oracle.jbo.server.BaseSQLBuilderImpl.bindUpdateStatement(BaseSQLBuilderImpl.java:1765)
         at oracle.jbo.server.EntityImpl.bindDMLStatement(EntityImpl.java:7345)
    With regareds,
    Kali.
    OSSI.

    Here are examples if inserting into a Blob from text, file, and retrieving a blob.
    Insert into a Blob (Text)
    import java.io.FileNotFoundException;
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    public class InsertBlob {
        public static void main(String[] args) throws FileNotFoundException {
            Connection con = null;
            PreparedStatement stmt = null;
            ResultSet rs = null;
            String letterText = "some letter text";
            long id = 100;
            try {
                DriverManager.registerDriver((Driver)(Class.forName("oracle.lite.poljdbc.POLJDBCDriver").newInstance()));
                try {
                    con = DriverManager.getConnection("jdbc:polite:polite", "system", "manager");
                } catch (SQLException sqle) {
                    sqle.printStackTrace();
            } catch (Exception e) {
                e.printStackTrace();
            try {
                stmt = con.prepareStatement("INSERT INTO BLOB_TABLE (BLOB_ID, BLOB_DATA) VALUES (?, EMPTY_BLOB())");
                stmt.setLong(1, id);
                stmt.executeUpdate();
                stmt = con.prepareStatement("SELECT BLOB_DATA FROM BLOB_TABLE WHERE BLOB_ID = ? FOR UPDATE");
                stmt.setLong(1, id);
                rs = stmt.executeQuery();
                if (rs.next()) {
                    try {
                        oracle.lite.poljdbc.BLOB oliteBlob = null;
                        oliteBlob = ((oracle.lite.poljdbc.OracleResultSet) rs).getBLOB(1);
                        byte[] byteLetterText = letterText.getBytes();
                        oliteBlob.putBytes(1, byteLetterText);
                        con.commit();
                    } catch (ClassCastException e) {
                        e.printStackTrace();
                    } finally {
                        rs = null;
                        stmt = null;
                        con.rollback();
                        con = null;
            } catch (SQLException e) {
                e.printStackTrace();
    }Insert Into a Blob (File)
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    public class InsertBlobFile {
        public static void main(String[] args) throws FileNotFoundException {
            Connection con = null;
            PreparedStatement stmt = null;
            long id = 200;
            try {
                DriverManager.registerDriver((Driver)(Class.forName("oracle.lite.poljdbc.POLJDBCDriver").newInstance()));
                try {
                    con = DriverManager.getConnection("jdbc:polite:polite", "system", "manager");
                } catch (SQLException sqle) {
                    sqle.printStackTrace();
            } catch (Exception e) {
                e.printStackTrace();
            try {
                stmt = con.prepareStatement("INSERT INTO BLOB_TABLE (BLOB_ID, BLOB_DATA) VALUES (?, ?)");
                stmt.setLong(1, id);
                File fBlob = new File ( "C:\\BLOB_TEST_FILE.TXT" );
                FileInputStream is = new FileInputStream ( fBlob );
                stmt.setBinaryStream (2, is, (int) fBlob.length() );
                stmt.executeUpdate();
                con.commit();
            } catch (SQLException e) {
                e.printStackTrace();
    }Retrieve from Blob (Write to file)
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.sql.Blob;
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    public class RetrieveBlob {
        final static int bBufLen = 32 * 1024;
        final static String outFile = "C:\\BLOB_OUTPUT_FILE.TXT";
        public static void main(String[] args) throws IOException {
            Connection con = null;
            PreparedStatement stmt = null;
            ResultSet rs = null;
            try {
                DriverManager.registerDriver((Driver)(Class.forName("oracle.lite.poljdbc.POLJDBCDriver").newInstance()));
                try {
                    con = DriverManager.getConnection("jdbc:polite:polite", "system", "manager");
                } catch (SQLException sqle) {
                    sqle.printStackTrace();
            } catch (Exception e) {
                e.printStackTrace();
            try {
                stmt = con.prepareStatement("SELECT * FROM BLOB_TABLE");
                rs = stmt.executeQuery();
                while(rs.next()) {
                    int id = rs.getInt(1);
                    Blob value = rs.getBlob(2);
                    System.out.println(id + " | " + value);
                    writeBlobToFile(value);
            } catch (SQLException e) {
                e.printStackTrace();
        public static long readFromBlob(Blob blob, OutputStream out)
          throws SQLException, IOException {
            InputStream in = blob.getBinaryStream();
            int length = -1;
            long read = 0;
            byte[] buf = new byte[bBufLen];
            while ((length = in.read(buf)) > 0) {
                out.write(buf, 0, length);
                read += length;
            in.close();
            return read;
        public static long writeBlobToFile(Blob blob)
          throws IOException, SQLException {
            long wrote = 0;
            OutputStream fwriter = new FileOutputStream(outFile);
            wrote = readFromBlob(blob, fwriter);
            fwriter.close();
            return wrote;
    }

  • Error "ClassCastException"  in a Client(Session Bean)

    Hy at all. I use Netbeans 6.5+Jboss5.1.
    I have realized a very easy session bean and i have deploied..
    10:22:57,377 INFO  [EjbModule] Deploying tommy2
    10:22:57,393 WARN  [EjbModule] EJB configured to bypass security.
    Please verify if this is intended. Bean=tommy2 Deployment=vfszip:/C:/
    Programmi/JBoss/server/default/deploy/TOMMY2-ejb.jar/
    10:22:57,799 INFO  [BaseLocalProxyFactory] Bound EJB LocalHome
    'tommy2' to jndi 'tommy2' Now I'm developing, in the same directory of bean project but in other
    package, a client that must to be use the bean:
    public class tommy2client {
        public static void main(String[] args) throws NamingException,
    CreateException
            if (System.getSecurityManager() == null)
                System.setSecurityManager(new RMISecurityManager());
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "org.jnp.interfaces.NamingContextFactory");
    env.put(Context.URL_PKG_PREFIXES,
    "org.jboss.naming:org.jnp.interfaces" );
    env.put(Context.PROVIDER_URL, "localhost:1099");
    Context contesto = new InitialContext(env);
    Object riferimentooggetto = contesto.lookup("tommy2");/*OKKK*/
    tommy2Home istanzahome = (tommy2Home)PortableRemoteObject.narrow
    (riferimentooggetto, tommy2Home.class);/*debug error!*/but a debug error is present on last row of code
    Exception in thread "main" java.lang.ClassCastException
            at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow
    (PortableRemoteObject.java:229)
            at javax.rmi.PortableRemoteObject.narrow
    (PortableRemoteObject.java:137)
            at tommy2client.tommy2client.main(tommy2client.java:34)
    Caused by: java.lang.ClassCastException: $Proxy0 cannot be cast to
    org.omg.CORBA.Object
            at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow
    (PortableRemoteObject.java:212) Anyone can help me?
    Thanks at all
    Bye

    I could try and help, if you can tell me which line of the "tommy2client" file is line 34. As referenced by the error:
    (tommy2client.java:34)
    Cheers,
    David

  • Jwsc and map interface

    Hi All,
    I would like to expose java.util.Map as a parameter using JAX-WS web service generated using jwsc. I am getting the following error while executing jwsc ant task,
    *JWS Validation failed: [Type java.util.Map on JWS is not supported., Type java.util.Map on JWS is not supported.]*
    Here's what I have,
    Complex.java
    @WebService(name="complex", targetNamespace="http://abcd.org.jaxws")
    @SOAPBinding(style=SOAPBinding.Style.DOCUMENT, parameterStyle=SOAPBinding.ParameterStyle.WRAPPED, use=SOAPBinding.Use.LITERAL)
    @WLHttpTransport(contextPath="jaxws_complex", serviceUri="ComplexService")
    public class Complex {
         @WebMethod
         @XmlJavaTypeAdapter(MyMapAdapter.class)
         public Map<Integer, String> processHashMap(Map<Integer, String> hashMap) {
              hashMap.put(1, "2");
              return hashMap;
    I have written a custom MapAdapter to map the java.util.Map to a simple name/value string, but I think jwsc is not considering it while generating the web service.
    MyMapAdapter.java
    public class MyMapAdapter extends XmlAdapter<MyMapType, Map<Integer, String>> {
         @Override
         public MyMapType marshal(Map<Integer, String> v) throws Exception {
              // TODO Auto-generated method stub
              MyMapType myMapType = new MyMapType();
              List<MyMapEntryType> entries = new ArrayList<MyMapEntryType>();
              for(Map.Entry<Integer, String> entry : v.entrySet()){
                   entries.add(new MyMapEntryType(entry.getKey(), entry.getValue()));
              myMapType.setEntry(entries);
              return myMapType;
         @Override
         public Map<Integer, String> unmarshal(MyMapType v) throws Exception {
              Map<Integer, String> Map = new HashMap<Integer, String>(v.getEntry().size());
              for (MyMapEntryType entry : v.getEntry())
                   Map.put(entry.key, entry.value);
              return Map;
    MyMapEntryType.java
    public class MyMapEntryType {
         @XmlAttribute
    public Integer key;
    @XmlValue
    public String value;
    public MyMapEntryType() {
              super();
         public MyMapEntryType(Integer key, String value) {
              super();
              this.key = key;
              this.value = value;
         public Integer getKey() {
              return key;
         public void setKey(Integer key) {
              this.key = key;
         public String getValue() {
              return value;
         public void setValue(String value) {
              this.value = value;
    MyMapType.java
    public class MyMapType {
         List<MyMapEntryType> entry;
         public List<MyMapEntryType> getEntry() {
              return entry;
         public void setEntry(List<MyMapEntryType> entry) {
              this.entry = entry;
    build.xml
    <project name="webservices-jws_basic-complex" default="all"
         basedir=".">
    <property name="complex.ear.dir" value="output/complex/complexEAR" />
         <property name="complex.war" value="complex" />
         <property name="complex.ws.file" value="org\abcd\jaxws\complex\Complex" />
         <target name="all" depends="build-complex-service" />
         <target name="build-complex-service">
              <jwsc verbose="on" debug="on" srcdir="src" destdir="${complex.ear.dir}" >
                        <jws file="${complex.ws.file}.java" explode="true"/>
              </jwsc>
         </target>
    </project>
    Exception stack trace:
    [jwsc] 1 JWS files being processed for module /org/syed/jaxws/complex/Complex
    [jwsc] C:\workspace\JAAS\JAXWS\src\org\syed\jaxws\complex\Complex.java 27:37
    [jwsc] [ERROR] - Type java.util.Map on JWS is not supported.
    [jwsc] C:\workspace\JAAS\JAXWS\src\org\syed\jaxws\complex\Complex.java 27:37
    [jwsc] [ERROR] - Type java.util.Map on JWS is not supported.
    [AntUtil.deleteDir] Deleting directory C:\DOCUME~1\p2085712\LOCALS~1\Temp\1\_i2m6up1
    [AntUtil.deleteDir] Deleting directory C:\DOCUME~1\p2085712\LOCALS~1\Temp\1\_i2m6up1
    BUILD FAILED
    C:\workspace\JAAS\JAXWS\ComplexBuild.xml:22: weblogic.wsee.tools.WsBuildException: JWS Validation failed: [Type java.util.Map on JWS is not supported., Type java.util.Map on JWS is not supported.]
         at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:236)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
         at org.apache.tools.ant.Task.perform(Task.java:348)
         at org.apache.tools.ant.Target.execute(Target.java:390)
         at org.apache.tools.ant.Target.performTasks(Target.java:411)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
         at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
         at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
         at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)
    Caused by: weblogic.wsee.tools.WsBuildException: JWS Validation failed: [Type java.util.Map on JWS is not supported., Type java.util.Map on JWS is not supported.]
         at weblogic.wsee.tools.anttasks.JwsModule.buildAndValidate(JwsModule.java:589)
         at weblogic.wsee.tools.anttasks.JwsModule.loadWebServices(JwsModule.java:576)
         at weblogic.wsee.tools.anttasks.JwsModule.generate(JwsModule.java:369)
         at weblogic.wsee.tools.anttasks.JwsModule.build(JwsModule.java:256)
         at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:229)
         ... 16 more
    Any idea on how to enforce jwsc to understand the adapter I have written? Many thanks for your help.
    Regards
    Syed
    Edited by: 992473 on 07-Mar-2013 07:17

    Just found the solution after posting the question, it is related to build.xml, have updated with type="JAXWS" as below:
    <target name="build-complex-service">
              <jwsc verbose="on" debug="on" srcdir="src" destdir="${complex.ear.dir}" >
                        <jws file="${complex.ws.file}.java" explode="true" type="JAXWS"/>
                        <binding dir="${binding.dir}" casesensitive="yes">
                             <include name="**/*.xml"/>
                        </binding>
              </jwsc>
         </target>

  • Fail to create web service with user-defined data type using jwsc Ant task!

    Hello every body!
    I used JAXWS to create WSDL from a jws file.
    This is my jws:
    package ws;
    import javax.jws.WebService;
    import javax.jws.WebMethod;
    import ws.MyDataType;
    *@WebService*
    *public class MyWebService {*
    public MyWebService()
    *@WebMethod*
    public MyDataType MyWebMethod(MyDataType mdt)
    *// mdt.setS("I got it!");*
    return mdt;
    and this is my data type:
    package ws;
    *public class MyDataType {*
    String s;
    public MyDataType()
    *public String getS() {*
    return s;
    *public void setS(String s) {*
    this.s = s;
    and this is my Ant build.xml
    *<project default="all">*
    *<property name="weblogic.jar.classpath" value="D:/Projects/bea103/wlserver_10.3/server/lib"/>*
    *<taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask">*
    *<classpath>*
    *<path id="weblogic.classpath">*
    *<pathelement path="WEBLOGIC_HOME"/>*
    *<fileset dir="${weblogic.jar.classpath}">*
    *<include name="weblogic.jar"/>*
    *</fileset>*
    *</path>*
    *</classpath>*
    *</taskdef>*
    *<target name="all" depends="clean,build-service"/>*
    *<target name="clean">*
    *<delete dir="output"/>*
    *</target>*
    *<target name="build-service">*
    *<!--add jwsc and related tasks here -->*
    *<jwsc srcdir="" destdir="wsoutput">*
    *<jws file="MyWebService.java" type="JAXWS"/>*
    *</jwsc>*
    *</target>*
    *<!--<target name="deploy"> --><!--add wldeploy task here --><!-- </target>-->*
    *</project>*
    I run the Ant task but I get this error:
    Buildfile: build.xml
    clean:
    build-service:
    [jwsc] JWS: processing module /MyWebService
    [jwsc] Parsing source files
    [jwsc] Parsing source files
    [jwsc] 1 JWS files being processed for module /MyWebService
    *[jwsc] [JAM] Warning: failed to resolve class MyDataType*
    [jwsc] JWS: C:\Documents and Settings\samimi\IdeaProjects\SampleWebService\src\ws\MyWebService.java Validated.
    [jwsc] Processing 1 JAX-WS web services...
    *[jwsc] error: Could not get TypeDeclaration for: MyDataType in apt round: 1*..........
    BUILD FAILED
    C:\Documents and Settings\samimi\IdeaProjects\SampleWebService\src\ws\build.xml:
    19: weblogic.wsee.tools.WsBuildException: Error processing JAX-WS web services
    Please help me to solve this issue.
    Thank you,
    Mojir

    Thank u very much Jay SenSharma this was helpful
    and thank u sandeep_singh this is the answer,
    I find another answer too :
    adding my class files to the path remove the error:
    <project default="all">
    <property name="weblogic.jar.classpath" value="D:/Projects/bea103/wlserver_10.3/server/lib"/>
    <taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask">
    <classpath>
    <path id="my.path">
    <pathelement path="D:/Projects/bea103/jdk160_05/lib/tools.jar"/>
    <pathelement path="D:/Projects/bea103/wlserver_10.3/server/lib/weblogic.jar"/>
    *<pathelement path="D:/Projects/LifeInsurance Project Original/BusinessModule/classes/"/>* adding this line solved my problem.
    <pathelement path="${java.class.path}"/>
    </path>
    <path id="weblogic.classpath">
    <pathelement path="WEBLOGIC_HOME"/>
    <fileset dir="${weblogic.jar.classpath}">
    <include name="weblogic.jar"/>
    </fileset>
    </path>
    </classpath>
    </taskdef>
    <target name="all" depends="clean,build-service"/>
    <target name="clean">
    <delete dir="output"/>
    </target>
    <target name="build-service">
    <jwsc sourcepath="mytype" classpathref="my.path" debug="true" srcdir="" destdir="wsoutput">
    <jws file="NegotiationService.java" generatewsdl="true" type="JAXWS"/>
    </jwsc>
    </target>
    </project>
    Thank u very much,
    Mojir

  • WLS 10 WebService compilation (jwsc) XMLObject parameter issue

    Hi,
    We are in the process of migrating an application from WebLogic 8.1 to WebLogic 10.
    This application contains a few web services.
    During the compilation of the web services, after getting migrated via the upgrade wizard, the build script fails with the following error.
    jwsc ERROR - A java class "com.hp.bep.component.webservice.valueObjects.dataTransferObjects.UpdateStatusRequest" is being used as a parameter or return type that contains a property or field that is an XmlBean "org.apache.xmlbeans.XmlObject", this is not allowed.
    Rightly so, this web service contains method that passes a parameter of type UpdateStatusRequest containing a varialble of type "org.apache.xmlbeans.XmlObject".
    From the error, it appears that this is no longer allowed in WebLogic 10.
    Appreciate if anyone can recommend a solution to the above, or suggest a workaround for the same.
    Thanks in advance,
    Deepak A.

    This use case is not supported.
    Ajay

  • Webservices: jwsc is unable to compile wsdlc-generated classes

    Hello,
    I'm trying to generate JAXWS web service classes using WebLogic 10.0 MP1 wsdlc and jwsc Ant tasks, following the steps described in [Creating a Web Service from a WSDL File|http://edocs.bea.com/wls/docs100/webserv/use_cases.html#wp220705].
    I'm using the WSRP WSDL which I have in my local system and which is also available at [http://docs.oasis-open.org/wsrp/v2/wsrp-service.wsdl]. The only change I made is to remove all the references to "v1" specification of WSRP in there.
    It seems that wsdlc can only work with a single service and single port so I'm currently trying to generate just the classes for WSRP_v2_Markup_Service port.
    Here are my ant tasks:
    <wsdlc type="JAXWS" srcWsdl="${wsdl.path}" srcPortName="WSRP_v2_Markup_Service" destJwsDir="${target.jws.dir}" destImplDir="${target.impl.dir}" />
    <jwsc srcdir="${target.impl.dir}" destdir="target/wls-wsrp-ws.ear">
    <jws type="JAXWS" file="oasis/names/tc/wsrp/v2/wsdl/WSRPV2ServiceImpl.java" compiledWsdl="target/compiledWsdl/wsrp-2_0-service_wsdl.jar">
    <WLHttpTransport contextPath="${contextPath}" serviceUri="WSRP_v2_Markup_Service" />
    </jws>
    "wsdlc" part succeeds but jwsc part fails with the following error message:
    [jwsc] C:\DOCUME~1\zachcial\LOCALS~1\Temp\_970x54\oasis\names\tc\wsrp\v2\wsdl\WSRPV2MarkupPortType.java 263:28
    [jwsc] *[ERROR] - Method contains javax.jws.WebResult annotation but is not a WebMethod. Add the javax.jws.WebMethod annotation to the method definition.*
    [jwsc] C:\DOCUME~1\zachcial\LOCALS~1\Temp\_970x54\oasis\names\tc\wsrp\v2\wsdl\WSRPV2MarkupPortType.java 290:28
    [jwsc] *[ERROR] - Method contains javax.jws.WebResult annotation but is not a WebMethod. Add the javax.jws.WebMethod annotation to the method definition.*
    [jwsc] C:\home\hp\WsrpTake5\wls-wsrp-ws\target\impl\oasis\names\tc\wsrp\v2\wsdl\WSRPV2ServiceImpl.java 17:8
    [jwsc] [ERROR] - javax.jws.WebService.endpointInterface oasis.names.tc.wsrp.v2.wsdl.WSRPV2MarkupPortType is invalid.
    Looking at the interface class and line I find both WebMethod and WebResult annotations for the methods above, e.g.:
    *@WebMethod(action = "urn:oasis:names:tc:wsrp:v2:releaseSessions")*
    *@WebResult(name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types")*
    @RequestWrapper(localName = "releaseSessions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types", className = "oasis.names.tc.wsrp.v2.types.ReleaseSessions")
    @ResponseWrapper(localName = "releaseSessionsResponse", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types", className = "oasis.names.tc.wsrp.v2.types.ReturnAny")
    public List<Extension> releaseSessions(
    @WebParam(name = "registrationContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types")
    RegistrationContext registrationContext,
    @WebParam(name = "sessionIDs", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types")
    List<String> sessionIDs,
    @WebParam(name = "userContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types")
    UserContext userContext)
    throws AccessDenied, InvalidRegistration, MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
    I found the following post of somebody having a similar problem: [http://forums.bea.com/thread.jspa?threadID=600014665]. Unfortunately for me both interface and implementation method declarations look exactly the same except the @Web... annotations not present in the implementation class.
    Can you think about anything I'm doing wrong?
    Thanks in advance for any help.
    /Slawek

    I figured that out.
    It turns out that the order of exceptions in the interface class and in the generated implementation class are not the same. Even though this is fine from the Java perspective, jwsc gets confused by this. Putting the exceptions in the method signatures of the implementation class in the same order as in the interface fixes this issue.
    Now, I hit another problem:
    jwsc error: Response wrapper bean names must be unique and must not clash with other generated classes. Class: oasis.names.tc.wsrp.v2.wsdl.WSRPV2MarkupPortType method initCookie(oasis.names.tc.wsrp.v2.types.RegistrationContext,oasis.names.tc.wsrp.v2.types.UserContext)
    Let's see how long will it take to find a fix for this one ...
    /Slawek

  • Problem building the service with jwsc task on bea 9.2

    i am trying to build a web service from a wsdl file,
    Firstly i generate the proper artifacts with the wsdlc task as described on bea 9.2 docs,then i run the wsdl task trying to build the service from the artifacts previously generated,
    here is the wsdl file,and after there are the error i get trying to build the service.
    <?xml version="1.0" encoding="utf-8" ?>
    <wsdl:definitions xmlns:types="http://emcs.dgtaxud.ec/webservice/types"
    xmlns:ref="http://ws-i.org/profiles/basic/1.1/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    targetNamespace="http://emcs.dgtaxud.ec/webservice"
    xmlns:ws="http://emcs.dgtaxud.ec/webservice"
    xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/">
    <wsdl:types>
    <xsd:schema elementFormDefault="qualified" targetNamespace="http://emcs.dgtaxud.ec/webservice/types"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="startEntityAction">
    <xsd:complexType>
    <xsd:sequence/>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="startEntityActionResponse">
    <xsd:complexType>
    <xsd:sequence/>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="getEntityActionResult">
    <xsd:complexType>
    <xsd:sequence/>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="getEntityActionResultResponse">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="ActionSucceeded" type="xsd:boolean"/>
    <xsd:element name="ActionResult" minOccurs="0" >
    <xsd:simpleType>
    <xsd:restriction base="xsd:token">
    <xsd:enumeration value="Success" />
    <xsd:enumeration value="Error" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="stopEntityAction">
    <xsd:complexType>
    <xsd:sequence/>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="stopEntityActionResponse">
    <xsd:complexType>
    <xsd:sequence/>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    <xsd:schema elementFormDefault="qualified"
    targetNamespace="http://www.openuri.org/2002/04/soap/conversation/">
    <xsd:element name="StartHeader" type="conv:StartHeader"/>
    <xsd:element name="ContinueHeader" type="conv:ContinueHeader"/>
    <xsd:element name="CallbackHeader" type="conv:CallbackHeader"/>
    <xsd:complexType name="StartHeader">
    <xsd:sequence>
    <xsd:element name="conversationID" type="xsd:string" minOccurs="0"/>
    <xsd:element name="callbackLocation" type="xsd:string" minOccurs="0"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="ContinueHeader">
    <xsd:sequence>
    <xsd:element name="conversationID" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="CallbackHeader">
    <xsd:sequence>
    <xsd:element name="conversationID" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    </wsdl:types>
    <wsdl:message name="StartHeader_literal">
    <wsdl:part name="StartHeader" element="conv:StartHeader"/>
    </wsdl:message>
    <wsdl:message name="ContinueHeader_literal">
    <wsdl:part name="ContinueHeader" element="conv:ContinueHeader"/>
    </wsdl:message>
    <wsdl:message name="startEntityActionSoapIn">
    <wsdl:part name="startEntityActionParameters" element="types:startEntityAction"/>
    <wsdl:part name="entities" type="xsd:base64Binary"/>
    </wsdl:message>
    <wsdl:message name="startEntityActionSoapOut">
    <wsdl:part name="startEntityActionResponseParameters" element="types:startEntityActionResponse"/>
    </wsdl:message>
    <wsdl:message name="getEntityActionResultSoapIn">
    <wsdl:part name="getEntityActionResultParameters" element="types:getEntityActionResult"/>
    </wsdl:message>
    <wsdl:message name="getEntityActionResultSoapOut">
    <wsdl:part name="getEntityActionResultResponseParameters" element="types:getEntityActionResultResponse"/>
    <wsdl:part name="report" type="xsd:base64Binary"/>
    </wsdl:message>
    <wsdl:message name="stopEntityActionSoapIn">
    <wsdl:part name="stopEntityActionParameters" element="types:stopEntityAction"/>
    </wsdl:message>
    <wsdl:message name="stopEntityActionSoapOut">
    <wsdl:part name="stopEntityActionResponseParameters" element="types:stopEntityActionResponse"/>
    </wsdl:message>
    <wsdl:portType name="MaintainEntitySoap">
    <wsdl:operation name="startEntityAction">
    <wsdl:input message="ws:startEntityActionSoapIn"/>
    <wsdl:output message="ws:startEntityActionSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="getEntityActionResult">
    <wsdl:input message="ws:getEntityActionResultSoapIn"/>
    <wsdl:output message="ws:getEntityActionResultSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="stopEntityAction">
    <wsdl:input message="ws:stopEntityActionSoapIn" />
    <wsdl:output message="ws:stopEntityActionSoapOut" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="MaintainEntitySoap" type="ws:MaintainEntitySoap">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="startEntityAction">
    <soap:operation soapAction="http://emcs.dgtaxud.ec/startEntityAction"/>
    <conv:transition phase="start"/>
    <wsdl:input>
    <mime:multipartRelated>
    <mime:part>
    <soap:body parts="startEntityActionParameters" use="literal"/>
    <soap:header wsdl:required="true" message="ws:StartHeader_literal"
    part="StartHeader" use="literal" />
    </mime:part>
    <mime:part>
    <mime:content part="entities" type="application/octet-stream"/>
    </mime:part>
    </mime:multipartRelated>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getEntityActionResult">
    <soap:operation soapAction="http://emcs.dgtaxud.ec/getEntityActionResult"/>
    <conv:transition phase="continue"/>
    <wsdl:input>
    <soap:body use="literal"/>
    <soap:header wsdl:required="true" message="ws:ContinueHeader_literal"
    part="ContinueHeader" use="literal" />
    </wsdl:input>
    <wsdl:output>
    <mime:multipartRelated>
    <mime:part>
    <soap:body parts="getEntityActionResultResponseParameters" use="literal"/>
    </mime:part>
    <mime:part>
    <mime:content part="report" type="application/octet-stream"/>
    </mime:part>
    </mime:multipartRelated>
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="stopEntityAction">
    <soap:operation soapAction="http://emcs.dgtaxud.ec/stopEntityAction" style="document" />
    <conv:transition phase="finish" />
    <wsdl:input>
    <soap:body use="literal" />
    <soap:header wsdl:required="true" message="ws:ContinueHeader_literal"
    part="ContinueHeader" use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="MaintainEntity">
    <wsdl:documentation>Asynchronous web service for maintaining entities.</wsdl:documentation>
    <wsdl:port name="MaintainEntitySoap" binding="ws:MaintainEntitySoap">
    <soap:address location="https://seed.dgtaxud.ec:8443/SEEDWS/entity/MaintainEntity.jws"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    the errors i get:
    build-service:
    [jwsc] JWS: processing module /MaintainEntitySoapImpl
    [jwsc] Parsing source files
    [jwsc] Parsing source files
    [jwsc] 1 JWS files being processed for module /MaintainEntitySoapImpl
    [jwsc] C:\DOCUME~1\PAPAGE~1\LOCALS~1\Temp\_1mu7ug\seed\webservices\maintainecontract\MaintainEntitySoap.java 31:69
    [jwsc] [ERROR] - A Document Bare style operation must have exactly one non header IN Parameter.
    [jwsc] C:\DOCUME~1\PAPAGE~1\LOCALS~1\Temp\_1mu7ug\seed\webservices\maintainecontract\MaintainEntitySoap.java 41:15
    [jwsc] [ERROR] - A Document Bare style operation must be declared Oneway if it returns void.
    [jwsc] C:\Documents and Settings\papageorgopoulos\Desktop\emcs latest\MaintainEntityContractServ\webservicefiles\MaintainEntitySoa
    pImpl.java 28:21
    [jwsc] [ERROR] - A document style operation must not have a non header INOUT or OUT Parameter.
    [jwsc] C:\DOCUME~1\PAPAGE~1\LOCALS~1\Temp\_1mu7ug\seed\webservices\maintainecontract\MaintainEntitySoap.java 41:15
    [jwsc] [ERROR] - A Document Bare style operation must have exactly one non header IN Parameter.
    [jwsc] C:\Documents and Settings\papageorgopoulos\Desktop\emcs latest\MaintainEntityContractServ\webservicefiles\MaintainEntitySoa
    pImpl.java 13:8
    [jwsc] [ERROR] - javax.jws.WebService.endpointInterface seed.webservices.maintainecontract.MaintainEntitySoap is invalid.
    [AntUtil.deleteDir] Deleting directory C:\DOCUME~1\PAPAGE~1\LOCALS~1\Temp\_1mu7ug
    for any ideas i would be grateful

    Ok, thanks Shay. It is ok when I use ' instead of " in my rendering condition, but the page also crashes when there is an ADF table with Empty text attribute value for example: #{bindings.TmetaformatMprogramView1.viewable ? 'No rows yet.' : 'Access Denied.'}. It crashes, says it cannot parse ? same as \ before.
    Edited by: nermin on Oct 31, 2008 10:20 AM

  • JAXB and ClassCastException

    Hi all,
    When I try to unmarshal a XML document, I get a ClassCastException. I've listed the details below. I've also searched the forums on this one but can't seem to find any answer (maybe I've missed it somewhere). I appreciate any help or hints anyone can offer.
    XMLSchema: OrganizationalUnit.xsd
    JAXB Generated classes: OrganizationalUnit.java, OrganizationalUnitType.java etc.
    UnmarshallingCode:
    JAXBContext jc = JAXBContext.newInstance("com.myproject.unitinfo");
    Unmarshaller unmarshaller = jc.createUnmarshaller();
    unmarshaller.setValidating(true);
    String filename = JOptionPane.showInputDialog("Filename:");
    OrganizationalUnit unit = (OrganizationalUnit)unmarshaller.unmarshal(new FileInputStream( filename ) );
    System.out.println("Participant ID:" + unit.getUnitID() );The above code generates the following error:
    ClassCastException caught.
    com.iwise.process.jaxb.unitinfo.impl.OrganizationalUnitImpl
    java.lang.ClassCastException: com.iwise.process.jaxb.unitinfo.impl.OrganizationalUnitImpl
         at com.iwise.process.test.TestClient.saveParticipant(TestClient.java:58)
         at com.iwise.process.test.TestClient.main(TestClient.java:33)
    TIA, Claire

    What was wrong with your package structure? I'm running into a similar problem where one XML doc/schema combo parses great, but another throws the java.lang.ClassCastException.

  • ClassCastException and Maps

    For some reason i can't get either of the print statements to work.
    Could someone please tell me how to fix this and what's goin wrong.
    Error: ClassCastException
    import java.util.*;
    public class bag {
    public static void main(String [] args){
         Map m = new TreeMap();
         m.put(1, 2);
         m.put(2, 6);
         m.put(3, 8);
         m.put(100,1);
         Set s = m.entrySet();
         Iterator it = s.iterator();
         System.out.println(m.get(it.next()));
                         Object val = m.get(it.next());
         System.out.println(val);
    }

    If you read the complete error message closely, you can guess at the problem. If you look at the source code, you'll see it.
    get calls compare which casts to a Comparable. The iterator over the entrySet gives TreeMap.Entry objects, which don't implement Comparable.
    Your iterator gives you (1, 2). If you read the docs for EntrySet, you'll see that's a Map.Entry, and if you read its docs, you'll see it has both the key and the value, so there's no reason for the get.

  • ClassCastException: for IReports--what mistake i am doing

    IInfoObjects reports = iStore.query("SELECT SI_ID, SI_NAME, SI_CREATION_TIME,SI_KIND, SI_SCHEDULEINFO,SI_PROCESSINFO.SI_PROMPTS,SI_EXTENDED_PROCESSINFO FROM CI_INFOOBJECTS WHERE SI_PARENTID = " + reportId);
    for(int i = 0; i < reports.size(); i++)
        IReport report = (IReport) reports.get(i); --On this line i am getting error
    ClassCastException: Cannot cast $Proxy24 (id=507) to  com.crystaldecisions.sdk.plugin.desktop.report.IReport
    what mistake i am doing

    Hi Amita,
    SI_PARENTID is used to specify the ID of the folder.
    Instead use SI_ID of the report.
    i.e.
    In your query use:
    SELECT SI_ID, SI_NAME, SI_CREATION_TIME,SI_KIND, SI_SCHEDULEINFO,SI_PROCESSINFO.SI_PROMPTS,SI_EXTENDED_PROCESSINFO FROM CI_INFOOBJECTS WHERE SI_ID = " + reportId
    instead of:
    SELECT SI_ID, SI_NAME, SI_CREATION_TIME,SI_KIND, SI_SCHEDULEINFO,SI_PROCESSINFO.SI_PROMPTS,SI_EXTENDED_PROCESSINFO FROM CI_INFOOBJECTS WHERE SI_PARENTID = " + reportId)

  • Are the WLS 9.1 Web Service Ant Tasks ready for prime time?

    I am trying to create a Proof of Concept (POC) for Enterprise and B2B Services at Wendy's Int'l, Inc.
    As part of this POC, I created a WSDL for an in-house service and then used the wsdlc and jwsc Ant Tasks to translate this WSDL to Java classes and ultimately (I hoped) a deployable services.
    In this document, I describe the issues I encountered setting up what I consider to be a simple POC.
    I'll try to attach my WSDL file and build.xml so you can follow along.
    I'll also try to attach my CSS file so you can compare how the generated WSDL appears in the Browser to the way I want it to appear.
    If attachments are not allowed on these forums, then I will wait and see if there is interest in those documents before I paste them under this topic.
    Some preliminary information about my environment.
    Environment:
         Windows XP Pro SP2
         WebLogic 9.1
         Java 1.5.0_04
    Service Name:
         AppRelease
    Note: If I modify my WSDL (perhaps to add a new Operation or to change the definition of an element) and run wsdlc again, the AppReleaseSOAPPortImpl.java file is overwritten For this reason, I implemented my service logic in a class called AppReleaseServiceImple.java.
    Now, for the issues.
    1.     Bug:
    In the WSDL generated by wsdlc, the wsdl:part child of the wsdl:message tag is erroneously prefixed with a colon.
    This occurs whether or not I specify a prefix for the http://schemas.xmlsoap.org/wsdl/ namespace.
    Work around: Extract the wsdl from the jar file, fix it and add it back into the jar.
    2.     Bug:
    In the WSDL generated by wsdlc, the wsdl:input and wsdl:output children of the wsdl:operation child of wsdl:portType tag are erroneously prefixed with a colon. Like 1 above, this occurs whether or not I specify a prefix for the http://schemas.xmlsoap.org/wsdl/ namespace.
    Work around: Extract the wsdl from the jar file, fix it and add it back into the jar.
    The error message generated by Bugs 1 and 2 is not helpful in diagnosing the problem:
    [jwsc] Error at line:46 col:7 ':' expected [?! -- [CDATA[ ]
    3.     Bug:
    In the WSDL generated by wsdlc, the documentation elements have all of my html elements stripped out, as well as my xhtml and wsdl namespace references. This completely negates one of the best features of the documentation tag, being able to present the WSDL in a browser as a nicely formatted, human friendly document which is also the underlying WSDL that can be viewed when the person views the source document.
    I label this as a bug because it greatly reduces the functionality of the resulting WSDL.
    4.     Annoyance:
    The WSDL generated by wsdlc has all of my comments stripped out, except the comments in the xsd:schema section of the wsdl:types element. I would prefer that all my comments be left in the WSDL, but if comments must be stripped out then I think all of the comments should be stripped out.
    5.     Annoyance:
    The WSDL generated by wsdlc has my CSS specification stripped.
    Work around: I don’t know if adding the CSS back will do any good because I have not yet created a deployable service (see the last issue below).
    6.     Annoyance:
    The WSDL generated by wsdlc has different namespace prefixes than the ones I specified for my application's namespace and for the http://schemas.xmlsoap.org/wsdl/soap/ namespace.
    Work around: Perform a find/replace on namespace prefixes "s0" and "s1" to return them to my prefered values.
    Another thing I can do at this point is simply replace the generated WSDL in the jar file with my original WSDL. This would address issues 1 thru 6 above.
    7.     Annoyance:
    The java source files created by wsdlc are put into a jar file. This makes it annoying when working within a traditional IDE like Eclipse because there is no way to reference the source files within the jar as working source.
    Work around: Extract the source files from the jar and identify the resulting directory structure as part of the source structure of the project.
    8.     Bug:
    The jwsc task complains if the same parameter name is used in multiple operations. I received the following Errors from jwsc:
    [jwsc] C:\IDE\workspace\Acre-WL9.1\AppReleaseSOAPPort.java 0:0
    [jwsc] [ERROR] - Parameter element "{http://acre.services.wendys.com/AppRelease/}garRequest" is not unique across document/literal bare WebService.
    Since the operation names are unique, I see no reason to also require uniqueness in the parameter names used by those operations.
    Work around: Use unique element names for the input parameters of the services operations.
    9.     Bug:
    Once items 1, 2 and 8 above are taken care of, jwsc fails with the following error:
    java.lang.AssertionError: java.lang.ClassNotFoundException: weblogic.j2ee.descriptor.ApplicationBeanImpl
    This seems to be due to the weblogic.jar file not being in the System Classpath.
    However, I should note that when I set verbose="on" and debug="on" in the jwsc ant task, there was a message from the task which stated "[jwsc] [search path for class files: [big freakin’ jar list]". In the big freakin’ jar list, I did find weblogic.jar and weblogic.jar has the required ApplicationBeanImpl. This indicates to me that the jwsc task does not fully honor either its classpathref attribute, nor an embedded classpath element.
    Work around: Make sure the weblogic.jar is in the System Classpath.
    10.     Bug:
    I fixed bug #9 by running a setDomainEnv script and then ran my ant task. This time I received the following output:
    ant build-serviceBuildfile: build.xml
    build-service:
    [jwsc] 1 JWS files will be processed.
    [jwsc] Processing JWS: C:\IDE\workspace\Acre-WL9.1\src\com\wendys\services\acre\AppReleaseServiceImpl.java
    [jwsc] JWS: C:\IDE\workspace\Acre-WL9.1\src\com\wendys\services\acre\AppReleaseServiceImpl.java Validated.
    [AntUtil.deleteDir] Deleting directory <some temporary directory>
    BUILD FAILED
    java.lang.ExceptionInInitializerError
    At this point, I am completely stymied about how to proceed.
    I wonder what new issues await once this 10th issue is addressed.
    Really, is this tool set ready for prime time?

    <i>Sorry to hear you are having so many issues with using the WLS 9.1 web service Ant tasks, inside of Eclipse.
    I generally create a User Library for the couple weblogic jars needed, and use it (the User Library) in my Eclipse projects that I create JWSes in.</i><br>
    I also have a separate WebLogic Library in Eclipse (actually 2 libraries since I work with WL 8.1 and now WL 9.1). As you may know, one of the long-standing issues with the Ant integration within Eclipse is the fact that Ant, being an External Tool, does not receive the Project-specific Paths/Libraries. However, since most Java-relevant Ant tasks can take classpath and classpathref attributes, this is usually not an issue. In the case of the BEA-supplied wsdlc Ant task, it is apparent from the verbose/debug console output that wsdlc can see the jars in its classpathref, but it ignores those references when resolving class references and instead only uses the system classpath.
    <p>
    <i>I've only needed the weblogic.jar and xbean.jar, not all the ones you mentioned in an earlier thread of this post.</i><br>
    I have not tried to winnow down exactly which jars are required. I simply included all the jars that exist and were added to the system classpath by the setDomainEnv.bat file created by WebLogic 9.1.
    <p>
    <i>Afterwards, I create an Ant Builder to build the JWS Web Service EAR, as opposed to fiddlin' with Eclipse.</i><br>
    I too use Ant to build my deployable archives. Eclipse is simply my IDE of choice. I validated that all the issues I listed occurred when running Ant from the command line.
    <p>
    <i>If you are interested in how I do it, send me an e-mail (to [email protected]), and I'll send you a zip of one of these JWS projects. The build.xml script for the project, takes care of a lot of the "annoyances" you mentioned, one of which I think is not accurate. I have never had a situation where the wsdlc Ant task "overwrote" my XXXImpl.java file..</i><br>
    Since I'm doing a POC to determine how we want to proceed with developing Web Services and an SOA in general, I tried to perform the same tasks using Axis 2 1.0, the WebLogic 9.1 tools, and XFire 1.1. Overwriting the Impl class is a common failing in the tools which take a WSDL and create Java source files for all three frameworks.
    <p>
    Try my scenario. Add another operation to an existing WSDL, and run the wsdlc Ant Task. The old IMPL class will be over-written.
    <p>
    Because of this, I have a separate Impl class and I make sure that all its methods and annotations match the methods and annotations in the Skeleton Impl class created by wsdlc.
    <p>
    <i>Maybe that's because I use the <exec> Ant task with jar.exe (the xvf options) in my build.xml, to only get what I need out of the .jar/.zip the wsdlc generates. I'm typically only interest in the interface class that my XXXImpl.java file needs to implements, because I use XMLBeans for the input args (and return values) of my web service operations.</i><br>
    Perhaps. I am not using XMLBeans in any of the three frameworks because the resulting service seems to be lighter-weight in all three frameworks if XMLBeans is not used. I'm sure there will be scenarios where XMLBeans is preferred, but I have not encountered that case in this POC.
    <p>
    <i>Regards,
    Mike Wooten</i>
    Thanks for the follow-up.
    Mike McAngus

  • Possible trap in generics.

    package generics;
    import java.util.*;
    public class arrays {
         public static void main(String ...strings ){
              List<String>[] lsa = new List[10]; // Not really allowed.
              Object o = lsa;
              Object[] oa = (Object[]) o;
              List<Integer> li = new ArrayList<Integer>();
              li.add(new Integer(3));
              oa[1] = li; // Unsound, but passes run time store check
              String s = lsa[1].get(0); // Run-time error: ClassCastException.
    My 1.5 java compiler gives a warning , why does this not give a compilation error?

    why does this not give a compilation error?The same reason this doesn't
    Object o = "a String";
    Integer i = (Integer) o;Use the code tags in the future.
    http://forum.java.sun.com/help.jspa?sec=formatting

Maybe you are looking for

  • I have office 2013 and it uses word to save and open .pdf files.

    I want to use Adobe Reader XI, how can I use that instead of Word?

  • Problem with kerio-control-vpnclient

    Hi everyone i connect to internet with kerio-control-vpnclient the problem is some site filter by goverment like facebook and when connect with my VPN, all site load but the facebook and youtube and so on not load i guess the problem is my DNS how i

  • Assign song to multiple albums?

    Is there a way to assign a song to multiple albums? For instance, if I want a track to show in Greatest Hits and also the real album it's from, I need to have the song loaded twice; once for each album. Is there a way around this? I know some people

  • Configuration Cisco SG200 livebox 2 NAS

    Bonjour j'ai pas mal cherché la solution par moi même mais j'avoue sans résultat concret Je dispose de : Un switch Cisco SG200 Une livebox 2 sagem (avec TV) Une borne Airport Express Un NAS Une maison avec 12 prises Mon probleme : en gros rien ne mar

  • Info on ESS based on ITS

    Hello all , Can anybody suggest me on  documents on implementation / customization of ESS based on ITS Thanks Aneez