제안/솔루션/팁을 많이 주시면 감사하겠습니다.powerbuilder 12.5를 사용하여 웹 서비스 메서드를 호출하면 null 응답이 반환됩니다.
PowerBuilder 12.5를 사용하여 .Net 웹 서비스를 호출하면 호출이 작동하고 유효한 XML 응답을 보낸 WS가 수신하지만 PB가로드 할 때 응답 객체는 null입니다.
프록시 프로젝트에서 .Net 옵션을 사용하여 PB 프록시를 생성합니다. 일부 WS 메서드는 제대로 작동하고 PB 코드에서는 응답 개체에 액세스 할 수 있지만 다른 WS 메서드 중 일부를 호출하면 응답 XML이 정확하고 예상 값을 포함하더라도 WS 메서드의 응답을 유지하기 위해 할당 된 PB 개체가 null입니다 (피들러를 사용하여 캡처 됨)). 시각적 인 검사에서 PB에 의해 생성 된 프록시는 WSDL 정의와 일치하는 것처럼 보입니다.
코드에서 WS 메서드 호출의 응답을 검사하여 응용 프로그램이 실패 할 경우 적절한 조치를 취할 수 있어야합니다. http://cbre.truelogic.com.au/service.asmx?WSDL
예 PB 코드 :
은 WSDL은 GroupInsert()
작품
같은 WS, 1 메서드 호출하지만 ContactBulkImportWithGroups()
작품 2 메서드 호출, PB는 방법 응답 및로드를 해석하는 데 실패하지만, 응답 객체 (비록 응답 XML이 맞지만).
// Web Service = lws_cl, already created earlier in script.
// Get Group ID - This WS method call works
wspn_campaignlogic_group ln_ret_group
decimal ldc_groupID[1]
ln_ret_group = lws_cl.GroupInsert(ls_groupName)
if isValid(ln_ret_group.GroupResults) then
if ln_ret_group.GroupResults.ResultCode = 1 then
ldc_groupID[1] = ln_ret_group.GroupID
end if
end if
// Contacts - This WS method returns null
wspn_campaignlogic_contactbulkimporter ln_ret_contact
any la_xml
ln_ret_contact = create wspn_campaignlogic_contactbulkimporter
la_xml = '<contacts><c><f>Jill</f><l>Jackson</l><e>[email protected]</e><comp>Acme Solutions</comp><sal></sal><p>(02) 8080 1111</p><m></m></c></contacts>'
ln_ret_contact = lws_cl.ContactBulkImportWithGroups(3, ldc_groupID, la_xml, "dd/mm/yyyy")
// Check results
if NOT isValid(ln_ret_contact) then
// Error - execution goes in here because ln_ret_contact is null so result cannot be checked by code
else
// OK
end if
XML 응답 : 피들러에 의해 캡처는 :
HTTP/1.1 200 OK
Date: Fri, 06 Jul 2012 04:39:42 GMT
Server: Microsoft-IIS/6.0
X-UA-Compatible: IE=8
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 688
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><ContactBulkImportWithGroupsResponse xmlns="http://new.cl.truelogic.com.au/"><ContactBulkImportWithGroupsResult><ImportResults><InvalidContacts><contacts xmlns=""></contacts></InvalidContacts><Updated>1</Updated><Inserted>0</Inserted></ImportResults><ContactImportResults><ResultCode>1</ResultCode><ResultDescription>Success.</ResultDescription></ContactImportResults></ContactBulkImportWithGroupsResult></ContactBulkImportWithGroupsResponse></soap:Body></soap:Envelope>
안녕하세요 Paul, 감사합니다.하지만 차이는 없습니다. 두 WS 메서드 호출 전에 응답 개체 작성 문을 사용하거나 사용하지 않고 코드를 시도했습니다. GroupInsert()는 여전히 응답을 채웠지 만, 응답 개체 작성 문을 사용했는지 여부에 관계없이 BulkImport()는 null을 반환했습니다. –