Home Man
Today's Posts

Javascript, Javascript libs and toolkits, LAMP, Apache, MySQL, HTML, and other web coding posts.

Error on executing soap request using Curl command


Login to Reply

Thread Tools Search this Thread
# 1  
Old 09-29-2015
Error on executing soap request using Curl command

i have curl command to POST a soap request to web service. I have a file (query.xml) which has all the soap message attached to it I just don't seem to be able to properly post it.

curl command
curl -s -H "Content-Type: text/soap+xml;charset=UTF-8" -H "SOAPAction:" -d @query.xml

        <parameter name="enableREST">true</parameter>
<q0:SubscriberNo>9150000014</q0:SubscriberNo> <q0:QueryType>3</q0:QueryType> </QueryBasicInfoRequest> </q2:QueryBasicInfoRequestMsg>

error coming is
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header>
<faultcode></faultcode><faultstring>com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '-' (code 45) in prolog; expected '&lt;'
 at [row,col {unknown-source}]: [1,22]</faultstring><detail /></soapenv:Fault>

# 2  
Old 09-29-2015
Since your data contains no - , it must be complaining about your headers.
# 3  
Old 09-29-2015
I usually put my soap requests in a file.... e.g soap-request.txt

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body />

then use curl like so:

curl -d @soap-request.txt  http://myserver/soapything

The Following User Says Thank You to cjcox For This Useful Post:
Corona688 (09-29-2015)
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
CurL command Rest API call with oauth 2.0 secutity error shobhit.working IP Networking 0 05-14-2018 05:53 AM
Error executing sqlcmd command through UNIX Rahul Raj UNIX for Advanced & Expert Users 4 06-22-2015 09:34 AM
Access Sharepoint site using SOAP request in unix johninweb Solaris 0 07-23-2012 10:19 PM
Error while executing sh command RP09 Shell Programming and Scripting 5 07-02-2012 02:56 AM
Error while executing isql command on RHEL4 roopalidalvi231 Red Hat 4 04-13-2012 04:17 AM
Error while executing isql command on RHEL4 roopalidalvi231 Red Hat 1 04-12-2012 11:55 PM
Error while executing command in aix box newtoaixos AIX 6 08-18-2011 06:22 AM
Issue in Curl to send http POST request with attachment/multipart manishmaha UNIX for Advanced & Expert Users 1 05-19-2010 01:12 AM
error while executing the mail command madhumathikv Shell Programming and Scripting 2 02-17-2008 08:43 AM

All times are GMT -4. The time now is 05:21 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password