클라이언트에서 제공하는 내 로컬 컴퓨터에 WSDL이 저장되어 있습니다. 민감한 데이터는 공용으로 게시 할 수 있습니다. 수정 된 버전을 게시하고 있습니다.서버가 요청을 처리 할 수 없습니다. ---> 객체 참조가 Worklight 6.1.0을 사용하는 객체의 인스턴스로 설정되지 않습니까?
<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.Client.in/StoreLocator" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.Client.in/StoreLocator">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.Client.in/StoreLocator">
<s:element name="GetClientStore">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="fromLongitude" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="fromLatitude" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetClientStoreResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetClientStoreResult" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AuthsoapHead" type="tns:AuthsoapHead"/>
<s:complexType name="AuthsoapHead">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="FirstKey" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="SecondKey" type="s:string"/>
</s:sequence>
<s:anyAttribute/>
</s:complexType>
</s:schema>
</wsdl:types>
<wsdl:message name="GetClientStoreSoapIn">
<wsdl:part name="parameters" element="tns:GetClientStore"/>
</wsdl:message>
<wsdl:message name="GetClientStoreSoapOut">
<wsdl:part name="parameters" element="tns:GetClientStoreResponse"/>
</wsdl:message>
<wsdl:message name="GetClientStoreAuthsoapHead">
<wsdl:part name="AuthsoapHead" element="tns:AuthsoapHead"/>
</wsdl:message>
<wsdl:portType name="NearestStoreSoap">
<wsdl:operation name="GetClientStore">
<wsdl:input message="tns:GetClientStoreSoapIn"/>
<wsdl:output message="tns:GetClientStoreSoapOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="NearestStoreSoap" type="tns:NearestStoreSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetClientStore">
<soap:operation soapAction="http://www.Client.in/StoreLocator/GetClientStore" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
<soap:header message="tns:GetClientStoreAuthsoapHead" part="AuthsoapHead" use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="NearestStoreSoap12" type="tns:NearestStoreSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetClientStore">
<soap12:operation soapAction="http://www.Client.in/StoreLocator/GetClientStore" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
<soap12:header message="tns:GetClientStoreAuthsoapHead" part="AuthsoapHead" use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="NearestStore">
<wsdl:port name="NearestStoreSoap" binding="tns:NearestStoreSoap">
<soap:address location="https://www.Client.in/StoreLocator/neareststore.asmx"/>
</wsdl:port>
<wsdl:port name="NearestStoreSoap12" binding="tns:NearestStoreSoap12">
<soap12:address location="https://www.Client.in/StoreLocator/neareststore.asmx"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
이 SOAP에서 결과를 얻으려면 Worklight 백 엔드 서비스를 사용하고 있습니다. 아래와 같이 위도 (경도)와 경도 (위도)에 따라 가장 가까운 매장을 가져 오도록의 매장 검색기 서비스 URL을 찾아보고 고객 저장소 로케이터 서비스 URL (요청 헤더의 값 전달)에 대한 테스트 키를 봅니다. 예 : FirstKey : FTG8F535DFGDFGER8GFDGG4FG8DGS, SecondKey : 비밀 번호.
--------------------------------- SoapAdapter1-impl.js -------- ------------------------------
function NearestStore_GetClientStore(params, headers){
var soapEnvNS;
soapEnvNS = 'http://www.w3.org/2003/05/soap-envelope';
var request = buildBody(params, 'xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:tns="http://www.Client.in/StoreLocator" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" ', soapEnvNS);
return invokeWebService(request, headers);
}
function invokeWebService(body, headers){
var input = {
method : 'post',
returnedContentType : 'xml',
path : '/StoreLocator/neareststore.asmx',
body: {
content : body.toString(),
contentType : 'text/xml; charset=utf-8'
}
};
//Adding custom HTTP headers if they were provided as parameter to the procedure call
headers && (input['headers'] = headers);
return WL.Server.invokeHttp(input);
}
이제 직접 아래 절차를 사용하여 eclipse에서 프로 시저를 호출합니다.
{
"GetClientStore": {
"fromLatitude": "18.9750",
"fromLongitude": "72.8258"
}
},{"soapAction": "http://www.Client.in/StoreLocator/GetClientStore","FirstKey":"FTG8F535DFGDFGER8GFDGG4FG8DGS","SecondKey":"password"}
그리고 지금은 다음과 같이 오류가 점점 오전 :
{
"Envelope": {
"Body": {
"Fault": {
"Code": {
"Value": "soap:Receiver"
},
"Detail": "",
"Reason": {
"Text": {
"CDATA": "Server was unable to process request. ---> Object reference not set to an instance of an object.",
"lang": "en"
}
}
}
},
"soap": "http:\/\/www.w3.org\/2003\/05\/soap-envelope",
"xsd": "http:\/\/www.w3.org\/2001\/XMLSchema",
"xsi": "http:\/\/www.w3.org\/2001\/XMLSchema-instance"
},
"errors": [
],
"info": [
],
"isSuccessful": true,
"responseHeaders": {
"Cache-Control": "private",
"Connection": "Keep-Alive",
"Content-Length": "508",
"Content-Type": "application\/soap+xml; charset=utf-8",
"Date": "Wed, 09 Jul 2014 11:57:13 GMT",
"X-Frame-Options": "SAMEORIGIN",
"X-MS-InvokeApp": "1; RequireReadOnly"
},
"responseTime": 158,
"statusCode": 500,
"statusReason": "Internal Server Error",
"totalTime": 159,
"warnings": [
]
}