Java WebService und IPS WSDL

Moin,

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?

Eine TestURL http://px.pats.no/px/services/TerminalLocation?wsdl funktioniert einwandfrei.

Hoffe, jemand hat einen Hinweis für mich…

Viele Grüße
Sascha

Über die Testurl: Generic SOAP Client kann ich das IP-Symcon WSDL auch nicht validieren / testen…

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

Hoffe, dass wir damit weiterkommen…

Viele Grüße
Sascha

Ich habe das ganze gestern noch mit weiteren WSDL Parsern getestet und habe immer das gleiche Ergebnis erzielt.

Kann zu dem Thema noch jemand etwas sagen? Ich würde das ganze ansonsten als Bug einkippen.

Viele Grüße
Sascha

Wir hatten mit Eclipse for Java EE bisher nie Probleme.

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.

- <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="IIPSCategoryManagerservice" targetNamespace="http://localhost/" xmlns:tns="http://localhost/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns1="urn:UIPSTypes">
- <types>
- <xs:schema targetNamespace="urn:UIPSTypes" xmlns="urn:UIPSTypes">
- <xs:complexType name="TCategoryIDs">
- <xs:complexContent>
- <xs:restriction base="soapenc:Array">
  <xs:sequence /> 
  <xs:attribute ref="soapenc:arrayType" xmlns:n1="http://schemas.xmlsoap.org/wsdl/" n1:arrayType="xs:unsignedShort[]" /> 
  </xs:restriction>
  </xs:complexContent>
  </xs:complexType>
  </xs:schema>
  </types>

kritisch finde ich diese Zeile:

<xs:schema targetNamespace=„urn:UIPSTypes“ xmlns=„urn:UIPSTypes“>

(xmlns wird überschrieben)
und

<xs:attribute ref=„soapenc:arrayType“ xmlns:n1=„http://schemas.xmlsoap.org/wsdl/“ n1:arrayType=„xs:unsignedShort“ />

(xmlns:n1 wurde schon mal mit „urn:UIPSTypes“ definiert)

Möglicherweise sind andere Validatoren toleranter als Axis

Tommi

Moin,

ich habe noch andere Parser für Java getestet, die sich alle an der WSDL Datei stören.

Ich würde mich freuen, wenn paresy sich dem Punkt für die 2.2 mit annimmt und den Part evtl. überarbeitet.

Viele Grüße
Sascha

Habe für das Problem/BUG eine entsprechende BUG-Meldung eröffnet:

Wäre super wenn den BUG jemand auf „Bestätigt“ setzen könnte.

Viele Grüße
Sascha

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…

Viele Grüße
Sascha