UPS 开发者 API 缺失 ja

发布于 2024-09-15 07:37:45 字数 1615 浏览 10 评论 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;

I am looking for what jar library to import into my software. I am using ups's Shipping_Pkg_Gnd.zip for a spring board to provide shipping label generation. However they did not provide a .jar library in any of sample code that they provide. Does anyone know where to get this library.

Here are the imports that will not work because I do not have the required developer API
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipmentErrorMessage;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.BillShipperType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.InternationalFormType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.LabelImageFormatType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.LabelSpecificationType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.PackageType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.PackageWeightType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.PackagingType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.PaymentInfoType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ProductType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ProductWeightType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.RequestType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ServiceAccessToken_type0;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ServiceType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipAddressType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipFromType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipPhoneType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipToAddressType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipToType;
import com.ups.www.wsdl.xoltws.ship.v1_1.ShipServiceStub.ShipUnitOfMeasurementType;

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

她如夕阳 2024-09-22 07:37:45

我遇到了类似的问题,解决方案是使用 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:

$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

I had the similar issue, and the solution is to use wsimport.sh to generate the jar/class files from the wsdl.

So you have to copy the following six files to the same folder

$ 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

Generated code:

$ 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

Now you can put all your *.class files in a package and use it in your project:

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

Your new jar:

$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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文