public boolean isUnwrapped() { return opInfo.isUnwrapped(); } public BindingOperationInfo getWrappedOperation() {
@Override public void end(OperationInfo op) { // we only process the wrapped operation, not the unwrapped alternative. if (op.isUnwrapped()) { isInUnwrappedOperation = false; return; } isWrapped = op.isUnwrappedCapable(); StringBuilder parameterList = new StringBuilder(); inputParameterNames = new ArrayList<>(); if (isWrapped) { collectWrapperElementInfo(); } else { collectUnwrappedInputInfo(); } buildParameterList(parameterList); MessageInfo outputMessage = op.getOutput(); nonVoidOutput = outputMessage != null && outputMessage.getMessageParts().size() != 0; if (!op.isOneWay()) { buildSuccessFunction(outputMessage); buildErrorFunction(); // fault part some day. } buildOperationFunction(parameterList); createInputSerializer(); if (nonVoidOutput) { createResponseDeserializer(outputMessage); } }
public boolean isUnwrapped() { return opInfo.isUnwrapped(); } public BindingOperationInfo getWrappedOperation() {
public boolean isUnwrapped() { return opInfo.isUnwrapped(); } public BindingOperationInfo getWrappedOperation() {
public boolean isUnwrapped() { return opInfo.isUnwrapped(); } public BindingOperationInfo getWrappedOperation() {
@Override public void begin(OperationInfo op) { if (op.isUnwrapped()) { isInUnwrappedOperation = true; return; } currentOperation = op; OperationInfo conflict = localOperationsNameMap.get(op.getName().getLocalPart()); if (conflict != null) { operationsWithNameConflicts.add(conflict); operationsWithNameConflicts.add(op); } localOperationsNameMap.put(op.getName().getLocalPart(), op); opFunctionPropertyName = getFunctionPropertyName(operationsWithNameConflicts, op, op.getName()); opFunctionGlobalName = getFunctionGlobalName(op.getName(), "op"); }
private MessagePartInfo getFaultMessagePart(QName qname, OperationInfo op) { if (op.isUnwrapped() && (op instanceof UnwrappedOperationInfo)) { op = ((UnwrappedOperationInfo)op).getWrappedOperation(); } for (FaultInfo faultInfo : op.getFaults()) { for (MessagePartInfo mpi : faultInfo.getMessageParts()) { String ns = null; if (mpi.isElement()) { ns = mpi.getElementQName().getNamespaceURI(); } else { ns = mpi.getTypeQName().getNamespaceURI(); } if (qname.getLocalPart().equals(mpi.getConcreteName().getLocalPart()) && qname.getNamespaceURI().equals(ns)) { return mpi; } } } return null; } }
private MessagePartInfo getFaultMessagePart(QName qname, OperationInfo op) { if (op.isUnwrapped() && (op instanceof UnwrappedOperationInfo)) { op = ((UnwrappedOperationInfo)op).getWrappedOperation(); } for (FaultInfo faultInfo : op.getFaults()) { for (MessagePartInfo mpi : faultInfo.getMessageParts()) { String ns = null; if (mpi.isElement()) { ns = mpi.getElementQName().getNamespaceURI(); } else { ns = mpi.getTypeQName().getNamespaceURI(); } if (qname.getLocalPart().equals(mpi.getConcreteName().getLocalPart()) && qname.getNamespaceURI().equals(ns)) { return mpi; } } } return null; } }
public void checkForExistence(MessagePartInfo part) { QName qn = part.getElementQName(); if (qn != null) { XmlSchemaElement el = schemas.getElementByQName(qn); if (el == null) { Class<?> clazz = part.getTypeClass(); if (clazz == null) { return; } boolean isFromWrapper = part.getMessageInfo().getOperation().isUnwrapped(); if (isFromWrapper && clazz.isArray() && !Byte.TYPE.equals(clazz.getComponentType())) { clazz = clazz.getComponentType(); } mapClass(part, clazz); } } }
public void checkForExistence(MessagePartInfo part) { QName qn = part.getElementQName(); if (qn != null) { XmlSchemaElement el = schemas.getElementByQName(qn); if (el == null) { Class<?> clazz = part.getTypeClass(); if (clazz == null) { return; } boolean isFromWrapper = part.getMessageInfo().getOperation().isUnwrapped(); if (isFromWrapper && clazz.isArray() && !Byte.TYPE.equals(clazz.getComponentType())) { clazz = clazz.getComponentType(); } mapClass(part, clazz); } } }
@Override public void begin(MessagePartInfo part) { LOG.finest(part.getName().toString()); // Check to see if the WSDL information has been filled in for us. if (part.getTypeQName() != null || part.getElementQName() != null) { checkForExistence(part); return; } Class<?> clazz = part.getTypeClass(); if (clazz == null) { return; } boolean isFromWrapper = part.getMessageInfo().getOperation().isUnwrapped(); if (isFromWrapper && clazz.isArray() && !Byte.TYPE.equals(clazz.getComponentType())) { clazz = clazz.getComponentType(); } mapClass(part, clazz); } private void mapClass(MessagePartInfo part, Class<?> clazz) {
@Override public void begin(MessagePartInfo part) { LOG.finest(part.getName().toString()); // Check to see if the WSDL information has been filled in for us. if (part.getTypeQName() != null || part.getElementQName() != null) { checkForExistence(part); return; } Class<?> clazz = part.getTypeClass(); if (clazz == null) { return; } boolean isFromWrapper = part.getMessageInfo().getOperation().isUnwrapped(); if (isFromWrapper && clazz.isArray() && !Byte.TYPE.equals(clazz.getComponentType())) { clazz = clazz.getComponentType(); } mapClass(part, clazz); }
} else if (part.getMessageInfo().getOperation().isUnwrapped() && el.getMaxOccurs() != 1) {
public void checkForExistence(MessagePartInfo part) { QName qn = part.getElementQName(); if (qn != null) { XmlSchemaElement el = schemas.getElementByQName(qn); if (el == null) { Class<?> clazz = part.getTypeClass(); if (clazz == null) { return; } boolean isFromWrapper = part.getMessageInfo().getOperation().isUnwrapped(); if (isFromWrapper && clazz.isArray() && !Byte.TYPE.equals(clazz.getComponentType())) { clazz = clazz.getComponentType(); } JAXBBeanInfo beanInfo = getBeanInfo(clazz); if (beanInfo == null) { if (Exception.class.isAssignableFrom(clazz)) { QName name = (QName)part.getMessageInfo().getProperty("elementName"); part.setElementQName(name); buildExceptionType(part, clazz); } return; } QName typeName = getTypeName(beanInfo); createBridgeXsElement(part, qn, typeName); } else if (part.getXmlSchema() == null) { part.setXmlSchema(el); } } }
@Override public void begin(MessagePartInfo part) { // the unwrapped parts build for wrapped operations don't have real elements. if (part.isElement() && !part.getMessageInfo().getOperation().isUnwrapped()) { try { schemaCollection.validateElementName(part.getName(), part.getElementQName()); } catch (InvalidXmlSchemaReferenceException ixsre) { complaints.append(part.getName() + " part element name " + ixsre.getMessage() + "\n"); } } else if (!part.getMessageInfo().getOperation().isUnwrapped()) { if (part.getTypeQName() == null) { complaints.append(part.getName() + " of message " + part.getMessageInfo().getName() + " part type QName null.\n"); } else { try { schemaCollection.validateTypeName(part.getName(), part.getTypeQName()); } catch (InvalidXmlSchemaReferenceException ixsre) { complaints.append(part.getName() + " part type name " + ixsre.getMessage() + "\n"); } } } } }
@Override public void begin(MessagePartInfo part) { // the unwrapped parts build for wrapped operations don't have real elements. if (part.isElement() && !part.getMessageInfo().getOperation().isUnwrapped()) { try { schemaCollection.validateElementName(part.getName(), part.getElementQName()); } catch (InvalidXmlSchemaReferenceException ixsre) { complaints.append(part.getName() + " part element name " + ixsre.getMessage() + "\n"); } } else if (!part.getMessageInfo().getOperation().isUnwrapped()) { if (part.getTypeQName() == null) { complaints.append(part.getName() + " of message " + part.getMessageInfo().getName() + " part type QName null.\n"); } else { try { schemaCollection.validateTypeName(part.getName(), part.getTypeQName()); } catch (InvalidXmlSchemaReferenceException ixsre) { complaints.append(part.getName() + " part type name " + ixsre.getMessage() + "\n"); } } } } }
@Override public void begin(MessagePartInfo part) { // the unwrapped parts build for wrapped operations don't have real elements. if (part.isElement() && !part.getMessageInfo().getOperation().isUnwrapped()) { try { schemaCollection.validateElementName(part.getName(), part.getElementQName()); } catch (InvalidXmlSchemaReferenceException ixsre) { complaints.append(part.getName() + " part element name " + ixsre.getMessage() + "\n"); } } else if (!part.getMessageInfo().getOperation().isUnwrapped()) { if (part.getTypeQName() == null) { complaints.append(part.getName() + " of message " + part.getMessageInfo().getName() + " part type QName null.\n"); } else { try { schemaCollection.validateTypeName(part.getName(), part.getTypeQName()); } catch (InvalidXmlSchemaReferenceException ixsre) { complaints.append(part.getName() + " part type name " + ixsre.getMessage() + "\n"); } } } } }
@Override public void begin(MessagePartInfo part) { // the unwrapped parts build for wrapped operations don't have real elements. if (part.isElement() && !part.getMessageInfo().getOperation().isUnwrapped()) { try { schemaCollection.validateElementName(part.getName(), part.getElementQName()); } catch (InvalidXmlSchemaReferenceException ixsre) { complaints.append(part.getName() + " part element name " + ixsre.getMessage() + "\n"); } } else if (!part.getMessageInfo().getOperation().isUnwrapped()) { if (part.getTypeQName() == null) { complaints.append(part.getName() + " of message " + part.getMessageInfo().getName() + " part type QName null.\n"); } else { try { schemaCollection.validateTypeName(part.getName(), part.getTypeQName()); } catch (InvalidXmlSchemaReferenceException ixsre) { complaints.append(part.getName() + " part type name " + ixsre.getMessage() + "\n"); } } } } }
if (part.getMessageInfo().getOperation().isUnwrapped() && Boolean.TRUE.equals(part.getProperty(HEADER))) {
if (op.isUnwrapped()) { op = ((UnwrappedOperationInfo)op).getWrappedOperation();