Jump to content

Import XML over HTTP - No Proxy Settings!


This topic is 4360 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Has anyone used the 'Import XML data over http' feature at all? It could be one of the most powerful tools in the product if only they had developed it properly and finished the job! Sorry I'm having a bit of a whinge here as I cannot quite believe that no facility has been created for allowing proxy details to be entered. This is one of those slightly hidden or 'less-known-about' features of Filemaker which could now prove to be one of the post powerful. As demand for web usage and interoperability increases etc. how can this feature be left not fully developed?! I'm staggered.

The reason we want to use this - and I'm interested to know if anyone else has used it, is we develop shrink-wrapped 'application'- like databases that are locked down but upgradeable. This means that the database has to behave like a real compiled application. It will not be accessed by developers once installed on the customer's computer and has to stand on its own feet, as it were. Customers' data sets are imported and exported in their entirety.

But we were looking for ways for the database, once out there on its own, to access critical data (usually some sort of 'meta' data) from our servers. This allows us centrally, to control some of the behaviours of the product in copies already out there. Now the import xml data over http is such a slick and easy way to allow a database to 'draw-in' data without having it fully 'connected' to another database. All you need is an 'http' URL. It's utterly brilliant…

Except, of course, Filemaker have only done half a job. They've implemented this feature without any proxy control. That means that this feature will not work on any organisation networks where they don't allow unfiltered internet on port 80. If any proxies are involved and the router/firewalls are not set to accept requests on port 80 it's utterly useless. In actual fact, that means this feature is useless in 90% of educational establishments, most of Asia where proxies are normal even on home connections and certainly a majority of businesses where their IT departments are particularly security-minded. So… that's most of the world then. Filemaker, how and where are you intending this feature to be used, exactly?

Sorry to sound so irritated but, really! I think what winds me up so much about this is just how good this would be if it were finished off! The fact that Filemaker Server can serve xml data as a specific service is an indicator of how seriously Filemaker has taken it at that end of the equation. So how on earth is it that this feature can ever be used?!

Does anyone use it successfully? And if so how are you getting around the proxy/gateway issue? Many thanks for reading by rant! I'm just so disappointed.

Will

Link to comment
Share on other sites

  • 2 months later...

Hi Will,

I use the scriptmaster plugin from 360Works. It conatains a module: PostXMLdata. I have modified this so it can use a proxy.

If you use the modified version below you can use it with a proxy.

RegisterGroovy( "PostXMLData( url ; proxyHost ; proxyPort ; xml ; soapaction )" ; "// Send data¶

if (proxyHost != null && proxyPort != null )¶

System.properties.putAll( ["http.proxyHost":proxyHost, "http.proxyPort":proxyPort] );¶

URL url = new URL(url);¶

HttpURLConnection conn = url.openConnection();¶

if( soapaction != null ) conn.setRequestProperty( "SOAPAction", soapaction );¶

conn.setRequestProperty( "content-type", "text/xml" );¶

conn.setDoOutput(true);¶

OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());¶

wr.write(xml);¶

wr.close();¶

// Get the response¶

String response;¶

InputStream responseStream;¶

try {¶

responseStream = conn.getInputStream();¶

success = 1;¶

} catch( IOException e ) {¶

success = 0;¶

if( conn.getResponseCode() == 500 ) {¶

responseStream = conn.getErrorStream();¶

} else throw e;¶

response = responseStream.getText("utf-8");¶

responseStream.close();¶

return response;" )

Joost

Link to comment
Share on other sites

This topic is 4360 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.