File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/test/java/com/github/underscore/lodash Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1021,6 +1021,26 @@ public void stackoverflow4() {
10211021 U .fromXml (xml ).toString ());
10221022 }
10231023
1024+ @ Test
1025+ public void stackoverflow5 () {
1026+ // https://stackoverflow.com/questions/59429211/
1027+ // convert-xml-to-json-and-vice-versa-and-also-how-to-identify-rest-endpoint-while
1028+ String xmlData = "<soapenv:Envelope xmlns:soapenv=\" http://schemas.xmlsoap.org/soap/envelope/\" "
1029+ + " xmlns:urn=\" urn:ahc.com:dms:wsdls:organization\" >\n "
1030+ + " <soapenv:Header/>\n "
1031+ + " <soapenv:Body>\n "
1032+ + " <urn:getRoles>\n "
1033+ + " <getRolesRequest>\n "
1034+ + " <Type>ABC</Type>\n "
1035+ + " </getRolesRequest>\n "
1036+ + " </urn:getRoles>\n "
1037+ + " </soapenv:Body>\n "
1038+ + "</soapenv:Envelope>" ;
1039+ Map <String , Object > jsonData = U .<Map <String , Object >>get (
1040+ U .<Map <String , Object >>fromXmlWithoutNamespaces (xmlData ), "Envelope.Body.getRoles" );
1041+ assertEquals ("{getRolesRequest={Type=ABC}}" , jsonData .toString ());
1042+ }
1043+
10241044 @ SuppressWarnings ("unchecked" )
10251045 @ Test
10261046 public void sqlru1 () {
You can’t perform that action at this time.
0 commit comments