NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
NuSoap https/localfile


Joined: 12 Oct 2006
Posts: 6
Reply with quote
hi
i wanted to use nuSOap to use the webservice of the eurpean patent office to cal up patents pfds
https://publications.european-patent-office.org/PublicationServer/soap/Server.jws?wsdl
but unfortunately i usw xamp under windows and so i don't have cURL in it only OpenSSL
so i wanted to save the wsdl loccal and open it.
i worekd no errors but i cant call any funktion or there is no reply.
is it possible or doesnt nusoap recognice the server from teh local xml ?

EDIT:
i added error request for my proxy var and i gto this strange error:

HTTP Error: Couldn't open socket connection to server oebhttp2.data.123/PublicationServer/soap/Server.jws, Error (12):

could the europen patent webservice be offline O.o @_@ that would be strange
View user's profileFind all posts by NonenixSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7897
Reply with quote
either wsdl is incorrect where it refers to oebhttp2.data.123 (for example targetNamespace="oebhttp2.data.123/PublicationServer/soap/Server.jws" and wsdlsoap:address location="oebhttp2.data.123/PublicationServer/soap/Server.jws")
or hostname oebhttp2.data.123 is not available from your place where you run your script.

If it's accessible from your proxy, don't forget to specify it in the client code.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 12 Oct 2006
Posts: 6
Reply with quote
thanks for your hint tried mysql to open the url in browser, the result was BAD gateway Sad
so the european patens server team made a misstake , man an intranet webservice , that kills me Oo
gonna write a mail to them ^^ i will post afterwards if this sloves the question *g*
View user's profileFind all posts by NonenixSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7897
Reply with quote
did they supply any instructions?
I'd recommend you to become familiar with them first Smile

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 12 Oct 2006
Posts: 6
Reply with quote
i have a pdf there was the wsdle url and a set of functions there results examples and so on but nothing about a special endpoint. but there was a mail adress for further questions *g* ^^ so i hope they answer soon. (another coder rechecked my problems hes writing the mail now so i guess there is no misstage on our side)
they forgot to give out a proxy or wrote the wrong endpoint in theier xml, i also searched with google but the webservice is very new so there is no support or documentation (also not on theri website)
somehow it exites me to find misstakes i 'm not responible for *g* kind of a relief
View user's profileFind all posts by NonenixSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7897
Reply with quote
if you have WSDL, save it into a local file and use it instead of the wsdl URL, for example:
$soapclient = new soapclient('/etc/myperfect_wsdl_file.txt', 'wsdl');

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 12 Oct 2006
Posts: 6
Reply with quote
yes thats exactly what i did, but they url in de wsdl still is wrong,

sorry for my bad english makeing all confusing here,

i will write when i get an answer from the team who createt the wrong wsdl or what they mean to this problem.

...pending ^^
View user's profileFind all posts by NonenixSend private message


Joined: 12 Oct 2006
Posts: 6
Reply with quote
They guys from eruopean patent ... fixed the wsdl url
but now i get a pdf as result and this error.
i used your mimeclient.php sample and modified it
with soapclientmime i get:
Error

Response not of type text/xml

Request

... and so on same as next


with soapclient i get:


Error

Charset from HTTP Content-Type 'US-ASCII' does not match encoding from XML declaration 'ISO-8859-1'

Request

POST /PublicationServer/soap/Server.jws HTTP/1.0
Host: publications.european-patent-office.org
User-Agent: NuSOAP/0.7.2 (1.94)
Content-Type: text/xml; charset=ISO-8859-1
SOAPAction: ""
Content-Length: 672

<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 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:ns1499="http://DefaultNamespace"><SOAP-ENV:Body><ns1499:getPdfPatentPublication xmlns:ns1499="http://DefaultNamespace"><country xsi:type="xsd:string">EP</country><docnumber xsi:type="xsd:string">1494177</docnumber><kind xsi:type="xsd:string">A2</kind></ns1499:getPdfPatentPublication></SOAP-ENV:Body></SOAP-ENV:Envelope>

Response

HTTP/1.1 200 OK
Date: Fri, 13 Oct 2006 12:30:36 GMT
Server: Apache
Set-Cookie: JSESSIONID=923AB4CA64D1E006CF1B656C2E8A4162.lboebhttp2; Path=/PublicationServer
Content-Type: multipart/related; type="text/xml"; start="<E4ABF968E102368EADAA3724D2F1ACB2>"; boundary="----=_Part_4278_22126232.1160742636829"
Connection: close
Transfer-Encoding: chunked


------=_Part_4278_22126232.1160742636829
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <E4ABF968E102368EADAA3724D2F1ACB2>

<?xml version="1.0" encoding="ISO-8859-1"?><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><ns1:getPdfPatentPublicationResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://DefaultNamespace"><getPdfPatentPublicationReturn href="cid:00C6DFDCDD57CFE38C7563540A208B52" xsi:type="ns2:DataHandler" xmlns:ns2="http://xml.apache.org/xml-soap"/></ns1:getPdfPatentPublicationResponse></soapenv:Body></soapenv:Envelope>
------=_Part_4278_22126232.1160742636829
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-Id: <00C6DFDCDD57CFE38C7563540A208B52>

%PDF-1.1
%âãÏÓ
1 0 obj
<<
/Type /XObject
/Subtype /Image
/Name /Im1
/Width 2000
/Height 1278
/BitsPerComponent 1
/ColorSpace /DeviceGray
/Length 22609
/Filter /CCITTFaxDecode
/DecodeParms <<
/K -1 /Columns 2000>>
>>
stream
ÿÿÿÿÿÿ–t"1ó´GÈù°<6K'£4C#ÆlÁ¼·I”fÙtc.eò8‹2EÀÚ
....
...
....and so on
View user's profileFind all posts by NonenixSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7897
Reply with quote
it looks like a bug in parseResponse() function.

In particualr this code:
Code:
      if (strpos($headers['content-type'], '=')) {
         $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1));
         $this->debug('Got response encoding: ' . $enc);
         if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){
            $this->xml_encoding = strtoupper($enc);
         } else {
            $this->xml_encoding = 'US-ASCII';
         }
      } else {
         // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1
         $this->xml_encoding = 'ISO-8859-1';
      }

does not care of multi-part attachments.
I'd recommend you to change
$this->xml_encoding = 'US-ASCII';
to
$this->xml_encoding = ''; // pretend we didn't find encoding
or
$this->xml_encoding = 'ISO-8859-1'; // fallback to default HTTP encoding.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 12 Oct 2006
Posts: 6
Reply with quote
now i get only:
Constructor error

Response not of type text/xml

but i want to get the pdf, is nusoap able to handle it rigt as an attachement or not ?
View user's profileFind all posts by NonenixSend private message
NuSoap https/localfile
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic