As before this error means it cannot resolve the hostname. Can you login to the server ML is running on and run a ping or nslookup or other such test to verify the host is resolvable on that host ?
---------------------------------------- David A. Lee Senior Principal Software Engineer Epocrates, Inc. [email protected]<mailto:[email protected]> 812-482-5224 From: [email protected] [mailto:[email protected]] On Behalf Of mano m Sent: Wednesday, November 30, 2011 7:57 AM To: Geert Josten; General MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Access webservice ??? Hi , We are accessing the web service remotely. Is it possible to access a .Net service via a HTTP-post method.Since we couldn't able to call the web service directly, we thought of calling a .net sampleservice.svc file which intern call the web service. xdmp:http-post("http://net16:8099/sampleservice.svc", <options xmlns="xdmp:http"> <timeout>100000000</timeout> <data>{$post-data}</data> <headers> <content-type>text/xml</content-type> </headers> </options>)[2] here also I am getting the same error. <result status="fail" exception="SVC-SOCHN1.0-mlSocket hostname errorSVC-SOCHN: xdmp:http-post("http://net16:8099/SampleService.svc", <options xmlns="xdmp:http"><timeout>100000000</timeout><data><text> Your response will be interesting. Pay attention to what you read...</options>) -- Socket hostname error: gethostbyname net16: The specified host is unknown.falsexdmp:http-post("http://net16:8099/SampleService.svc", <options xmlns="xdmp:http"><timeout>100000000</timeout><data><text> Your response will be interesting. Pay attention to what you read...</options>)gethostbynamenet16The specified host is unknown./ui/try/iCitation.xqy13survey:httppost("http://net16:8099/SampleService.svc", "<text> Your response will be interesting. Pay attention to what you read...")uri"http://net16:8099/SampleService.svc"post-data"<text> Your response will be interesting. Pay attention to what you read..."1.0-ml/ui/try/iCitation.xqy32end<text> Your response will be interesting. Pay attention to what you read...1.0-ml" /> regards, mano ________________________________ From: Geert Josten <[email protected]> To: mano m <[email protected]>; General MarkLogic Developer Discussion <[email protected]> Sent: Monday, 28 November 2011 5:06 AM Subject: RE: [MarkLogic Dev General] Access webservice ??? Hi Mano, Are you running MarkLogic Server locally or on a remote server? In case you are running it remotely, then the server on which MarkLogic Server is running might have firewall or network settings preventing it to find or access the url you entered. If MarkLogic Server would be able to access the server, you would have at least received a response.. Kind regards, Geert Van: mano m [mailto:[email protected]<mailto:[email protected]>] Verzonden: maandag 28 november 2011 10:09 Aan: Geert Josten; General MarkLogic Developer Discussion Onderwerp: Re: [MarkLogic Dev General] Access webservice ??? Hi, I tried by adding xdmp:quote for the data before passing through Url. But getting same error .The url is correct. regards, Mano ________________________________ From: Geert Josten <[email protected]<mailto:[email protected]>> To: mano m <[email protected]<mailto:[email protected]>>; General MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Sent: Monday, 28 November 2011 2:27 AM Subject: RE: [MarkLogic Dev General] Access webservice ??? Hi Mano, You have to xdmp:quote your post-data, like in the second example of the documentation of xdmp:http-post: http://developer.marklogic.com/pubs/5.0/apidocs/Ext-2.html#xdmp:http-post But the error says there is something else going wrong. It says that the url you pass in is not found. Are you sure the url you use is correct? Kind regards, Geert Van: mano m [mailto:[email protected]<mailto:[email protected]>] Verzonden: maandag 28 november 2011 7:38 Aan: Geert Josten; General MarkLogic Developer Discussion Onderwerp: Re: [MarkLogic Dev General] Access webservice ??? Hi all, Thanks, Can you share a sample soap request accessed using http-post. For my scenario I have to pass xml node to the webservice. I tried in the following way . But I am getting error. let $post-data := <s>mano soap request </s> return xdmp:http-post("http://net16:8097/service.svc", <options xmlns="xdmp:http"> <timeout>100000000</timeout> <data>{$post-data}</data> </options>)[2] Error : SVC-SOCHN1.0-mlSocket hostname errorSVC-SOCHN: xdmp:http-post.... -- Socket hostname error: gethostbyname net16: The specified host is unknown.falsexdmp:http-post Regards, Mano ________________________________ From: Geert Josten <[email protected]<mailto:[email protected]>> To: mano m <[email protected]<mailto:[email protected]>>; General MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Sent: Thursday, 24 November 2011 7:33 AM Subject: RE: [MarkLogic Dev General] Access webservice ??? Hi Mano, Abishek asked a similar question. You can find the answer here: http://markmail.org/message/44wzhqsswnczi2lj Kind regards, Geert Van: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] Namens mano m Verzonden: donderdag 24 november 2011 12:08 Aan: [email protected]<mailto:[email protected]> Onderwerp: [MarkLogic Dev General] Access webservice ??? Hi I have to access a web service from mark logic. Will it be possible via xdmp:http-post method.Please let me know how to access webservice and pass parameters to them? Thanks in Advance. regards, Mano
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
