You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Alex Pivovarov <ax...@gmail.com> on 2006/07/04 11:31:48 UTC

Is it possible to use type java.text.DateFormat as an output type of WS method

MyInter Interface:
-----------------------------------------------------------

package org.x4444;
import java.text.DateFormat;

public interface MyInter {

    DateFormat getDateFormat();

    void setDateFormat(DateFormat f);
}
-----------------------------------------------------------
I get WSDL by run
$ Java2WSDL -cn org.x4444.MyInter -cp . -sn MyInter

-----------------------------------------------------------
After that I try to get java skeleton of the WS
$ WSDL2Java -uri MyInter.wsdl -ss -sd -d xmlbeans -o out

and I get an exception:
-----------------------------------------------------------
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(
CodeGenerationEngine.java:235)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
        at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(
XMLBeansExtension.java:92)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(
CodeGenerationEngine.java:188)
        ... 2 more
Caused by: java.lang.reflect.InvocationTargetException
        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:324)
        at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(
XMLBeansExtension.java:82)
        ... 3 more
Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException:
error:src-resolve: type 'DateFormat@http://text.java/xsd' not found.
        at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(
CodeGenerationUtility.java:194)
        ... 8 more
Caused by: org.apache.xmlbeans.XmlException: error: src-resolve: type '
DateFormat@http://text.java/xsd' not found.
        at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(
SchemaTypeSystemCompiler.java:225)
        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:324)
        at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:665)
        at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(
CodeGenerationUtility.java:163)
        ... 8 more
-----------------------------------------------------------

the problem i think is: error:src-resolve: type 'DateFormat@
http://text.java/xsd' not found.
is it possible to use  java.text.DateFormat as an output type of WS method?