Happy Business Starts Here

Highlighted
Newly Enrolled

[SOAP] How do I convert a string in Java to a zns:id

Looking for a Java code fragment.

I have some IDs in a JSON string and I would like to convert them to a an the "ZuoraServiceStub ID" type in java so that I can query and manipulate the object. For instance I have this product id: "2c92a0f949cbd1980149d36fe7012e89" and I'd like to update/delete/query against it. Normal casting does not work.

 

Thanks in advance.

Tags (2)
2 REPLIES 2
Newly Enrolled

Re: [SOAP] How do I convert a string in Java to a zns:id

Found it. In case anybody is interested:

ZuoraServiceStub.ID id = ZuoraServiceStub.ID.Factory.fromString((String) zapiResp.get("id"), "");
Community Manager

Re: [SOAP] How do I convert a string in Java to a zns:id

Thanks for sharing your solution!

Lana Lee | Senior Community Manager and Strategist
"A little consideration, a little thought for others, makes all the difference." —A. A. Milne