WSDL2Java error

View: New views
4 Messages — Rating Filter:   Alert me  

WSDL2Java error

by warnockm :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm trying to use WSDL2Java to create some shell java code from a WSDL file I created.  I created the SOAP server in PHP and used the WSDL file to create code in c# using Visual Studio 2008.  This works very well, but when i try it using the Axis2 tool, i get an error.  

My WSDL file is: https://www.warnockinc.com/Dunbar/ws/wsdl/dunbar.wsdl

The error is:

wsdl2java -uri https://www.warnockinc.com/Dunbar/ws/wsdl/dunbar.wsdl
Using AXIS2_HOME:   C:\axis2\
Using JAVA_HOME:    C:\Program Files\Java\jre6\
Retrieving document at 'https://www.warnockinc.com/Dunbar/ws/wsdl/dunbar.wsdl'.
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:271)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
        ... 2 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50)
        ... 3 more
Caused by: org.apache.axis2.schema.SchemaCompilationException: can not find type {http://schemas.xmlsoap.org/soap/encoding/}Array from the parent schema http://
schema.example.com
        at org.apache.axis2.schema.SchemaCompiler.copyMetaInfoHierarchy(SchemaCompiler.java:1296)
        at org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1258)
        at org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:1153)
        at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1097)
        at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:1017)
        at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:931)
        at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
        at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:552)
        at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1991)
        at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1874)
        at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1081)
        at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:980)
        at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:934)
        at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
        at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:563)
        at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:370)
        at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:280)
        at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:103)
        ... 8 more

Any idea what this would be? Thanks!

Re: WSDL2Java error

by Amila Suriarachchi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Thu, Nov 20, 2008 at 8:47 AM, warnockm <matt@...> wrote:

I'm trying to use WSDL2Java to create some shell java code from a WSDL file I
created.  I created the SOAP server in PHP and used the WSDL file to create
code in c# using Visual Studio 2008.  This works very well, but when i try
it using the Axis2 tool, i get an error.

My WSDL file is: https://www.warnockinc.com/Dunbar/ws/wsdl/dunbar.wsdl

The error is:

wsdl2java -uri https://www.warnockinc.com/Dunbar/ws/wsdl/dunbar.wsdl
Using AXIS2_HOME:   C:\axis2\
Using JAVA_HOME:    C:\Program Files\Java\jre6\
Retrieving document at
'https://www.warnockinc.com/Dunbar/ws/wsdl/dunbar.wsdl'.
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:271)
       at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
       at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
       at
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53)
       at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
       ... 2 more
Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50)
       ... 3 more
Caused by: org.apache.axis2.schema.SchemaCompilationException: can not find
type {http://schemas.xmlsoap.org/soap/encoding/}Array from the parent schema
http://
schema.example.com
       at
org.apache.axis2.schema.SchemaCompiler.copyMetaInfoHierarchy(SchemaCompiler.java:1296)
       at
org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1258)
       at
org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:1153)
       at
org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1097)
       at
org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:1017)
       at
org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:931)
       at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
       at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:552)
       at
org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1991)
       at
org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1874)
       at
org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1081)
       at
org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:980)
       at
org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:934)
       at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
       at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:563)
       at
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:370)
       at
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:280)
       at
org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:103)
       ... 8 more

Any idea what this would be? Thanks!

Here the problem is Axis2 does not support SoapEncoding.

Thanks,
Amila.

--
View this message in context: http://www.nabble.com/WSDL2Java-error-tp20594340p20594340.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@...
For additional commands, e-mail: axis-user-help@...




--
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Re: WSDL2Java error

by warnockm :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks, that helps.  Specifically, is it the "SOAP-ENC" part?  It occurs when there is an array of a complex data type.  I read more about this, and many people have a problem with it.  What is the alternative to this?

Amila Suriarachchi wrote:
On Thu, Nov 20, 2008 at 8:47 AM, warnockm <matt@warnockinc.com> wrote:

>
> I'm trying to use WSDL2Java to create some shell java code from a WSDL file
> I
> created.  I created the SOAP server in PHP and used the WSDL file to create
> code in c# using Visual Studio 2008.  This works very well, but when i try
> it using the Axis2 tool, i get an error.
>
> My WSDL file is: https://www.warnockinc.com/Dunbar/ws/wsdl/dunbar.wsdl
>
> The error is:
>
> wsdl2java -uri https://www.warnockinc.com/Dunbar/ws/wsdl/dunbar.wsdl
> Using AXIS2_HOME:   C:\axis2\
> Using JAVA_HOME:    C:\Program Files\Java\jre6\
> Retrieving document at
> 'https://www.warnockinc.com/Dunbar/ws/wsdl/dunbar.wsdl'.
> 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:271)
>        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
> Caused by: java.lang.RuntimeException:
> java.lang.reflect.InvocationTargetException
>        at
>
> org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53)
>        at
>
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>        ... 2 more
> Caused by: java.lang.reflect.InvocationTargetException
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at
>
> org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50)
>        ... 3 more
> Caused by: org.apache.axis2.schema.SchemaCompilationException: can not find
> type {http://schemas.xmlsoap.org/soap/encoding/}Array<http://schemas.xmlsoap.org/soap/encoding/%7DArray>from the parent schema
> http://
> schema.example.com
>        at
>
> org.apache.axis2.schema.SchemaCompiler.copyMetaInfoHierarchy(SchemaCompiler.java:1296)
>        at
>
> org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1258)
>        at
>
> org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:1153)
>        at
>
> org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1097)
>        at
>
> org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:1017)
>        at
>
> org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:931)
>        at
>
> org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
>        at
>
> org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:552)
>        at
> org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1991)
>        at
>
> org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1874)
>        at
>
> org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1081)
>        at
>
> org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:980)
>        at
>
> org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:934)
>        at
>
> org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
>        at
>
> org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:563)
>        at
> org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:370)
>        at
> org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:280)
>        at
> org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:103)
>        ... 8 more
>
> Any idea what this would be? Thanks!


Here the problem is Axis2 does not support SoapEncoding.

Thanks,
Amila.

>
> --
> View this message in context:
> http://www.nabble.com/WSDL2Java-error-tp20594340p20594340.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


--
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Parent Message unknown rampart encrypt with x509 no data encipherment

by erwinr :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Hello All,

I am using axis2 1.4 and rampart and found that encryption (WSS 1.0) is not possible if the certificate has no data encipherment, i.e using the transport security cert.

Am i understanding correctly that this is implementation specific? I read somewhere that other tooling allows  transport security certs without the key usage data encipherment to encrypt a message by creating a symetric key based on this transport security cert.

Any info ragarding this is welcome.

Kind regards,
Erwin






---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@...
For additional commands, e-mail: axis-user-help@...

winmail.dat (3K) Download Attachment