是使用axis 來實現的。 嘗試過cxf 可再傳byte[] 時一直沒法成功訪問,後來嘗試了 axis來實現,經過ecplise 生成java webservice client 來調用webservice接口java
添加的依賴:web
<dependency> <groupId>org.apache.axis</groupId> <artifactId>axis</artifactId> <version>1.4</version> </dependency> <dependency> <groupId>org.apache.axis</groupId> <artifactId>axis-jaxrpc</artifactId> <version>1.4</version> </dependency> <dependency> <groupId>axis</groupId> <artifactId>axis-wsdl4j</artifactId> <version>1.5.1</version> </dependency> <dependency> <groupId>commons-discovery</groupId> <artifactId>commons-discovery</artifactId> <version>0.2</version> </dependency> <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> <version>1.4.7</version> </dependency>
一、建立建立一個maven項目,添加相關依賴apache
二、建立java webservice clientmaven
三、完成後能夠在上圖的那個路徑下找到相應的java文件spa
四、最後能夠一般建立xxxxxxxProxy.java 這個類的對象進行調用就能夠了code
這樣就能夠成功訪問了對象