enum types not supported in jws - weblogic.developer.interest.webservices.general(Archived)

I'm using wls 10.3 and one of my java class has a property that used a java enum type and when I tried to run jwsc, I'm getting this error message:
[jwsc] [ERROR] - Enum Types are not supported on a JWS: com.starcomsoft.pp.vo.RecordStatus
[jwsc] C:\starcomsoft\jax-rpc-103-test117\source\server\com\starcomsoft\pp\order\jws\OrderWSImpl.java 205
:21
How can I fix this problem. Thanks for you help

Related

Error when trying to create a types jar from a web service WSDL

Hi,
I generated a WSDL from a web service. When I try to generate a types jar from that WSDL in another project, I get an error:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
com.bea.workshop.webservices.servicecontrol.ui.except.TypeGenerationFailedException: Buildfile: C:\eclipsews\.metadata\com.bea.workshop.webservices.servicecontrol.ui\build-dir\build.xml
Trying to override old definition of task wsgen
build:
build-types:
clean-types:
[echo] Deleting types directory c:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474
[echo] Deleting types jar C:\eclipsews\AAATest\WebContent\WEB-INF\lib\CaregiverEBillingMasterServiceServiceTypes_xmlbeans_apache.jar
[mkdir] Created dir: C:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474
generate-src-code:
[echo] Generating types of family xmlbeans_apache from WSDL at file:/C:/eclipsews/AAATest/src/test/CaregiverEBillingMasterServiceService.wsdl, all services. Outputting to c:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474
[typesGen] Generating complex Java types for schema types in WSDL file:/C:/eclipsews/AAATest/src/test/CaregiverEBillingMasterServiceService.wsdl. Outputting to C:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474 ...
[typesGen] [WARNING] Generating array which is non-compliant with JaxRPC 1.1 for XML name: t=ArrayOfTreatmentDetailItem#http://org/abc/claims/caregiver/ebilling/services
[typesGen] [WARNING] Generating array which is non-compliant with JaxRPC 1.1 for XML name: t=ArrayOfDocumentTypeAutoPayWrapper_literal#java:org.abc.claims.caregiver.ebilling.services.util
[typesGen] [WARNING] Generating array which is non-compliant with JaxRPC 1.1 for XML name: t=ArrayOfJavaLangint_literal#java:org.abc.claims.caregiver.ebilling.services
[typesGen] [WARNING] Generating array which is non-compliant with JaxRPC 1.1 for XML name: t=ArrayOfDocumentSubmissionHierarchy#http://org/abc/claims/caregiver/ebilling/services
[typesGen] [WARNING] Generating array which is non-compliant with JaxRPC 1.1 for XML name: t=ArrayOfMessageCode#http://org/abc/claims/caregiver/ebilling/services
[typesGen] [WARNING] Generating array which is non-compliant with JaxRPC 1.1 for XML name: t=ArrayOfFeeCodeType#http://org/abc/claims/caregiver/ebilling/services
[typesGen] [WARNING] Generating array which is non-compliant with JaxRPC 1.1 for XML name: t=ArrayOfBatchMessage#http://org/abc/claims/caregiver/ebilling/services
[typesGen] [WARNING] Generating array which is non-compliant with JaxRPC 1.1 for XML name: t=ArrayOfArrayOfJavaLangstring_literal#java:org.abc.claims.caregiver.ebilling.services.util
[typesGen] [WARNING] Generating array which is non-compliant with JaxRPC 1.1 for XML name: t=ArrayOfJavaLangstring_literal#java:org.abc.claims.caregiver.ebilling.services.util
compile-src-code:
[echo] Compiling source files from c:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474 to c:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474
[javac] Compiling 298 source files to C:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474
[javac] ----------
[javac] 1. ERROR in C:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474\com\abc\claims\caregiver\ebilling\FeeCodeDocument.java (at line 51)
[javac]      public static com.abc.claims.caregiver.ebilling.FeeCodeDocument parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
[javac]      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] No exception of type XmlException can be thrown; an exception type must be a subclass of Throwable
[javac] ----------
[javac] 2. ERROR in C:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474\com\abc\claims\caregiver\ebilling\FeeCodeDocument.java (at line 54)
[javac]      public static com.abc.claims.caregiver.ebilling.FeeCodeDocument parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
[javac]      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] No exception of type XmlException can be thrown; an exception type must be a subclass of Throwable
[javac] ----------
[javac] 3. ERROR in C:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474\com\abc\claims\caregiver\ebilling\FeeCodeDocument.java (at line 58)
[javac]      public static com.abc.claims.caregiver.ebilling.FeeCodeDocument parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
[javac]      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] No exception of type XmlException can be thrown; an exception type must be a subclass of Throwable
[javac] ----------
[javac] 4. ERROR in C:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474\com\abc\claims\caregiver\ebilling\FeeCodeDocument.java (at line 61)
[javac]      public static com.abc.claims.caregiver.ebilling.FeeCodeDocument parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
[javac]      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] No exception of type XmlException can be thrown; an exception type must be a subclass of Throwable
[javac] ----------
[javac] 5. ERROR in C:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474\com\abc\claims\caregiver\ebilling\FeeCodeDocument.java (at line 64)
[javac]      public static com.abc.claims.caregiver.ebilling.FeeCodeDocument parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
[javac]      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] No exception of type XmlException can be thrown; an exception type must be a subclass of Throwable
[javac] ----------
[javac] 6. ERROR in C:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474\com\abc\claims\caregiver\ebilling\FeeCodeDocument.java (at line 67)
[javac]      public static com.abc.claims.caregiver.ebilling.FeeCodeDocument parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
[javac]      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] No exception of type XmlException can be thrown; an exception type must be a subclass of Throwable
=== snipped here due to huge file size ===
[javac] 2680. ERROR in C:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474\org\xfa\schema\xfaData\x10\SignatureDocument.java (at line 99)
[javac]      public static org.xfa.schema.xfaData.x10.SignatureDocument parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
[javac]      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] No exception of type XmlException can be thrown; an exception type must be a subclass of Throwable
[javac] ----------
[javac] 2681. ERROR in C:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474\org\xfa\schema\xfaData\x10\SignatureDocument.java (at line 103)
[javac]      public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
[javac]      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] No exception of type XmlException can be thrown; an exception type must be a subclass of Throwable
[javac] ----------
[javac] 2682. ERROR in C:\development\wlwBuild\XCaregiverEBillingMasterServiceService1297810259474\org\xfa\schema\xfaData\x10\SignatureDocument.java (at line 107)
[javac]      public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
[javac]      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] No exception of type XmlException can be thrown; an exception type must be a subclass of Throwable
[javac] ----------
[javac] 2682 problems (2682 errors)
BUILD FAILED
C:\eclipsews\.metadata\com.bea.workshop.webservices.servicecontrol.ui\build-dir\build.xml:73: The following error occurred while executing this line:
C:\eclipsews\.metadata\com.bea.workshop.webservices.servicecontrol.ui\build-dir\build.xml:107: The following error occurred while executing this line:
C:\eclipsews\.metadata\com.bea.workshop.webservices.servicecontrol.ui\build-dir\build.xml:181: Compile failed; see the compiler error output for details.
Total time: 17 seconds
     at com.bea.workshop.webservices.servicecontrol.ui.util.TypesGenerationScript.run(TypesGenerationScript.java:197)
     at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Caused by: org.eclipse.core.runtime.CoreException: C:\eclipsews\.metadata\com.bea.workshop.webservices.servicecontrol.ui\build-dir\build.xml:73: The following error occurred while executing this line:
C:\eclipsews\.metadata\com.bea.workshop.webservices.servicecontrol.ui\build-dir\build.xml:107: The following error occurred while executing this line:
C:\eclipsews\.metadata\com.bea.workshop.webservices.servicecontrol.ui\build-dir\build.xml:181: Compile failed; see the compiler error output for details.
     at org.eclipse.ant.core.AntRunner.handleInvocationTargetException(AntRunner.java:451)
     at org.eclipse.ant.core.AntRunner.run(AntRunner.java:383)
     at com.bea.workshop.webservices.servicecontrol.ui.util.TypesGenerationScript.run(TypesGenerationScript.java:185)
     ... 1 more
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I was previously able to generate a types jar just fine from the web service's WSDL. Recently, I made some changes to the web service. Apparently, these changes to the web service now cause the WSDL to be unparseable when trying to generate types jars.
Any ideas? 
Hi,
Just wondering... might your build is try to compile first and then creating a jar file..
Basically it quite easy to create jar file but I would say try to with directly with workshop and execute the jar file from there you will get actual root cause of the problem.
Regards,
Kal. 
Thanks for the reply. Actually, I am using Workshop to attempt to generate the types jar from the WSDL; I'm not trying to create the jar from outside of Workshop. Inside Workshop, I right-click the WSDL, then Generate Types JAR file. After I follow the prompts, the error I indicated occurs. I think those are the steps that you suggested I try? Any more suggestions? 
Hi,
Can you make me sure which sort of the changes you made in the WSDL file as it is trying compile but fails out...
Can you more specific towards changes you done on WSDL
Regards,
Kal. 
The WSDL is generated from my web service. I made heavy revisions to my web service which, in turn, affected the resultant WSDL. The changes I made to my web service were almost exclusively related to object substitution. For example, prior to the change I was referencing object A from my web service; after the change, I was referencing object B. The objects that I'm referring to are XMLBeans, if that matters. I can't really describe it more than that without actually showing you the WSDL.
I would post the WSDL file here to allow you to try to create a types jar out of it, but the WSDL exceeds the 30000 character limit for this field. There is no way for me to attach the WSDL to this post.

how to support java 5 enum types in jws

I'm using wls 10.3 and one of my java class has a property that used a java enum type and when I tried to run jwsc, I'm getting this error message:
[jwsc] [ERROR] - Enum Types are not supported on a JWS: com.starcomsoft.pp.vo.RecordStatus
[jwsc] C:\starcomsoft\jax-rpc-103-test117\source\server\com\starcomsoft\pp\order\jws\OrderWSImpl.java 205
:21
I'm stuck, can you please help me. Thanks

Help with RPC soap message with attachement

Hi,
I am using Weblogic 8.03 server. I need to implement a soap interface that receives
a string along with an image as an attachement from a client who is using Jakarta
soap implementation. I am relatively new to soap and weblogic soap support.
My question is can I implement the RPC based soap interface and still receive
the attachement? Do I need to implement a message handler that extract the attachement?
does anybody have any examples of an RPC bases soap interface with the handler
that extract the attachement? or should I implement my service as type "document"?
is there any examples of that?
thanks,
Nasrin
Example
http://manojc.com/?sample5
Ajay
"Nasrin Azordegan" <nasrin_azordegan#raytheon.com> wrote in message
news:3fbe5622$1#newsgroups.bea.com...
>
Hi,
I am using Weblogic 8.03 server. I need to implement a soap interfacethat receives
a string along with an image as an attachement from a client who is usingJakarta
soap implementation. I am relatively new to soap and weblogic soapsupport.
>
My question is can I implement the RPC based soap interface and stillreceive
the attachement? Do I need to implement a message handler that extract theattachement?
>
does anybody have any examples of an RPC bases soap interface with thehandler
that extract the attachement? or should I implement my service as type"document"?
is there any examples of that?
thanks,
Nasrin
Ajay,
thanks very much for the example. I get the following errors when I compile, any
ideas?
C:\hdidemo2\EA\tutorial\sample5>ant clean
Buildfile: build.xml
clean:
BUILD SUCCESSFUL
Total time: 1 second
C:\hdidemo2\EA\tutorial\sample5>ant
Buildfile: build.xml
clean:
setup:
[mkdir] Created dir: C:\tmp\output\WEB-INF\classes
[mkdir] Created dir: C:\tmp\client_classes
compile.server:
[javac] Compiling 1 source file to C:\tmp\output\WEB-INF\classes
webservice.build:
webss.build:
webss.check:
[autotype] Autotyping for javaComponents tutorial.sample5.HelloWorldService
[source2wsdd] Loading source file C:\hdidemo2\EA\tutorial\sample5\HelloWorldServ
ice.java...
[source2wsdd] Constructing Javadoc information...
[clientgen] Generating client jar for c:/tmp//output/HelloWorldService.wsdl ...
deploy:
[jar] Building jar: C:\bea\user_projects\domains\mydomain\applications\sam
ple5.war
compile.client:
[javac] Compiling 1 source file to C:\tmp\client_classes
[javac] C:\hdidemo2\EA\tutorial\sample5\client\Main.java:42: echoImageArray(
java.lang.String) in tutorial.sample5.client.HelloWorldServicePort cannot be app
lied to (java.awt.Image[])
[javac] Image[] images = port.echoImageArray( new Image[]{image} );
[javac] ^
[javac] C:\hdidemo2\EA\tutorial\sample5\client\Main.java:49: echoDataHandler
Array(java.lang.String) in tutorial.sample5.client.HelloWorldServicePort cannot
be applied to (javax.activation.DataHandler[])
[javac] DataHandler[] arrayResult = port.echoDataHandlerArray(
[javac] ^
[javac] 2 errors
BUILD FAILED
file:C:/hdidemo2/EA/tutorial/sample5/build.xml:57: Compile failed; see the compi
ler error output for details.
Total time: 9 seconds
C:\hdidemo2\EA\tutorial\sample5>
"Ajay" <ahonnur#bea.com> wrote:
Example
http://manojc.com/?sample5
Ajay
"Nasrin Azordegan" <nasrin_azordegan#raytheon.com> wrote in message
news:3fbe5622$1#newsgroups.bea.com...
Hi,
I am using Weblogic 8.03 server. I need to implement a soap interfacethat receives
a string along with an image as an attachement from a client who isusing
Jakarta
soap implementation. I am relatively new to soap and weblogic soapsupport.
My question is can I implement the RPC based soap interface and stillreceive
the attachement? Do I need to implement a message handler that extractthe
attachement?
does anybody have any examples of an RPC bases soap interface withthe
handler
that extract the attachement? or should I implement my service as type"document"?
is there any examples of that?
thanks,
Nasrin
Hello,
This sample builds cleanly, start to finish, for me. What version of
WLS (take a look at the first part of the server log) and are you using
the JDK provided by the kit?
Thanks,
Bruce
Nasrin Azordegan wrote:
>
Ajay,
thanks very much for the example. I get the following errors when I compile, any
ideas?
C:\hdidemo2\EA\tutorial\sample5>ant clean
Buildfile: build.xml
clean:
BUILD SUCCESSFUL
Total time: 1 second
C:\hdidemo2\EA\tutorial\sample5>ant
Buildfile: build.xml
clean:
setup:
[mkdir] Created dir: C:\tmp\output\WEB-INF\classes
[mkdir] Created dir: C:\tmp\client_classes
compile.server:
[javac] Compiling 1 source file to C:\tmp\output\WEB-INF\classes
webservice.build:
webss.build:
webss.check:
[autotype] Autotyping for javaComponents tutorial.sample5.HelloWorldService
[source2wsdd] Loading source file C:\hdidemo2\EA\tutorial\sample5\HelloWorldServ
ice.java...
[source2wsdd] Constructing Javadoc information...
[clientgen] Generating client jar for c:/tmp//output/HelloWorldService.wsdl ...
deploy:
[jar] Building jar: C:\bea\user_projects\domains\mydomain\applications\sam
ple5.war
compile.client:
[javac] Compiling 1 source file to C:\tmp\client_classes
[javac] C:\hdidemo2\EA\tutorial\sample5\client\Main.java:42: echoImageArray(
java.lang.String) in tutorial.sample5.client.HelloWorldServicePort cannot be app
lied to (java.awt.Image[])
[javac] Image[] images = port.echoImageArray( new Image[]{image} );
[javac] ^
[javac] C:\hdidemo2\EA\tutorial\sample5\client\Main.java:49: echoDataHandler
Array(java.lang.String) in tutorial.sample5.client.HelloWorldServicePort cannot
be applied to (javax.activation.DataHandler[])
[javac] DataHandler[] arrayResult = port.echoDataHandlerArray(
[javac] ^
[javac] 2 errors
BUILD FAILED
file:C:/hdidemo2/EA/tutorial/sample5/build.xml:57: Compile failed; see the compi
ler error output for details.
Total time: 9 seconds
C:\hdidemo2\EA\tutorial\sample5>
"Ajay" <ahonnur#bea.com> wrote:
Example
http://manojc.com/?sample5
Ajay
"Nasrin Azordegan" <nasrin_azordegan#raytheon.com> wrote in message
news:3fbe5622$1#newsgroups.bea.com...
Hi,
I am using Weblogic 8.03 server. I need to implement a soap interfacethat receives
a string along with an image as an attachement from a client who isusing
Jakarta
soap implementation. I am relatively new to soap and weblogic soapsupport.
My question is can I implement the RPC based soap interface and stillreceive
the attachement? Do I need to implement a message handler that extractthe
attachement?
does anybody have any examples of an RPC bases soap interface withthe
handler
that extract the attachement? or should I implement my service as type"document"?
is there any examples of that?
thanks,
Nasrin

Binding Exception

I am using WebLogic 7.0 to generate webservice from an ofx schema with complex
types. I ran into the following error when generating the ear file using ant.
Apparently all type classes are expected to have a default public constructor.
Such rule does not seem to be required with other tool (such as websphere). Is
there any where of getting around this problem ? The java classes were generated
by the software Castor using the schema.
Thanks.
===================================================
ear:
[servicegen] Generating service "demo" ...
[servicegen] Generating XML types and serializers from java classes (examples.demo.Ofx2)
..
[servicegen] weblogic.xml.schema.binding.BindingException: No default constructor
was found for class examples.demo.type
s.AccountEnum loaded from C:/bea2/weblogic700/samples/server/src/examples/demo/build/examples/demo/types/AccountEnum.class.
All classes that will be serialized or deserialized must be non-interface, non-abstract
classes that provide a public default constructor - with nested exception:

can i overload my web service methods?

It's possible to overload methods in web services? im using WLS 10.0 MP2
i got this error while build my ws...
[jwsc] [ERROR] - Operation name "activar" is already defined.
[jwsc] /Users/mau/Documents/workspace/ActivarWS/com/test/app/ws/ActivacionWS 29:8
[jwsc] [ERROR] - Operation name "desactivar" is already defined.
[jwsc] /Users/mau/Documents/workspace/ActivarWS/com/test/app/ws/ActivacionWS 68:21
[jwsc] [ERROR] - The operation {http://com/test/app/ws}activarBolsa cannot be uniquely identified. An alternate operation name can be specified using #WebMethod annotation for Doc/lit/Wrapped, RPC message style or #WebParam annotation for Doc/lit/bare message style
[jwsc] /Users/mau/Documents/workspace/ActivarWS/com/test/app/ws/ActivacionWS 111:21
[jwsc] [ERROR] - The operation {http://com/test/app/ws}desactivarBolsa cannot be uniquely identified. An alternate operation name can be specified using #WebMethod annotation for Doc/lit/Wrapped, RPC message style or #WebParam annotation for Doc/lit/bare message style
[AntUtil.deleteDir] Deleting directory /var/folders/2L/2Lz6Bkl+GVC9aJ5QCEF7Xk+++TI/-Tmp-/_xhflkq
i guess is because im overloading 2 methods (activar with 3 and 4 params, and desactivar with 3 and 4 params too)
:___
Help it is very appreciated
thanx in advance 
Operations on your WSDL must have unique names. By default, WSDL operations are named after the Java methods from which they were generated. This means that in order to use Java method overloading you must provide unique names for the WSDL. As the error message suggests, you can most easily do this with the #WebMethod annotation. Like this:
#WebMethod() // Use default operation name
public void someMethod(String a) { ... }
#WebMethod(operationName="someMethodTwoArg") // Give unique name
public void someMethod(String a, String b) { ... } 
Hi
I tried this option still my eclipse still genrates WSDL only with one operation name.
Any idea or suggestions?
Thanks for your help
-abhi 
Web service doesn't support method overload..

Categories

Resources