Hi Malintha, Thank you for your response, I sent the request without encoding, but still I get 400. Please find the request currently I sent through the REST, below
{"outboundSMSMessageRequest": { "address": ["tel:+94754284288"], "outboundSMSTextMessage": {"message": "Test Message:SMSX-02"}, "senderAddress": "tel:+94772446947" } my end point is http://localhost:8080/oneapiserver/SendSMSService/1/smsmessaging/outbound/tel:+94772446947/requests and I'm getting the response like 400 Bad request { "requestError": { "serviceException": { "messageId": "SVC0002", "text": "Invalid input value for message part %1", "variables": [ "Missing mandatory parameter: senderAddress,address,message" ] }, "policyException": null } } On Tue, Mar 31, 2015 at 7:30 AM, Malintha Adikari <malin...@wso2.com> wrote: > Hi Sriashalya, > > I missed the mail, sorry for that. > > Yes, I have faced 400 responses when my parameters are not compatible with > expected ones. For your sample request , possible culprit is mobile > number's format. Please look at following SMS send request, which I have > used with a SMS gateway > > > {"outboundSMSMessageRequest":{ > "address":["tel:+941234456","tel:+941234566"], > "senderAddress":"tel:+200", > "outboundSMSTextMessage":{"message":"Hello World"}, > "clientCorrelator":"12g3456", > "receiptRequest": {"notifyURL":"http://abc123.com > <http://application.example.com/notifications/DeliveryInfoNotification>", > "callbackData":"some-data-useful-to-the-requester"}, > "senderName":"wso2"} > } > > > Here we have used phone numbers with "+" ( note in your request you have > encoded it). Could you try phone numbers without encoding and share the > result. ? > > Does your BE give any fault response apart from the status code. If it > does, could you please share it. > > Regards, > Malintha > > On Tue, Mar 31, 2015 at 1:53 AM, Malintha Adikari <malin...@wso2.com> > wrote: > >> Hi Sriashalya, >> >> I missed the mail, sorry for that. >> >> Yes, I have faced 400 responses when my parameters are not compatible >> with expected ones. For your sample request , possible culprit is mobile >> number's format. Please look at following SMS send request, which I have >> used with a SMS gateway >> >> >> {"outboundSMSMessageRequest":{ >> "address":["tel:+941234456","tel:+941234566"], >> "senderAddress":"tel:+200", >> "outboundSMSTextMessage":{"message":"Hello World"}, >> "clientCorrelator":"12g3456", >> "receiptRequest": {"notifyURL":" >> http://application.example.com/notifications/DeliveryInfoNotification", >> "callbackData":"some-data-useful-to-the-requester"}, >> "senderName":"wso2"} >> } >> >> >> Here we have used phone numbers with "+" ( note in your request you have >> encoded it). Could you try phone numbers without encoding and share the >> result. ? >> >> Is your BE gives any fault response apart from the status code. If it >> does, could you please share it. >> >> Regards, >> Malintha >> >> On Mon, Mar 30, 2015 at 5:47 AM, Sriashalya Srivathsan <asha...@wso2.com> >> wrote: >> >>> Hi Malintha, >>> Have you experienced about above issue. >>> >>> >>> >>> Thank you, >>> Rgds, >>> >>> On Fri, Mar 27, 2015 at 10:54 AM, Sriashalya Srivathsan < >>> asha...@wso2.com> wrote: >>> >>>> Hi All, >>>> >>>> I'm trying to do the GSMA One API for send sms.For that I need to set up >>>> the back end. For that I tried the following information given by the API >>>> git repo. >>>> >>>> >>>> *Deployment: pull the oneapi directory and contents and build a .war. >>>> Deploy in your JEE application server (tested on Tomcat 6, OSX and Win XP) >>>> >>>> Usage: Start the application on localhost:8080 . This shows a form through >>>> which requests may be made to the OneAPI server. The src code is LGPL and >>>> m,ay be used to build a production OneAPI server that will actually >>>> fulfill the requests (i.e. charge/locate/message users)* >>>> >>>> >>>> I used the following end point in the REST client >>>> >>>> >>>> http://localhost:8080/oneapiserver/SendSMSService/1/smsmessaging/outbound/tel%3A94772446947/requests >>>> >>>> Content- Type application/json >>>> >>>> Accept - application/json >>>> >>>> Authorization - Basic YXNoYWx5YTg2QGdhbWlsLmNvbTpBc2gxOThAdmF0aA== >>>> >>>> >>>> {"outboundSMSMessageRequest": >>>> { >>>> "address": ["tel%3A%2B94754284288"], >>>> "outboundSMSTextMessage": {"message": "Test Message:SMSX-02"}, >>>> "senderAddress": "tel:94772446947" >>>> } >>>> >>>> >>>> but I'm getting the response 400, What I'm missing here? >>>> >>>> >>>> -- >>>> S.Sriashalya, >>>> Associate Software Engineer, >>>> WSO2. >>>> >>> >>> >>> >>> -- >>> S.Sriashalya, >>> Associate Software Engineer, >>> WSO2. >>> >> >> >> >> -- >> *Malintha Adikari* >> Software Engineer >> WSO2 Inc.; http://wso2.com >> lean.enterprise.middleware >> >> Mobile: +94 71 2312958 >> Blog: http://malinthas.blogspot.com >> Page: http://about.me/malintha >> > > > > -- > *Malintha Adikari* > Software Engineer > WSO2 Inc.; http://wso2.com > lean.enterprise.middleware > > Mobile: +94 71 2312958 > Blog: http://malinthas.blogspot.com > Page: http://about.me/malintha > -- S.Sriashalya, Associate Software Engineer, WSO2.
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev