Author Message
Nesbit421
Joined: Feb 24, 2020
Messages: 51
Offline
I would really like assistance writing a java servlet to parse the following return from a web service call to my variables in OD. Not the whole thing, but enough to get me started:

28/10/2021 13:20:41:342 DEBUG - C088203F6DBDDCF06F92560206A8986B:/FAC : Web Service Reply <- <?xml version='1.0' encoding='utf-8'?><s:Envelope xmlns:s="http://schemas.x
mlsoap.org/soap/envelope/"><s:Body><GetDataResponse xmlns="TreasWebService"><GetDataResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><AssessedTaxAmount>7.72</
AssessedTaxAmount><BackTaxAmount>0</BackTaxAmount><BackTaxFlag>false</BackTaxFlag><CPFlag>false</CPFlag><FirstHalfIntDue>0</FirstHalfIntDue><FirstHalfTaxFeesDue>0</Firs
tHalfTaxFeesDue><FullYearPaymentAmount>0</FullYearPaymentAmount><FullYearPaymentPending>0</FullYearPaymentPending><HalfYearPaymentAmount>3.86</HalfYearPaymentAmount><Im
poundAmt>0</ImpoundAmt><LastPaymentReceivedAmount>7.72</LastPaymentReceivedAmount><LastPaymentReceivedDate>0001-01-01T00:00:00</LastPaymentReceivedDate><NameAddressLine
s xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"><a:string>STARLIGHT TRAIL HOMEOWNERS ASSOCIATION I</a:string><a:string>CITY PROPERTY MANAGEMENT CO
</a:string><a:string>4645 E COTTON GIN LP</a:string><a:string>PHOENIX AZ 85040</a:string></NameAddressLines><OutstandingBalance>0</OutstandingBalance><ParcelNumber>1010
1446</ParcelNumber><PendingPaymentAmount>0</PendingPaymentAmount><ReasonCode>0</ReasonCode><ResultCode>1</ResultCode><ReturnStatusMessage>Paid</ReturnStatusMessage><Sec
ondHalfIntDue>0</SecondHalfIntDue><SecondHalfTaxFeesDue>0</SecondHalfTaxFeesDue><TCD>0</TCD><TaxYear>2021</TaxYear><TotalPaymentApplied>7.72</TotalPaymentApplied></GetD
ataResult></GetDataResponse></s:Body></s:Envelope>
WilsonYu
Joined: Nov 6, 2013
Messages: 3937
Offline
This looks like a whole soap message. I am not sure why you need to parse that. There are plenty of sample code on the web to show you how to parse a xml document if that's what you need.
Nesbit421
Joined: Feb 24, 2020
Messages: 51
Offline
My issue is that when the results come back it's not in a variable string that I can use. In fact, when I try to display the results of the variable 'GetDataResponse', I get this: connectivity.ws.beans.ParcelInquiryServiceStub$GetDataResponse@67d7a8f3

So my question is, how do I manipulate this Soap return to variables I can use?
WilsonYu
Joined: Nov 6, 2013
Messages: 3937
Offline
This is a Java object in the variable. You can write a little code you get the values out of the properties. The Java class should have been defined in the stub folder.
SteffenBisgaard
Joined: Apr 16, 2008
Messages: 9
Offline
I had roughly the same question in https://www.devconnectprogram.com/forums/posts/list/24505.page
I am still not clear how to do this - can anybody shed some light?

Nesbit421
Joined: Feb 24, 2020
Messages: 51
Offline
Is this so hard to help with? Why can't anyone answer this question? I know it can be done. I just don't know how or where to start.
Go to:   
Mobile view