/** * The qname of the particle for this web result. If the {@link #getParticleType() particle type} is * TYPE then it's the qname of the xml type. Otherwise, it's the qname of the implicit schema * element. * * @return The qname of the particle for this web result as a part. */ public QName getParticleQName() { if (method.getSoapBindingStyle() == SOAPBinding.Style.RPC && !isHeader()) { return getTypeQName(); } else { return new QName(getTargetNamespace(), getElementName()); } }
/** * Gets the client-side package for the type, type declaration, package, or their string values. * * @param list The arguments. * @return The string value of the client-side package. */ public Object exec(List list) throws TemplateModelException { if (list.size() < 1) { throw new TemplateModelException("The responseDocumentQName method method must have a web method as a parameter."); } TemplateModel from = (TemplateModel) list.get(0); Object unwrapped = new BeansWrapperBuilder(Configuration.getVersion()).build().unwrap(from); if (!(unwrapped instanceof WebMethod)) { throw new TemplateModelException("A web method must be provided."); } WebMethod webMethod = (WebMethod) unwrapped; if (webMethod.getSoapBindingStyle() != SOAPBinding.Style.DOCUMENT || webMethod.getSoapUse() != SOAPBinding.Use.LITERAL) { throw new TemplateModelException("No response document qname available for a " + webMethod.getSoapBindingStyle() + "/" + webMethod.getSoapUse() + " web method."); } if (webMethod.getResponseWrapper() != null) { return new QName(webMethod.getResponseWrapper().getElementNamespace(), webMethod.getResponseWrapper().getElementName()); } else if (webMethod.getSoapParameterStyle() == SOAPBinding.ParameterStyle.BARE) { WebResult wr = webMethod.getWebResult(); if (!wr.isHeader()) { return new QName(wr.getTargetNamespace(), wr.getElementName()); } } return null; }
/** * Gets the client-side package for the type, type declaration, package, or their string values. * * @param list The arguments. * @return The string value of the client-side package. */ public Object exec(List list) throws TemplateModelException { if (list.size() < 1) { throw new TemplateModelException("The responseDocumentQName method method must have a web method as a parameter."); } TemplateModel from = (TemplateModel) list.get(0); Object unwrapped = new BeansWrapperBuilder(Configuration.getVersion()).build().unwrap(from); if (!(unwrapped instanceof WebMethod)) { throw new TemplateModelException("A web method must be provided."); } WebMethod webMethod = (WebMethod) unwrapped; if (webMethod.getSoapBindingStyle() != SOAPBinding.Style.DOCUMENT || webMethod.getSoapUse() != SOAPBinding.Use.LITERAL) { throw new TemplateModelException("No response document qname available for a " + webMethod.getSoapBindingStyle() + "/" + webMethod.getSoapUse() + " web method."); } if (webMethod.getResponseWrapper() != null) { return new QName(webMethod.getResponseWrapper().getElementNamespace(), webMethod.getResponseWrapper().getElementName()); } else if (webMethod.getSoapParameterStyle() == SOAPBinding.ParameterStyle.BARE) { WebResult wr = webMethod.getWebResult(); if (!wr.isHeader()) { return new QName(wr.getTargetNamespace(), wr.getElementName()); } } return null; }
javax.lang.model.element.Element conflict = paramsByName.put(webMethod.getWebResult().getElementName(), webMethod); if (conflict != null) { warn("%s: C# requires that all header parameters defined in the same endpoint interface have unique names. This return parameter conflicts with the one at %s.", positionOf(webMethod), positionOf(conflict));
javax.lang.model.element.Element conflict = paramsByName.put(webMethod.getWebResult().getElementName(), webMethod); if (conflict != null) { warn("%s: C# requires that all header parameters defined in the same endpoint interface have unique names. This return parameter conflicts with the one at %s.", positionOf(webMethod), positionOf(conflict));