ich versuche aktuell ein Client in Java zu schreiben der via Soap-Requests Daten vom IP-Symcon Server abholt.
Nun bin ich aber mit dem Problem konfrontiert, dass ich Eclipse die .wsdl Datei von IP-Symcon nicht beibringen kann. Es kommt jedes Mal die Meldung, dass die Datei nicht valid ist.
Als WSDL-Pfad habe ich http://<host>:3773/wsdl/IIPSCategoryManager angegeben. Ist das nicht der korrekte Pfad?
Ich habe mehrere WSDL Parser für Java ausprobiert. AXIS2 für Java bringt auch einen wsdl2java Convert mit der evtl. eine Ausgabe produziert, mit der man was anfangen kann:
realriot@mnh:~/dev/ips/test/axis2-1.5/bin$ ./wsdl2java.sh -o /home/realriot/dev/ips/test/src -uri http://<host>:3773/wsdl/IIPSObjectManager
Using AXIS2_HOME: /home/realriot/dev/ips/test/axis2-1.5
Using JAVA_HOME: /opt/java
Retrieving document at 'http://<host>:3773/wsdl/IIPSObjectManager'.
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(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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 urn:UIPSTypes
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:766)
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
Vieleicht sollte sich wirklich paresy die WDSL noch einmal anschauen. Ich würde mal vermuten, das das Problem mit dem überschreiben des xmlns-Namesraumes zusammen hängen könnte.
Ich habe es mit den verschiedensten Tools für Java probiert… Von nahezu allen Tools wird die WSDL als ungültig abgelehnt. Einige scheinen toleranter zu sein, und nehmen diese trotzdem an.
paresy, kannst Du mal schauen, ob Du das Problem nicht fixen kannst? Hat aktuell maßgeblichen Einfluss auf Java-Programmierenvironments…