


Hi ,
I am trying to trigger a subscription service using SOAP.
I have nms:subscription WSDL and I am using subscribe method ,however it seems to be not working.
I wanted to know if any one tried this.
below is the request for Subscribe:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:nms:subscription">
<soapenv:Header/>
<soapenv:Body>
<urn:Subscribe>
<urn:sessiontoken>___02A7C516-98AB-41E4-978D-3382796E3FCD</urn:sessiontoken>
<urn:strServiceName>SMS</urn:strServiceName>
<urn:elemRecipient>
</urn:elemRecipient>
<urn:bCreate></urn:bCreate>
</urn:Subscribe>
</soapenv:Body>
</soapenv:Envelope>
regards
Shiva
Views
Replies
Sign in to like this content
Total Likes
Hi Shiva,
Your SOAP XML should be something like this
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:nms:subscription">
<soapenv:Header/>
<soapenv:Body>
<urn:Subscribe>
<urn:sessiontoken>___02A7C516-98AB-41E4-978D-3382796E3FCD</urn:sessiontoken>
<urn:strServiceName>SMS</urn:strServiceName>
<urn:elemRecipient>
<recipient _key="email" emailFormat="2" email= "shiva.k@b.com.au" firstName="Shiva" lastName="K">
<location zipCode="2067"/>
</recipient>
</urn:elemRecipient>
<urn:bCreate></urn:bCreate>
</urn:Subscribe>
</soapenv:Body>
</soapenv:Envelope>
Please refer to the official documentation to understand more about it Business oriented APIs
Regards,
Vipul
Views
Replies
Sign in to like this content
Total Likes
Hi Vipul,
Thanks for the prompt response .
I am passing in :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:nms:subscription">
<soapenv:Header/>
<soapenv:Body>
<urn:Subscribe>
<urn:sessiontoken>___DA3E97AF-F20A-4747-B847-B26565A111AA</urn:sessiontoken>
<urn:strServiceName>2</urn:strServiceName>
<urn:elemRecipient>
<recipient _key="email" emailFormat="2" email= "shiva.k@b.com.au" firstName="Shiva" lastName="K">
<location zipCode="2067"/>
</recipient>
</urn:elemRecipient>
<urn:bCreate></urn:bCreate>
</urn:Subscribe>
</soapenv:Body>
</soapenv:Envelope>
I am getting the below error :
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring xsi:type="xsd:string">SOP-330011 Error while executing the method 'Subscribe' of service 'nms:subscription'.</faultstring>
<detail xsi:type="xsd:string">NMS-470003 Impossible to update. Creation of new recipient profile is not allowed.</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Views
Replies
Sign in to like this content
Total Likes
Hi Shiva,
The Session token you are using was generate through an Admin Operator?
Is there any error that you are getting in Web logs.
Thanks & Regards,
Deepika
Views
Replies
Sign in to like this content
Total Likes
Hi Shiva,
You have not specified a value for <urn:bCreate> tag. So it will default to false.
it means that the recipient entity you are feedign into the subscription api call, if there is no corresponding recipient found inside the database, it will not create it and hence there will be no subscription.
I'll suggest passing in true in such a scenario.
Regards,Vipul
Views
Replies
Sign in to like this content
Total Likes
Thanks Vipul,
I got it working by adding true for create and
under servicename I had to pass the internal name of Services and Subscription.
I have also tried this for SMS and it worked.
Here is the request :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:nms:subscription">
<soapenv:Header/>
<soapenv:Body>
<urn:Subscribe>
<urn:sessiontoken>___F289899C-E857-4B99-999C-47D87EBC2DEC</urn:sessiontoken>
<urn:strServiceName>newsletter</urn:strServiceName>
<urn:elemRecipient>
<recipient _key="email" emailFormat="2" email=" shiva.k@b.com.au " firstName="Shiva" lastName="K" >
<location zipCode="2067"/>
</recipient>
</urn:elemRecipient>
<urn:bCreate>True</urn:bCreate>
</urn:Subscribe>
</soapenv:Body>
</soapenv:Envelope>
Views
Replies
Sign in to like this content
Total Likes