This discussion is archived
1 Reply Latest reply: Sep 18, 2013 2:48 AM by JackT RSS

php soap lib for using SGD 5 web services

ba246067-abe9-47cd-996f-1672fe45b0b2 Newbie
Currently Being Moderated

hello,

the php pages I was using with SGD 4.61 in http mode doesn t work anymore with SGD 5.0 in https.

my pages were using nusoap lib ($Id: nusoap.php,v 0.7.2  2005/08/04) and they were OK with sgd4.61 and http (on port 8080)

with SGD5 and https, I get an :

 

XML error parsing SOAP payload on line XXX : Invalid document end

 

I updated the nusoap lib with 0.9.5 2010/04/26, but allways the same pb

after a few tests :

- I know that the server is OK thanks to apitest,

- I know that the request is good :

 

Request

POST /axis/services/document/webtopsession HTTP/1.0 Host: XXX.XXX.XXX.19 User-Agent: NuSOAP/0.9.5 (1.123) Content-Type: text/xml; charset=UTF-8 SOAPAction: "http://sgd.sun.com/webservices/document/webtopsession/authenticate" Content-Length: 545  <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns8813="http://tempuri.org"><SOAP-ENV:Body><authenticate xmlns="http://sgd.sun.com/webservices/document/webtopsession"><user>xxxxxxx</user><passwd>xxxxxxxx</passwd><clientid>12345</clientid><locale>fr</locale></authenticate></SOAP-ENV:Body></SOAP-ENV:Envelope>

 

may be it is because of the automatic forwarding to https and port 443 ? and / or pb of wrong decoding (as you can see in the response under, the begining of the respnse is corrct, but not in the middle )?

 

Response

HTTP/1.1 200 OK Date: Tue, 17 Sep 2013 11:34:06 GMT Server: Apache Content-Length: 1450 Vary: User-Agent,Accept-Encoding Content-Type: text/xml;charset=utf-8  <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><authenticateResponse xmlns="http://sgd.sun.com/webservices/document/webtopsession"><return>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;tta:response xmlns:tta=&quot;http://xml.tarantella.com/2001/soapreply.xsd&quot;&gt; &lt;attr name=&quot;scottasessioncookie&quot;&gt;8544189537634943910:xxxxxxxxx.xxxxxxx.fr:1379416574976:6048721943343582209:2&lt;/attr&gt; &lt;attr name=&quot;isadministrator&quot;&gt;false&lt;/attr&gt; &lt;attr name=&quot;scottatheme&quot;&gt;sco/tta/standard&lt;/attr&gt; &lt;attr name=&quot;cn&quot;&gt;xxxxxxxxxx&lt;/attr&gt; &lt;attr name=&quot;arrayMember&quot;&gt;xxxxx.xxxx.fr&lt;/attr&gt; &lt;obj name=&quot;serverattributes&quot;&gt; &lt;attr name=&quot;scottasessionid&quot;&gt;xxxxxx.xxxxx.fr:1379416574976:6048721943343582209&lt;/attr&gt; &lt;attr name=&quot;scottasessiontemplateowner&quot;&gt;.../_ens/o=organization/cn=xxxxxx&lt;/attr&gt; &lt;attr name=&quot;scottasessionowner&quot;&gt;.../_ens/o=organization/cn=xxxxx&lt;/attr&gt; &lt;/obj&gt; &lt;obj name=&quot;views&quot;&gt; &lt;obj name=&quot;view&quot;&gt; &lt;attr name=&quot;viewid&quot;&gt;1&lt;/attr&gt; &lt;attr name=&quot;tc

 

Has anyone used SGD web services from php ?

If yes, is it possible to send me the code of a simple example to see where I am mistaken ? (too few documentation from SGD ).

 

Thanks in advance

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points