Bitte helft mir,
ich muss einen Web Service Client erstellen. Die fertigen Jar's sollen dabei möglichst klein sein. Ich habe eine WSDL Datei bekommen die ich in Eclipse WTP Web Service Explorer erfolgreich testen konnte.
Hier die WSDL Datei:
Ich generiere den Client code mit
Als Ergebniss bekomme ich folgende Dateien erstellt:
dQuery.java
dQueryResponse.java
ObjectFactory.java
package-info.java
dTest1ServerPhp_Service.java
dTest1ServerPhp.java
Nun möchte ich in einem neuen Application Projekt diesen Web Service aufrufen und das Ergebnis (mehrere Datensätze) empfangen.
Ich probiere bereits seit einer Woche alles Mögliche aus und komme nicht weiter. Auch die Suche im Internet bringt mich nicht weiter.
Wer hat es schon einmal geschafft einen Web Service Client mit wsimport und wenig Jar files zu erstellen?
Danke für Hilfe
Ron
Ron
ich muss einen Web Service Client erstellen. Die fertigen Jar's sollen dabei möglichst klein sein. Ich habe eine WSDL Datei bekommen die ich in Eclipse WTP Web Service Explorer erfolgreich testen konnte.
Hier die WSDL Datei:
Code:
<?xml version="1.0" encoding="UTF-8"?> <!--Generated by calling http://192.168.1.4/dTest1Server.php?wsdl--> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.wso2.org/php" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:http="http://www.w3.org/2003/05/soap/bindings/HTTP/" xmlns:ns0="http://www.wso2.org/php/xsd" targetNamespace="http://www.wso2.org/php"> <types><xsd:schema targetNamespace="http://www.wso2.org/php/xsd"> <xsd:element name="dQuery"> <xsd:complexType> <xsd:sequence> <xsd:element name="searchStr" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="dQueryResponse"> <xsd:complexType> <xsd:sequence> <xsd:element name="id" type="xsd:long"/> <xsd:element name="Name1" type="xsd:string"/> <xsd:element name="Name2" type="xsd:string"/> <xsd:element name="Type1" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </types> <message name="dQueryInput"> <part name="parameters" element="ns0:dQuery"/> </message> <message name="dQueryOutput"> <part name="parameters" element="ns0:dQueryResponse"/> </message> <portType name="dTest1Server.php"> <operation name="dQuery"> <input message="tns:dQueryInput"/> <output message="tns:dQueryOutput"/> </operation> </portType> <binding name="dTest1Server.php" type="tns:dTest1Server.php"> <soap:binding xmlns="http://schemas.xmlsoap.org/wsdl/soap/" transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <operation xmlns:default="http://schemas.xmlsoap.org/wsdl/soap/" name="dQuery"> <soap:operation xmlns="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://192.168.1.4/dTest1Server.php/dQuery" style="document"/> <input xmlns:default="http://schemas.xmlsoap.org/wsdl/soap/"> <soap:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" use="literal"/> </input> <output xmlns:default="http://schemas.xmlsoap.org/wsdl/soap/"> <soap:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" use="literal"/> </output> </operation> </binding> <service name="dTest1Server.php"> <port xmlns:default="http://schemas.xmlsoap.org/wsdl/soap/" name="dTest1Server.php" binding="tns:dTest1Server.php"> <soap:address xmlns="http://schemas.xmlsoap.org/wsdl/soap/" location="http://192.168.1.4/dTest1Server.php"/> </port> </service> </definitions>
Code:
wsimport -d C:\data\WsImportTest\bin -keep -s C:\data\WsImportTest\src -p com.bTest.wsclient http://192.168.1.4/dTest1.wsdl
dQuery.java
dQueryResponse.java
ObjectFactory.java
package-info.java
dTest1ServerPhp_Service.java
dTest1ServerPhp.java
Nun möchte ich in einem neuen Application Projekt diesen Web Service aufrufen und das Ergebnis (mehrere Datensätze) empfangen.
Ich probiere bereits seit einer Woche alles Mögliche aus und komme nicht weiter. Auch die Suche im Internet bringt mich nicht weiter.
Wer hat es schon einmal geschafft einen Web Service Client mit wsimport und wenig Jar files zu erstellen?
Danke für Hilfe
Ron
Ron
Comment