« first day (2593 days earlier)      last day (2365 days later) » 

11:53 AM
Hi guys
Can someone help me curl command
?
 
I hope so. What are you looking for help with? Are you running curl and it is not behaving as you expect?
 
So I am trying to make a SOAP request
to an endpoint
and
I get this
 
What are you getting?
 
12:12 PM
$ curl --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction:urn: methodName" --data @request.xml example.com/abcd
curl: (7) couldn't connect to host
But my code written in Java can connect to host
and perform opereatiosn
 
@AbhishekSingh You forgot http:// in the URL?
 
https://
is there
instead of http
 
Ah, it wasn't marked-up properly so it just didn't show.
 
Yes
So I am confused if anything else is required
 
So the command you have is:
curl --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction:urn: methodName" --data @request.xml example.com/abcd
(Indenting four spaces renders it as code here in chat.)
 
12:21 PM
yes
 
12:42 PM
Can you show the Java code that does work?
@AbhishekSingh In SOAPAction:urn: methodName, is urn literally the text urn, or is it something else?
 
1:10 PM
What does urn signify ?
I just followed a tutorial
which had urn in it
 
Uniform Resource Name But I think what you wrote probably is correct. The URN syntax does have that in it.
Did you follow the same tutorial for the Java code?
Since the Java code works and the curl command doesn't, inspecting each might be helpful.
I expected your curl command to look more like this but I don't know if that's necessary or not.
 
1:59 PM
@AbhishekSingh I cant reproduce the error you get, simply copying your initial line from the chat history and trying it on my machine gave me this:
┌─[03:52:59]─[michael@NEXUS-ONE]
└──> ~ $ curl --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction:urn: methodName" --data @request.xml example.com/abcd
Warning: Couldn't read data from file "request.xml", this makes an empty POST.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
maybe check your network settings?
 
2:16 PM
@Videonauth I really doubt that the real URL contains example.com as that's a domain reserved for use in examples: iana.org/domains/reserved
 
@Kusalananda I know but the line worked and curl did not return "Host not reachable" so the line itself is not wrong, and its something else causing problems here. This is what i wanted to point out.
 
@Videonauth Ah, good point.
 
and i think even parsing the 404 page of example.com is enough for that to prove :)
and knowing myself when going to DEV mode, systems can be easily messed up by installation of libraries, etc, or firewall settings interfere, there are so many possible options where it could have gone wrong
 

« first day (2593 days earlier)      last day (2365 days later) »