Contributions
Re: CDATA problems with special characters
Thanks for that. I tried it and it's reporting org.xml.sax.SAXParseException; Premature end of file for this line: String myInnerStrQuoteNo = new XmlSlurper().parseText(CDATA) I did try changing a few bits but I don't know the language that well so just ended up getting different errors of just nothing at all in the variable1.9KViews0likes0CommentsCDATA problems with special characters
We have a 3rd party application that is returning the results within a CDATA string. I need to be able to get one of the tags in there (strQuoteNo)and then pass it for use in another request message but am having problems even getting at the tag. I've searched all over and following the https://www.soapui.org/docs/functional-testing/working-with-cdata.htmlguide I have passed the whole CDATAstring to a property. declare namespace ns1=''; declare namespace rpc='http://www.w3.org/2003/05/soap-rpc'; declare namespace soap='http://www.w3.org/2003/05/soap-envelope'; declare namespace saxon='http://saxon.sf.net/' ; //ns1:rootCreateQuoteResponse/text() The resultis: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><CreateQuoteResponse xmlns="webservices.quotation.company.com"><strQuoteNo>1234567</strQuoteNo><lngNoOfLives>13</lngNoOfLives><dblTotalBenefit>309033</dblTotalBenefit><dblFreeCoverLimit>65000</dblFreeCoverLimit><dteArd>2018-05-01</dteArd><DoclIst/><CommissionLevel><lngCommissionUnitVID>240</lngCommissionUnitVID><dblCommissionRate>12</dblCommissionRate><lngPremiumFrequencyVID>42</lngPremiumFrequencyVID><dblAnnualPremium>2696.14</dblAnnualPremium><dblModalPremium>224.6783</dblModalPremium><dblUnitRate>3.096</dblUnitRate></CommissionLevel></CreateQuoteResponse> I think the problem is that this sting contains special characters as whatever I try next either results in 'null' or an error when trying to pass it to a new property. Can anyone help advise here? Using the basic SoapUI rather than Pro, the idea is to then pass the quote number in to the next request message to issue the quote, which is also of CDATA format: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <rootIssueQuoteRequest><![CDATA[<IssueQuoteRequest xmlns="webservices.quotation.company.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Header> <strQuoteNo>1234567</strQuoteNo> <strUserId>ISSUEQUOTEUSER</strUserId> </Header> </IssueQuoteRequest>]]></rootIssueQuoteRequest> </soapenv:Body> </soapenv:Envelope>1.9KViews0likes3CommentsRe: Setting parameter in REST post xml mesage and checking result
Thanks Rupert, will give that a go. It sounds like what I was after at least In terms of checking the results, I was thinking it would be some kind of xpath? I currently have the data stored in a txt file as below so whatever option is easiest to check I guess customerReference, name, active 12345, Bobs bits, Y 34567,Handy harry, N5.5KViews1like3CommentsSetting parameter in REST post xml mesage and checking result
Another noob question... We have a REST xml service that uses Post. It only has one value in the request, lets call itCustomerReference and returns a few details, such as name and if they are active <GetCustRef ns: xxxx> <message header ns: xxxx> some stuff </message header> <request> CustomerReference </request> </GetCustRef> What I need to do is set the CustomerReference as a parameter in the post message and then check some of the results. I've already found a script that will allow me to loop through different references but nothing that can help with settign the parameter and checking the results.Solved5.5KViews0likes5CommentsRe: Testing via a ESB, adding name space?
Have finially managed to get it working :robothappy: I put everything in the request part (bottom left of request screen)and it worked. Just need to sort out how to paramatise it andalso get it to loop onceand use the reference number value from the first loop as the basis for the assertion on the next loop (ref id = ref id + 1) And once done that try against some more complex services. Happy days Cheers2.3KViews0likes1CommentRe: Testing via a ESB, adding name space?
Thanks once again Rupert. The code above is not from SoapUI, it's what we enter in Fiddler to test the service, therefore I've not entered the xmlns in SoapUI. Think I'll spend some time going through your cookbook to get a better understanding of the tool.2.3KViews0likes3CommentsTesting via a ESB, adding name space?
I'm trying to do a proof of concept around using SoapUI within our orgnisation. We have a REST service that simply returns a reference number so should be very easy to test. This works in Fiddler, request body below, but how do I get this to work in SoapUI? I've added the blue parts of the body as parameters but I get 'Object reference not set to an instance of an object.' which according to the developer (who's too busy to help at the moment) is becauseall ourservicesare behind a service bus. Would addingthe namespace help - and if so how do I do that? Thanks D <?xml version="1.0" encoding="utf-8"?><GetWorkReferenceIdRequest xmlns="http://xxxxxxx"> <MessageHeader xmlns="http://xxxxxxxx"> <MessageId>1234</MessageId> <InitiatorId>122343</InitiatorId> <ServerName>12123</ServerName> <BusinessProcessName>123</BusinessProcessName> <BusinessProcessId>123</BusinessProcessId> <DateTimeStamp>0001-01-01T00:00:00</DateTimeStamp> <ProcessHeader> <MessageStatus>Success</MessageStatus> <Details> </Details> </ProcessHeader> </MessageHeader> </GetWorkReferenceIdRequest>2.4KViews0likes7Comments