OPS usage via VB.NET

This space is made available to users of Open Patent Services (OPS) web-service and now also to users of EPO’s bulk data subscription products such as 14. EPO worldwide bibliographic database (DOCDB), 14.11 EPO worldwide legal status database (INPADOC), 14.12 EP full text data, 14.1 EP bibliographic data (EBD)and more.

Users can ask each other questions, exchange experiences and solutions, post ideas. The moderator will use this space to announce changes or other relevant information.
Post Reply

Posts: 20
Joined: Thu Aug 13, 2009 8:26 am

OPS usage via VB.NET

Post by ksb » Wed Dec 04, 2013 8:21 am

I am using VB.NET programming language to access OPS. Has somebody here experience and can answer the following questions?

1. How to download PDF documents via OPS
When using the following code:

Code: Select all

Dim RestStr As String = "http://ops.epo.org/3.1/rest-services/published-data/images/EP/" & pn & "/" & ki & "/fullimage"
Dim WReq As WebRequest = WebRequest.Create(RestStr)
   Dim wResp As WebResponse = WReq.GetResponse
   Dim sr = New IO.BinaryReader(wResp.GetResponseStream())
   Dim bytes(wResp.ContentLength) As Byte
   bytes = sr.ReadBytes(wResp.ContentLength)
   Return bytes
Catch ex As System.Net.WebException
End Try
Of course of existence of the image data has been checked before - without errors. But the code execution above results most often in a 500 server error:

"The remote server returned an error: (500) Internal Server Error."

The strange thing: sometimes it's working, but most often not. And: it is always working when I use the same URL manually in a web browser. I assume that I need to provide some properties to the WebRequest class of VB.NET?

2. How to pass on login credentials
How to pass on the OPS login credentials received from the EPO to the VB.NET objects above? Any idea?

Thanks a lot.


Posts: 20
Joined: Thu Aug 13, 2009 8:26 am

Re: OPS usage via VB.NET

Post by ksb » Wed Jul 30, 2014 1:25 pm

Seems I am the only one using VB.NET for OPS access.
Problems above had been solved...


Post Reply