@Test public void testUnwrappedArray() throws Exception { BodyBuilder builder = createBuilder(wsdlResourcePath("TestServices-unwrapped.wsdl"), "countStringArray"); assertTrue("Wrong type of builder, it should be Literal based",builder instanceof LiteralBodyBuilder); Map<String,Object> inputMap = new HashMap<String, Object>(); inputMap.put("array", "<array><item>1</item><item>2</item><item>3</item></array>"); SOAPElement body = builder.build(inputMap); assertTrue("Outer element should be named {http: assertTrue("There must be three child nodes in array", body.getChildNodes().getLength() == 3); Iterator<Node> items = body.getChildElements(new QName("", "item")); assertTrue("Array element should be named item", items.hasNext()); assertTrue("First Array element should have the value '1'", "1".equals(items.next().getTextContent())); }
@Override public SOAPElement build(Map inputMap) throws WSDLException, ParserConfigurationException, SOAPException, IOException, SAXException, UnknownOperationException { SOAPElement body = super.build(inputMap); if (getStyle() == Style.DOCUMENT) { fixTypeAttributes(body); } return body; }
LiteralBodyBuilder extends AbstractBodyBuilder { @Override public SOAPElement build(Map inputMap) throws WSDLException, ParserConfigurationException, SOAPException, IOException, SAXException, UnknownOperationException { SOAPElement body = super.build(inputMap); if (getStyle() == Style.DOCUMENT) { fixTypeAttributes(body); } return body; } }
LiteralBodyBuilder extends AbstractBodyBuilder { @Override public SOAPElement build(Map inputMap) throws WSDLException, ParserConfigurationException, SOAPException, IOException, SAXException, UnknownOperationException { SOAPElement body = super.build(inputMap); if (getStyle() == Style.DOCUMENT) { fixTypeAttributes(body); } return body; } LiteralBodyBuilder(String style, WSDLParser parser, String operationName, List<TypeDescriptor> inputDescriptors); }
LiteralBodyBuilder extends AbstractBodyBuilder { @Override public SOAPElement build(Map inputMap) throws WSDLException, ParserConfigurationException, SOAPException, IOException, SAXException, UnknownOperationException { SOAPElement body = super.build(inputMap); if (getStyle() == Style.DOCUMENT) { fixTypeAttributes(body); } return body; } LiteralBodyBuilder(String style, WSDLParser parser, String operationName, List<TypeDescriptor> inputDescriptors); @Override SOAPElement build(Map inputMap); }
LiteralBodyBuilder extends AbstractBodyBuilder { @Override public SOAPElement build(Map inputMap) throws WSDLException, ParserConfigurationException, SOAPException, IOException, SAXException, UnknownOperationException { SOAPElement body = super.build(inputMap); if (getStyle() == Style.DOCUMENT) { fixTypeAttributes(body); } return body; } LiteralBodyBuilder(String style, WSDLParser parser, String operationName, List<TypeDescriptor> inputDescriptors); @Override SOAPElement build(Map inputMap);  }