Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/CustomizationParser.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/CustomizationParser.java?view=diff&rev=553415&r1=553414&r2=553415 ============================================================================== --- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/CustomizationParser.java (original) +++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/CustomizationParser.java Thu Jul 5 01:28:47 2007 @@ -23,19 +23,12 @@ import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.logging.Logger; -import javax.xml.namespace.NamespaceContext; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathExpressionException; -import javax.xml.xpath.XPathFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -48,6 +41,7 @@ import org.apache.cxf.common.logging.LogUtils; import org.apache.cxf.common.util.StringUtils; import org.apache.cxf.helpers.DOMUtils; +import org.apache.cxf.helpers.MapNamespaceContext; import org.apache.cxf.resource.URIResolver; import org.apache.cxf.tools.common.ToolConstants; import org.apache.cxf.tools.common.ToolContext; @@ -59,9 +53,6 @@ public final class CustomizationParser { // For WSDL1.1 private static final Logger LOG = LogUtils.getL7dLogger(CustomizationParser.class); - private static final XPathFactory XPF = XPathFactory.newInstance(); - - private final XPath xpath = XPF.newXPath(); private ToolContext env; private final List<Element> jaxwsBindings = new ArrayList<Element>(); @@ -71,6 +62,8 @@ private Element wsdlNode; private String wsdlURL; + private CustomNodeSelector nodeSelector = new CustomNodeSelector(); + public CustomizationParser() { jaxwsBindings.clear(); jaxbBindings.clear(); @@ -105,6 +98,7 @@ } for (Element element : jaxwsBindings) { + nodeSelector.addNamespaces(element); internalizeBinding(element, ""); } buildHandlerChains(); @@ -119,7 +113,7 @@ } catch (IOException e1) { throw new ToolException(e1); } - + try { doc = DOMUtils.readXml(ins); } catch (Exception e) { @@ -148,7 +142,61 @@ } - private void internalizeBinding(Element bindings, String expression) { + private Node[] getAnnotationNodes(final Node node) { + Node[] nodes = new Node[2]; + + Node annotationNode = nodeSelector.queryNode(node, "//xsd:annotation"); + + if (annotationNode == null) { + annotationNode = node.getOwnerDocument().createElementNS(ToolConstants.SCHEMA_URI, + "annotation"); + } + + nodes[0] = annotationNode; + + Node appinfoNode = nodeSelector.queryNode(annotationNode, "//xsd:appinfo"); + + if (appinfoNode == null) { + appinfoNode = node.getOwnerDocument().createElementNS(ToolConstants.SCHEMA_URI, + "appinfo"); + annotationNode.appendChild(appinfoNode); + } + nodes[1] = appinfoNode; + return nodes; + } + + protected void copyAllJaxbDeclarations(final Node schemaNode, final Node jaxwsBindingNode) { + Node[] embededNodes = getAnnotationNodes(schemaNode); + Node annotationNode = embededNodes[0]; + Node appinfoNode = embededNodes[1]; + + NodeList childNodes = jaxwsBindingNode.getChildNodes(); + for (int i = 0; i < childNodes.getLength(); i++) { + Node childNode = childNodes.item(i); + if (!isJaxbBindings(childNode)) { + continue; + } + + final Element schemaElement = (Element) schemaNode; + final Node jaxbNode = childNode; + String jaxbPrefix = schemaElement.lookupPrefix(ToolConstants.NS_JAXB_BINDINGS); + if (jaxbPrefix == null) { + schemaElement.setAttribute("xmlns:jaxb", ToolConstants.NS_JAXB_BINDINGS); + schemaElement.setAttribute("jaxb:version", "2.0"); + } + + Node cloneNode = ProcessorUtil.cloneNode(schemaNode.getOwnerDocument(), jaxbNode, true); + appinfoNode.appendChild(cloneNode); + } + + if (schemaNode.getChildNodes().getLength() > 0) { + schemaNode.insertBefore(annotationNode, schemaNode.getChildNodes().item(0)); + } else { + schemaNode.appendChild(annotationNode); + } + } + + protected void internalizeBinding(Element bindings, String expression) { if (bindings.getAttributeNode("wsdlLocation") != null) { expression = "/"; } @@ -160,115 +208,49 @@ } else { pfx += ":"; } - ContextImpl ctx = new ContextImpl(wsdlNode); - Node node = queryXPathNode(wsdlNode, - ctx, - "//" + pfx + "definitions"); - copyBindingsToWsdl(node, bindings, ctx); + + nodeSelector.addNamespaces(wsdlNode); + Node node = nodeSelector.queryNode(wsdlNode, "//" + pfx + "definitions"); + copyBindingsToWsdl(node, bindings, nodeSelector.getNamespaceContext()); } if (isJAXWSBindings(bindings) && bindings.getAttributeNode("node") != null) { expression = expression + "/" + bindings.getAttribute("node"); - Node node = null; - NodeList nestedJaxbNodes = getNestedJaxbBinding(bindings); - NodeList nestedJaxbSchemaBindingNodes = getNestedJaxbSchemaBinding(bindings); - - ContextImpl ctx = new ContextImpl(bindings); - node = queryXPathNode(wsdlNode, ctx, expression); - if (node != null - && nestedJaxbNodes.getLength() == 0 - && nestedJaxbSchemaBindingNodes.getLength() == 0) { - copyBindingsToWsdl(node, bindings, ctx); - } - - if (node != null && nestedJaxbNodes.getLength() != 0) { - // append xmlns:jaxb and jaxb:version attribute for schema - Node jaxbNode = nestedJaxbNodes.item(0); - - String xpathExpress = DOMUtils.getAttribute(jaxbNode, "node"); - - Node schemaNode = getSchemaNode(node); - - ctx = new ContextImpl(bindings); - Node targetNode = queryXPathNode(schemaNode, ctx, xpathExpress); - //@@TODO - copy namespaces - Element schemaElement = (Element)schemaNode; - // Element targetElement = (Element)targetNode; - - String jaxbPrefix = schemaElement.lookupPrefix(ToolConstants.NS_JAXB_BINDINGS); - if (jaxbPrefix == null) { - schemaElement.setAttribute("xmlns:jaxb", ToolConstants.NS_JAXB_BINDINGS); - schemaElement.setAttribute("jaxb:version", "2.0"); - } - - // append jaxb appinfo for value node - Element annoElement = node.getOwnerDocument().createElementNS(ToolConstants.SCHEMA_URI, - "annotation"); - Element appinfoEle = node.getOwnerDocument().createElementNS(ToolConstants.SCHEMA_URI, - "appinfo"); - - annoElement.appendChild(appinfoEle); - - for (int j = 0; j < jaxbNode.getChildNodes().getLength(); j++) { - Node cloneNode = ProcessorUtil.cloneNode(node.getOwnerDocument(), jaxbNode - .getChildNodes().item(j), true); - appinfoEle.appendChild(cloneNode); - } + nodeSelector.addNamespaces(bindings); - if (targetNode.getChildNodes().getLength() > 0) { - targetNode.insertBefore(annoElement, targetNode.getChildNodes().item(0)); - } else { - targetNode.appendChild(annoElement); - } - } else if (node != null && nestedJaxbSchemaBindingNodes.getLength() != 0) { - Element schemaElement = (Element)node; - Node jaxbNode = nestedJaxbSchemaBindingNodes.item(0); - String jaxbPrefix = schemaElement.lookupPrefix(ToolConstants.NS_JAXB_BINDINGS); - if (jaxbPrefix == null) { - schemaElement.setAttribute("xmlns:jaxb", ToolConstants.NS_JAXB_BINDINGS); - schemaElement.setAttribute("jaxb:version", "2.0"); - } - // append jaxb appinfo for value node - Element annoElement = node.getOwnerDocument().createElementNS(ToolConstants.SCHEMA_URI, - "annotation"); - Element appinfoEle = node.getOwnerDocument().createElementNS(ToolConstants.SCHEMA_URI, - "appinfo"); - annoElement.appendChild(appinfoEle); - Node cloneNode = ProcessorUtil.cloneNode(node.getOwnerDocument(), jaxbNode, true); - - appinfoEle.appendChild(cloneNode); - - if (schemaElement.getChildNodes().getLength() > 0) { - schemaElement.insertBefore(annoElement, schemaElement.getChildNodes().item(0)); - } else { - schemaElement.appendChild(annoElement); - } + Node node = nodeSelector.queryNode(wsdlNode, expression); + if (node == null) { + throw new ToolException(new Message("NODE_NOT_EXISTS", + LOG, new Object[] {expression})); } + if (hasJaxbBindingDeclaration(bindings)) { + copyAllJaxbDeclarations(node, bindings); + } else { + copyBindingsToWsdl(node, bindings, nodeSelector.getNamespaceContext()); + } } Element[] children = getChildElements(bindings, ToolConstants.NS_JAXWS_BINDINGS); for (int i = 0; i < children.length; i++) { - if (children[i].getNodeType() == Node.ELEMENT_NODE) { internalizeBinding(children[i], expression); } - } } - private void copyBindingsToWsdl(Node node, Node bindings, ContextImpl ctx) { + private void copyBindingsToWsdl(Node node, Node bindings, MapNamespaceContext ctx) { if (bindings.getNamespaceURI().equals(ToolConstants.JAXWS_BINDINGS.getNamespaceURI())) { bindings.setPrefix("jaxws"); } - + for (Map.Entry<String, String> ent : ctx.getUsedNamespaces().entrySet()) { if (node.lookupNamespaceURI(ent.getKey()) == null) { node.getOwnerDocument().getDocumentElement() .setAttribute("xmlns:" + ent.getKey(), ent.getValue()); } - + } for (int i = 0; i < bindings.getChildNodes().getLength(); i++) { @@ -311,20 +293,6 @@ firstChild.appendChild(cloneNode); } - private Node getSchemaNode(Node node) { - if (!"schema".equals(node.getLocalName())) { - while (node.getParentNode() != null) { - node = node.getParentNode(); - - if ("schema".equals(node.getLocalName())) { - return node; - } - } - return null; - } - return node; - } - private boolean isGlobaleBindings(Element binding) { boolean globleNode = binding.getNamespaceURI().equals(ToolConstants.NS_JAXWS_BINDINGS) @@ -399,7 +367,7 @@ if (this.wsdlURL != null) { normalizedURL = URI.create(this.wsdlURL).normalize(); } - + if (wsdlURI.normalize().equals(normalizedURL)) { jaxwsBindings.add(root); } else { @@ -433,58 +401,9 @@ } - class ContextImpl implements NamespaceContext { - private Node targetNode; - private Map<String, String> pfxMap = new HashMap<String, String>(); - - public ContextImpl(Node node) { - targetNode = node; - } - - public String getNamespaceURI(String prefix) { - String s = targetNode.lookupNamespaceURI(prefix); - if (prefix != null) { - pfxMap.put(prefix, s); - } - return s; - } - - public String getPrefix(String nsURI) { - throw new UnsupportedOperationException(); - } - - public Iterator getPrefixes(String namespaceURI) { - throw new UnsupportedOperationException(); - } - - public Map<String, String> getUsedNamespaces() { - return pfxMap; - } + protected void setWSDLNode(final Element node) { + this.wsdlNode = node; } - - private Node queryXPathNode(Node target, ContextImpl nsCtx, String expression) { - NodeList nlst; - try { - xpath.setNamespaceContext(nsCtx); - nlst = (NodeList)xpath.evaluate(expression, target, XPathConstants.NODESET); - } catch (XPathExpressionException e) { - Message msg = new Message("XPATH_ERROR", LOG, new Object[] {expression}); - throw new ToolException(msg, e); - } - - if (nlst.getLength() != 1) { - Message msg = new Message("ERROR_TARGETNODE_WITH_XPATH", LOG, new Object[] {expression}); - throw new ToolException(msg); - } - - Node rnode = nlst.item(0); - if (!(rnode instanceof Element)) { - Message msg = new Message("ERROR_TARGETNODE_WITH_XPATH", LOG, new Object[] {expression}); - throw new ToolException(msg); - } - return (Element)rnode; - } - public Node getWSDLNode() { return this.wsdlNode; } @@ -494,11 +413,19 @@ && "bindings".equals(bindings.getLocalName()); } - private NodeList getNestedJaxbBinding(Element bindings) { - return bindings.getElementsByTagNameNS(ToolConstants.NS_JAXB_BINDINGS, "bindings"); + private boolean isJaxbBindings(Node bindings) { + return ToolConstants.NS_JAXB_BINDINGS.equals(bindings.getNamespaceURI()); } - private NodeList getNestedJaxbSchemaBinding(Element bindings) { - return bindings.getElementsByTagNameNS(ToolConstants.NS_JAXB_BINDINGS, "schemaBindings"); + + protected boolean hasJaxbBindingDeclaration(Node bindings) { + NodeList childNodes = bindings.getChildNodes(); + for (int i = 0; i < childNodes.getLength(); i++) { + Node childNode = childNodes.item(i); + if (isJaxbBindings(childNode)) { + return true; + } + } + return false; } public Element getCustomizedWSDLElement() {
Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/Messages.properties URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/Messages.properties?view=diff&rev=553415&r1=553414&r2=553415 ============================================================================== --- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/Messages.properties (original) +++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/Messages.properties Thu Jul 5 01:28:47 2007 @@ -27,10 +27,9 @@ JAXWSBINDINGS_NOT_BIND = JAXWSBidnings do not bind to any wsdl.Check the wsdlLocation attribute in the JAXWSBindings element ERROR_TARGETNODE_WITH_XPATH = The xpath query identifies mutil or none target nodes with the query expression : {0} XPATH_ERROR = XPath query error , check the query expression : {0} -NOT_URI = Can not construct new URI with this string : {0} +NOT_URI = Can not construct new URI with this string : {0} FILE_NOT_FOUND = Can not found the file : {0} CAN_NOT_READ_AS_ELEMENT = Can not read this file to a xml element : {0} WSDL_HASNOCONTENT = Can not read content from the wsdl : {0} - - \ No newline at end of file + NODE_NOT_EXISTS = Can not find the node with the xpath {0} \ No newline at end of file Added: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/CustomizationParserTest.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/CustomizationParserTest.java?view=auto&rev=553415 ============================================================================== --- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/CustomizationParserTest.java (added) +++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/CustomizationParserTest.java Thu Jul 5 01:28:47 2007 @@ -0,0 +1,137 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cxf.tools.wsdlto.frontend.jaxws.customiztion; + +import java.io.File; +import java.io.FileOutputStream; + +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; + +import org.apache.cxf.helpers.XMLUtils; +import org.apache.cxf.tools.common.ProcessorTestBase; +import org.junit.Test; + +public class CustomizationParserTest extends ProcessorTestBase { + CustomizationParser parser = new CustomizationParser(); + CustomNodeSelector selector = new CustomNodeSelector(); + + @Test + public void testHasJaxbBindingDeclaration() throws Exception { + Element doc = getDocumentElement("resources/embeded_jaxb.xjb"); + + Node jaxwsBindingNode = selector.queryNode(doc, "//jaxws:[EMAIL PROTECTED]"); + + assertNotNull(jaxwsBindingNode); + + assertTrue(parser.hasJaxbBindingDeclaration(jaxwsBindingNode)); + + doc = getDocumentElement("resources/external_jaxws.xml"); + jaxwsBindingNode = selector.queryNode(doc, "//jaxws:[EMAIL PROTECTED]"); + assertNotNull(jaxwsBindingNode); + assertFalse(parser.hasJaxbBindingDeclaration(jaxwsBindingNode)); + } + + @Test + public void testCopyAllJaxbDeclarations() throws Exception { + Element schema = getDocumentElement("resources/test.xsd"); + Element binding = getDocumentElement("resources/embeded_jaxb.xjb"); + + String checkingPoint = "//xsd:annotation/xsd:appinfo/jaxb:schemaBindings/jaxb:[EMAIL PROTECTED]"; + assertNull(selector.queryNode(schema, checkingPoint)); + + Node jaxwsBindingNode = selector.queryNode(binding, "//jaxws:[EMAIL PROTECTED]"); + Node schemaNode = selector.queryNode(schema, "//xsd:schema"); + + parser.copyAllJaxbDeclarations(schemaNode, jaxwsBindingNode); + + File file = new File(output, "custom_test.xsd"); + XMLUtils.writeTo(schemaNode, new FileOutputStream(file)); + Document testNode = XMLUtils.parse(file); + + Node result = selector.queryNode(testNode, checkingPoint); + assertNotNull(result); + } + + @Test + public void testInternalizeBinding1() throws Exception { + Element wsdlDoc = getDocumentElement("resources/test.wsdl"); + Element jaxwsBinding = getDocumentElement("resources/external_jaxws.xml"); + + parser.setWSDLNode(wsdlDoc); + parser.internalizeBinding(jaxwsBinding, ""); + + File file = new File(output, "custom_test.wsdl"); + XMLUtils.writeTo(wsdlDoc, new FileOutputStream(file)); + Document testNode = XMLUtils.parse(file); + + String[] checkingPoints = + new String[]{"wsdl:definitions/wsdl:portType/jaxws:bindings/jaxws:class", + "wsdl:definitions/jaxws:bindings/jaxws:package"}; + checking(testNode, checkingPoints); + } + + @Test + public void testInternalizeBinding2() throws Exception { + Element wsdlDoc = getDocumentElement("resources/test.wsdl"); + Element jaxwsBinding = getDocumentElement("resources/external_jaxws_embed_jaxb.xml"); + + parser.setWSDLNode(wsdlDoc); + parser.internalizeBinding(jaxwsBinding, ""); + + String base = "wsdl:definitions/wsdl:types/xsd:schema/xsd:annotation/xsd:appinfo/"; + String[] checkingPoints = + new String[]{base + "jaxb:schemaBindings/jaxb:package"}; + + File file = new File(output, "custom_test.wsdl"); + XMLUtils.writeTo(wsdlDoc, new FileOutputStream(file)); + Document testNode = XMLUtils.parse(file); + + checking(testNode, checkingPoints); + } + + @Test + public void testInternalizeBinding3() throws Exception { + Element wsdlDoc = getDocumentElement("resources/test.wsdl"); + Element jaxwsBinding = getDocumentElement("resources/external_jaxws_embed_jaxb_date.xml"); + parser.setWSDLNode(wsdlDoc); + parser.internalizeBinding(jaxwsBinding, ""); + + String base = "wsdl:definitions/wsdl:types/xsd:schema/xsd:annotation/xsd:appinfo/"; + String[] checkingPoints = + new String[]{base + "jaxb:globalBindings/jaxb:javaType"}; + + File file = new File(output, "custom_test.wsdl"); + XMLUtils.writeTo(wsdlDoc, new FileOutputStream(file)); + Document testNode = XMLUtils.parse(file); + + checking(testNode, checkingPoints); + } + + private Element getDocumentElement(final String resource) throws Exception { + return XMLUtils.parse(getClass().getResourceAsStream(resource)).getDocumentElement(); + } + + private void checking(Node node, String[] checkingPoints) { + for (String checkingPoint : checkingPoints) { + assertNotNull(selector.queryNode(node, checkingPoint)); + } + } +} \ No newline at end of file Added: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/expected/inline_jaxws.wsdl URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/expected/inline_jaxws.wsdl?view=auto&rev=553415 ============================================================================== --- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/expected/inline_jaxws.wsdl (added) +++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/expected/inline_jaxws.wsdl Thu Jul 5 01:28:47 2007 @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:jaxws="http: +//java.sun.com/xml/ns/jaxws" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" +xmlns:tns="http://apache.org/hello_world_soap_http" xmlns:wsdl="http://schemas.x +mlsoap.org/wsdl/" xmlns:x1="http://apache.org/hello_world_soap_http/types" +xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloWorld" targetNamespace="http: +//apache.org/hello_world_soap_http"> + <wsdl:types> + <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://apach +e.org/hello_world_soap_http/types" elementFormDefault="qualified" version="1.0"> + + <element name="sayHi"> + <complexType/> + </element> + <element name="sayHiResponse"> + <complexType> + <sequence> + <element name="responseType" type="string"/> + </sequence> + </complexType> + </element> + <element name="greetMe"> + <complexType> + <sequence> + <element name="requestType" type="dateTime"/> + </sequence> + </complexType> + </element> + <element name="greetMeResponse"> + <complexType> + <sequence> + <element name="responseType" type="string"/> + </sequence> + </complexType> + </element> + </xsd:schema> + </wsdl:types> + <wsdl:message name="sayHiRequest"> + <wsdl:part element="x1:sayHi" name="in"/> + </wsdl:message> + <wsdl:message name="sayHiResponse"> + <wsdl:part element="x1:sayHiResponse" name="out"/> + </wsdl:message> + <wsdl:message name="greetMeRequest"> + <wsdl:part element="x1:greetMe" name="in"/> + </wsdl:message> + <wsdl:message name="greetMeResponse"> + <wsdl:part element="x1:greetMeResponse" name="out"/> + </wsdl:message> + + <wsdl:portType name="Greeter"> + <wsdl:operation name="sayHi"> + <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/> + <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/> + </wsdl:operation> + + <wsdl:operation name="greetMe"> + <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/> + <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/> + </wsdl:operation> + <jaxws:bindings> + <!-- change the generated SEI class --> + <jaxws:class name="MathUtil"/> + + <!-- you can also override the following customization settings --> + <jaxws:enableWrapperStyle>true</jaxws:enableWrapperStyle> + <jaxws:enableAsyncMapping>false</jaxws:enableAsyncMapping> + </jaxws:bindings></wsdl:portType> + + <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/ht +tp"/> + + <wsdl:operation name="sayHi"> + <soap:operation soapAction="" style="document"/> + <wsdl:input name="sayHiRequest"> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output name="sayHiResponse"> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + + <wsdl:operation name="greetMe"> + <soap:operation soapAction="" style="document"/> + <wsdl:input name="greetMeRequest"> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output name="greetMeResponse"> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="SOAPService"> + <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort"> + <soap:address location="http://localhost:9000/SoapContext/SoapPort"/> + </wsdl:port> + </wsdl:service> +<jaxws:bindings><jaxws:package name="external_customize.client"/><jaxws:enableWrapperStyle>true</jaxws:enableWrapperStyle><jaxws:enableAsyncMapping>false</jaxws:enableAsyncMapping></jaxws:bindings></wsdl:definitions> \ No newline at end of file Added: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/embeded_jaxb.xjb URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/embeded_jaxb.xjb?view=auto&rev=553415 ============================================================================== --- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/embeded_jaxb.xjb (added) +++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/embeded_jaxb.xjb Thu Jul 5 01:28:47 2007 @@ -0,0 +1,31 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<jaxws:bindings + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + wsdlLocation="http://localhost:8080/jaxws-inline-customize/addnumbers?wsdl" + xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"> + <package name="inline_customize.client"/> + <jaxws:bindings node="wsdl:definitions/wsdl:types/xsd:[EMAIL PROTECTED]'http://duke.org']"> + <jaxb:schemaBindings> + <jaxb:package name="inline_customize.client"/> + </jaxb:schemaBindings> + </jaxws:bindings> +</jaxws:bindings> \ No newline at end of file Added: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/external_jaxws.xml URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/external_jaxws.xml?view=auto&rev=553415 ============================================================================== --- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/external_jaxws.xml (added) +++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/external_jaxws.xml Thu Jul 5 01:28:47 2007 @@ -0,0 +1,37 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<jaxws:bindings + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + wsdlLocation="test.wsdl" + xmlns="http://java.sun.com/xml/ns/jaxws" + xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"> + <package name="external_customize.client"/> + <!-- default settings --> + <enableWrapperStyle>true</enableWrapperStyle> + <enableAsyncMapping>false</enableAsyncMapping> + <jaxws:bindings node="wsdl:definitions/wsdl:[EMAIL PROTECTED]'Greeter']"> + <!-- change the generated SEI class --> + <class name="MathUtil"/> + + <!-- you can also override the following customization settings --> + <enableWrapperStyle>true</enableWrapperStyle> + <enableAsyncMapping>false</enableAsyncMapping> + </jaxws:bindings> +</jaxws:bindings> \ No newline at end of file Added: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/external_jaxws_embed_jaxb.xml URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/external_jaxws_embed_jaxb.xml?view=auto&rev=553415 ============================================================================== --- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/external_jaxws_embed_jaxb.xml (added) +++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/external_jaxws_embed_jaxb.xml Thu Jul 5 01:28:47 2007 @@ -0,0 +1,13 @@ +<jaxws:bindings + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + wsdlLocation="test.wsdl" + xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"> + <package name="inline_customize.client"/> + <jaxws:bindings node="wsdl:definitions/wsdl:types/xsd:[EMAIL PROTECTED]'http://apache.org/hello_world_soap_http/types']"> + <jaxb:schemaBindings> + <jaxb:package name="inline_customize.client"/> + </jaxb:schemaBindings> + </jaxws:bindings> +</jaxws:bindings> \ No newline at end of file Added: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/external_jaxws_embed_jaxb_date.xml URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/external_jaxws_embed_jaxb_date.xml?view=auto&rev=553415 ============================================================================== --- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/external_jaxws_embed_jaxb_date.xml (added) +++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/external_jaxws_embed_jaxb_date.xml Thu Jul 5 01:28:47 2007 @@ -0,0 +1,13 @@ +<jaxws:bindings wsdlLocation="test.wsdl" + xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> + <jaxws:bindings node="wsdl:definitions/wsdl:types/xsd:[EMAIL PROTECTED]'http://apache.org/hello_world_soap_http/types']"> + <jaxb:globalBindings> + <jaxb:javaType name="java.util.Date" xmlType="xs:dateTime" + parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime" + printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDateTime"/> + </jaxb:globalBindings> + </jaxws:bindings> +</jaxws:bindings> \ No newline at end of file Added: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/test.wsdl URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/test.wsdl?view=auto&rev=553415 ============================================================================== --- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/test.wsdl (added) +++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/test.wsdl Thu Jul 5 01:28:47 2007 @@ -0,0 +1,112 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<wsdl:definitions name="HelloWorld" targetNamespace="http://apache.org/hello_world_soap_http" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:tns="http://apache.org/hello_world_soap_http" + xmlns:x1="http://apache.org/hello_world_soap_http/types" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <wsdl:types> + <xsd:schema version="1.0" + targetNamespace="http://apache.org/hello_world_soap_http/types" + xmlns:tns="http://apache.org/hello_world_soap_http/types" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified"> + <element name="sayHi"> + <complexType/> + </element> + <element name="sayHiResponse"> + <complexType> + <sequence> + <element name="responseType" type="string"/> + </sequence> + </complexType> + </element> + <element name="greetMe"> + <complexType> + <sequence> + <element name="requestType" type="dateTime"/> + </sequence> + </complexType> + </element> + <element name="greetMeResponse"> + <complexType> + <sequence> + <element name="responseType" type="string"/> + </sequence> + </complexType> + </element> + </xsd:schema> + </wsdl:types> + <wsdl:message name="sayHiRequest"> + <wsdl:part element="x1:sayHi" name="in"/> + </wsdl:message> + <wsdl:message name="sayHiResponse"> + <wsdl:part element="x1:sayHiResponse" name="out"/> + </wsdl:message> + <wsdl:message name="greetMeRequest"> + <wsdl:part element="x1:greetMe" name="in"/> + </wsdl:message> + <wsdl:message name="greetMeResponse"> + <wsdl:part element="x1:greetMeResponse" name="out"/> + </wsdl:message> + + <wsdl:portType name="Greeter"> + <wsdl:operation name="sayHi"> + <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/> + <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/> + </wsdl:operation> + + <wsdl:operation name="greetMe"> + <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/> + <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/> + </wsdl:operation> + </wsdl:portType> + + <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + + <wsdl:operation name="sayHi"> + <soap:operation soapAction="" style="document"/> + <wsdl:input name="sayHiRequest"> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output name="sayHiResponse"> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + + <wsdl:operation name="greetMe"> + <soap:operation soapAction="" style="document"/> + <wsdl:input name="greetMeRequest"> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output name="greetMeResponse"> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="SOAPService"> + <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort"> + <soap:address location="http://localhost:9000/SoapContext/SoapPort"/> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> \ No newline at end of file Added: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/test.xsd URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/test.xsd?view=auto&rev=553415 ============================================================================== --- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/test.xsd (added) +++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/resources/test.xsd Thu Jul 5 01:28:47 2007 @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<xsd:schema version="1.0" + targetNamespace="http://apache.org/hello_world_soap_http/types" + xmlns:tns="http://apache.org/hello_world_soap_http/types" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified"> + <xsd:element name="sayHi"> + <complexType/> + </xsd:element> + <xsd:element name="sayHiResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="responseType" type="string"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="greetMe"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="requestType" type="dateTime"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="greetMeResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="responseType" type="string"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> +</xsd:schema> \ No newline at end of file Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java?view=diff&rev=553415&r1=553414&r2=553415 ============================================================================== --- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java (original) +++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java Thu Jul 5 01:28:47 2007 @@ -21,7 +21,6 @@ import java.util.Iterator; import java.util.List; - import javax.wsdl.Definition; import javax.wsdl.Operation; import javax.wsdl.PortType; @@ -71,24 +70,24 @@ assertEquals("Customized enable EnableWrapperStyle name does not been parsered", true, binding .isEnableWrapperStyle()); - + List opList = portType.getOperations(); Operation operation = (Operation)opList.get(0); List extList = operation.getExtensibilityElements(); binding = (JAXWSBinding)extList.get(0); assertEquals("Customized method name does not parsered", "echoMeOneWay", binding.getMethodName()); - - + + assertEquals("Customized parameter element name does not parsered", "tns:number1", binding .getJaxwsPara().getElementName()); assertEquals("Customized parameter message name does not parsered", "greetMeOneWayRequest", binding .getJaxwsPara().getMessageName()); assertEquals("customized parameter name does not parsered", "num1", binding.getJaxwsPara().getName()); } - - - + + + @Test public void testCustomizationWithDifferentNS() { env.put(ToolConstants.CFG_WSDLURL, getClass().getResource("resources/hello_world.wsdl").toString()); @@ -117,15 +116,15 @@ assertEquals("Customized enable EnableWrapperStyle name does not been parsered", true, binding .isEnableWrapperStyle()); - + List opList = portType.getOperations(); Operation operation = (Operation)opList.get(0); List extList = operation.getExtensibilityElements(); binding = (JAXWSBinding)extList.get(0); assertEquals("Customized method name does not parsered", "echoMeOneWay", binding.getMethodName()); - - + + assertEquals("Customized parameter element name does not parsered", "tns:number1", binding .getJaxwsPara().getElementName()); assertEquals("Customized parameter message name does not parsered", "greetMeOneWayRequest", binding @@ -137,16 +136,16 @@ @Test public void testCustomizationWhereURINotAnExactStringMatch() { // set up a URI with ./../wsdl11/hello_world.wsdl instead of - // ./hello_world.wsdl - env.put(ToolConstants.CFG_WSDLURL, + // ./hello_world.wsdl + env.put(ToolConstants.CFG_WSDLURL, getClass().getResource(".").toString() + "../wsdl11/resources/hello_world.wsdl"); - env.put(ToolConstants.CFG_BINDING, + env.put(ToolConstants.CFG_BINDING, getClass().getResource("resources/cxf556_binding.xml").toString()); JAXWSDefinitionBuilder builder = new JAXWSDefinitionBuilder(); builder.setContext(env); builder.build(); - + // this call will fail before CXF-556 builder.customize(); Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/resources/binding3.xml URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/resources/binding3.xml?view=diff&rev=553415&r1=553414&r2=553415 ============================================================================== --- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/resources/binding3.xml (original) +++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/resources/binding3.xml Thu Jul 5 01:28:47 2007 @@ -1,47 +1,47 @@ <!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. --> <jaxws:bindings - wsdlLocation="hello_world.wsdl" - xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" - xmlns:wsdlFoo="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns="http://apache.org/hello_world_soap_http" - xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <jaxws:package name="com.foo" /> - <jaxws:enableAsyncMapping>true</jaxws:enableAsyncMapping> + wsdlLocation="hello_world.wsdl" + xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" + xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" + xmlns:wsdlFoo="http://schemas.xmlsoap.org/wsdl/" + xmlns:tns="http://apache.org/hello_world_soap_http" + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <jaxws:package name="com.foo" /> + <jaxws:enableAsyncMapping>true</jaxws:enableAsyncMapping> - <jaxws:bindings node="wsdlFoo:[EMAIL PROTECTED]'Greeter']"> - <jaxws:enableAsyncMapping>true</jaxws:enableAsyncMapping> - <jaxws:bindings - node="wsdlFoo:[EMAIL PROTECTED]'greetMeOneWay']"> - <jaxws:method name="echoMeOneWay" /> - <jaxws:parameter part="wsdlFoo:[EMAIL PROTECTED]'greetMeOneWayRequest']/wsdlFoo:[EMAIL PROTECTED]'in']" childElementName="tns:number1" name="num1"/> - </jaxws:bindings> - </jaxws:bindings> + <jaxws:bindings node="wsdlFoo:[EMAIL PROTECTED]'Greeter']"> + <jaxws:enableAsyncMapping>true</jaxws:enableAsyncMapping> + <jaxws:bindings + node="wsdlFoo:[EMAIL PROTECTED]'greetMeOneWay']"> + <jaxws:method name="echoMeOneWay" /> + <jaxws:parameter part="wsdlFoo:[EMAIL PROTECTED]'greetMeOneWayRequest']/wsdlFoo:[EMAIL PROTECTED]'in']" childElementName="tns:number1" name="num1"/> + </jaxws:bindings> + </jaxws:bindings> - <jaxws:bindings node="wsdlFoo:definitions/wsdlFoo:types/xsd:schema"> - <jaxb:bindings version="2.0" node="xsd:[EMAIL PROTECTED]'CreateProcess']/xsd:complexType/xsd:sequence/xsd:[EMAIL PROTECTED]'MyProcess']/xsd:simpleType"> - <jaxb:typesafeEnumClass name="MyProcess"> - <jaxb:typesafeEnumMember name="BLUE" value="BLUE" /> - <jaxb:typesafeEnumMember name="RED" value="RED" /> - <jaxb:typesafeEnumMember name="GREEN" value="GREEN" /> - </jaxb:typesafeEnumClass> - </jaxb:bindings> - </jaxws:bindings> + <jaxws:bindings node="wsdlFoo:definitions/wsdlFoo:types/xsd:schema"> + <jaxb:bindings version="2.0" node="xsd:[EMAIL PROTECTED]'CreateProcess']/xsd:complexType/xsd:sequence/xsd:[EMAIL PROTECTED]'MyProcess']/xsd:simpleType"> + <jaxb:typesafeEnumClass name="MyProcess"> + <jaxb:typesafeEnumMember name="BLUE" value="BLUE" /> + <jaxb:typesafeEnumMember name="RED" value="RED" /> + <jaxb:typesafeEnumMember name="GREEN" value="GREEN" /> + </jaxb:typesafeEnumClass> + </jaxb:bindings> + </jaxws:bindings> </jaxws:bindings>
