0

我正在寻找要导入我的软件的 jar 库。我正在使用 ups 的 Shipping_Pkg_Gnd.zip 作为弹簧板来生成运输标签。但是,他们没有在他们提供的任何示例代码中提供 .jar 库。有谁知道在哪里可以得到这个图书馆。

以下是无法使用的导入,因为我没有所需的开发人员 API 导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipmentErrorMessage;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.BillShipperType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.InternationalFormType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.LabelImageFormatType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.LabelSpecificationType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.PackageType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.PackageWeightType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.PackagingType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.PaymentInfoType;导入 com.ups.www.wsdl.xoltws.ship.v1_1。ShipServiceStub.ProductType; 导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ProductWeightType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.RequestType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ServiceAccessToken_type0;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ServiceType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipAddressType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipFromType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipPhoneType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipToAddressType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipToType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipUnitOfMeasurementType;产品重量类型;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.RequestType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ServiceAccessToken_type0;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ServiceType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipAddressType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipFromType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipPhoneType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipToAddressType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipToType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipUnitOfMeasurementType;产品重量类型;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.RequestType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ServiceAccessToken_type0;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ServiceType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipAddressType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipFromType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipPhoneType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipToAddressType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipToType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipUnitOfMeasurementType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ServiceType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipAddressType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipFromType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipPhoneType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipToAddressType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipToType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipUnitOfMeasurementType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ServiceType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipAddressType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipFromType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipPhoneType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipToAddressType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipToType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipUnitOfMeasurementType;ShipToAddressType; 导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipToType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipUnitOfMeasurementType;ShipToAddressType; 导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipToType;导入 com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipUnitOfMeasurementType;

4

1 回答 1

4

我有类似的问题,解决方案是使用 wsimport.sh 从 wsdl 生成 jar/class 文件。

所以你必须将以下六个文件复制到同一个文件夹中

$ mkdir ups_ship && cd ups_ship
$ ls -1
common.xsd
Error1.1.xsd
IFWS.xsd
ShipWebServiceSchema.xsd
Ship.wsdl
UPSSecurity.xsd
$ wsimport.sh -verbose -keep -extension -target 2.0 Ship.wsdl

生成的代码:

$ ls -1 com/ups/wsdl/xoltws/ship/v1/
ShipAcceptErrorMessage.class
ShipAcceptErrorMessage.java
ShipConfirmErrorMessage.class
ShipConfirmErrorMessage.java
ShipmentErrorMessage.class
ShipmentErrorMessage.java
ShipPortType.class
ShipPortType.java
ShipService.class
ShipService.java

现在您可以将所有 *.class 文件放在一个包中并在您的项目中使用它:

$jar cvf com_ups_wsdl_xoltws_ship_v1.jar ./com/ups/wsdl/xoltws/ship/v1/*.class

你的新罐子:

$jar tf com_ups_wsdl_xoltws_ship_v1.jar
META-INF/
META-INF/MANIFEST.MF
com/ups/wsdl/xoltws/ship/v1/ShipAcceptErrorMessage.class
com/ups/wsdl/xoltws/ship/v1/ShipConfirmErrorMessage.class
com/ups/wsdl/xoltws/ship/v1/ShipmentErrorMessage.class
com/ups/wsdl/xoltws/ship/v1/ShipPortType.class
com/ups/wsdl/xoltws/ship/v1/ShipService.class
于 2011-02-14T21:41:33.900 回答