Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

JSSP - Subscribe Method

Avatar

Avatar
Validate 10
Level 4
davidl14970702
Level 4

Likes

30 likes

Total Posts

93 posts

Correct Reply

13 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 4
davidl14970702
Level 4

Likes

30 likes

Total Posts

93 posts

Correct Reply

13 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
davidl14970702
Level 4

06-08-2018

This is writing to the rec table but it is not subscribing to the service.

Not sure what I am doing wrong.

Any help would be great.

var service = "lwTFOBS";

var create = true;

 

  var rcp =

    <recipient

      _operation="insertOrUpdate"

      _key="@email"

      xtkschema="nms:recipient"

      firstName={request.getParameter("firstName")}

      lastName={request.getParameter("lastName")}

      email={request.getParameter("email")}

    </recipient>;

nms.subscription.Subscribe(service, rcp, create);

Amit_Kumar

florentlb

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
Level 4
davidl14970702
Level 4

Likes

30 likes

Total Posts

93 posts

Correct Reply

13 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 4
davidl14970702
Level 4

Likes

30 likes

Total Posts

93 posts

Correct Reply

13 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
davidl14970702
Level 4

09-08-2018

Found my error.

I started over a few times, trying new namespace for the JSSP and the link to the JSSP page changed by a '_' character. Once I was aware of this and changed my form action to the correct link everything worked just fine.

Thanks for the help.

Answers (6)

Answers (6)

Avatar

Avatar
Validate 10
Level 4
davidl14970702
Level 4

Likes

30 likes

Total Posts

93 posts

Correct Reply

13 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 4
davidl14970702
Level 4

Likes

30 likes

Total Posts

93 posts

Correct Reply

13 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
davidl14970702
Level 4

07-08-2018

Do you mean to use something like Fiddler to monitor the HTTP request?

Avatar

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

369 likes

Total Posts

726 posts

Correct Reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

369 likes

Total Posts

726 posts

Correct Reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Vapsy
Employee

07-08-2018

I'm requesting to check the web logs for nms.subscription.subscribe method call errors.

Avatar

Avatar
Validate 10
Level 4
davidl14970702
Level 4

Likes

30 likes

Total Posts

93 posts

Correct Reply

13 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 4
davidl14970702
Level 4

Likes

30 likes

Total Posts

93 posts

Correct Reply

13 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
davidl14970702
Level 4

07-08-2018

It worked for me in vanilla JS as well...

Im not sure how to check the logs of the JSSP page. Where would that be located in AC?

Avatar

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

369 likes

Total Posts

726 posts

Correct Reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

369 likes

Total Posts

726 posts

Correct Reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Vapsy
Employee

07-08-2018

Hi davidl14970702,

I've tested this on 8896 with vanilla setup and it works.

1543715_pastedImage_1.png

1543716_pastedImage_2.png

Can you please check your web logs to see if any error is bring thrown?

Regards,
Vipul

Avatar

Avatar
Validate 10
Level 4
davidl14970702
Level 4

Likes

30 likes

Total Posts

93 posts

Correct Reply

13 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 4
davidl14970702
Level 4

Likes

30 likes

Total Posts

93 posts

Correct Reply

13 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
davidl14970702
Level 4

07-08-2018

I've made the update to the xml and it is still acting the same.

Will create/update but not subscribe.

I double checked the internal name to the service and that value is correct. Not sure why it's not subscribing.

Avatar

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

369 likes

Total Posts

726 posts

Correct Reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

369 likes

Total Posts

726 posts

Correct Reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Vapsy
Employee

06-08-2018

Hi davidl14970702,

Seems your recipient XML is incorrect and in my opinion, you should not be able to create a recipient as well. You can opening thag with "<recipient" but then ending it with "</recipient>".

Correct code wll be

var service = "lwTFOBS"

var create = true

   

  var rcp =  

    <recipient 

      _operation="insertOrUpdate" 

      _key="@email" 

      xtkschema="nms:recipient" 

      firstName={request.getParameter("firstName")} 

      lastName={request.getParameter("lastName")} 

      email={request.getParameter("email")} />; 

nms.subscription.Subscribe(service, rcp, create); 

It should work.

Regards,
Vipul