|
Apache CXF example source code file (RequestWrapper.java)
The Apache CXF RequestWrapper.java source code/** * 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.java2wsdl.processor.internal.jaxws; import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; import javax.jws.WebParam; import org.apache.cxf.common.util.StringUtils; import org.apache.cxf.service.model.MessageInfo; import org.apache.cxf.service.model.MessagePartInfo; import org.apache.cxf.service.model.OperationInfo; import org.apache.cxf.tools.common.model.JavaField; import org.apache.cxf.tools.java2wsdl.generator.wsdl11.model.WrapperBeanClass; public class RequestWrapper extends Wrapper { @Override public void setOperationInfo(final OperationInfo op) { super.setOperationInfo(op); setName(op.getInput().getMessageParts().get(0).getElementQName()); setClassName((String)op.getInput().getMessageParts().get(0).getProperty("REQUEST.WRAPPER.CLASSNAME")); } @Override public boolean isWrapperAbsent(final Method method) { javax.xml.ws.RequestWrapper reqWrapper = method.getAnnotation(javax.xml.ws.RequestWrapper.class); return getClassName() == null && (reqWrapper == null || StringUtils.isEmpty(reqWrapper.className())); } public String getWrapperTns(Method method) { javax.xml.ws.RequestWrapper reqWrapper = method.getAnnotation(javax.xml.ws.RequestWrapper.class); if (reqWrapper != null) { return reqWrapper.targetNamespace(); } return null; } @Override protected List<JavaField> buildFields() { return buildFields(getMethod(), getOperationInfo().getUnwrappedOperation().getInput()); } protected List<JavaField> buildFields(final Method method, final MessageInfo message) { List<JavaField> fields = new ArrayList Other Apache CXF examples (source code examples)Here is a short list of links related to this Apache CXF RequestWrapper.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.