Hi Milinda,

Hope this may help:
http://madhukaudantha.blogspot.com/2013/02/invoke-web-service-with-jaggery-with.html




On Tue, Jul 29, 2014 at 6:48 PM, Milinda Perera <[email protected]> wrote:

> Hi Harsha & Tishan,
>
> Here is the response header (retrieved using getAllResponseHeaders()):
>
> Set-Cookie: JSESSIONID=4DA0D85B59354B71873C6F94BD89053D; Path=/; Secure;
> HttpOnly
> Content-Type: text/xml;charset=UTF-8
> Transfer-Encoding: chunked
> Date: Tue, 29 Jul 2014 13:07:25 GMT
> Server: WSO2 Carbon Server
>
> It seems reply (+ Content-Type) from the server is fine..
>
> could the problem caused due to "<?xml version="1.0" encoding="UTF-8"?>"
> part of the xml response (may be *responseXML *expect response without
> that part) ??? WDYT?
>
> thanks,
> milinda
>
>
>
> On Tue, Jul 29, 2014 at 6:39 PM, Harsha Kumara <[email protected]> wrote:
>
>> Hi Milinda,
>> This can be due to content type is not returned as text/xml  by the
>> server. If you can check the the full response text, you can figure it out.
>> If it return as text/plain responseText will work and responseXML won't
>> work.
>> Thanks,
>> Harsha
>>
>>
>> On Tue, Jul 29, 2014 at 6:24 PM, Milinda Perera <[email protected]>
>> wrote:
>>
>>> Here is the response which retrieved by *responseText *
>>>
>>> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="
>>> http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Body><ns:loginResponse
>>> xmlns:ns="http://authentication.services.core.carbon.wso2.org
>>> "><ns:return>true</ns:return></ns:loginResponse></soapenv:Body></soapenv:Envelope>
>>>
>>>
>>> On Tue, Jul 29, 2014 at 6:18 PM, Tishan Dahanayakage <[email protected]>
>>> wrote:
>>>
>>>> Hi Milinda,
>>>> Can you please post the response text?
>>>>
>>>>
>>>> On Tue, Jul 29, 2014 at 5:20 PM, Milinda Perera <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>   I'm writing jaggery app to retrieve data from a Admin services. I'm
>>>>> getting for *responseXML* of XMLHttpRequest (responseText works
>>>>> perfectly) any problem with my code?
>>>>>
>>>>>         var httpAuth = new XMLHttpRequest();
>>>>>         var endPoint = '
>>>>> https://10.100.5.92:9443/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/
>>>>> ';
>>>>>
>>>>>         httpAuth.open('POST', endPoint, false);
>>>>>         httpAuth.setRequestHeader('SOAPAction', 'urn:login');
>>>>>         httpAuth.setRequestHeader('Content-Type','text/xml');
>>>>>
>>>>>         var payload = '<soapenv:Envelope xmlns:soapenv="
>>>>> http://schemas.xmlsoap.org/soap/envelope/"; xmlns:aut="
>>>>> http://authentication.services.core.carbon.wso2.org";>\
>>>>>                             <soapenv:Header/>\
>>>>>                                 <soapenv:Body>\
>>>>>                                     <aut:login>\
>>>>>                                         <aut:username>' +username
>>>>> +'</aut:username>\
>>>>>                                         <aut:password>' +password
>>>>> +'</aut:password>\
>>>>>                                         <aut:remoteAddress>'
>>>>> +remoteAddr +'</aut:remoteAddress>\
>>>>>                                     </aut:login>\
>>>>>                             </soapenv:Body>\
>>>>>                         </soapenv:Envelope>';
>>>>>
>>>>>         try{
>>>>>             httpAuth.send(payload);
>>>>>             //var BPSResponse = httpAuth.responseText;
>>>>>             var BPSResponse = httpAuth.responseXML;
>>>>>             log.info('RESPONSE XML : ' +BPSResponse.toXMLString());
>>>>>             log.info('RESPONSE:' +httpAuth.responseText.toString());
>>>>>
>>>>>         }catch(e){
>>>>>              log.error(e.toString());
>>>>>         }
>>>>>
>>>>> Thanks,
>>>>> Milinda
>>>>>
>>>>> --
>>>>> Milinda Perera
>>>>> Software Engineer;
>>>>> WSO2 Inc. http://wso2.com ,
>>>>> Mobile: (+94) 714 115 032
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> [email protected]
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Tishan Dahanayakage
>>>> Software Engineer
>>>>  WSO2, Inc.
>>>> Mobile:+94 716481328
>>>>
>>>> Disclaimer: This communication may contain privileged or other
>>>> confidential information and is intended exclusively for the addressee/s.
>>>> If you are not the intended recipient/s, or believe that you may have
>>>> received this communication in error, please reply to the sender indicating
>>>> that fact and delete the copy you received and in addition, you should not
>>>> print, copy, re-transmit, disseminate, or otherwise use the information
>>>> contained in this communication. Internet communications cannot be
>>>> guaranteed to be timely, secure, error or virus-free. The sender does not
>>>> accept liability for any errors or omissions.
>>>>
>>>
>>>
>>>
>>> --
>>> Milinda Perera
>>> Software Engineer;
>>> WSO2 Inc. http://wso2.com ,
>>> Mobile: (+94) 714 115 032
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Harsha Kumara
>> Software Engineer, WSO2 Inc.
>> Mobile: +94775505618
>> Blog:harshcreationz.blogspot.com
>>
>
>
>
> --
> Milinda Perera
> Software Engineer;
> WSO2 Inc. http://wso2.com ,
> Mobile: (+94) 714 115 032
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Buddhima Wijeweera
Software Engineer; WSO2 Inc.; http://wso2.com ,

Email: [email protected]
Blog:   https://buddhimawijeweera.wordpress.com
GitHub Profile: https://github.com/Buddhima
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to