[Spce-user] SOAP roblem
Juan José Ivars
juanjo at beeztel.com
Thu May 24 10:03:54 EDT 2012
Hello, i continue with my SOAP experiments, but i have problems creating a
VoIP account, my xml is:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/
"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<create_voip_account xmlns="/SOAP/Provisioning">
<authentication>
<type xsi:type="xsd:string">admin</type>
<username xsi:type="xsd:string">administrator</username>
<password xsi:type="xsd:string">XXXXXXXXXXX</password>
</authentication>
<parameters>
<billing_profile xsi:type="xsd:string">default</billing_profile>
<status xsi:type="xsd:string">active</status>
<external_id xsi:type="xsd:string">666666666</external_id>
<username xsi:type="xsd:string">666666666</username>
<domain xsi:type="xsd:string">XXXXXXXXXXX</domain>
<password xsi:type="xsd:string">666666666</password>
<cc xsi:type="xsd:string">true</cc>
<ac xsi:type="xsd:string">true</ac>
<sn xsi:type="xsd:string">true</sn>
<admin xsi:type="xsd:boolean">false</admin>
<webusername xsi:type="xsd:string">666666666</webusername>
<webpassword xsi:type="xsd:string">666666666</webpassword>
<external_id xsi:type="xsd:string">666666666</external_id>
</parameters>
</create_voip_account>
</soap:Body>
</soap:Envelope>
I try to create the account with:
curl -s -k --user XXX:XXXXXXX -H "Content-Type: text/xml; charset=utf-8" -H
"SOAPAction:
https://XXX.XXX.XXX.XXX:2443/SOAP/Provisioning#create_voip_account" -d
@soap.xml https://XXX.XXX.XXX.XXX:2443/SOAP
I get:
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:typens="
http://dev.sipwise.com/2009/schema/provisioning_types.xsd" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" soap:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Client.Syntax.MissingParam</faultcode><faultstring>need
a billing profile for the new
account</faultstring></soap:Fault></soap:Body></soap
I dont understand why is complaining about the billing profile, i have
confirmmed through the web interface that the profile exists.
Best regards.
2012/5/24 Juan José Ivars <juanjo at beeztel.com>
> Thank you very much Andrew, i have solved the problem with the last
> e-mail, i was authenticating myself using only the config.yml
> credentials, now i use the config.yml and sip:provider CE credentials and
> all works perfectly.
>
>
> Best regards.
>
> 2012/5/24 Andrew Pogrebennyk <apogrebennyk at sipwise.com>
>
>> On 05/24/2012 12:50 PM, Juan José Ivars wrote:
>> > Yes i know, i have pasted {SHA}bbbbb intead of my real hash password.
>> >
>> > hank you for the notice.
>>
>> Hm, that should work. Look how to do HTTP basic authentication in curl.
>> The authentication for SOAP is a two-stage process: first HTTP basic
>> authentication with login and pw specific in config.yml, then
>> authentication with administrator credentials of your sip:provider CE
>> placed into parameters of SOAP request.
>>
>> HTH.
>> Andrew
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20120524/428da1d8/attachment-0001.html>
More information about the Spce-user
mailing list