[ 
http://issues.apache.org/jira/browse/AXIS2-733?page=comments#action_12416011 ] 

Ken Campbell commented on AXIS2-733:
------------------------------------

As a follow up to this I am writing another service at the moment. When I tried 
to generate code I ran into the same error. This time it ocurred *with* the 
targetNamespace attribute in place. I eventually tracked down the source of the 
trouble to the fact that if a type in my schema was referred to by another type 
then it must precede the type making the reference in the schema. 

I'll have another look at the schema I attached here to see if that was the 
original cause.

> Unknown prefix created by WSDL2Java
> -----------------------------------
>
>          Key: AXIS2-733
>          URL: http://issues.apache.org/jira/browse/AXIS2-733
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Sub-task

>   Components: wsdl, databinding
>     Versions: 1.0
>  Environment: Windows XP, j2sdk 5.0
>     Reporter: Ken Campbell

>
> Taking the previously attached PAF.wsdl and removing the targetNamespace 
> attributes I re-ran WSDL2Java. The result was an exception compaining about 
> an unknown prefix, 'gen361'. This prefix does not exist in the schema 
> therefore it would seem that something is not reading the wsdl correctly.
> <WSDL2Java exception follows :>
> >WSDL2Java -uri ..\DEVELOP\paf\PAF.wsdl -ss -sd -g -d xmlbeans -o 
> >..\DEVELOP\paf -p edp.ws.paf.generated
> Using AXIS2_HOME:   C:\Apache\Tomcat5\webapps\axis2\WEB-INF
> Using JAVA_HOME:    C:\Program Files\Java\jdk1.5.0_04
> org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>         at 
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
> ationEngine.java:185)
>         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.InvocationTargetExcepti
> on
>         at 
> org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLB
> eansExtension.java:93)
>         at 
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
> ationEngine.java:140)
>         ... 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(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at 
> org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLB
> eansExtension.java:83)
>         ... 3 more
> Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: 
> error:
> Invalid QName value: Can't resolve prefix 'gen361'
>         at 
> org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGe
> nerationUtility.java:192)
>         ... 8 more
> Caused by: org.apache.xmlbeans.XmlException: error: Invalid QName value: 
> Can't r esolve prefix 'gen361'
>         at 
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(Sche
> maTypeSystemCompiler.java:225)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:665)
>         at 
> org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGe
> nerationUtility.java:161)
>         ... 8 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to