Hello.
Does anyone have a bit of sample code using curl (or anything else php) to
make an insert transaction request to geoserver? I'm reading the geoserver
samples and the php manual but I can't figure out how they fit together.
Thanks. Dan
--
View this message in context: http://www.nabble.com/PHP-xml-request-sample-code-tf4730702.html#a13526951
Sent from the GeoServer - User mailing list archive at Nabble.com.
Dan,
It’s a proper web service so the easiest way to do it is using a web service library for PHP, one example is nusoap: http://dietrich.ganx4.com/nusoap
You can use much of geoserver’s functionality using URL calls too which is much easier in plain PHP with no help from libraries but I’m not sure that includes inserts?
Tom
On 11/1/07, lunarfish <dan.jones@anonymised.com> wrote:
Hello.
Does anyone have a bit of sample code using curl (or anything else php) to
make an insert transaction request to geoserver? I’m reading the geoserver
samples and the php manual but I can’t figure out how they fit together.
Thanks. Dan
View this message in context: http://www.nabble.com/PHP-xml-request-sample-code-tf4730702.html#a13526951
Sent from the GeoServer - User mailing list archive at Nabble.com.
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Tom (JDi Solutions) wrote:
Dan,
It's a proper web service so the easiest way to do it is using a web service library for PHP, one example is nusoap: http://dietrich.ganx4.com/nusoap
You can use much of geoserver's functionality using URL calls too which is much easier in plain PHP with no help from libraries but I'm not sure that includes inserts?
Nope, unfortunately you need to do post calls to do inserts.
Chris
Tom
On 11/1/07, *lunarfish* <dan.jones@anonymised.com <mailto:dan.jones@anonymised.com>> wrote:
Hello.
Does anyone have a bit of sample code using curl (or anything else
php) to
make an insert transaction request to geoserver? I'm reading the
geoserver
samples and the php manual but I can't figure out how they fit
together.
Thanks. Dan
--
View this message in context:
http://www.nabble.com/PHP-xml-request-sample-code-tf4730702.html#a13526951
Sent from the GeoServer - User mailing list archive at Nabble.com
<http://Nabble.com>.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
<http://get.splunk.com/>
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
<mailto:Geoserver-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:4005,4729bd40230292090977483!
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
!DSPAM:4005,4729bd40230292090977483!
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:4005,4729bd40230292090977483!
Hi Tom.
Thanks for that. I've got nusoap installed and working for other services.
What I don't get is where the WSDL is as the url listed on the demo
http://host/geoserver/wfs just gives a 500 error.
The other thing that's not there without the WSDL is the operation mapping
so I don't know the name of the service I'm calling. Am I just being stupid?
Cheers. Dan
--
View this message in context: http://www.nabble.com/PHP-xml-request-sample-code-tf4730702.html#a13529160
Sent from the GeoServer - User mailing list archive at Nabble.com.
lunarfish ha scritto:
Hi Tom.
Thanks for that. I've got nusoap installed and working for other services.
What I don't get is where the WSDL is as the url listed on the demo
http://host/geoserver/wfs just gives a 500 error.
The other thing that's not there without the WSDL is the operation mapping
so I don't know the name of the service I'm calling. Am I just being stupid?
No. OGC services are not SOAP based, so there is no WSDL. They are xml + http post, but no real SOAP.
Cheers
Andrea
I’d offer a little more help but it was one of my ex-colleagues who actually implemented our web service clients with nusoap and although they weren’t with geoserver I’m 99% sure they were sans wsdl so I’m assuming you don’t actually need to supply the wsdl?
On 11/1/07, Andrea Aime <aaime@anonymised.com> wrote:
lunarfish ha scritto:
Hi Tom.
Thanks for that. I’ve got nusoap installed and working for other services.
What I don’t get is where the WSDL is as the url listed on the demo
http://host/geoserver/wfs just gives a 500 error.
The other thing that’s not there without the WSDL is the operation mapping
so I don’t know the name of the service I’m calling. Am I just being stupid?
No. OGC services are not SOAP based, so there is no WSDL. They are xml +
http post, but no real SOAP.
Cheers
Andrea
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Don’t know if this is helpful or not but here’s the code we use to call it, note, it’s in a class and the nuSoap object is $this->m_wsClient
function runService($body_array, $service_name)
{
$this->m_wsClient = new SoapClient($service_name);
$body = “”;
// make $body from assoc array, using preset values in XMLTag objects.
foreach($this->m_bodyTags as $tagname=>$xmltag)
{
$body .= $xmltag->drawTag($body_array[$tagname]);
}
// create the body tag proper to create main part of xml query.
$body_tags = ‘<’ . $this->m_functionName . ’ xmlns=“’ . $this->m_xmlns . '”>’
. $body .
‘</’ . $this->m_functionName . ‘>’;
// ‘serailise’ the data we just compiled.
$msg = $this->m_wsClient->serializeEnvelope($body_tags);
// make sure there a ‘/’ at end of $m_xmlns … and send request off to WebService.
$this->m_wsClient->send($msg, $this->m_xmlns . “/” . $this->m_functionName);
// read the results into our XML Reader.
if(!readXML($this->m_wsClient->responseData, true))
{
echo “Failed XML Reading!
”;
return false;
}
…
On 11/1/07, Tom (JDi Solutions) <tom.dean@anonymised.com> wrote:
I’d offer a little more help but it was one of my ex-colleagues who actually implemented our web service clients with nusoap and although they weren’t with geoserver I’m 99% sure they were sans wsdl so I’m assuming you don’t actually need to supply the wsdl?
On 11/1/07, Andrea Aime < aaime@anonymised.com> wrote:
lunarfish ha scritto:
Hi Tom.
Thanks for that. I’ve got nusoap installed and working for other services.
What I don’t get is where the WSDL is as the url listed on the demo
http://host/geoserver/wfs just gives a 500 error.
The other thing that’s not there without the WSDL is the operation mapping
so I don’t know the name of the service I’m calling. Am I just being stupid?
No. OGC services are not SOAP based, so there is no WSDL. They are xml +
http post, but no real SOAP.
Cheers
Andrea
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Hi Chris.
I'm happy generating post requests from within php but what I can't find in
the docs or on the demo page is where I put stuff in the post request.
Can you let me know the structure of the post request for an insert? Or if
there is a help page I can't find could you point me at that?
Thanks. Dan
Nope, unfortunately you need to do post calls to do inserts.
Chris
--
View this message in context: http://www.nabble.com/PHP-xml-request-sample-code-tf4730702.html#a13545245
Sent from the GeoServer - User mailing list archive at Nabble.com.
lunarfish ha scritto:
Hi Chris.
I'm happy generating post requests from within php but what I can't find in
the docs or on the demo page is where I put stuff in the post request.
Can you let me know the structure of the post request for an insert? Or if
there is a help page I can't find could you point me at that?
The demo page has the structure in fact... if you look at all the wfs
sample requests they are made up of:
* an url where you post your request
* the request itself, which is the body of the post.
That is, the post is not a form encoded post made of key value pairs,
the xml itself is the body of the post (and the mime type should be
set accordingly, it's not application/x-www-form-urlencoded but
text/xml).
Hope this helps
Cheers
Andrea
Sorry Dan, I misunderstood the confusion. As Andrea says, the demo page in the admin console has sample requests.
Tom
On 11/2/07, lunarfish < dan.jones@anonymised.com> wrote:
Hi Chris.
I’m happy generating post requests from within php but what I can’t find in
the docs or on the demo page is where I put stuff in the post request.
Can you let me know the structure of the post request for an insert? Or if
there is a help page I can’t find could you point me at that?
Thanks. Dan
Nope, unfortunately you need to do post calls to do inserts.
Chris
View this message in context: http://www.nabble.com/PHP-xml-request-sample-code-tf4730702.html#a13545245
Sent from the GeoServer - User mailing list archive at Nabble.com.
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users