public static ShapeMarshaller createInputShapeMarshaller ( ServiceMetadata service , Operation operation ) { if ( operation == null ) throw new IllegalArgumentException ( "The operation parameter must be specified!" ) ; ShapeMarshaller marshaller = new ShapeMarshaller ( ) . withAction ( operation . getName ( ) ) . withVerb ( operation . getHttp ( ) . getMethod ( ) ) . withRequestUri ( operation . getHttp ( ) . getRequestUri ( ) ) ; Input input = operation . getInput ( ) ; if ( input != null ) { marshaller . setLocationName ( input . getLocationName ( ) ) ; // Pass the xmlNamespace trait from the input reference XmlNamespace xmlNamespace = input . getXmlNamespace ( ) ; if ( xmlNamespace != null ) { marshaller . setXmlNameSpaceUri ( xmlNamespace . getUri ( ) ) ; } } if ( ! StringUtils . isNullOrEmpty ( service . getTargetPrefix ( ) ) && Metadata . isNotRestProtocol ( service . getProtocol ( ) ) ) { marshaller . setTarget ( service . getTargetPrefix ( ) + "." + operation . getName ( ) ) ; } return marshaller ; }
Create the ShapeMarshaller to the input shape from the specified Operation . The input shape in the operation could be empty .