Ibm mobilefirst 服务器无法处理请求---&燃气轮机;对象引用未设置为使用Worklight 6.1.0的对象实例?

Ibm mobilefirst 服务器无法处理请求---&燃气轮机;对象引用未设置为使用Worklight 6.1.0的对象实例?,ibm-mobilefirst,worklight-adapters,Ibm Mobilefirst,Worklight Adapters,我将WSDL存储在客户端提供的本地机器上,因为它的敏感数据要公开发布,所以我在下面发布了它的修改版本 <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.

我将WSDL存储在客户端提供的本地机器上,因为它的敏感数据要公开发布,所以我在下面发布了它的修改版本

<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>
现在,我直接调用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": [
   ]
}
{
       "GetclientStoreResult": 
       "<Response>
                <StatusCode>200<\/StatusCode>
                <StoresCount>3<\/StoresCount>
                <Stores>

        <StoreDetails>
            <StoreName>client Store<\/StoreName>
            <AddressLine1>Fatehabad Road<\/AddressLine1>
            <AddressLine2>Khasra No.-76, Mauja Rajpur, Near Amar Hotel, Fatehabad Road, Agra<\/AddressLine2>
            <City>Agra<\/City>
            <State>Uttar Pradesh<\/State>
            <countryCode>IN<\/countryCode>
            <Postalcode>282001<\/Postalcode>
            <MainPhone>09x 1x 0x71x0<\/MainPhone>
            <MobilePhone>09x 1x9 x97x9x<\/MobilePhone>
            <MobilePhone2><\/MobilePhone2>
            <HomePage>http:\/\/www.client.in<\/HomePage>
            <EMail>clientcare.upw@client.com<\/EMail>
            <Timings>1:10:30:19:30,2:10:30:19:30,3:10:30:19:30,4:10:30:19:30,5:10:30:19:30,6:10:30:19:30,7:10:30:19:30<\/Timings>
            <PaymentType><\/PaymentType>
            <Category>Mobile Service Provider Company<\/Category>
            <Description>Service & Sales Store for client<\/Description>
            <Latitude>27.164696<\/Latitude>
            <Longitude>78.038031<\/Longitude>
            <Distance>1.21778962564819<\/Distance>
        <\/StoreDetails>

        <StoreDetails>
            <StoreName>client Store<\/StoreName>
            <AddressLine1>VS Pratap Pura<\/AddressLine1>
            <AddressLine2>client Store G1 & G2 Ground floor Hotel Usha Kiran Complex Pratap Pura MG Road Agra<\/AddressLine2>
            <City>Agra<\/City>
            <State>Uttar Pradesh<\/State>
            <countryCode>IN<\/countryCode>
            <Postalcode>282001<\/Postalcode>
            <MainPhone>09x 19 x971x0<\/MainPhone>
            <MobilePhone>0x7 19 x7190<\/MobilePhone>
            <MobilePhone2><\/MobilePhone2>
            <HomePage>http:\/\/www.client.in<\/HomePage>
            <EMail>clientcare.upw@client.com<\/EMail>
            <Timings>1:10:30:19:30,2:10:30:19:30,3:10:30:19:30,4:10:30:19:30,5:10:30:19:30,6:10:30:19:30,7:10:30:19:30<\/Timings>
            <PaymentType><\/PaymentType>
            <Category>Mobile Service Provider Company<\/Category>
            <Description>Service & Sales Store for client<\/Description>
            <Latitude>27.15356<\/Latitude>
            <Longitude>78.007565<\/Longitude>
            <Distance>4.1715187443831<\/Distance>
        <\/StoreDetails>

        <StoreDetails>
            <StoreName>client Store<\/StoreName>
            <AddressLine1>Sanjay Place<\/AddressLine1>
            <AddressLine2>Shop No. G-1, Block No. 38\/4B, Sanjay Place, Agra<\/AddressLine2>
            <City>Agra<\/City>
            <State>Uttar Pradesh<\/State>
            <countryCode>IN<\/countryCode>
            <Postalcode>282002<\/Postalcode>
            <MainPhone>0x7 1x 097x90<\/MainPhone>
            <MobilePhone>0x7 19 0xx190<\/MobilePhone>
            <MobilePhone2><\/MobilePhone2>
            <HomePage>http:\/\/www.client.in<\/HomePage>
            <EMail>clientcare.upw@client.com<\/EMail>
            <Timings>1:10:30:19:30,2:10:30:19:30,3:10:30:19:30,4:10:30:19:30,5:10:30:19:30,6:10:30:19:30,7:10:30:19:30<\/Timings>
            <PaymentType><\/PaymentType>
            <Category>Mobile Service Provider Company<\/Category>
            <Description>Service & Sales Store for client<\/Description>
            <Latitude>27.198541<\/Latitude>
            <Longitude>78.006023<\/Longitude>
            <Distance>4.4289447148507<\/Distance>
        <\/StoreDetails>

        <\/Stores>
<\/Response>",


"isSuccessful": true,
   "xmlns": "http:\/\/www.client.in\/StoreLocator"
}

最后,我得到了我自己问题的答案。我必须开发一个简单的HTTP适配器,如下所示

function getLocation(latVar, longVar) {

    var request =
        <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:stor="http://www.client.in/StoreLocator">
            <soap:Header>
                <stor:AuthsoapHead>
                    <stor:FirstKey>FTG8F535DFGDFGER8GFDGG4FG8DGS</stor:FirstKey>
                    <stor:SecondKey>password</stor:SecondKey>
                </stor:AuthsoapHead>
            </soap:Header>
            <soap:Body>
                <stor:GetclientStore>
                    <stor:fromLongitude>{longVar}</stor:fromLongitude>
                    <stor:fromLatitude>{latVar}</stor:fromLatitude>
                </stor:GetclientStore>
            </soap:Body>
        </soap:Envelope>;

    var input = {
        method : 'post',
        returnedContentType : 'xml',
        path : '/StoreLocator/neareststore.asmx',
        body: {
            content: request.toString(),
            contentType: 'text/xml; charset=utf-8'
        },
    };
    var result = WL.Server.invokeHttp(input);
    var filteredData = result.Envelope.Body.GetclientStoreResponse;
    return filteredData;
}
函数getLocation(latVar、longVar){ var请求= FTG8F535DFGDFGER8GFDGG4FG8DGS 暗语 {longVar} {latVar} ; 变量输入={ 方法:“post”, returnedContentType:'xml', 路径:'/StoreLocator/neareststore.asmx', 正文:{ 内容:request.toString(), contentType:'text/xml;字符集=utf-8' }, }; var result=WL.Server.invokeHttp(输入); var filteredData=result.Envelope.Body.GetclientStoreResponse; 返回过滤器数据; } Javascript将为请求显示红色错误标记,但忽略并部署并调用它,我可以看到如下数据:

{
   "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": [
   ]
}
{
       "GetclientStoreResult": 
       "<Response>
                <StatusCode>200<\/StatusCode>
                <StoresCount>3<\/StoresCount>
                <Stores>

        <StoreDetails>
            <StoreName>client Store<\/StoreName>
            <AddressLine1>Fatehabad Road<\/AddressLine1>
            <AddressLine2>Khasra No.-76, Mauja Rajpur, Near Amar Hotel, Fatehabad Road, Agra<\/AddressLine2>
            <City>Agra<\/City>
            <State>Uttar Pradesh<\/State>
            <countryCode>IN<\/countryCode>
            <Postalcode>282001<\/Postalcode>
            <MainPhone>09x 1x 0x71x0<\/MainPhone>
            <MobilePhone>09x 1x9 x97x9x<\/MobilePhone>
            <MobilePhone2><\/MobilePhone2>
            <HomePage>http:\/\/www.client.in<\/HomePage>
            <EMail>clientcare.upw@client.com<\/EMail>
            <Timings>1:10:30:19:30,2:10:30:19:30,3:10:30:19:30,4:10:30:19:30,5:10:30:19:30,6:10:30:19:30,7:10:30:19:30<\/Timings>
            <PaymentType><\/PaymentType>
            <Category>Mobile Service Provider Company<\/Category>
            <Description>Service & Sales Store for client<\/Description>
            <Latitude>27.164696<\/Latitude>
            <Longitude>78.038031<\/Longitude>
            <Distance>1.21778962564819<\/Distance>
        <\/StoreDetails>

        <StoreDetails>
            <StoreName>client Store<\/StoreName>
            <AddressLine1>VS Pratap Pura<\/AddressLine1>
            <AddressLine2>client Store G1 & G2 Ground floor Hotel Usha Kiran Complex Pratap Pura MG Road Agra<\/AddressLine2>
            <City>Agra<\/City>
            <State>Uttar Pradesh<\/State>
            <countryCode>IN<\/countryCode>
            <Postalcode>282001<\/Postalcode>
            <MainPhone>09x 19 x971x0<\/MainPhone>
            <MobilePhone>0x7 19 x7190<\/MobilePhone>
            <MobilePhone2><\/MobilePhone2>
            <HomePage>http:\/\/www.client.in<\/HomePage>
            <EMail>clientcare.upw@client.com<\/EMail>
            <Timings>1:10:30:19:30,2:10:30:19:30,3:10:30:19:30,4:10:30:19:30,5:10:30:19:30,6:10:30:19:30,7:10:30:19:30<\/Timings>
            <PaymentType><\/PaymentType>
            <Category>Mobile Service Provider Company<\/Category>
            <Description>Service & Sales Store for client<\/Description>
            <Latitude>27.15356<\/Latitude>
            <Longitude>78.007565<\/Longitude>
            <Distance>4.1715187443831<\/Distance>
        <\/StoreDetails>

        <StoreDetails>
            <StoreName>client Store<\/StoreName>
            <AddressLine1>Sanjay Place<\/AddressLine1>
            <AddressLine2>Shop No. G-1, Block No. 38\/4B, Sanjay Place, Agra<\/AddressLine2>
            <City>Agra<\/City>
            <State>Uttar Pradesh<\/State>
            <countryCode>IN<\/countryCode>
            <Postalcode>282002<\/Postalcode>
            <MainPhone>0x7 1x 097x90<\/MainPhone>
            <MobilePhone>0x7 19 0xx190<\/MobilePhone>
            <MobilePhone2><\/MobilePhone2>
            <HomePage>http:\/\/www.client.in<\/HomePage>
            <EMail>clientcare.upw@client.com<\/EMail>
            <Timings>1:10:30:19:30,2:10:30:19:30,3:10:30:19:30,4:10:30:19:30,5:10:30:19:30,6:10:30:19:30,7:10:30:19:30<\/Timings>
            <PaymentType><\/PaymentType>
            <Category>Mobile Service Provider Company<\/Category>
            <Description>Service & Sales Store for client<\/Description>
            <Latitude>27.198541<\/Latitude>
            <Longitude>78.006023<\/Longitude>
            <Distance>4.4289447148507<\/Distance>
        <\/StoreDetails>

        <\/Stores>
<\/Response>",


"isSuccessful": true,
   "xmlns": "http:\/\/www.client.in\/StoreLocator"
}
{
“GetclientStoreResult”:
"
200
3.
客户商店
法蒂哈巴德路
阿格拉法特哈巴德路阿马尔酒店附近Mauja Rajpur Khasra 76号
阿格拉
北方邦
在里面
282001
09x 1x 0x71x0
09x 1x9 x97x9x
http:\/\/www.client.in
客户关怀。upw@client.com
1:10:30:19:30,2:10:30:19:30,3:10:30:19:30,4:10:30:19:30,5:10:30:19:30,6:10:30:19:30,7:10:30:19:30
移动服务提供商公司
客户服务和销售商店
27.164696
78.038031
1.21778962564819
客户商店
普拉塔普普拉酒店
客户店G1&G2乌沙基兰综合酒店地下普拉塔普普拉MG路阿格拉
阿格拉
北方邦
在里面
282001
09x19x971x0
0x7 19 x7190
http:\/\/www.client.in
客户关怀。upw@client.com
1:10:30:19:30,2:10:30:19:30,3:10:30:19:30,4:10:30:19:30,5:10:30:19:30,6:10:30:19:30,7:10:30:19:30
移动服务提供商公司
客户服务和销售商店
27.15356
78.007565
4.1715187443831
客户商店
桑杰广场
阿格拉Sanjay Place 38\/4B座G-1号铺
阿格拉
北方邦
在里面
282002
0x7 1x 097x90
0x7 19 0xx190
http:\/\/www.client.in
客户关怀。upw@client.com
1:10:30:19:30,2:10:30:19:30,3:10:30:19:30,4:10:30:19:30,5:10:30:19:30,6:10:30:19:30,7:10:30:19:30
移动服务提供商公司
客户服务和销售商店
27.198541
78.006023
4.4289447148507
",
“isSuccessful”:正确,
“xmlns”:“http:\/\/www.client.in\/StoreLocator”
}