错误描述:
unexpected element (uri:"http://impl.order.api.service.ac.jd.com",local:"venderSign").expected elements are
<{}startDate.....>对这块小弟不太熟悉,求高手解答。
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://220.231.59.70/services/services/orderSearchService?wsdl
// Encoding : UTF-8
// Codegen : [wfDebug,wfUseSerializerClassForAttrs]
// Version : 1.0
// (2011-05-27 16:50:06 - 1.33.2.5)
// ************************************************************************ //unit orderSearchService1;interfaceuses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;type // ************************************************************************ //
// The following types, referred to in the WSDL document are not being represented
// in this file. They are either aliases[@] of other types represented or were referred
// to but never[!] declared in the document. The types from the latter category
// typically map to predefined/known XML or Borland types; however, they could also
// indicate incorrect WSDL documents that failed to declare or import a schema type.
// ************************************************************************ //
// !:string - "http://www.w3.org/2001/XMLSchema"
// !:long - "http://www.w3.org/2001/XMLSchema"
// !:int - "http://www.w3.org/2001/XMLSchema"
// !:boolean - "http://www.w3.org/2001/XMLSchema" apiResult = class; { "http://impl.order.api.service.ac.jd.com/" }
consignee = class; { "http://impl.order.api.service.ac.jd.com/" }
ware = class; { "http://impl.order.api.service.ac.jd.com/" }
order = class; { "http://impl.order.api.service.ac.jd.com/" }
apiOrderQueryDetail = class; { "http://impl.order.api.service.ac.jd.com/" } // ************************************************************************ //
// Namespace : http://impl.order.api.service.ac.jd.com/
// ************************************************************************ //
apiResult = class(TRemotable)
private
FchineseErrCode: WideString;
FenglishErrCode: WideString;
FnumberCode: Integer;
Fsuccess: Boolean;
published
property chineseErrCode: WideString read FchineseErrCode write FchineseErrCode;
property englishErrCode: WideString read FenglishErrCode write FenglishErrCode;
property numberCode: Integer read FnumberCode write FnumberCode;
property success: Boolean read Fsuccess write Fsuccess;
end; // ************************************************************************ //
// Namespace : http://impl.order.api.service.ac.jd.com/
// ************************************************************************ //
consignee = class(TRemotable)
private
FuserAddress: WideString;
FuserEmail: WideString;
FuserMobilephone: WideString;
FuserName: WideString;
FuserPost: WideString;
FuserTelephone: WideString;
published
property userAddress: WideString read FuserAddress write FuserAddress;
property userEmail: WideString read FuserEmail write FuserEmail;
property userMobilephone: WideString read FuserMobilephone write FuserMobilephone;
property userName: WideString read FuserName write FuserName;
property userPost: WideString read FuserPost write FuserPost;
property userTelephone: WideString read FuserTelephone write FuserTelephone;
end; // ************************************************************************ //
// Namespace : http://impl.order.api.service.ac.jd.com/
// ************************************************************************ //
ware = class(TRemotable)
private
FgiftPoint: WideString;
FjdPrice: WideString;
FproductNo: WideString;
FskuId: WideString;
FskuOutId: WideString;
FwareDiscountFee: WideString;
FwareId: WideString;
FwareName: WideString;
FwareOutId: WideString;
FwareTotal: WideString;
published
property giftPoint: WideString read FgiftPoint write FgiftPoint;
property jdPrice: WideString read FjdPrice write FjdPrice;
property productNo: WideString read FproductNo write FproductNo;
property skuId: WideString read FskuId write FskuId;
property skuOutId: WideString read FskuOutId write FskuOutId;
property wareDiscountFee: WideString read FwareDiscountFee write FwareDiscountFee;
property wareId: WideString read FwareId write FwareId;
property wareName: WideString read FwareName write FwareName;
property wareOutId: WideString read FwareOutId write FwareOutId;
property wareTotal: WideString read FwareTotal write FwareTotal;
end; // ************************************************************************ //
// Namespace : http://impl.order.api.service.ac.jd.com/
// ************************************************************************ //
order = class(TRemotable)
private
FbuyerOrderRe: WideString;
FconsigneeInfo: consignee;
FdeliveryDateRe: WideString;
FfactFreightPrice: WideString;
FfreightPrice: WideString;
FinvoiceInfo: WideString;
ForderEndTime: WideString;
ForderId: WideString;
ForderStartTime: WideString;
ForderState: WideString;
ForderTotalPrice: WideString;
FpayType: WideString;
Fpayment: WideString;
FsellerOrderRe: WideString;
FtotalDiscountFee: WideString;
FvenderId: WideString;
FwareInfos: ware;
FwareTotalPrice: WideString;
public
destructor Destroy; override;
published
property buyerOrderRe: WideString read FbuyerOrderRe write FbuyerOrderRe;
property consigneeInfo: consignee read FconsigneeInfo write FconsigneeInfo;
property deliveryDateRe: WideString read FdeliveryDateRe write FdeliveryDateRe;
property factFreightPrice: WideString read FfactFreightPrice write FfactFreightPrice;
property freightPrice: WideString read FfreightPrice write FfreightPrice;
property invoiceInfo: WideString read FinvoiceInfo write FinvoiceInfo;
property orderEndTime: WideString read ForderEndTime write ForderEndTime;
property orderId: WideString read ForderId write ForderId;
property orderStartTime: WideString read ForderStartTime write ForderStartTime;
property orderState: WideString read ForderState write ForderState;
property orderTotalPrice: WideString read ForderTotalPrice write ForderTotalPrice;
property payType: WideString read FpayType write FpayType;
property payment: WideString read Fpayment write Fpayment;
property sellerOrderRe: WideString read FsellerOrderRe write FsellerOrderRe;
property totalDiscountFee: WideString read FtotalDiscountFee write FtotalDiscountFee;
property venderId: WideString read FvenderId write FvenderId;
property wareInfos: ware read FwareInfos write FwareInfos;
property wareTotalPrice: WideString read FwareTotalPrice write FwareTotalPrice;
end; // ************************************************************************ //
// Namespace : http://impl.order.api.service.ac.jd.com/
// ************************************************************************ //
apiOrderQueryDetail = class(TRemotable)
private
FapiResult: apiResult;
ForderTotal: Integer;
Forders: order;
public
destructor Destroy; override;
published
property apiResult: apiResult read FapiResult write FapiResult;
property orderTotal: Integer read ForderTotal write ForderTotal;
property orders: order read Forders write Forders;
end;
// ************************************************************************ //
// Namespace : http://impl.order.api.service.ac.jd.com/
// transport : http://schemas.xmlsoap.org/soap/http
// style : document
// binding : OrderSearchServiceImplServiceSoapBinding
// service : OrderSearchServiceImplService
// port : OrderSearchServiceImplPort
// URL : http://220.231.59.70/services/services/orderSearchService
// ************************************************************************ //
OrderSearchService = interface(IInvokable)
['{03213F39-BBCF-B9D2-2684-8ADEB3D880BD}']
function searchOrderInfoByOrderId(const venderSign: WideString; const tradeNo: WideString; const venderId: Int64; const orderId: WideString; const optionalFields: WideString): apiOrderQueryDetail; stdcall;
function searchOrderInfo(const venderSign: WideString; const tradeNo: WideString; const venderId: Int64; const startDate: WideString; const endDate: WideString; const orderState: WideString; const page: WideString; const pageSize: WideString; const optionalFields: WideString): apiOrderQueryDetail; stdcall;
end;function GetOrderSearchService(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): OrderSearchService;
implementation
unexpected element (uri:"http://impl.order.api.service.ac.jd.com",local:"venderSign").expected elements are
<{}startDate.....>对这块小弟不太熟悉,求高手解答。
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://220.231.59.70/services/services/orderSearchService?wsdl
// Encoding : UTF-8
// Codegen : [wfDebug,wfUseSerializerClassForAttrs]
// Version : 1.0
// (2011-05-27 16:50:06 - 1.33.2.5)
// ************************************************************************ //unit orderSearchService1;interfaceuses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;type // ************************************************************************ //
// The following types, referred to in the WSDL document are not being represented
// in this file. They are either aliases[@] of other types represented or were referred
// to but never[!] declared in the document. The types from the latter category
// typically map to predefined/known XML or Borland types; however, they could also
// indicate incorrect WSDL documents that failed to declare or import a schema type.
// ************************************************************************ //
// !:string - "http://www.w3.org/2001/XMLSchema"
// !:long - "http://www.w3.org/2001/XMLSchema"
// !:int - "http://www.w3.org/2001/XMLSchema"
// !:boolean - "http://www.w3.org/2001/XMLSchema" apiResult = class; { "http://impl.order.api.service.ac.jd.com/" }
consignee = class; { "http://impl.order.api.service.ac.jd.com/" }
ware = class; { "http://impl.order.api.service.ac.jd.com/" }
order = class; { "http://impl.order.api.service.ac.jd.com/" }
apiOrderQueryDetail = class; { "http://impl.order.api.service.ac.jd.com/" } // ************************************************************************ //
// Namespace : http://impl.order.api.service.ac.jd.com/
// ************************************************************************ //
apiResult = class(TRemotable)
private
FchineseErrCode: WideString;
FenglishErrCode: WideString;
FnumberCode: Integer;
Fsuccess: Boolean;
published
property chineseErrCode: WideString read FchineseErrCode write FchineseErrCode;
property englishErrCode: WideString read FenglishErrCode write FenglishErrCode;
property numberCode: Integer read FnumberCode write FnumberCode;
property success: Boolean read Fsuccess write Fsuccess;
end; // ************************************************************************ //
// Namespace : http://impl.order.api.service.ac.jd.com/
// ************************************************************************ //
consignee = class(TRemotable)
private
FuserAddress: WideString;
FuserEmail: WideString;
FuserMobilephone: WideString;
FuserName: WideString;
FuserPost: WideString;
FuserTelephone: WideString;
published
property userAddress: WideString read FuserAddress write FuserAddress;
property userEmail: WideString read FuserEmail write FuserEmail;
property userMobilephone: WideString read FuserMobilephone write FuserMobilephone;
property userName: WideString read FuserName write FuserName;
property userPost: WideString read FuserPost write FuserPost;
property userTelephone: WideString read FuserTelephone write FuserTelephone;
end; // ************************************************************************ //
// Namespace : http://impl.order.api.service.ac.jd.com/
// ************************************************************************ //
ware = class(TRemotable)
private
FgiftPoint: WideString;
FjdPrice: WideString;
FproductNo: WideString;
FskuId: WideString;
FskuOutId: WideString;
FwareDiscountFee: WideString;
FwareId: WideString;
FwareName: WideString;
FwareOutId: WideString;
FwareTotal: WideString;
published
property giftPoint: WideString read FgiftPoint write FgiftPoint;
property jdPrice: WideString read FjdPrice write FjdPrice;
property productNo: WideString read FproductNo write FproductNo;
property skuId: WideString read FskuId write FskuId;
property skuOutId: WideString read FskuOutId write FskuOutId;
property wareDiscountFee: WideString read FwareDiscountFee write FwareDiscountFee;
property wareId: WideString read FwareId write FwareId;
property wareName: WideString read FwareName write FwareName;
property wareOutId: WideString read FwareOutId write FwareOutId;
property wareTotal: WideString read FwareTotal write FwareTotal;
end; // ************************************************************************ //
// Namespace : http://impl.order.api.service.ac.jd.com/
// ************************************************************************ //
order = class(TRemotable)
private
FbuyerOrderRe: WideString;
FconsigneeInfo: consignee;
FdeliveryDateRe: WideString;
FfactFreightPrice: WideString;
FfreightPrice: WideString;
FinvoiceInfo: WideString;
ForderEndTime: WideString;
ForderId: WideString;
ForderStartTime: WideString;
ForderState: WideString;
ForderTotalPrice: WideString;
FpayType: WideString;
Fpayment: WideString;
FsellerOrderRe: WideString;
FtotalDiscountFee: WideString;
FvenderId: WideString;
FwareInfos: ware;
FwareTotalPrice: WideString;
public
destructor Destroy; override;
published
property buyerOrderRe: WideString read FbuyerOrderRe write FbuyerOrderRe;
property consigneeInfo: consignee read FconsigneeInfo write FconsigneeInfo;
property deliveryDateRe: WideString read FdeliveryDateRe write FdeliveryDateRe;
property factFreightPrice: WideString read FfactFreightPrice write FfactFreightPrice;
property freightPrice: WideString read FfreightPrice write FfreightPrice;
property invoiceInfo: WideString read FinvoiceInfo write FinvoiceInfo;
property orderEndTime: WideString read ForderEndTime write ForderEndTime;
property orderId: WideString read ForderId write ForderId;
property orderStartTime: WideString read ForderStartTime write ForderStartTime;
property orderState: WideString read ForderState write ForderState;
property orderTotalPrice: WideString read ForderTotalPrice write ForderTotalPrice;
property payType: WideString read FpayType write FpayType;
property payment: WideString read Fpayment write Fpayment;
property sellerOrderRe: WideString read FsellerOrderRe write FsellerOrderRe;
property totalDiscountFee: WideString read FtotalDiscountFee write FtotalDiscountFee;
property venderId: WideString read FvenderId write FvenderId;
property wareInfos: ware read FwareInfos write FwareInfos;
property wareTotalPrice: WideString read FwareTotalPrice write FwareTotalPrice;
end; // ************************************************************************ //
// Namespace : http://impl.order.api.service.ac.jd.com/
// ************************************************************************ //
apiOrderQueryDetail = class(TRemotable)
private
FapiResult: apiResult;
ForderTotal: Integer;
Forders: order;
public
destructor Destroy; override;
published
property apiResult: apiResult read FapiResult write FapiResult;
property orderTotal: Integer read ForderTotal write ForderTotal;
property orders: order read Forders write Forders;
end;
// ************************************************************************ //
// Namespace : http://impl.order.api.service.ac.jd.com/
// transport : http://schemas.xmlsoap.org/soap/http
// style : document
// binding : OrderSearchServiceImplServiceSoapBinding
// service : OrderSearchServiceImplService
// port : OrderSearchServiceImplPort
// URL : http://220.231.59.70/services/services/orderSearchService
// ************************************************************************ //
OrderSearchService = interface(IInvokable)
['{03213F39-BBCF-B9D2-2684-8ADEB3D880BD}']
function searchOrderInfoByOrderId(const venderSign: WideString; const tradeNo: WideString; const venderId: Int64; const orderId: WideString; const optionalFields: WideString): apiOrderQueryDetail; stdcall;
function searchOrderInfo(const venderSign: WideString; const tradeNo: WideString; const venderId: Int64; const startDate: WideString; const endDate: WideString; const orderState: WideString; const page: WideString; const pageSize: WideString; const optionalFields: WideString): apiOrderQueryDetail; stdcall;
end;function GetOrderSearchService(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): OrderSearchService;
implementation
解决方案 »
- 网络互动教学客户端(做过IM的高手进)
- 那位大虾帮帮忙啊
- 怎么样读取Excel第三行,第二列的数据?sy:=ExcelApp.Cells(3, 2);不行
- 关于serversocket的问题
- 高手指点:客户端怎么让服务器执行一个存储进程呢?
- 100分 delphi c/s 技术难点 to me 急急急
- 把一个access数据库内面的表导出为一个新的access文件,然后内面只有这个表
- you can?
- 关于FastReport 3.0问题
- delphi疯了,还是偶疯了,这问题没有再简单的了,可为什么就通不过,1+1为什么就不等于2,起了怪了,有没有天理了?//牛虻
- 求S:='ABCD$EF/1G3H4/I323J/K43L/M4N%7O8P$9QR$STUV'中各字符所对应ASC值的和,但不包括$和/
- delphi 函数
const
defWSDL = 'http://220.231.59.70/services/services/orderSearchService?wsdl';
defURL = 'http://220.231.59.70/services/services/orderSearchService';
defSvc = 'OrderSearchServiceImplService';
defPrt = 'OrderSearchServiceImplPort';
var
RIO: THTTPRIO;
begin
Result := nil;
if (Addr = '') then
begin
if UseWSDL then
Addr := defWSDL
else
Addr := defURL;
end;
if HTTPRIO = nil then
RIO := THTTPRIO.Create(nil)
else
RIO := HTTPRIO;
try
Result := (RIO as OrderSearchService);
if UseWSDL then
begin
RIO.WSDLLocation := Addr;
RIO.Service := defSvc;
RIO.Port := defPrt;
end else
RIO.URL := Addr;
finally
if (Result = nil) and (HTTPRIO = nil) then
RIO.Free;
end;
end;
destructor order.Destroy;
begin
if Assigned(FconsigneeInfo) then
FconsigneeInfo.Free;
if Assigned(FwareInfos) then
FwareInfos.Free;
inherited Destroy;
end;destructor apiOrderQueryDetail.Destroy;
begin
if Assigned(FapiResult) then
FapiResult.Free;
if Assigned(Forders) then
Forders.Free;
inherited Destroy;
end;initialization
InvRegistry.RegisterInterface(TypeInfo(OrderSearchService), 'http://impl.order.api.service.ac.jd.com/', 'UTF-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(OrderSearchService), '');
InvRegistry.RegisterInvokeOptions(TypeInfo(OrderSearchService), ioDocument);
RemClassRegistry.RegisterXSClass(apiResult, 'http://impl.order.api.service.ac.jd.com/', 'apiResult');
RemClassRegistry.RegisterXSClass(consignee, 'http://impl.order.api.service.ac.jd.com/', 'consignee');
RemClassRegistry.RegisterXSClass(ware, 'http://impl.order.api.service.ac.jd.com/', 'ware');
RemClassRegistry.RegisterXSClass(order, 'http://impl.order.api.service.ac.jd.com/', 'order');
RemClassRegistry.RegisterXSClass(apiOrderQueryDetail, 'http://impl.order.api.service.ac.jd.com/', 'apiOrderQueryDetail');
end.//调用部分如下
var
order: OrderSearchService;
orderinfo: apiOrderQueryDetail;
venderSign: WideString;
tradeno: string;
startDate, endDate, field: string;
dfds: string;
t: Boolean;
const
venderID = 20388;
secretcode = '08D434A563ABE0712B8DCD15B762D33C'; //商家key
strmd5='90CA6C52A17D5D085437887B2162B353';
begin
tradeno := FormatDateTime('yyyyMMddHHmmss', Now);
venderSign := transferCode(secretcode + inttostr(venderID) + tradeno + secretcode);
field := 'venderId, orderState';
startDate := '2011-03-01 00:00:01';
endDate := '2011-03-28 00:00:01';
order := GetOrderSearchService(False, ''); orderinfo := order.searchOrderInfo(venderSign, tradeno, venderID, startDate, endDate, 'ALL', '1', '20', field);
dfds := orderinfo.apiResult.chineseErrCode;
t:= orderinfo.apiResult.success;
ShowMessage(IntToStr(orderinfo.orderTotal));
end;
后来尝试用。net 来执行,结果就可以正常获取数据,但个人还是比较习惯用delphi了
所以也期待高手能来解答一下,长点见识!